From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id D1CB7E00A26; Thu, 6 Aug 2015 08:44:34 -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.212.178 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id BAB05E009FD for ; Thu, 6 Aug 2015 08:44:33 -0700 (PDT) Received: by wijp15 with SMTP id p15so27838059wij.0 for ; Thu, 06 Aug 2015 08:44:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=24k3WN0UxMw+w0W6gxGKtZIx5QDTXSyMxIOcVr/5Bz4=; b=GVn20rvqxGFeqhJna5coBKXdkBMzF4dbRcG2u2kIB+VSdZ4Ve5cqdayENSqfXk4cny fUTJvKXj552Ut5PRvrYU6piIRcsSjEPocSdeQRo+D9OcyUc2AJOU5phf3vT82vh8Duat wWeX1Uzcmoy21pvHtGgWYDuYKx73tNuCxJXlJgGkRF471/r3hdBuVZQEyew3rVySL8Uw qEUNaYpvmmKzBZeJtOQGJJCSS0ctZJa25nc6xohEb4MmT7yAv08uXqAdxCSXizySBkNg +R5e69RF9HTRoiFMWsv40l4hLjY4ZwNyT5xhJsihnIzZ/nBeoxwIQDUK+ikh6qwiEWzf V57A== X-Gm-Message-State: ALoCoQkarVdTYRaWTutaGTMgyWGn6l6VhBL8PILfUSUi0dH4tnlm9gTv4z2E0SCecWq7ddn9tDrM X-Received: by 10.181.13.195 with SMTP id fa3mr7548438wid.7.1438875872376; Thu, 06 Aug 2015 08:44:32 -0700 (PDT) Received: from [192.168.2.18] ([83.217.123.106]) by smtp.googlemail.com with ESMTPSA id z9sm3927169wiv.9.2015.08.06.08.44.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Aug 2015 08:44:31 -0700 (PDT) Message-ID: <55C380DF.3010508@intel.com> Date: Thu, 06 Aug 2015 16:44:31 +0100 From: Michael Wood User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: "Barros Pena, Belen" , "toaster@yoctoproject.org" 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: 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:44:34 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Also available as a branch at michaelw/toaster/layerdetails-btns-fix http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=michaelw/toaster/layerdetails-btns-fix On 06/08/15 15:57, Barros Pena, Belen wrote: > > On 06/08/2015 15:16, "toaster-bounces@yoctoproject.org on behalf of > Michael Wood" michael.g.wood@intel.com> 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én > >> 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) { >> }); >> }); >> >> + $(".build-recipe-btn").unbind('click'); >> + $(".build-recipe-btn").click(function(e){ >> + e.preventDefault(); >> + var recipe = $(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 */ >> >> 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 = $(this).data('target-name'); >> - libtoaster.startABuild(ctx.projectBuildsUrl, >> libtoaster.ctx.projectId, target, null, null); >> - window.location.replace(libtoaster.ctx.projectPageUrl); >> - }); >> }); >> >> $("#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="get_description_or_summary") >> >> >> - build_recipe_template ='' >> + build_recipe_template ='' >> >> self.add_column(title="Build recipe", >> static_data_name="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="btn btn-block layer-exists-{{data.layer_version.pk}}" >> style="display:none; margin-top: 5px;" > >> + >>