aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/layerdetails.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerdetails.js23
1 files changed, 10 insertions, 13 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index bac60c4512..3b6423f7f4 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -9,7 +9,7 @@ function layerDetailsPageInit (ctx) {
var addRmLayerBtn = $("#add-remove-layer-btn");
/* setup the dependencies typeahead */
- libtoaster.makeTypeahead(layerDepInput, ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: ctx.projectId, include_added: "true" }, function(item){
+ libtoaster.makeTypeahead(layerDepInput, { type : "layers", project_id: libtoaster.ctx.projectId, include_added: "true" }, function(item){
currentLayerDepSelection = item;
layerDepBtn.removeAttr("disabled");
@@ -125,15 +125,14 @@ function layerDetailsPageInit (ctx) {
$(".build-target-btn").click(function(){
/* fire a build */
var target = $(this).data('target-name');
- libtoaster.startABuild(ctx.projectBuildUrl, ctx.projectId, target, null, null);
- window.location.replace(ctx.projectPageUrl);
+ libtoaster.startABuild(ctx.projectBuildUrl, libtoaster.ctx.projectId, target, null, null);
+ window.location.replace(libtoaster.ctx.projectPageUrl);
});
$(".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);
});
@@ -256,8 +255,8 @@ function layerDetailsPageInit (ctx) {
}
alertMsg.children("#layer-affected-name").text(ctx.layerVersion.name);
- alertMsg.children("#project-affected-name").text(ctx.projectName);
- alertMsg.children("#project-affected-name").attr("href", ctx.projectPageUrl);
+ alertMsg.children("#project-affected-name").text(libtoaster.ctx.projectName);
+ alertMsg.children("#project-affected-name").attr("href", libtoaster.ctx.projectPageUrl);
$("#alert-area").show();
}
@@ -269,12 +268,11 @@ function layerDetailsPageInit (ctx) {
if (directive == 'add') {
/* If adding get the deps for this layer */
- libtoaster.getLayerDepsForProject(ctx.xhrDataTypeaheadUrl, ctx.projectId, ctx.layerVersion.id, function (data) {
+ libtoaster.getLayerDepsForProject(libtoaster.ctx.projectId, ctx.layerVersion.id, function (data) {
/* got result for dependencies */
if (data.list.length == 0){
var editData = { layerAdd : ctx.layerVersion.id };
- libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, editData,
- function() {
+ libtoaster.editCurrentProject(editData, function() {
setLayerInCurrentPrj(true);
});
return;
@@ -291,8 +289,7 @@ function layerDetailsPageInit (ctx) {
} else if (directive == 'remove') {
var editData = { layerDel : ctx.layerVersion.id };
- libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, editData,
- function () {
+ libtoaster.editCurrentProject(editData, function () {
/* Success removed layer */
//window.location.reload();
setLayerInCurrentPrj(false);