summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-07-31 15:09:16 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:26:12 +0100
commitbe2b4239f688e9ab747c48a1fbb2b1233d97689c (patch)
treec692ab1b9082f6ef049ec8acef167c8e16400337
parent1a2f12099c91b81075826a8aa1820d964a3e4478 (diff)
downloadpoky-be2b4239f688e9ab747c48a1fbb2b1233d97689c.tar.gz
bitbake: toastergui: Fix Duplicate layer importlayer api calls
As the JSON response changed the duplicate layer functionality wasn't wasn't working as the field names in the returned data changed. This patch brings the field names back in sync with the response. (Bitbake rev: bdea86ae8720ee5792a5617c6073d51922a224ff) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/importlayer.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js
index 03274c00f3..50bc4ddd7c 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) {
195 var dupLayerInfo = $("#duplicate-layer-info"); 195 var dupLayerInfo = $("#duplicate-layer-info");
196 dupLayerInfo.find(".dup-layer-name").text(layer.name); 196 dupLayerInfo.find(".dup-layer-name").text(layer.name);
197 dupLayerInfo.find(".dup-layer-link").attr("href", layer.layerdetailurl); 197 dupLayerInfo.find(".dup-layer-link").attr("href", layer.layerdetailurl);
198 dupLayerInfo.find("#dup-layer-vcs-url").text(layer.giturl); 198 dupLayerInfo.find("#dup-layer-vcs-url").text(layer.layer__vcs_url);
199 dupLayerInfo.find("#dup-layer-revision").text(layer.revision); 199 dupLayerInfo.find("#dup-layer-revision").text(layer.revision.commit);
200 200
201 $(".fields-apart-from-layer-name").fadeOut(function(){ 201 $(".fields-apart-from-layer-name").fadeOut(function(){
202 202
@@ -214,11 +214,11 @@ function importLayerPageInit (ctx) {
214 $.getJSON(libtoaster.ctx.projectLayersUrl, 214 $.getJSON(libtoaster.ctx.projectLayersUrl,
215 { include_added: "true" , search: name, format: "json" }, 215 { include_added: "true" , search: name, format: "json" },
216 function(layer) { 216 function(layer) {
217 if (layer.list.length > 0) { 217 if (layer.rows.length > 0) {
218 for (var i in layer.list){ 218 for (var i in layer.rows){
219 if (layer.list[i].name == name) { 219 if (layer.rows[i].name == name) {
220 console.log(layer.list[i]) 220 console.log(layer.rows[i])
221 layerExistsError(layer.list[i]); 221 layerExistsError(layer.rows[i]);
222 } 222 }
223 } 223 }
224 } 224 }