[bitbake-devel] [PATCH 09/14] toaster: Fix "Recent builds" links
Alex DAMIAN
alexandru.damian at intel.com
Fri Apr 4 14:10:48 UTC 2014
From: Belen Barros Pena <belen.barros.pena at intel.com>
* Link the number of errors to the #errors section in the
build dashboard
* Link the number of warnigns to the #warnings section in
the build dashboard
* Link the build time to the build time page
* Move some javascript that applies only to builddashboard.html
to that template from main.js
Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
---
lib/toaster/toastergui/templates/build.html | 6 +++---
lib/toaster/toastergui/templates/builddashboard.html | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/lib/toaster/toastergui/templates/build.html b/lib/toaster/toastergui/templates/build.html
index afa390f..faabd22 100644
--- a/lib/toaster/toastergui/templates/build.html
+++ b/lib/toaster/toastergui/templates/build.html
@@ -48,16 +48,16 @@
{%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%}" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
+ <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>
{% endif %}
</div>
<div class="span2 lead">
{% if build.warnings_no %}
- <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>
+ <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>
{% endif %}
</div>
<div class="lead pull-right">
- Build time: <a href="build-time.html">{{ build.timespent|sectohms }}</a>
+ Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
</div>
{%endif%}{%if build.outcome == build.IN_PROGRESS %}
<div class="span4">
diff --git a/lib/toaster/toastergui/templates/builddashboard.html b/lib/toaster/toastergui/templates/builddashboard.html
index 6cce788..cc92af5 100644
--- a/lib/toaster/toastergui/templates/builddashboard.html
+++ b/lib/toaster/toastergui/templates/builddashboard.html
@@ -186,4 +186,13 @@
</div>
{% endif %}
+<script type="text/javascript">
+ $(document).ready(function() {
+ //show warnings section when requested from the previous page
+ if (location.href.search('#warnings') > -1) {
+ $('#collapse-warnings').addClass('in');
+ }
+ });
+</script>
+
{% endblock %}
--
1.9.1
More information about the bitbake-devel
mailing list