Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id F1A64E00CA6; Tue, 6 Oct 2015 04:21:33 -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.24 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C7FE0E0049B for ; Tue, 6 Oct 2015 04:21:32 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 06 Oct 2015 04:21:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,643,1437462000"; d="scan'208";a="820419304" Received: from blynch-mobl1.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.3.31]) by orsmga002.jf.intel.com with ESMTP; 06 Oct 2015 04:21:31 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Tue, 6 Oct 2015 12:21:12 +0100 Message-Id: <1444130481-25705-4-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1444130481-25705-1-git-send-email-elliot.smith@intel.com> References: <1444130481-25705-1-git-send-email-elliot.smith@intel.com> Subject: [review-request][PATCH 2/2] toaster: Hide "Download build log" button if log doesn't exist 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: Tue, 06 Oct 2015 11:21:34 -0000 Our builds pages show all builds, but also include build requests which may have resulted in a build failure, before the build started (e.g. at the recipe parsing stage). In such cases, the BuildStarted event is not captured by Toaster, so we have no idea where the log file for the failed build is. The result is that a build is shown by the Toaster UI /builds/ pages, but it is really a pretend build which never went beyond being a build request, and which has no associated log file. In turn, this breaks the "Download build log" button on the build dashboard, as there's no log file associated with the build. Fix this by hiding the "Download build log" button for builds which don't have a cooker_log_path. [YOCTO #8373] Signed-off-by: Elliot Smith --- bitbake/lib/toaster/toastergui/templates/builddashboard.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html index bab8e38..aa99134 100644 --- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html +++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html @@ -37,7 +37,9 @@ {{build.warnings.count}} warning{{build.warnings.count|pluralize}} {% endif %} Build time: {{ build.timespent_seconds|sectohms }} - Download build log + {% if build.cooker_log_path %} + Download build log + {% endif %} {%endif%} -- Elliot Smith Software Engineer Intel OTC --------------------------------------------------------------------- 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.