Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 29C40E00D3F; Fri, 9 Dec 2016 08:29:55 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.210.169 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wj0-f169.google.com (mail-wj0-f169.google.com [209.85.210.169]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 457DCE00C40 for ; Fri, 9 Dec 2016 08:29:53 -0800 (PST) Received: by mail-wj0-f169.google.com with SMTP id xy5so18904043wjc.0 for ; Fri, 09 Dec 2016 08:29:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=81dRiCJ4GRqTD2afFCubVOe+VBzgShZGGUrJzP2zKOs=; b=Mgs8zb97iMR+Da7IO5ecfuzWQGA5A58SlWB7aDhWPsYRwfcwvpMphrpDOwKyRBoypy eTZijt9bC9850PZ7xIgOWOXwLbjRSzzNquP9pKWPwPoyO2FUN/zWb5kCoaEchLZJtaeO dzuGLL7yp2JyZwAuWzCk5n3u6mPH+2sS4CVFZeCAXP3L58RZvdN9Cq+11le80ANDTnr8 CCLk8ENV83H3zxXNgJbTeTOnCRwArHqNSdF09McDlhfSqr+G4aiass5EbE5yOvBCKqWg Sn41cXp2qza+9g5W5eWCqEqSYwEfebeirJo9DFdQ1EPNmuUjGUveNmINY6bBIPvvsrnS svYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=81dRiCJ4GRqTD2afFCubVOe+VBzgShZGGUrJzP2zKOs=; b=QzJOC1y+e1uyj6hmwTqFMPEON+JaI49q5LnrqTywKUPrQxVDP0GKylSsrz5thg/P35 Y3WHZHHNV1dMU4+XdVuRDmfsbs1hlhKcwWYT34bjCn5b0wFULimK6u+VToJ+mQxSGLD6 5+5rUm2+2jhDgje1Bj/YQWHssJBO702gTRKPSSGf9UdiDTHt1QEgvsdbbZVWC3Htt9Qe UpmMfJHcKRZHVIRG1/RNQJA5LSYfJOeo8/tEQ7eM/XQisVXXN8advth71m/FvQzcfSoK qtwlqkEFWn8LG+uO5GZ/ashkA5uS0OQSWbK10LRFwWyqViY2sWQBO+1cc5eZzHDtgq4X Diyw== X-Gm-Message-State: AKaTC02CuPowLe+QjaARgxNQQABzT2pTZ09sXw0du7SExj7IrTXoorhcuouAuleFpIVZfpF/ X-Received: by 10.194.97.8 with SMTP id dw8mr43722717wjb.84.1481300993000; Fri, 09 Dec 2016 08:29:53 -0800 (PST) Received: from localhost.localdomain ([192.198.151.62]) by smtp.gmail.com with ESMTPSA id x5sm43051348wje.36.2016.12.09.08.29.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Dec 2016 08:29:52 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Fri, 9 Dec 2016 16:29:36 +0000 Message-Id: <1481300985-7356-6-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481300985-7356-1-git-send-email-michael.g.wood@intel.com> References: <1481300985-7356-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 05/14] toaster: importlayer Use new layer add API X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2016 16:29:55 -0000 Switch the importlayer.js to use the new REST API for importing a new layer. Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/static/js/importlayer.js | 7 ++++--- 1 file 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 30dc282..4784c65 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) { 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") { -- 2.7.4