[bitbake-devel] [PATCH 2/2] bitbake: toaster: fix invalid fields in the package details page
Michael Wood
michael.g.wood at intel.com
Wed Aug 12 10:33:43 UTC 2015
From: Alexandru DAMIAN <alexandru.damian at intel.com>
This patch safeguards referencing invalid fields in the
project details template, and fixes errors thrown in the
page.
[YOCTO #7992]
Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
Signed-off-by: Belen Barros Pena <belen.barros.pena at linux.intel.com>
---
.../toastergui/templates/package_included_reverse_dependencies.html | 2 +-
lib/toaster/toastergui/templates/tablesort.html | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html b/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
index 4ba472f..5cc8b47 100644
--- a/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
+++ b/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html
@@ -23,7 +23,7 @@
{% include "tablesort.html" %}
<tbody>
{% for reverse_dep in objects %}
- <tr {{reverse_dep.size|format_vpackage_rowclass}} >
+ <tr {% if reverse_dep.size %}{{reverse_dep.size|format_vpackage_rowclass}}{%endif%} >
{% if reverse_dep.size != -1 %}
<td>
<a href="{% url 'package_included_detail' build.id target.id reverse_dep.package_id %}">
diff --git a/lib/toaster/toastergui/templates/tablesort.html b/lib/toaster/toastergui/templates/tablesort.html
index bf311b6..3624742 100644
--- a/lib/toaster/toastergui/templates/tablesort.html
+++ b/lib/toaster/toastergui/templates/tablesort.html
@@ -5,7 +5,7 @@
<thead>
<tr>
{% for tc in tablecols %}
- <th class="{{tc.dclass}} {{tc.clclass}}">
+ <th class="{%if tc.dclass%}{{tc.dclass}}{%endif%} {%if tc.clclass%}{{tc.clclass}}{%endif%}">
{%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
{{tc.name}}
</th>
@@ -18,7 +18,7 @@
<!-- Table header row; generated from "tablecols" entry in the context dict -->
<tr>
{% for tc in tablecols %}
- <th class="{{tc.dclass}} {{tc.clclass}}">
+ <th class="{%if tc.dclass%}{{tc.dclass}}{%endif%} {%if tc.clclass%}{{tc.clclass}}{%endif%}">
{%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
{%if tc.orderfield%}
<a {%if tc.ordericon%} class="sorted" {%endif%}
--
2.1.4
More information about the bitbake-devel
mailing list