summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRavi Chintakunta <ravi.chintakunta@timesys.com>2014-01-21 21:43:33 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-17 15:38:52 +0000
commit6f38844000ada8fef146275613106c701f10f653 (patch)
tree0effce56f5593bdc1ffea4ab69eb02bfb5f8cf43 /bitbake
parentfd86e0e557cecc0bec4a0c01f8a7dfd0bbc62703 (diff)
downloadpoky-6f38844000ada8fef146275613106c701f10f653.tar.gz
bitbake: toaster: Fix builds view filter options to match changes in filter dialog
Filter dialog uses an array of tuples for filter options.Fixed the builds view by changing the filter options from a dictionary to a list of tuples. (Bitbake rev: bac1ca6e276b2e276b844d1009dba964810a2957) Signed-off-by: Ravi Chintakunta <ravi.chintakunta@timesys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/views.py71
1 files changed, 44 insertions, 27 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index f3baf047ae..9a4b64a268 100644
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -244,11 +244,13 @@ def builds(request):
244 # filter field will set a filter on that column with the specs in the filter description 244 # 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 245 # 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 246 # still, it is recommended for the values to be identical for easy tracking in the generated HTML
247 'filter' : {'class' : 'outcome', 'label': 'Show only', 'options' : { 247 'filter' : {'class' : 'outcome',
248 'Successful builds': 'outcome:' + str(Build.SUCCEEDED), # this is the field search expression 248 'label': 'Show:',
249 'Failed builds': 'outcome:'+ str(Build.FAILED), 249 'options' : [
250 } 250 ('Successful builds', 'outcome:' + str(Build.SUCCEEDED)), # this is the field search expression
251 } 251 ('Failed builds', 'outcome:'+ str(Build.FAILED)),
252 ]
253 }
252 }, 254 },
253 {'name': 'Target ', # default column, disabled box, with just the name in the list 255 {'name': 'Target ', # default column, disabled box, with just the name in the list
254 'qhelp': "This is the build target(s): one or more recipes or image recipes", 256 'qhelp': "This is the build target(s): one or more recipes or image recipes",
@@ -262,43 +264,58 @@ def builds(request):
262 {'name': 'Started on ', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column 264 {'name': 'Started on ', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column
263 'qhelp': "The date and time you started the build", 265 'qhelp': "The date and time you started the build",
264 'orderfield': _get_toggle_order(request, "started_on", True), 266 'orderfield': _get_toggle_order(request, "started_on", True),
265 'filter' : {'class' : 'started_on', 'label': 'Show only builds started', 'options' : { 267 'filter' : {'class' : 'started_on',
266 'Today' : 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d"), 268 'label': 'Show:',
267 'Yesterday' : 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), 269 'options' : [
268 'Within one week' : 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), 270 ("Today's builds" , 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d")),
269 }} 271 ("Yesterday's builds", 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d")),
272 ("This week's builds", 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d")),
273 ]
274 }
270 }, 275 },
271 {'name': 'Completed on ', 276 {'name': 'Completed on ',
272 'qhelp': "The date and time the build finished", 277 'qhelp': "The date and time the build finished",
273 'orderfield': _get_toggle_order(request, "completed_on", True), 278 'orderfield': _get_toggle_order(request, "completed_on", True),
274 'filter' : {'class' : 'completed_on', 'label': 'Show only builds completed', 'options' : { 279 'filter' : {'class' : 'completed_on',
275 'Today' : 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d"), 280 'label': 'Show:',
276 'Yesterday' : 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), 281 'options' : [
277 'Within one week' : 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), 282 ("Today's builds", 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d")),
278 }} 283 ("Yesterday's builds", 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d")),
284 ("This week's builds", 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d")),
285 ]
286 }
279 }, 287 },
280 {'name': 'Failed tasks ', 'clclass': 'failed_tasks', # specifing a clclass will enable the checkbox 288 {'name': 'Failed tasks ', 'clclass': 'failed_tasks', # specifing a clclass will enable the checkbox
281 'qhelp': "How many tasks failed during the build", 289 'qhelp': "How many tasks failed during the build",
282 'filter' : {'class' : 'failed_tasks', 'label': 'Show only ', 'options' : { 290 'filter' : {'class' : 'failed_tasks',
283 'Builds with failed tasks' : 'task_build__outcome:4', 291 'label': 'Show:',
284 'Builds without failed tasks' : 'task_build__outcome:NOT4', 292 'options' : [
285 }} 293 ('Builds with failed tasks', 'task_build__outcome:4'),
294 ('Builds without failed tasks', 'task_build__outcome:NOT4'),
295 ]
296 }
286 }, 297 },
287 {'name': 'Errors ', 'clclass': 'errors_no', 298 {'name': 'Errors ', 'clclass': 'errors_no',
288 'qhelp': "How many errors were encountered during the build (if any)", 299 'qhelp': "How many errors were encountered during the build (if any)",
289 'orderfield': _get_toggle_order(request, "errors_no", True), 300 'orderfield': _get_toggle_order(request, "errors_no", True),
290 'filter' : {'class' : 'errors_no', 'label': 'Show only ', 'options' : { 301 'filter' : {'class' : 'errors_no',
291 'Builds with errors' : 'errors_no__gte:1', 302 'label': 'Show:',
292 'Builds without errors' : 'errors_no:0', 303 'options' : [
293 }} 304 ('Builds with errors', 'errors_no__gte:1'),
305 ('Builds without errors', 'errors_no:0'),
306 ]
307 }
294 }, 308 },
295 {'name': 'Warnings', 'clclass': 'warnings_no', 309 {'name': 'Warnings', 'clclass': 'warnings_no',
296 'qhelp': "How many warnigns were encountered during the build (if any)", 310 'qhelp': "How many warnigns were encountered during the build (if any)",
297 'orderfield': _get_toggle_order(request, "warnings_no", True), 311 'orderfield': _get_toggle_order(request, "warnings_no", True),
298 'filter' : {'class' : 'warnings_no', 'label': 'Show only ', 'options' : { 312 'filter' : {'class' : 'warnings_no',
299 'Builds with warnings' : 'warnings_no__gte:1', 313 'label': 'Show:',
300 'Builds without warnings' : 'warnings_no:0', 314 'options' : [
301 }} 315 ('Builds with warnings','warnings_no__gte:1'),
316 ('Builds without warnings','warnings_no:0'),
317 ]
318 }
302 }, 319 },
303 {'name': 'Time ', 'clclass': 'time', 'hidden' : 1, 320 {'name': 'Time ', 'clclass': 'time', 'hidden' : 1,
304 'qhelp': "How long it took the build to finish", 321 'qhelp': "How long it took the build to finish",