summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBelen Barros Pena <belen.barros.pena@intel.com>2016-02-11 17:06:27 +0000
committerSujith H <sujith.h@gmail.com>2016-02-12 10:51:20 +0000
commitc12f942541d9fc568d746f98bb2f2aa4ca34ddd2 (patch)
tree748c7f5a1249a457ed9355592c5886cac91fd4b6
parentf707ae74751f50ce2077c3bee0cb4149f48138cb (diff)
downloadpoky-contrib-sujith/toaster-build-cancel14.tar.gz
poky-contrib-sujith/toaster-build-cancel14.tar.bz2
poky-contrib-sujith/toaster-build-cancel14.zip
toaster: ui fixes for build cancellationsujith/toaster-build-cancel14
Move 'cancel' button to the rigt of the % of tasks completed for builds in progress. Also, make sure that, once the build starts, we show the 'cancel' button for any builds started from the web UI, and an explanation of why the 'cancel' button is not there for builds started from the command line. [YOCTO #6787] Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Sujith H <sujith.h@gmail.com>
-rw-r--r--bitbake/lib/toaster/toastergui/templates/mrb_section.html21
1 files changed, 12 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index bcab824d545..b31b57f7638 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -124,22 +124,24 @@
<div id="build-pc-done-bar-{{build.pk}}" style="width: {{build.completeper}}%;" class="bar"></div>
</div>
</div>
- <div class="lead pull-right"><span id="build-pc-done-{{build.pk}}">{{build.completeper}}</span>% of tasks complete</div>
- {%if not build.project.name == "Command line builds" %}
+
+ <div class="lead pull-right" id="cancel-build-btn-location"><span id="build-pc-done-{{build.pk}}">{{build.completeper}}</span>% of tasks complete
{%if build.get_tasks.0 %}
- <button id="cancel-build-btn" class="btn btn-info"
+ {%if build.project.is_default %}
+ <i class="icon-question-sign get-help heading-help pull-right" data-placement="left" title="" data-original-title="Builds in this projects cannot be cancelled from Toaster: they can only be cancelled from the command line"></i>
+ {% else %}
+ <button id="cancel-build-btn" class="btn btn-info pull-right"
onclick='cancelBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}},
{{build.project.name|json}},
{% url 'project' build.project.id as purl %}{{purl|json}},
{{build.target_set.all|get_tasks|json}}, {{build.id|json}},
{{build.pk|json}})'>
- Cancel</button>
+ Cancel
+ </button>
+ {%endif%}
{%endif%}
- </div>
- {%else%}
- <i class="icon-question-sign get-help heading-help pull-right" data-placement="left" title="" data-original-title="Builds in this projects cannot be cancelled from Toaster: they can only be cancelled from the command line"></i>
- {%endif%}
- {%endif%}
+ </div>
+ {%endif%}
{% if build.outcome == build.CANCELLED %}
<div class="span6 lead">
<p class="text-center">Build cancelled</p>
@@ -180,6 +182,7 @@ function cancelBuild(url, projectName, projectUrl, buildlist, buildId, buildPk)
$('#' + id).remove();
id = "build-pc-done" + buildPk;
$('#' + id).remove();
+ $('#cancel-build-btn-location').remove();
$('#buildProgress').append('<div class="lead " align="center"> Cancelling the build ...</div>');
libtoaster.cancelABuild(url, buildId, function(){
console.log("reloading page");