summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/toaster/toastergui
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/toaster/toastergui')
-rw-r--r--poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js3
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/newproject.html4
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/recipe.html2
-rw-r--r--poky/bitbake/lib/toaster/toastergui/widgets.py19
4 files changed, 17 insertions, 11 deletions
diff --git a/poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 9ead393cb..933b65b4c 100644
--- a/poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -359,7 +359,8 @@ function layerDetailsPageInit (ctx) {
if ($(this).is("dt")) {
var dd = $(this).next("dd");
if (!dd.children("form:visible")|| !dd.find(".current-value").html()){
- if (ctx.layerVersion.layer_source == ctx.layerSourceTypes.TYPE_IMPORTED){
+ if (ctx.layerVersion.layer_source == ctx.layerSourceTypes.TYPE_IMPORTED ||
+ ctx.layerVersion.layer_source == ctx.layerSourceTypes.TYPE_LOCAL) {
/* There's no current value and the layer is editable
* so show the "Not set" and hide the delete icon
*/
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/newproject.html b/poky/bitbake/lib/toaster/toastergui/templates/newproject.html
index acb614e9d..bd03bb55d 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/newproject.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/newproject.html
@@ -54,12 +54,12 @@
<span class="help-block">{{release.helptext|safe}}</span>
</div>
{% endfor %}
+ </div>
+ </div>
{% else %}
<input type="hidden" name="projectversion" value="{{releases.0.id}}"/>
{% endif %}
</div>
- </div>
- </fieldset>
{% endif %}
<div class="top-air">
<input type="submit" id="create-project-button" class="btn btn-primary btn-lg" value="Create project"/>
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/recipe.html b/poky/bitbake/lib/toaster/toastergui/templates/recipe.html
index bf2cd7169..3f76e656f 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/recipe.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/recipe.html
@@ -176,7 +176,7 @@
<td>{{task.get_executed_display}}</td>
<td>{{task.get_outcome_display}}
- {% if task.outcome = task.OUTCOME_FAILED %}
+ {% if task.outcome == task.OUTCOME_FAILED %}
<a href="{% url 'build_artifact' build.pk "tasklogfile" task.pk %}">
<span class="glyphicon glyphicon-download-alt
get-help" title="Download task log
diff --git a/poky/bitbake/lib/toaster/toastergui/widgets.py b/poky/bitbake/lib/toaster/toastergui/widgets.py
index a1792d997..feef7c5d9 100644
--- a/poky/bitbake/lib/toaster/toastergui/widgets.py
+++ b/poky/bitbake/lib/toaster/toastergui/widgets.py
@@ -511,13 +511,18 @@ class MostRecentBuildsView(View):
buildrequest_id = build_obj.buildrequest.pk
build['buildrequest_id'] = buildrequest_id
- build['recipes_parsed_percentage'] = \
- int((build_obj.recipes_parsed /
- build_obj.recipes_to_parse) * 100)
-
- build['repos_cloned_percentage'] = \
- int((build_obj.repos_cloned /
- build_obj.repos_to_clone) * 100)
+ if build_obj.recipes_to_parse > 0:
+ build['recipes_parsed_percentage'] = \
+ int((build_obj.recipes_parsed /
+ build_obj.recipes_to_parse) * 100)
+ else:
+ build['recipes_parsed_percentage'] = 0
+ if build_obj.repos_to_clone > 0:
+ build['repos_cloned_percentage'] = \
+ int((build_obj.repos_cloned /
+ build_obj.repos_to_clone) * 100)
+ else:
+ build['repos_cloned_percentage'] = 0
tasks_complete_percentage = 0
if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED):