From 2f52ef4b2f22dc266bbf61bebddbcf8bc65e72c8 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 14 Oct 2015 14:10:10 +0300 Subject: bitbake: toaster: importlayer Update property names for importlayer api calls Update the property names used in checking for existing layers. The server side API changed but not all references were updated. [YOCTO #8300] (Bitbake rev: 1cbf0cf77a638257e18066f911fe4c4e13c278c6) Signed-off-by: Michael Wood Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/importlayer.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js index 2fadbc0978..c68f3669f6 100644 --- a/bitbake/lib/toaster/toastergui/static/js/importlayer.js +++ b/bitbake/lib/toaster/toastergui/static/js/importlayer.js @@ -195,8 +195,8 @@ function importLayerPageInit (ctx) { var dupLayerInfo = $("#duplicate-layer-info"); dupLayerInfo.find(".dup-layer-name").text(layer.name); dupLayerInfo.find(".dup-layer-link").attr("href", layer.layerdetailurl); - dupLayerInfo.find("#dup-layer-vcs-url").text(layer.layer__vcs_url); - dupLayerInfo.find("#dup-layer-revision").text(layer.revision.commit); + dupLayerInfo.find("#dup-layer-vcs-url").text(layer.vcs_url); + dupLayerInfo.find("#dup-layer-revision").text(layer.vcs_reference); $(".fields-apart-from-layer-name").fadeOut(function(){ @@ -214,11 +214,10 @@ function importLayerPageInit (ctx) { $.getJSON(libtoaster.ctx.layersTypeAheadUrl, { include_added: "true" , search: name, format: "json" }, function(layer) { - if (layer.rows.length > 0) { - for (var i in layer.rows){ - if (layer.rows[i].name == name) { - console.log(layer.rows[i]) - layerExistsError(layer.rows[i]); + if (layer.results.length > 0) { + for (var i in layer.results){ + if (layer.results[i].name == name) { + layerExistsError(layer.results[i]); } } } -- cgit v1.2.3-54-g00ecf