Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 63C0BE00E3D; Mon, 28 Sep 2015 11:13:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.46 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 3850CE00A28 for ; Mon, 28 Sep 2015 11:13:20 -0700 (PDT) Received: by pacex6 with SMTP id ex6so180899048pac.0 for ; Mon, 28 Sep 2015 11:13:20 -0700 (PDT) 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; bh=jEYvtwbf77jQxu2YpvPtLsQE5qtx67PoujrJB1MRF28=; b=GU1K7gXu4exDMiaaVcLV6pVuO6J47hVyyspG72J4///S9cTLjLSkYeiirB25Ch7t/u BD901LINYwys5NEgTwIfm8oGGkwwXuLT7GuMLbEtLh1cQ8v5FgU6HYeQlrbgyJuhq7nE 0Ob26Za/SwoX4P4KQrbwmqBAPZ/JG65UphZhmxqfZWvZTGbtOO0eJiL+0T/WOlwVfmgf m7fO9RETRTaSgtbwwhWtMfOnktRKumKVHkcO8PhoL8UdNcNy17wcnMfOMSfIzvDaMMbB yXMxJ/AHIp567LYlHln72voLKrg2fSrftZoV35PkTTj5WQp1LqqAtZ85IC3QxLt2VjVY rlrA== X-Gm-Message-State: ALoCoQnQxBLaZPhZaM3KXzyxiVgU3UWS7IU25lZEaHoQlNOuCh44SLR9xw8JnmITvSfIOCCmtPfw X-Received: by 10.66.191.232 with SMTP id hb8mr27858726pac.22.1443464000379; Mon, 28 Sep 2015 11:13:20 -0700 (PDT) Received: from draco.ger.corp.intel.com (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id li11sm20860849pab.43.2015.09.28.11.13.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Sep 2015 11:13:19 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Mon, 28 Sep 2015 19:13:00 +0100 Message-Id: <1443463980-9832-1-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 Subject: [PATCH] toaster: importlayer Update property names for importlayer api calls 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: Mon, 28 Sep 2015 18:13:23 -0000 Update the property names used in checking for existing layers. The server side API changed but not all references were updated. [YOCTO #8300] Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/static/js/importlayer.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js index 2fadbc0..c68f366 100644 --- a/bitbake/lib/toaster/toastergui/static/js/importlayer.js +++ b/bitbake/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.layer__vcs_url); - dupLayerInfo.find("#dup-layer-revision").text(layer.revision.commit); + dupLayerInfo.find("#dup-layer-vcs-url").text(layer.vcs_url); + dupLayerInfo.find("#dup-layer-revision").text(layer.vcs_reference); $(".fields-apart-from-layer-name").fadeOut(function(){ @@ -214,11 +214,10 @@ function importLayerPageInit (ctx) { $.getJSON(libtoaster.ctx.layersTypeAheadUrl, { include_added: "true" , search: name, format: "json" }, function(layer) { - 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]); + if (layer.results.length > 0) { + for (var i in layer.results){ + if (layer.results[i].name == name) { + layerExistsError(layer.results[i]); } } } -- 2.1.4