diff options
| author | Belen Barros Pena <belen.barros.pena@intel.com> | 2015-02-24 17:20:55 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-24 23:35:44 +0000 |
| commit | 03c1e479c987de6f53d0eb644892175b1de5a8e3 (patch) | |
| tree | 0919a486f9cada69ece8097976ac36838c795620 /bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html | |
| parent | 1ea940f920371939527353061664b927243a7233 (diff) | |
| download | poky-03c1e479c987de6f53d0eb644892175b1de5a8e3.tar.gz | |
bitbake: toasterui: improving the latest builds consistency
We have 2 pages where we have a 'latest builds' section:
the 'all builds / all projects' page and the 'project'
page. Unfortunately, we are currently using different
code base in both, which means that some inconsistencies
between the two in behaviour and presentation have sneaked
in.
This patch addresses some of such inconsistencies.
(Bitbake rev: 0825f1a74b3767aad67674ab5044075c90067377)
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
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/managed_mrb_section.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html index b8d087ab6c..08bb05d97b 100644 --- a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html | |||
| @@ -15,7 +15,9 @@ | |||
| 15 | 15 | ||
| 16 | <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} {% if MANAGED and build.project %}project-name{% endif %} "> | 16 | <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} {% if MANAGED and build.project %}project-name{% endif %} "> |
| 17 | {% if MANAGED and build.project %} | 17 | {% if MANAGED and build.project %} |
| 18 | <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-danger{%else%}label-info{%endif%}"> {{build.project.name}} </span> | 18 | <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}"> |
| 19 | <a href="{% url 'project' build.project.id %}"> {{build.project.name}} </a> | ||
| 20 | </span> | ||
| 19 | {% endif %} | 21 | {% endif %} |
| 20 | 22 | ||
| 21 | <div class="row-fluid"> | 23 | <div class="row-fluid"> |
| @@ -29,6 +31,7 @@ | |||
| 29 | </a> | 31 | </a> |
| 30 | {% endif %} | 32 | {% endif %} |
| 31 | </div> | 33 | </div> |
| 34 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | ||
| 32 | <div class="span2 lead"> | 35 | <div class="span2 lead"> |
| 33 | {% if build.completed_on|format_build_date %} | 36 | {% if build.completed_on|format_build_date %} |
| 34 | {{ build.completed_on|date:'d/m/y H:i' }} | 37 | {{ build.completed_on|date:'d/m/y H:i' }} |
| @@ -36,7 +39,6 @@ | |||
| 36 | {{ build.completed_on|date:'H:i' }} | 39 | {{ build.completed_on|date:'H:i' }} |
| 37 | {% endif %} | 40 | {% endif %} |
| 38 | </div> | 41 | </div> |
| 39 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | ||
| 40 | <div class="span2 lead"> | 42 | <div class="span2 lead"> |
| 41 | {% if build.errors_no %} | 43 | {% if build.errors_no %} |
| 42 | <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> | 44 | <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> |
| @@ -52,12 +54,13 @@ | |||
| 52 | Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a> | 54 | Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a> |
| 53 | </span> | 55 | </span> |
| 54 | {% if build.project %} | 56 | {% if build.project %} |
| 55 | <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 'xhr_projectbuild' build.project.id as bpi%}{{bpi|json}}, {{build.project.name|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button> | 57 | <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 'xhr_projectbuild' build.project.id as bpi%}{{bpi|json}}, {{build.project.name|json}}, |
| 58 | {% url 'project' buildrequest.project.id as bpurl%}{{bpurl|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button> | ||
| 56 | {% endif %} | 59 | {% endif %} |
| 57 | </div> | 60 | </div> |
| 58 | {%endif%} | 61 | {%endif%} |
| 59 | {%if build.outcome == build.IN_PROGRESS %} | 62 | {%if build.outcome == build.IN_PROGRESS %} |
| 60 | <div class="span4"> | 63 | <div class="span4 offset1"> |
| 61 | <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete"> | 64 | <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete"> |
| 62 | <div style="width: {{build.completeper}}%;" class="bar"></div> | 65 | <div style="width: {{build.completeper}}%;" class="bar"></div> |
| 63 | </div> | 66 | </div> |
| @@ -73,7 +76,9 @@ | |||
| 73 | 76 | ||
| 74 | 77 | ||
| 75 | <div class="alert {% if buildrequest.state == buildrequest.REQ_FAILED %}alert-error{% else %}alert-info{% endif %} project-name"> | 78 | <div class="alert {% if buildrequest.state == buildrequest.REQ_FAILED %}alert-error{% else %}alert-info{% endif %} project-name"> |
| 76 | <span class="label label-danger"> {{buildrequest.project.name}} </span> | 79 | <span class="label {% if buildrequest.state == buildrequest.REQ_FAILED %}label-important{% else%}label-info{% endif %}"> |
| 80 | <a href="{% url 'project' buildrequest.project.id %}"> {{buildrequest.project.name}} </a> | ||
| 81 | </span> | ||
| 77 | <div class="row-fluid"> | 82 | <div class="row-fluid"> |
| 78 | 83 | ||
| 79 | {% if buildrequest.state == buildrequest.REQ_FAILED %} | 84 | {% if buildrequest.state == buildrequest.REQ_FAILED %} |
| @@ -100,7 +105,7 @@ | |||
| 100 | <span class="lead{%if not MANAGED or not buildrequest.project%} pull-right{%endif%}"> | 105 | <span class="lead{%if not MANAGED or not buildrequest.project%} pull-right{%endif%}"> |
| 101 | Build time: {{ buildrequest.get_duration|sectohms }} | 106 | Build time: {{ buildrequest.get_duration|sectohms }} |
| 102 | </span> | 107 | </span> |
| 103 | <button class="btn btn-danger pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' buildrequest.project.id as bpi%}{{bpi|json}}, {{buildrequest.project.name|json}}, {{buildrequest.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button> | 108 | <button class="btn btn-danger pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' buildrequest.project.id as bpi%}{{bpi|json}}, {{buildrequest.project.name|json}}, {% url 'project' buildrequest.project.id as bpurl%}|{{bpurl|json}}, {{buildrequest.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button> |
| 104 | 109 | ||
| 105 | </div> | 110 | </div> |
| 106 | 111 | ||
| @@ -111,7 +116,7 @@ | |||
| 111 | 116 | ||
| 112 | <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span> | 117 | <span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span> |
| 113 | </div> | 118 | </div> |
| 114 | <div class="span4 lead" >Build queued | 119 | <div class="span4 lead">Build queued |
| 115 | <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i> | 120 | <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i> |
| 116 | </div> | 121 | </div> |
| 117 | 122 | ||
| @@ -172,13 +177,13 @@ function _makeXHRBuildCall(url, data, onsuccess, onfail) { | |||
| 172 | } | 177 | } |
| 173 | 178 | ||
| 174 | 179 | ||
| 175 | function scheduleBuild(url, projectName, buildlist) { | 180 | function scheduleBuild(url, projectName, projectUrl, buildlist) { |
| 176 | console.log("scheduleBuild"); | 181 | console.log("scheduleBuild"); |
| 177 | _makeXHRBuildCall(url, {targets: buildlist.join(" ")}, function (_data) { | 182 | _makeXHRBuildCall(url, {targets: buildlist.join(" ")}, function (_data) { |
| 178 | 183 | ||
| 179 | $('#latest-builds').prepend('<div class="alert alert-info" style="padding-top:0px">' + '<span class="label label-info" style="font-weight: normal; margin-bottom: 5px; margin-left:-15px; padding-top:5px;">'+projectName+'</span><div class="row-fluid">' + | 184 | $('#latest-builds').prepend("<div class=\"alert alert-info project-name\"><span class=\"label label-info\"><a href=\""+projectUrl+"\">"+projectName+"</a></span><div class=\"row-fluid\">" + |
| 180 | '<div class="span4 lead">' + buildlist.join(" ") + | 185 | "<div class=\"span5 lead\">" + buildlist.join(" ") + |
| 181 | '</div><div class="span4 lead pull-right">Build queued. Your build will start shortly.</div></div></div>'); | 186 | "</div><div class=\"span4 lead\">Build queued <i title=\"This build will start as soon as a build server is available\" class=\"icon-question-sign get-help get-help-blue heading-help\"></i></div></div></div>"); |
| 182 | }); | 187 | }); |
| 183 | } | 188 | } |
| 184 | 189 | ||
