summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-12-09 16:52:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-12 20:44:53 +0000
commitf2b0d43c2f010edc47c6a28f23aa862228ec0c27 (patch)
treecd5a0ca743a7e7de288b36757dc4bdc96610794d /bitbake/lib
parent7e80e501fb05021d4f4b6793462c488445cb4d89 (diff)
downloadpoky-f2b0d43c2f010edc47c6a28f23aa862228ec0c27.tar.gz
bitbake: toaster: importlayer Use new layer add API
Switch the importlayer.js to use the new REST API for importing a new layer. (Bitbake rev: 6475fd7e0d2488bf300b75322f2c00297cd1440b) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/importlayer.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js
index 30dc28280e..4784c657f5 100644
--- a/bitbake/lib/toaster/toastergui/static/js/importlayer.js
+++ b/bitbake/lib/toaster/toastergui/static/js/importlayer.js
@@ -158,6 +158,7 @@ function importLayerPageInit (ctx) {
158 project_id: libtoaster.ctx.projectId, 158 project_id: libtoaster.ctx.projectId,
159 layer_deps: layerDepsCsv, 159 layer_deps: layerDepsCsv,
160 local_source_dir: $('#local-dir-path').val(), 160 local_source_dir: $('#local-dir-path').val(),
161 add_to_project: true,
161 }; 162 };
162 163
163 if ($('input[name=repo]:checked').val() == "git") { 164 if ($('input[name=repo]:checked').val() == "git") {
@@ -168,9 +169,9 @@ function importLayerPageInit (ctx) {
168 } 169 }
169 170
170 $.ajax({ 171 $.ajax({
171 type: "POST", 172 type: "PUT",
172 url: ctx.xhrImportLayerUrl, 173 url: ctx.xhrLayerUrl,
173 data: layerData, 174 data: JSON.stringify(layerData),
174 headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, 175 headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
175 success: function (data) { 176 success: function (data) {
176 if (data.error != "ok") { 177 if (data.error != "ok") {