diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-08 15:22:01 +0100 |
---|---|---|
committer | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-10 15:31:12 +0100 |
commit | 33d2b87aca667d72262a3928deaf35414b46a7c1 (patch) | |
tree | 00e21c61d952f7cc09b736fc10ebaea52bc31a23 /lib/toaster/toastergui/static/js/importlayer.js | |
parent | 8e7a2c3b125a34fd9d6fa0442ab13290137ecc51 (diff) | |
download | bitbake-contrib-33d2b87aca667d72262a3928deaf35414b46a7c1.tar.gz |
toastergui: remove xhr_datatypeahaed layerdeps call
This patch removes the url-constructing calls to get the layer details
in favor of embedding the look-up URL in the JSON data on the
layer list page.
This allows further removal of the XHR-specific code for layer dependencies
in favor of REST calls to layer details data.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/static/js/importlayer.js')
-rw-r--r-- | lib/toaster/toastergui/static/js/importlayer.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/toaster/toastergui/static/js/importlayer.js b/lib/toaster/toastergui/static/js/importlayer.js index e1fc5c518..e9d7ae8ef 100644 --- a/lib/toaster/toastergui/static/js/importlayer.js +++ b/lib/toaster/toastergui/static/js/importlayer.js @@ -48,7 +48,7 @@ function importLayerPageInit (ctx) { newLayerDep.children("span").tooltip(); var link = newLayerDep.children("a"); - link.attr("href", ctx.layerDetailsUrl+String(currentLayerDepSelection.id)); + link.attr("href", currentLayerDepSelection.layerDetailsUrl); link.text(currentLayerDepSelection.name); link.tooltip({title: currentLayerDepSelection.tooltip, placement: "right"}); @@ -63,11 +63,11 @@ function importLayerPageInit (ctx) { $("#layer-deps-list").append(newLayerDep); - libtoaster.getLayerDepsForProject(libtoaster.ctx.projectId, currentLayerDepSelection.id, function (data){ + libtoaster.getLayerDepsForProject(currentLayerDepSelection.layerDetailsUrl, function (data){ /* These are the dependencies of the layer added as a dependency */ if (data.list.length > 0) { - currentLayerDepSelection.url = ctx.layerDetailsUrl+currentLayerDepSelection.id; - layerDeps[currentLayerDepSelection.id].deps = data.list + currentLayerDepSelection.url = currentLayerDepSelection.layerDetailsUrl; + layerDeps[currentLayerDepSelection.id].deps = data.list; } /* Clear the current selection */ |