mirror of
https://git.yoctoproject.org/poky
synced 2026-09-29 07:36:20 +02:00
bitbake: toaster: show "Tasks starting..." until the first task completes
To prevent showing a "0% of tasks complete" message for a long time, don't show the progress bar until the first task has finished. While waiting for that first task, show a message about tasks starting instead. [YOCTO #9631] (Bitbake rev: 5529bcd860d2932b967a064ae28690ac5a725342) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
dd99cf957d
commit
82d998d6c6
@@ -628,6 +628,17 @@ class Build(models.Model):
|
|||||||
return self.outcome == Build.IN_PROGRESS and \
|
return self.outcome == Build.IN_PROGRESS and \
|
||||||
self.recipes_parsed < self.recipes_to_parse
|
self.recipes_parsed < self.recipes_to_parse
|
||||||
|
|
||||||
|
def is_starting(self):
|
||||||
|
"""
|
||||||
|
True if the build has no completed tasks yet and is still just starting
|
||||||
|
tasks.
|
||||||
|
|
||||||
|
Note that the mechanism for testing whether a Task is "done" is whether
|
||||||
|
its order field is set, as per the completeper() method.
|
||||||
|
"""
|
||||||
|
return self.outcome == Build.IN_PROGRESS and \
|
||||||
|
self.task_build.filter(order__isnull=False).count() == 0
|
||||||
|
|
||||||
def get_state(self):
|
def get_state(self):
|
||||||
"""
|
"""
|
||||||
Get the state of the build; one of 'Succeeded', 'Failed', 'In Progress',
|
Get the state of the build; one of 'Succeeded', 'Failed', 'In Progress',
|
||||||
@@ -643,6 +654,8 @@ class Build(models.Model):
|
|||||||
return 'Queued'
|
return 'Queued'
|
||||||
elif self.is_parsing():
|
elif self.is_parsing():
|
||||||
return 'Parsing'
|
return 'Parsing'
|
||||||
|
elif self.is_starting():
|
||||||
|
return 'Starting'
|
||||||
else:
|
else:
|
||||||
return self.get_outcome_text()
|
return self.get_outcome_text()
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,8 @@
|
|||||||
<%include tmpl='#succeeded-or-failed-build-template'/%>
|
<%include tmpl='#succeeded-or-failed-build-template'/%>
|
||||||
<%else state == 'Cancelling'%>
|
<%else state == 'Cancelling'%>
|
||||||
<%include tmpl='#cancelling-build-template'/%>
|
<%include tmpl='#cancelling-build-template'/%>
|
||||||
|
<%else state == 'Starting'%>
|
||||||
|
<%include tmpl='#starting-template'/%>
|
||||||
<%else state == 'In Progress'%>
|
<%else state == 'In Progress'%>
|
||||||
<%include tmpl='#in-progress-build-template'/%>
|
<%include tmpl='#in-progress-build-template'/%>
|
||||||
<%else state == 'Cancelled'%>
|
<%else state == 'Cancelled'%>
|
||||||
@@ -81,8 +83,9 @@
|
|||||||
<!-- queued build -->
|
<!-- queued build -->
|
||||||
<script id="queued-build-template" type="text/x-jsrender">
|
<script id="queued-build-template" type="text/x-jsrender">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<span class="glyphicon glyphicon-question-sign get-help get-help-blue" title="This build is waiting for
|
<span class="glyphicon glyphicon-question-sign get-help get-help-blue"
|
||||||
the build directory to become available"></span>
|
title="This build is waiting for the build directory to become available">
|
||||||
|
</span>
|
||||||
|
|
||||||
Build queued
|
Build queued
|
||||||
</div>
|
</div>
|
||||||
@@ -108,7 +111,8 @@ the build directory to become available"></span>
|
|||||||
|
|
||||||
<div class="col-md-4 progress-info">
|
<div class="col-md-4 progress-info">
|
||||||
<!-- parse completion percentage -->
|
<!-- parse completion percentage -->
|
||||||
<span class="glyphicon glyphicon-question-sign get-help get-help-blue" title="BitBake is parsing the layers required for your build"></span>
|
<span class="glyphicon glyphicon-question-sign get-help get-help-blue" title="BitBake is parsing the layers required for your build">
|
||||||
|
</span>
|
||||||
|
|
||||||
Parsing <span id="recipes-parsed-percentage-<%:id%>"><%:recipes_parsed_percentage%></span>% complete
|
Parsing <span id="recipes-parsed-percentage-<%:id%>"><%:recipes_parsed_percentage%></span>% complete
|
||||||
|
|
||||||
@@ -116,7 +120,23 @@ the build directory to become available"></span>
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- in progress build -->
|
<!-- in progress build; tasks still starting -->
|
||||||
|
<script id="starting-template" type="text/x-jsrender">
|
||||||
|
<div class="col-md-5">
|
||||||
|
<span class="glyphicon glyphicon-question-sign get-help get-help-blue"
|
||||||
|
title="This build is waiting for tasks to start">
|
||||||
|
</span>
|
||||||
|
|
||||||
|
Tasks starting...
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<!-- cancel button -->
|
||||||
|
<%include tmpl='#cancel-template'/%>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- in progress build; at least one task finished -->
|
||||||
<script id="in-progress-build-template" type="text/x-jsrender">
|
<script id="in-progress-build-template" type="text/x-jsrender">
|
||||||
<!-- progress bar and task completion percentage -->
|
<!-- progress bar and task completion percentage -->
|
||||||
<div data-role="build-status" class="col-md-4 col-md-offset-1 progress-info">
|
<div data-role="build-status" class="col-md-4 col-md-offset-1 progress-info">
|
||||||
|
|||||||
Reference in New Issue
Block a user