diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-17 17:30:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-26 09:27:32 +0100 |
commit | 70c4eb8d3acaad267ee943ebfba793f9cc1c5ee6 (patch) | |
tree | 416f9dcf9c16014e1fc2b975a1de01b286847e25 /bitbake/lib/toaster/toastergui/templates/mrb_section.html | |
parent | 287b49a35b3f06b302ee199ed4b2d123f1aae58c (diff) | |
download | poky-70c4eb8d3acaad267ee943ebfba793f9cc1c5ee6.tar.gz |
bitbake: toaster: refactor build model
We remove the "timespent", "errors_no" and "warnings_no" fields
in favor of computing the needed values at runtime. This prevents
inconsistencies in the UI.
Also removeing all references to BuildRequests from the interface -
all build details now display in the build dashboard.
Minor fixes related to data logging.
(Bitbake rev: 44f37394ed3e4ca02f940be172fe4395b0ee0f7d)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/mrb_section.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/mrb_section.html | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 7e84e4134d..d37b694f3d 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
@@ -43,19 +43,35 @@ | |||
43 | </div> | 43 | </div> |
44 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 44 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} |
45 | <div class="span2 lead"> | 45 | <div class="span2 lead"> |
46 | {% if build.errors_no %} | 46 | {% if build.errors.count %} |
47 | <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a> | 47 | <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors.count}} error{{build.errors.count|pluralize}}</a> |
48 | {% endif %} | 48 | {% endif %} |
49 | </div> | 49 | </div> |
50 | <div class="span2 lead"> | 50 | <div class="span2 lead"> |
51 | {% if build.warnings_no %} | 51 | {% if build.warnings.count %} |
52 | <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a> | 52 | <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings.count}} warning{{build.warnings.count|pluralize}}</a> |
53 | {% endif %} | 53 | {% endif %} |
54 | </div> | 54 | </div> |
55 | <div class="lead "> | 55 | <div class="lead "> |
56 | <span class="lead{%if not MANAGED or not build.project%} pull-right{%endif%}"> | 56 | <span class="lead"> |
57 | Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a> | 57 | Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a> |
58 | </span> | 58 | </span> |
59 | <button class="btn | ||
60 | {% if build.outcome == build.SUCCEEDED %} | ||
61 | btn-success | ||
62 | {% elif build.outcome == build.FAILED %} | ||
63 | btn-danger | ||
64 | {% else %} | ||
65 | btn-info | ||
66 | {%endif%} | ||
67 | pull-right" | ||
68 | onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}}, | ||
69 | {{build.project.name|json}}, | ||
70 | {% url 'project' build.project.id as bpurl %}{{bpurl|json}}, | ||
71 | {{build.target_set.all|get_tasks|json}})'> | ||
72 | |||
73 | Run again | ||
74 | </button> | ||
59 | </div> | 75 | </div> |
60 | {%endif%} | 76 | {%endif%} |
61 | {%if build.outcome == build.IN_PROGRESS %} | 77 | {%if build.outcome == build.IN_PROGRESS %} |
@@ -77,6 +93,7 @@ | |||
77 | function scheduleBuild(url, projectName, projectUrl, buildlist) { | 93 | function scheduleBuild(url, projectName, projectUrl, buildlist) { |
78 | console.log("scheduleBuild"); | 94 | console.log("scheduleBuild"); |
79 | libtoaster.startABuild(url, null, buildlist.join(" "), function(){ | 95 | libtoaster.startABuild(url, null, buildlist.join(" "), function(){ |
96 | console.log("reloading page"); | ||
80 | window.location.reload(); | 97 | window.location.reload(); |
81 | }, null); | 98 | }, null); |
82 | } | 99 | } |