diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-17 17:30:34 +0100 |
---|---|---|
committer | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-25 11:10:06 +0100 |
commit | 44f37394ed3e4ca02f940be172fe4395b0ee0f7d (patch) | |
tree | c3ae8d70c53939c9fdeea9c2586f20bc2c877db5 /lib/toaster/toastergui/templates/mrb_section.html | |
parent | 4b92add34167304b45c66b9726cbc64bc0f74d9f (diff) | |
download | bitbake-44f37394ed3e4ca02f940be172fe4395b0ee0f7d.tar.gz |
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.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/templates/mrb_section.html')
-rw-r--r-- | lib/toaster/toastergui/templates/mrb_section.html | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/lib/toaster/toastergui/templates/mrb_section.html b/lib/toaster/toastergui/templates/mrb_section.html index 7e84e4134..d37b694f3 100644 --- a/lib/toaster/toastergui/templates/mrb_section.html +++ b/lib/toaster/toastergui/templates/mrb_section.html @@ -43,19 +43,35 @@ </div> {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} <div class="span2 lead"> - {% if build.errors_no %} - <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> + {% if build.errors.count %} + <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> {% endif %} </div> <div class="span2 lead"> - {% if build.warnings_no %} - <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> + {% if build.warnings.count %} + <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> {% endif %} </div> <div class="lead "> - <span class="lead{%if not MANAGED or not build.project%} pull-right{%endif%}"> - Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a> + <span class="lead"> + Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a> </span> + <button class="btn + {% if build.outcome == build.SUCCEEDED %} + btn-success + {% elif build.outcome == build.FAILED %} + btn-danger + {% else %} + btn-info + {%endif%} + pull-right" + onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}}, + {{build.project.name|json}}, + {% url 'project' build.project.id as bpurl %}{{bpurl|json}}, + {{build.target_set.all|get_tasks|json}})'> + + Run again + </button> </div> {%endif%} {%if build.outcome == build.IN_PROGRESS %} @@ -77,6 +93,7 @@ function scheduleBuild(url, projectName, projectUrl, buildlist) { console.log("scheduleBuild"); libtoaster.startABuild(url, null, buildlist.join(" "), function(){ + console.log("reloading page"); window.location.reload(); }, null); } |