From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 10C18E00874; Fri, 13 May 2016 09:14:10 -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,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -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 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.47 listed in list.dnswl.org] Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id EF291E007F2 for ; Fri, 13 May 2016 09:14:07 -0700 (PDT) Received: by mail-wm0-f47.google.com with SMTP id e201so28710954wme.0 for ; Fri, 13 May 2016 09:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=BWTpYkjnZCL7EbpmF6DF3G7dCdj6v4jGbIDewJV6APA=; b=S5mCLMtBvbNS4b/dZRxB91y0ltgvPnA20UjvN17UDFBb4saRxq9/ji4dd9QVloV+Vu F04LhV3MJBfFxucQJ2TAQ6jr4NfbO8ed6hbCKtw592ZU+fxkSTwO0/l1n5rwCPFH8rWa KhOTd+JqAO1og4O19YjijYZVH4FzG/hPe01ifo8nQlZRKnYOxlAAXgIF+Pqx1LeBD0u9 ek5omCEDpWFlR/GSlyEP35P0fiddjbSr1LEoaK10ox+tao6uK+3NQnA4IRkoIi4eEg29 v69GNYLRPDV0lNth+MUJsjzF3wCj4uAdVJ/XUMCgdWqMDhfpS9DP5cMEi7VzV2czoRH0 +1uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=BWTpYkjnZCL7EbpmF6DF3G7dCdj6v4jGbIDewJV6APA=; b=HaUuqtMMjOeBnKlDCUPHmJIkSZ+AT/Q2+2OQgVXVfXRPUgiQY28H5ec8YPM61s5oKD S8XhcVICu1VSDV2jXwdP5wf82QkLvpEkm8XyTxYcnfbZH1z/8y25z+O1br8asXmQVa/r bGT+Jp26Yjtlx3XfYSTG5vjZu59b8+fhc3oN0ijLMtr1ToBFXNMajANPmPgJ8kOZc4qm 9xebabEqT5+423xyodogMWWMg4/ZcbcHZLbuKWG1NKbonsjG9BPFQzF34Mb+0slNAKOI YeN2N53LEIgAn5Q13ZnDyDSkog52kHDco31oCMHVBPA6Z70ZhEMUGyFoo+BCQb7cIE1Z kY7Q== X-Gm-Message-State: AOPr4FXOHy7q8beA3AJ4hi2GxajN2No/RmDsoGicfFAy7eOCLsLL1oWMMi99OIBbxIEyZ54F X-Received: by 10.28.154.2 with SMTP id c2mr4649795wme.9.1463156046636; Fri, 13 May 2016 09:14:06 -0700 (PDT) Received: from [192.168.0.78] (host31-48-249-108.range31-48.btcentralplus.com. [31.48.249.108]) by smtp.googlemail.com with ESMTPSA id v143sm3972208wmv.4.2016.05.13.09.14.05 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 May 2016 09:14:06 -0700 (PDT) To: toaster@yoctoproject.org References: <1463136047-9409-1-git-send-email-elliot.smith@intel.com> From: Michael Wood Message-ID: <5735FD4D.4040604@intel.com> Date: Fri, 13 May 2016 17:14:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH] toaster: fix progress bar in MySQL environment 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, 13 May 2016 16:14:10 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 13/05/16 11:43, Smith, Elliot wrote: > On 13 May 2016 at 11:40, Elliot Smith > wrote: > > When using MySQL, the project builds info delivered by MySQL > differs from that delivered by SQLite: the former returns text > values from the enumeration for Build outcomes, while the latter > returns the integer value. This causes the progress bar JS to > break, as it is expecting outcome strings. > > > > This patch also applies to krogoth, so it could be back-ported to that > if we wanted to fix krogoth's support for production environments. > Thanks I've pushed it to toaster-next and also sent it upstream to bitbake master and 1.30 > Elliot > > > Modify the recent_build() method to include an outcomeText property > for each Build object, then use this in the conditionals in the > progress bar JS. > > [YOCTO #9498] > > Signed-off-by: Elliot Smith > > --- > bitbake/lib/toaster/orm/models.py | 1 + > bitbake/lib/toaster/toastergui/static/js/mrbsection.js | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/bitbake/lib/toaster/orm/models.py > b/bitbake/lib/toaster/orm/models.py > index 2669606..88967a2 100644 > --- a/bitbake/lib/toaster/orm/models.py > +++ b/bitbake/lib/toaster/orm/models.py > @@ -416,6 +416,7 @@ class Build(models.Model): > # to show build progress in mrb_section.html > for build in recent_builds: > build.percentDone = build.completeper() > + build.outcomeText = build.get_outcome_text() > > return recent_builds > > diff --git > a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js > b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js > index 09117e1..9a76ee6 100644 > --- a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js > +++ b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js > @@ -57,12 +57,12 @@ function mrbSectionInit(ctx){ > for (var i in prjInfo.builds){ > var build = prjInfo.builds[i]; > > - if (build.outcome === "In Progress" || > + if (build.outcomeText === "In Progress" || > $(".progress .bar").length > 0){ > /* Update the build progress */ > var percentDone; > > - if (build.outcome !== "In Progress"){ > + if (build.outcomeText !== "In Progress"){ > /* We have to ignore the value when it's > Succeeded because it > * goes back to 0 > */ > -- > 1.9.3 > > --------------------------------------------------------------------- > Intel Corporation (UK) Limited > Registered No. 1134945 (England) > Registered Office: Pipers Way, Swindon SN3 1RJ > VAT No: 860 2173 47 > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. > > > > > -- > Elliot Smith > Software Engineer > Intel Open Source Technology Centre > >