Skip to contentSkip to conversation

toaster: make build data breadcrumb consistent

PATCH In review Belen Barros Pena 2 participants 2 messages Feb 8, 2016 – Feb 10, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: make build data breadcrumb consistent

From: Belen Barros Pena <[email protected]>

The pages in the build data section of Toaster showed different
breadcrumbs: in some pages the machine was displayed, but not in others. For builds with more than one target, some pages showed the first alphabetical target (the correct behaviour), others didn't.

This patch removes the inconsistencies, showing exactly the same breacrumb across all pages in the section.

The patch also removes the extra space between the '+' and the number of targets when the builds have more than one target.

---
 bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html | 2 +-
 bitbake/lib/toaster/toastergui/templates/basebuildpage.html       | 2 +-
 bitbake/lib/toaster/toastergui/templates/builddashboard.html      | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)
bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html +1 -1
index 22ca50c..ffe7aa4 100644
@@ -8,7 +8,7 @@
         <ul class="breadcrumb" id="breadcrumb">
             <li class="muted">{{build.project.name}}:</li>
             <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
-            <li><a href="{%url 'builddashboard' build.pk%}">{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
+            <li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
             {% block localbreadcrumb %}{% endblock %}
         </ul>
         <script>
bitbake/lib/toaster/toastergui/templates/basebuildpage.html +1 -1
index d441df8..fcf1c54 100644
@@ -13,7 +13,7 @@
             <li>
             {% block parentbreadcrumb %}
             <a href="{%url 'builddashboard' build.pk%}">
-                {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})
+              {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
             </a>
             {% endblock %}
             </li>
bitbake/lib/toaster/toastergui/templates/builddashboard.html +1 -2
index 323bbbb..7857aba 100644
@@ -6,10 +6,9 @@
 {% block parentbreadcrumb %}
 {% if build.get_sorted_target_list.count > 0 %}
   {{build.get_sorted_target_list.0.target}}
-  &nbsp;
 {% endif %}
 
-{%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
+{%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
 {% endblock %}
 
 {% block buildinfomain %}
Signature · 1 line
2.5.4 (Apple Git-61)
#1 lore raw

Thanks - submitted upstream & toaster-next

Quoted 62 lines · Belen Barros Pena

From: Belen Barros Pena <[email protected]>

The pages in the build data section of Toaster showed different
breadcrumbs: in some pages the machine was displayed, but not in others. For builds with more than one target, some pages showed the first alphabetical target (the correct behaviour), others didn't.

This patch removes the inconsistencies, showing exactly the same breacrumb across all pages in the section.

The patch also removes the extra space between the '+' and the number of targets when the builds have more than one target.

---
  bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html | 2 +-
  bitbake/lib/toaster/toastergui/templates/basebuildpage.html       | 2 +-
  bitbake/lib/toaster/toastergui/templates/builddashboard.html      | 3 +--
  3 files changed, 3 insertions(+), 4 deletions(-)
bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html +1 -1
index 22ca50c..ffe7aa4 100644
@@ -8,7 +8,7 @@
          <ul class="breadcrumb" id="breadcrumb">
              <li class="muted">{{build.project.name}}:</li>
              <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
-            <li><a href="{%url 'builddashboard' build.pk%}">{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
+            <li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
              {% block localbreadcrumb %}{% endblock %}
          </ul>
          <script>
bitbake/lib/toaster/toastergui/templates/basebuildpage.html +1 -1
index d441df8..fcf1c54 100644
@@ -13,7 +13,7 @@
              <li>
              {% block parentbreadcrumb %}
              <a href="{%url 'builddashboard' build.pk%}">
-                {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})
+              {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
              </a>
              {% endblock %}
              </li>
bitbake/lib/toaster/toastergui/templates/builddashboard.html +1 -2
index 323bbbb..7857aba 100644
@@ -6,10 +6,9 @@
  {% block parentbreadcrumb %}
  {% if build.get_sorted_target_list.count > 0 %}
    {{build.get_sorted_target_list.0.target}}
-  &nbsp;
  {% endif %}
 
-{%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
+{%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
  {% endblock %}
 
  {% block buildinfomain %}