summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-02-21 15:23:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 12:24:01 -0700
commitf3294d8da91de03b6354743326322318580cf05b (patch)
treead8935fc5d4b17098194a2c162523076bf47afea /bitbake/lib/toaster/toastergui
parent3f16624485e44bf4b261be4aa506dd8c7fc8a6cc (diff)
downloadpoky-f3294d8da91de03b6354743326322318580cf05b.tar.gz
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 <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/build.html2
-rw-r--r--bitbake/lib/toaster/toastergui/views.py11
3 files changed, 12 insertions, 3 deletions
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 @@
76 <tr> 76 <tr>
77 {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}"> 77 {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}">
78 {%if tc.qhelp%}<i class="icon-question-sign get-help" data-toggle="tooltip" title="{{tc.qhelp}}"></i>{%endif%} 78 {%if tc.qhelp%}<i class="icon-question-sign get-help" data-toggle="tooltip" title="{{tc.qhelp}}"></i>{%endif%}
79 {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'orderby' : '{{tc.orderfield}}' })" >{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%} 79 {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })" >{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
80 {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%} 80 {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%}
81 {%if tc.filter%}<div class="btn-group pull-right"> 81 {%if tc.filter%}<div class="btn-group pull-right">
82 <a href="#filter_{{tc.filter.class}}" role="button" class="btn btn-mini {%if request.GET.filter%}{{tc.filter.options|filtered_icon:request.GET.filter}} {%endif%}" {%if request.GET.filter%} title="<p>{{tc.filter.options|filtered_tooltip:request.GET.filter}}</p><p><a class='btn btn-small btn-primary' href=javascript:reload_params({'filter':''})>Show all {{objectname}}</a></p>" {%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a> 82 <a href="#filter_{{tc.filter.class}}" role="button" class="btn btn-mini {%if request.GET.filter%}{{tc.filter.options|filtered_icon:request.GET.filter}} {%endif%}" {%if request.GET.filter%} title="<p>{{tc.filter.options|filtered_tooltip:request.GET.filter}}</p><p><a class='btn btn-small btn-primary' href=javascript:reload_params({'filter':''})>Show all {{objectname}}</a></p>" {%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a>
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 @@
70 <div class="alert"> 70 <div class="alert">
71 <form class="no-results" id="searchform"> 71 <form class="no-results" id="searchform">
72 <div class="input-append"> 72 <div class="input-append">
73 <input id="search" name="search" class="input-xxlarge" type="text" placeholder="{{request.GET.search}}" /><a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a> 73 <input id="search" name="search" class="input-xxlarge" type="text" placeholder="{{request.GET.search}}" />{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a>{% endif %}
74 <input class="btn" type="submit" value="Search"/> 74 <input class="btn" type="submit" value="Search"/>
75 <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button> 75 <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button>
76 </div> 76 </div>
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):
199 # define here what parameters the view needs in the GET portion in order to 199 # define here what parameters the view needs in the GET portion in order to
200 # be able to display something. 'count' and 'page' are mandatory for all views 200 # be able to display something. 'count' and 'page' are mandatory for all views
201 # that use paginators. 201 # that use paginators.
202 mandatory_parameters = { 'count': 10, 'page' : 1}; 202 mandatory_parameters = { 'count': 10, 'page' : 1, 'orderby' : 'completed_on:-' };
203 retval = _verify_parameters( request.GET, mandatory_parameters ) 203 retval = _verify_parameters( request.GET, mandatory_parameters )
204 if retval: 204 if retval:
205 return _redirect_parameters( 'all-builds', request.GET, mandatory_parameters) 205 return _redirect_parameters( 'all-builds', request.GET, mandatory_parameters)
@@ -241,6 +241,7 @@ def builds(request):
241 'qhelp' : "The outcome tells you if a build completed successfully or failed", # the help button content 241 'qhelp' : "The outcome tells you if a build completed successfully or failed", # the help button content
242 'dclass' : "span2", # indication about column width; comes from the design 242 'dclass' : "span2", # indication about column width; comes from the design
243 'orderfield': _get_toggle_order(request, "outcome"), # adds ordering by the field value; default ascending unless clicked from ascending into descending 243 'orderfield': _get_toggle_order(request, "outcome"), # adds ordering by the field value; default ascending unless clicked from ascending into descending
244 'ordericon':_get_toggle_order_icon(request, "outcome"),
244 # filter field will set a filter on that column with the specs in the filter description 245 # filter field will set a filter on that column with the specs in the filter description
245 # the class field in the filter has no relation with clclass; the control different aspects of the UI 246 # the class field in the filter has no relation with clclass; the control different aspects of the UI
246 # still, it is recommended for the values to be identical for easy tracking in the generated HTML 247 # still, it is recommended for the values to be identical for easy tracking in the generated HTML
@@ -255,15 +256,18 @@ def builds(request):
255 {'name': 'Target ', # default column, disabled box, with just the name in the list 256 {'name': 'Target ', # default column, disabled box, with just the name in the list
256 'qhelp': "This is the build target(s): one or more recipes or image recipes", 257 'qhelp': "This is the build target(s): one or more recipes or image recipes",
257 'orderfield': _get_toggle_order(request, "target__target"), 258 'orderfield': _get_toggle_order(request, "target__target"),
259 'ordericon':_get_toggle_order_icon(request, "target__target"),
258 }, 260 },
259 {'name': 'Machine ', 261 {'name': 'Machine ',
260 'qhelp': "The machine is the hardware for which you are building", 262 'qhelp': "The machine is the hardware for which you are building",
261 'orderfield': _get_toggle_order(request, "machine"), 263 'orderfield': _get_toggle_order(request, "machine"),
264 'ordericon':_get_toggle_order_icon(request, "machine"),
262 'dclass': 'span3' 265 'dclass': 'span3'
263 }, # a slightly wider column 266 }, # a slightly wider column
264 {'name': 'Started on ', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column 267 {'name': 'Started on ', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column
265 'qhelp': "The date and time you started the build", 268 'qhelp': "The date and time you started the build",
266 'orderfield': _get_toggle_order(request, "started_on", True), 269 'orderfield': _get_toggle_order(request, "started_on", True),
270 'ordericon':_get_toggle_order_icon(request, "started_on"),
267 'filter' : {'class' : 'started_on', 271 'filter' : {'class' : 'started_on',
268 'label': 'Show:', 272 'label': 'Show:',
269 'options' : [ 273 'options' : [
@@ -276,6 +280,7 @@ def builds(request):
276 {'name': 'Completed on ', 280 {'name': 'Completed on ',
277 'qhelp': "The date and time the build finished", 281 'qhelp': "The date and time the build finished",
278 'orderfield': _get_toggle_order(request, "completed_on", True), 282 'orderfield': _get_toggle_order(request, "completed_on", True),
283 'ordericon':_get_toggle_order_icon(request, "completed_on"),
279 'filter' : {'class' : 'completed_on', 284 'filter' : {'class' : 'completed_on',
280 'label': 'Show:', 285 'label': 'Show:',
281 'options' : [ 286 'options' : [
@@ -298,6 +303,7 @@ def builds(request):
298 {'name': 'Errors ', 'clclass': 'errors_no', 303 {'name': 'Errors ', 'clclass': 'errors_no',
299 'qhelp': "How many errors were encountered during the build (if any)", 304 'qhelp': "How many errors were encountered during the build (if any)",
300 'orderfield': _get_toggle_order(request, "errors_no", True), 305 'orderfield': _get_toggle_order(request, "errors_no", True),
306 'ordericon':_get_toggle_order_icon(request, "errors_no"),
301 'filter' : {'class' : 'errors_no', 307 'filter' : {'class' : 'errors_no',
302 'label': 'Show:', 308 'label': 'Show:',
303 'options' : [ 309 'options' : [
@@ -309,6 +315,7 @@ def builds(request):
309 {'name': 'Warnings', 'clclass': 'warnings_no', 315 {'name': 'Warnings', 'clclass': 'warnings_no',
310 'qhelp': "How many warnigns were encountered during the build (if any)", 316 'qhelp': "How many warnigns were encountered during the build (if any)",
311 'orderfield': _get_toggle_order(request, "warnings_no", True), 317 'orderfield': _get_toggle_order(request, "warnings_no", True),
318 'ordericon':_get_toggle_order_icon(request, "warnings_no"),
312 'filter' : {'class' : 'warnings_no', 319 'filter' : {'class' : 'warnings_no',
313 'label': 'Show:', 320 'label': 'Show:',
314 'options' : [ 321 'options' : [
@@ -320,12 +327,14 @@ def builds(request):
320 {'name': 'Time ', 'clclass': 'time', 'hidden' : 1, 327 {'name': 'Time ', 'clclass': 'time', 'hidden' : 1,
321 'qhelp': "How long it took the build to finish", 328 'qhelp': "How long it took the build to finish",
322 'orderfield': _get_toggle_order(request, "timespent", True), 329 'orderfield': _get_toggle_order(request, "timespent", True),
330 'ordericon':_get_toggle_order_icon(request, "timespent"),
323 }, 331 },
324 {'name': 'Log', 332 {'name': 'Log',
325 'dclass': "span4", 333 'dclass': "span4",
326 'qhelp': "The location in disk of the build main log file", 334 'qhelp': "The location in disk of the build main log file",
327 'clclass': 'log', 'hidden': 1, 335 'clclass': 'log', 'hidden': 1,
328 'orderfield': _get_toggle_order(request, "cooker_log_path"), 336 'orderfield': _get_toggle_order(request, "cooker_log_path"),
337 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"),
329 }, 338 },
330 {'name': 'Output', 'clclass': 'output', 339 {'name': 'Output', 'clclass': 'output',
331 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory", 340 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",