From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id C74B7E00BB9; Mon, 21 Mar 2016 12:54:41 -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.88 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2311FE00BB9 for ; Mon, 21 Mar 2016 12:54:39 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 21 Mar 2016 12:54:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,373,1455004800"; d="scan'208";a="942053886" Received: from jsanz-mobl2.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.5.136]) by fmsmga002.fm.intel.com with ESMTP; 21 Mar 2016 12:54:12 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Mon, 21 Mar 2016 19:53:53 +0000 Message-Id: <1458590033-4724-3-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1458590033-4724-1-git-send-email-elliot.smith@intel.com> References: <1458590033-4724-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: Mon, 21 Mar 2016 19:54:41 -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 %}