From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 442FEE00C18; Thu, 17 Mar 2016 04:40:54 -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 * [134.134.136.20 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 20C34E00C02 for ; Thu, 17 Mar 2016 04:40:50 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 17 Mar 2016 04:40:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,349,1455004800"; d="scan'208";a="912922753" Received: from wmalikow-mobl.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.20.136]) by orsmga001.jf.intel.com with ESMTP; 17 Mar 2016 04:40:39 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Thu, 17 Mar 2016 11:40:26 +0000 Message-Id: <1458214826-17485-3-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1458214826-17485-1-git-send-email-elliot.smith@intel.com> References: <1458214826-17485-1-git-send-email-elliot.smith@intel.com> Subject: [PATCH 2/2] toaster: remove links from time field on failed builds 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, 17 Mar 2016 11:40:54 -0000 Failed builds don't have any time data recorded for them, so the time field in the builds table, the time shown in the recent builds area, and the build time shown in the build dashboard should not be links for failed builds. [YOCTO #8443] Signed-off-by: Elliot Smith --- bitbake/lib/toaster/toastergui/tables.py | 8 ++++++-- bitbake/lib/toaster/toastergui/templates/builddashboard.html | 12 ++++++++++-- bitbake/lib/toaster/toastergui/templates/mrb_section.html | 7 ++++++- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index 67a6592..ebe7431 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py @@ -1195,9 +1195,13 @@ class BuildsTable(ToasterTable): time_template = ''' {% load projecttags %} - + {% if data.outcome == extra.Build.SUCCEEDED %} + + {{data.timespent_seconds | sectohms}} + + {% else %} {{data.timespent_seconds | sectohms}} - + {% endif %} ''' image_files_template = ''' diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html index b0c3d99..e38ee6c 100644 --- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html +++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html @@ -41,9 +41,17 @@ {% endif %} {{build.warnings.count}} warning{{build.warnings.count|pluralize}} {% endif %} - Build time: {{ build.timespent_seconds|sectohms }} + + Build time: + + {% if build.started %} + {{ build.timespent_seconds|sectohms }} + {% else %} + {{ build.timespent_seconds|sectohms }} + {% endif %} + {% if build.cooker_log_path %} - Download build log + Download build log {% endif %} diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 551e341..07914d8 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html @@ -85,7 +85,12 @@
- Build time: {{ build.timespent_seconds|sectohms }} + Build time: + {% if build.outcome == build.SUCCEEDED %} + {{ build.timespent_seconds|sectohms }} + {% else %} + {{ build.timespent_seconds|sectohms }} + {% endif %} {% if build.project.is_default %}