aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/machines.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/machines.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/machines.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js b/bitbake/lib/toaster/toastergui/static/js/machines.js
index 973a037be7..fbcafc26b5 100644
--- a/bitbake/lib/toaster/toastergui/static/js/machines.js
+++ b/bitbake/lib/toaster/toastergui/static/js/machines.js
@@ -45,7 +45,7 @@ function machinesPageInit (ctx) {
var layerName = addLayerBtn.data('layer-name');
alertMsg.children("#layer-affected-name").text(layerName);
- alertMsg.children("#project-affected-name").text(ctx.projectName).attr('href', ctx.projectPageUrl);
+ alertMsg.children("#project-affected-name").text(libtoaster.ctx.projectName).attr('href', libtoaster.ctx.projectPageUrl);
$("#alert-area").show();
}
@@ -61,12 +61,11 @@ function machinesPageInit (ctx) {
name : $(this).data('layer-name'),
};
- libtoaster.getLayerDepsForProject(ctx.xhrDataTypeaheadUrl, ctx.projectId, layer.id, function (data) {
+ libtoaster.getLayerDepsForProject(libtoaster.ctx.projectId, layer.id, function (data) {
/* got result for dependencies */
if (data.list.length == 0){
var editData = { layerAdd : layer.id };
- libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, editData,
- function() {
+ libtoaster.editCurrentProject(editData, function() {
setLayerInCurrentPrj(btn);
});
return;
@@ -84,9 +83,8 @@ function machinesPageInit (ctx) {
$(".select-machine-btn").click(function(){
var data = { machineName : $(this).data('machine-name') };
- libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
- function (){
- window.location.replace(ctx.projectPageUrl+"#/machineselected");
+ libtoaster.editCurrentProject(data, function (){
+ window.location.replace(libtoaster.ctx.projectPageUrl+"#/machineselected");
}, null);
});