From 33a24992139e7dc05d14bbe1da60299b732945aa Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Tue, 12 Jul 2016 15:54:43 -0700 Subject: [PATCH] toaster: display Target targets in build dashboard The build dashboard was showing the targets for the build in the page heading and title as "Target object". Add a filter which extracts the "target" from each Target object as a string so that the heading and title display correctly. Also sort the image file suffixes alphabetically. [YOCTO #8556] Signed-off-by: Elliot Smith Signed-off-by: bavery Signed-off-by: Richard Purdie --- .../toastergui/templates/builddashboard.html | 9 +++++---- .../templatetags/field_values_filter.py | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 lib/toaster/toastergui/templatetags/field_values_filter.py diff --git a/lib/toaster/toastergui/templates/builddashboard.html b/lib/toaster/toastergui/templates/builddashboard.html index 04a57ef64f9..dcda2a891f7 100644 --- a/lib/toaster/toastergui/templates/builddashboard.html +++ b/lib/toaster/toastergui/templates/builddashboard.html @@ -1,8 +1,9 @@ {% extends "basebuildpage.html" %} {% load humanize %} {% load projecttags %} +{% load field_values_filter %} -{% block title %} {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %} +{% block title %} {{build.get_sorted_target_list|field_values:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %} {% block parentbreadcrumb %} {% if build.get_sorted_target_list.count > 0 %} {{build.get_sorted_target_list.0.target}} @@ -15,7 +16,7 @@