Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 09E53E00A01; Thu, 6 Aug 2015 08:00:49 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.115 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 5E177E009B8 for ; Thu, 6 Aug 2015 08:00:45 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 06 Aug 2015 08:00:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,622,1432623600"; d="scan'208";a="620539743" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga003.jf.intel.com with ESMTP; 06 Aug 2015 08:00:42 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX152.ger.corp.intel.com (163.33.192.66) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 6 Aug 2015 15:57:25 +0100 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.29]) by irsmsx111.ger.corp.intel.com ([169.254.2.31]) with mapi id 14.03.0224.002; Thu, 6 Aug 2015 15:57:25 +0100 From: "Barros Pena, Belen" To: "Wood, Michael G" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [review-request][PATCH 4/4] bitbake: toastergui: layerBtn Fix build trigger mechanism Thread-Index: AQHQ0Fg0LmFCo7FZH0+nKJ1kdpKZrw== Date: Thu, 6 Aug 2015 14:57:24 +0000 Message-ID: References: <1438870586-17099-1-git-send-email-michael.g.wood@intel.com> <1438870586-17099-4-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1438870586-17099-4-git-send-email-michael.g.wood@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.3.150624 x-originating-ip: [10.237.224.30] MIME-Version: 1.0 Subject: Re: [review-request][PATCH 4/4] bitbake: toastergui: layerBtn Fix build trigger mechanism 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: Thu, 06 Aug 2015 15:00:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable On 06/08/2015 15:16, "toaster-bounces@yoctoproject.org on behalf of Michael Wood" wrote: >The new project page is no longer responsible for triggering the build so >add a handler for this in layerBtn which is used in the layerdetails and >layers pages. This also removes the conflicting and redundant handler >for this in the layerdetails. The whole series looks good to me. Thanks! Bel=E9n > >Signed-off-by: Michael Wood >--- > bitbake/lib/toaster/toastergui/static/js/layerBtn.js | 13 >+++++++++++++ > bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 8 -------- > bitbake/lib/toaster/toastergui/tables.py | 2 +- > bitbake/lib/toaster/toastergui/templates/recipe_btn.html | 4 ++-- > 4 files changed, 16 insertions(+), 11 deletions(-) > >diff --git a/bitbake/lib/toaster/toastergui/static/js/layerBtn.js >b/bitbake/lib/toaster/toastergui/static/js/layerBtn.js >index 4243c2b..a0509f9 100644 >--- a/bitbake/lib/toaster/toastergui/static/js/layerBtn.js >+++ b/bitbake/lib/toaster/toastergui/static/js/layerBtn.js >@@ -55,6 +55,19 @@ function layerBtnsInit(ctx) { > }); > }); >=20 >+ $(".build-recipe-btn").unbind('click'); >+ $(".build-recipe-btn").click(function(e){ >+ e.preventDefault(); >+ var recipe =3D $(this).data('recipe-name'); >+ >+ libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl, >+ libtoaster.ctx.projectId, recipe, >+ function(){ >+ /* Success */ >+ window.location.replace(libtoaster.ctx.projectBuildsUrl); >+ }); >+ }); >+ > /* Setup the initial state of the buttons */ >=20 > for (var i in ctx.projectLayers){ >diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js >b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js >index d12d3ae..3f5d7a9 100644 >--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js >+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js >@@ -179,14 +179,6 @@ function layerDetailsPageInit (ctx) { > /* re run the machinesTabShow to update the text */ > targetsTabShow(); > } >- >- $(".build-target-btn").unbind('click'); >- $(".build-target-btn").click(function(){ >- /* fire a build */ >- var target =3D $(this).data('target-name'); >- libtoaster.startABuild(ctx.projectBuildsUrl, >libtoaster.ctx.projectId, target, null, null); >- window.location.replace(libtoaster.ctx.projectPageUrl); >- }); > }); >=20 > $("#machinestable").on('table-done', function(e, total, tableParams){ >diff --git a/bitbake/lib/toaster/toastergui/tables.py >b/bitbake/lib/toaster/toastergui/tables.py >index 51fe4b6..810e101 100644 >--- a/bitbake/lib/toaster/toastergui/tables.py >+++ b/bitbake/lib/toaster/toastergui/tables.py >@@ -465,7 +465,7 @@ class LayerRecipesTable(RecipesTable): > field_name=3D"get_description_or_summary") >=20 >=20 >- build_recipe_template =3D'' >+ build_recipe_template =3D'' >=20 > self.add_column(title=3D"Build recipe", > static_data_name=3D"add-del-layers", >diff --git a/bitbake/lib/toaster/toastergui/templates/recipe_btn.html >b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html >index d9ec3fa..77c1b23 100644 >--- a/bitbake/lib/toaster/toastergui/templates/recipe_btn.html >+++ b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html >@@ -1,6 +1,6 @@ >-class=3D"btn btn-block layer-exists-{{data.layer_version.pk}}" >style=3D"display:none; margin-top: 5px;" > >+ >