[bitbake-devel] [PATCH 15/22] bitbake: toastergui: Fix Duplicate layer importlayer api calls

Ed Bartosh ed.bartosh at linux.intel.com
Fri Jul 31 12:09:16 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

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.

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 lib/toaster/toastergui/static/js/importlayer.js | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/toaster/toastergui/static/js/importlayer.js b/lib/toaster/toastergui/static/js/importlayer.js
index 03274c0..50bc4dd 100644
--- a/lib/toaster/toastergui/static/js/importlayer.js
+++ b/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.giturl);
-    dupLayerInfo.find("#dup-layer-revision").text(layer.revision);
+    dupLayerInfo.find("#dup-layer-vcs-url").text(layer.layer__vcs_url);
+    dupLayerInfo.find("#dup-layer-revision").text(layer.revision.commit);
 
     $(".fields-apart-from-layer-name").fadeOut(function(){
 
@@ -214,11 +214,11 @@ function importLayerPageInit (ctx) {
       $.getJSON(libtoaster.ctx.projectLayersUrl,
         { include_added: "true" , search: name, format: "json" },
         function(layer) {
-          if (layer.list.length > 0) {
-            for (var i in layer.list){
-              if (layer.list[i].name == name) {
-                console.log(layer.list[i])
-                layerExistsError(layer.list[i]);
+          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]);
               }
             }
           }
-- 
2.1.4




More information about the bitbake-devel mailing list