From f3294d8da91de03b6354743326322318580cf05b Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Fri, 21 Feb 2014 15:23:52 +0000 Subject: bitbake: toaster: fix issues in the build table This patches fixes minor issues in the sorting functionality of the build table. [YOCTO #5455] (Bitbake rev: 47196039bd8bac2eddb1c19ad4fc2e285dc23ee3) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/templates/basetable_top.html | 2 +- bitbake/lib/toaster/toastergui/templates/build.html | 2 +- bitbake/lib/toaster/toastergui/views.py | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html index 23fb04dec9..0cd948cc2a 100644 --- a/bitbake/lib/toaster/toastergui/templates/basetable_top.html +++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html @@ -76,7 +76,7 @@ {% for tc in tablecols %} {%if tc.qhelp%}{%endif%} - {%if tc.orderfield%}{{tc.name}}{%else%}{{tc.name}}{%endif%} + {%if tc.orderfield%}{{tc.name}}{%else%}{{tc.name}}{%endif%} {%if tc.ordericon%} {%endif%} {%if tc.filter%}
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html index 3b0c614502..85de98aae7 100644 --- a/bitbake/lib/toaster/toastergui/templates/build.html +++ b/bitbake/lib/toaster/toastergui/templates/build.html @@ -70,7 +70,7 @@
- + {% if request.GET.search %}{% endif %}
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 8383e73434..ccf95855a3 100644 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -199,7 +199,7 @@ def builds(request): # define here what parameters the view needs in the GET portion in order to # be able to display something. 'count' and 'page' are mandatory for all views # that use paginators. - mandatory_parameters = { 'count': 10, 'page' : 1}; + mandatory_parameters = { 'count': 10, 'page' : 1, 'orderby' : 'completed_on:-' }; retval = _verify_parameters( request.GET, mandatory_parameters ) if retval: return _redirect_parameters( 'all-builds', request.GET, mandatory_parameters) @@ -241,6 +241,7 @@ def builds(request): 'qhelp' : "The outcome tells you if a build completed successfully or failed", # the help button content 'dclass' : "span2", # indication about column width; comes from the design 'orderfield': _get_toggle_order(request, "outcome"), # adds ordering by the field value; default ascending unless clicked from ascending into descending + 'ordericon':_get_toggle_order_icon(request, "outcome"), # filter field will set a filter on that column with the specs in the filter description # the class field in the filter has no relation with clclass; the control different aspects of the UI # still, it is recommended for the values to be identical for easy tracking in the generated HTML @@ -255,15 +256,18 @@ def builds(request): {'name': 'Target ', # default column, disabled box, with just the name in the list 'qhelp': "This is the build target(s): one or more recipes or image recipes", 'orderfield': _get_toggle_order(request, "target__target"), + 'ordericon':_get_toggle_order_icon(request, "target__target"), }, {'name': 'Machine ', 'qhelp': "The machine is the hardware for which you are building", 'orderfield': _get_toggle_order(request, "machine"), + 'ordericon':_get_toggle_order_icon(request, "machine"), 'dclass': 'span3' }, # a slightly wider column {'name': 'Started on ', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column 'qhelp': "The date and time you started the build", 'orderfield': _get_toggle_order(request, "started_on", True), + 'ordericon':_get_toggle_order_icon(request, "started_on"), 'filter' : {'class' : 'started_on', 'label': 'Show:', 'options' : [ @@ -276,6 +280,7 @@ def builds(request): {'name': 'Completed on ', 'qhelp': "The date and time the build finished", 'orderfield': _get_toggle_order(request, "completed_on", True), + 'ordericon':_get_toggle_order_icon(request, "completed_on"), 'filter' : {'class' : 'completed_on', 'label': 'Show:', 'options' : [ @@ -298,6 +303,7 @@ def builds(request): {'name': 'Errors ', 'clclass': 'errors_no', 'qhelp': "How many errors were encountered during the build (if any)", 'orderfield': _get_toggle_order(request, "errors_no", True), + 'ordericon':_get_toggle_order_icon(request, "errors_no"), 'filter' : {'class' : 'errors_no', 'label': 'Show:', 'options' : [ @@ -309,6 +315,7 @@ def builds(request): {'name': 'Warnings', 'clclass': 'warnings_no', 'qhelp': "How many warnigns were encountered during the build (if any)", 'orderfield': _get_toggle_order(request, "warnings_no", True), + 'ordericon':_get_toggle_order_icon(request, "warnings_no"), 'filter' : {'class' : 'warnings_no', 'label': 'Show:', 'options' : [ @@ -320,12 +327,14 @@ def builds(request): {'name': 'Time ', 'clclass': 'time', 'hidden' : 1, 'qhelp': "How long it took the build to finish", 'orderfield': _get_toggle_order(request, "timespent", True), + 'ordericon':_get_toggle_order_icon(request, "timespent"), }, {'name': 'Log', 'dclass': "span4", 'qhelp': "The location in disk of the build main log file", 'clclass': 'log', 'hidden': 1, 'orderfield': _get_toggle_order(request, "cooker_log_path"), + 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"), }, {'name': 'Output', 'clclass': 'output', 'qhelp': "The root file system types produced by the build. You can find them in your /build/tmp/deploy/images/ directory", -- cgit v1.2.3-54-g00ecf