[oe-commits] [bitbake] 05/14: toaster: importlayer Use new layer add API

git at git.openembedded.org git at git.openembedded.org
Mon Dec 12 20:45:59 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

commit 6475fd7e0d2488bf300b75322f2c00297cd1440b
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Fri Dec 9 16:52:46 2016 +0000

    toaster: importlayer Use new layer add API
    
    Switch the importlayer.js to use the new REST API for importing a new layer.
    
    Signed-off-by: Michael Wood <michael.g.wood at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/toastergui/static/js/importlayer.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/toaster/toastergui/static/js/importlayer.js b/lib/toaster/toastergui/static/js/importlayer.js
index 30dc282..4784c65 100644
--- a/lib/toaster/toastergui/static/js/importlayer.js
+++ b/lib/toaster/toastergui/static/js/importlayer.js
@@ -158,6 +158,7 @@ function importLayerPageInit (ctx) {
         project_id: libtoaster.ctx.projectId,
         layer_deps: layerDepsCsv,
         local_source_dir: $('#local-dir-path').val(),
+        add_to_project: true,
       };
 
       if ($('input[name=repo]:checked').val() == "git") {
@@ -168,9 +169,9 @@ function importLayerPageInit (ctx) {
       }
 
       $.ajax({
-          type: "POST",
-          url: ctx.xhrImportLayerUrl,
-          data: layerData,
+          type: "PUT",
+          url: ctx.xhrLayerUrl,
+          data: JSON.stringify(layerData),
           headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
           success: function (data) {
             if (data.error != "ok") {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list