From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 8B895E00BF8; Thu, 17 Mar 2016 04:40:53 -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 0BE4FE00BF8 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="912922723" 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:37 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Thu, 17 Mar 2016 11:40:25 +0000 Message-Id: <1458214826-17485-2-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 1/2] toaster: adjust build dashboard for 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:53 -0000 Remove the side bar and build details modules for failed builds. Modify templates so that the span is moved out of the individual elements and into the container. This makes it simpler to change the width of the main container, depending on whether the build failed or not (which in turn hides or shows the left-hand menu). [YOCTO #8443] Signed-off-by: Elliot Smith --- bitbake/lib/toaster/orm/models.py | 15 ++ .../toastergui/templates/basebuildpage.html | 148 +++++++++--------- .../toastergui/templates/builddashboard.html | 174 +++++++++++---------- bitbake/lib/toaster/toastergui/views.py | 1 + 4 files changed, 177 insertions(+), 161 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 3c98c0b..1d69c24 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -516,6 +516,21 @@ class Build(models.Model): return target_labels + def started(self): + """ + As build variables are only added for a build when its BuildStarted event + is received, a build with no build variables is counted as + "in preparation" and not properly started yet. This method + will return False if a build has no build variables (it never properly + started), or True otherwise. + + Note that this is a temporary workaround for the fact that we don't + have a fine-grained state variable on a build which would allow us + to record "in progress" (BuildStarted received) vs. "in preparation". + """ + variables = Variable.objects.filter(build=self) + return len(variables) > 0 + def get_current_status(self): """ get the status string from the build request if the build diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html index ff9433e..7762210 100644 --- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html +++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html @@ -2,89 +2,81 @@ {% load projecttags %} {% load project_url_tag %} {% load humanize %} -{% block pagecontent %} +{% block pagecontent %} + +
+ + +
-
- -
-