diff options
author | Belen Barros Pena <belen.barros.pena@linux.intel.com> | 2016-06-10 14:31:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-15 08:35:05 +0100 |
commit | 46271833bed74559ad006024c94036170cfc5b7d (patch) | |
tree | 0f3e4a846050185a354f7a9f7e835b7b6cd44486 /bitbake | |
parent | de3984ccdb4fc404e35f6f0ed149816b888411bd (diff) | |
download | poky-46271833bed74559ad006024c94036170cfc5b7d.tar.gz |
bitbake: toaster: buildtables Remove links from non name fields
Design change to have no links for non-named fields in BuiltPackagesTable.
BuiltRecipesTables and BuildTasksTable.
Additionally:
- Fix class and elements for Bootstrap3 in help text.
- Change title of InstalledPackages table to Packages Included.
- Change which columns are default shown/hidden columns.
(Bitbake rev: 7c377e161a90184a4786e33951d8c0e30688ba3b)
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/buildtables.py | 88 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html | 4 |
2 files changed, 42 insertions, 50 deletions
diff --git a/bitbake/lib/toaster/toastergui/buildtables.py b/bitbake/lib/toaster/toastergui/buildtables.py index e237e4ecb6..00a053dfe2 100644 --- a/bitbake/lib/toaster/toastergui/buildtables.py +++ b/bitbake/lib/toaster/toastergui/buildtables.py | |||
@@ -75,8 +75,8 @@ class BuiltPackagesTableBase(tables.PackagesTable): | |||
75 | {%% endif %%} | 75 | {%% endif %%} |
76 | ''' % {'value': val}) | 76 | ''' % {'value': val}) |
77 | 77 | ||
78 | add_pkg_link_to = ['name', 'version', 'size', 'license'] | 78 | add_pkg_link_to = 'name' |
79 | add_recipe_link_to = ['recipe__name', 'recipe__version'] | 79 | add_recipe_link_to = 'recipe__name' |
80 | 80 | ||
81 | # Add the recipe and pkg build links to the required columns | 81 | # Add the recipe and pkg build links to the required columns |
82 | for column in self.columns: | 82 | for column in self.columns: |
@@ -84,7 +84,7 @@ class BuiltPackagesTableBase(tables.PackagesTable): | |||
84 | tmplv = column['field_name'].replace('__', '.') | 84 | tmplv = column['field_name'].replace('__', '.') |
85 | tmplv = "{{data.%s}}" % tmplv | 85 | tmplv = "{{data.%s}}" % tmplv |
86 | 86 | ||
87 | if column['field_name'] in add_pkg_link_to: | 87 | if column['field_name'] is add_pkg_link_to: |
88 | # Don't overwrite an existing template | 88 | # Don't overwrite an existing template |
89 | if column['static_data_template']: | 89 | if column['static_data_template']: |
90 | column['static_data_template'] =\ | 90 | column['static_data_template'] =\ |
@@ -94,7 +94,7 @@ class BuiltPackagesTableBase(tables.PackagesTable): | |||
94 | 94 | ||
95 | column['static_data_name'] = column['field_name'] | 95 | column['static_data_name'] = column['field_name'] |
96 | 96 | ||
97 | elif column['field_name'] in add_recipe_link_to: | 97 | elif column['field_name'] is add_recipe_link_to: |
98 | # Don't overwrite an existing template | 98 | # Don't overwrite an existing template |
99 | if column['static_data_template']: | 99 | if column['static_data_template']: |
100 | column['static_data_template'] =\ | 100 | column['static_data_template'] =\ |
@@ -160,7 +160,7 @@ class InstalledPackagesTable(BuildTablesMixin, BuiltPackagesTableBase): | |||
160 | """ Show all packages installed in an image """ | 160 | """ Show all packages installed in an image """ |
161 | def __init__(self, *args, **kwargs): | 161 | def __init__(self, *args, **kwargs): |
162 | super(InstalledPackagesTable, self).__init__(*args, **kwargs) | 162 | super(InstalledPackagesTable, self).__init__(*args, **kwargs) |
163 | self.title = "Installed Packages" | 163 | self.title = "Packages Included" |
164 | self.default_orderby = "name" | 164 | self.default_orderby = "name" |
165 | 165 | ||
166 | def make_package_list(self, target): | 166 | def make_package_list(self, target): |
@@ -213,11 +213,11 @@ class InstalledPackagesTable(BuildTablesMixin, BuiltPackagesTableBase): | |||
213 | ' extra.target_id data.pk %}">{{data.name}}</a>' | 213 | ' extra.target_id data.pk %}">{{data.name}}</a>' |
214 | '{% if data.installed_name and data.installed_name !=' | 214 | '{% if data.installed_name and data.installed_name !=' |
215 | ' data.name %}' | 215 | ' data.name %}' |
216 | '<span class="muted"> as {{data.installed_name}}</span>' | 216 | '<span class="text-muted"> as {{data.installed_name}}</span>' |
217 | ' <i class="icon-question-sign get-help hover-help"' | 217 | ' <span class="glyphicon glyphicon-question-sign get-help hover-help"' |
218 | ' title="{{data.name}} was renamed at packaging time and' | 218 | ' title="{{data.name}} was renamed at packaging time and' |
219 | ' was installed in your image as {{data.installed_name}}' | 219 | ' was installed in your image as {{data.installed_name}}' |
220 | '"></i>{% endif %} ') | 220 | '"></span>{% endif %} ') |
221 | 221 | ||
222 | for column in self.columns: | 222 | for column in self.columns: |
223 | if column['static_data_name'] == 'name': | 223 | if column['static_data_name'] == 'name': |
@@ -245,11 +245,6 @@ class BuiltRecipesTable(BuildTablesMixin): | |||
245 | '{{data.name}}'\ | 245 | '{{data.name}}'\ |
246 | '</a>' | 246 | '</a>' |
247 | 247 | ||
248 | recipe_version_tmpl =\ | ||
249 | '<a href="{% url "recipe" extra.build.pk data.pk %}">'\ | ||
250 | '{{data.version}}'\ | ||
251 | '</a>' | ||
252 | |||
253 | recipe_file_tmpl =\ | 248 | recipe_file_tmpl =\ |
254 | '{{data.file_path}}'\ | 249 | '{{data.file_path}}'\ |
255 | '{% if data.pathflags %}<i>({{data.pathflags}})</i>'\ | 250 | '{% if data.pathflags %}<i>({{data.pathflags}})</i>'\ |
@@ -307,30 +302,28 @@ class BuiltRecipesTable(BuildTablesMixin): | |||
307 | static_data_template=recipe_name_tmpl) | 302 | static_data_template=recipe_name_tmpl) |
308 | 303 | ||
309 | self.add_column(title="Version", | 304 | self.add_column(title="Version", |
310 | field_name="version", | 305 | field_name="version") |
311 | static_data_name='version', | ||
312 | static_data_template=recipe_version_tmpl) | ||
313 | 306 | ||
314 | self.add_column(title="Dependencies", | 307 | self.add_column(title="Dependencies", |
315 | static_data_name="dependencies", | 308 | static_data_name="dependencies", |
316 | static_data_template=depends_on_tmpl, | 309 | static_data_template=depends_on_tmpl) |
317 | hidden=True) | ||
318 | 310 | ||
319 | self.add_column(title="Reverse dependencies", | 311 | self.add_column(title="Reverse dependencies", |
320 | static_data_name="revdeps", | 312 | static_data_name="revdeps", |
321 | static_data_template=rev_depends_tmpl, | 313 | static_data_template=rev_depends_tmpl, |
322 | help_text='Recipe build-time reverse dependencies' | 314 | help_text='Recipe build-time reverse dependencies' |
323 | ' (i.e. the recipes that depend on this recipe)', | 315 | ' (i.e. the recipes that depend on this recipe)') |
324 | hidden=True) | ||
325 | 316 | ||
326 | self.add_column(title="Recipe file", | 317 | self.add_column(title="Recipe file", |
327 | field_name="file_path", | 318 | field_name="file_path", |
328 | static_data_name="file_path", | 319 | static_data_name="file_path", |
329 | static_data_template=recipe_file_tmpl) | 320 | static_data_template=recipe_file_tmpl, |
321 | hidden=True) | ||
330 | 322 | ||
331 | self.add_column(title="Section", | 323 | self.add_column(title="Section", |
332 | field_name="section", | 324 | field_name="section", |
333 | orderable=True) | 325 | orderable=True, |
326 | hidden=True) | ||
334 | 327 | ||
335 | self.add_column(title="License", | 328 | self.add_column(title="License", |
336 | field_name="license", | 329 | field_name="license", |
@@ -347,11 +340,13 @@ class BuiltRecipesTable(BuildTablesMixin): | |||
347 | 340 | ||
348 | self.add_column(title="Layer branch", | 341 | self.add_column(title="Layer branch", |
349 | field_name="layer_version__branch", | 342 | field_name="layer_version__branch", |
350 | orderable=True) | 343 | orderable=True, |
344 | hidden=True) | ||
351 | 345 | ||
352 | self.add_column(title="Layer commit", | 346 | self.add_column(title="Layer commit", |
353 | static_data_name="commit", | 347 | static_data_name="commit", |
354 | static_data_template=git_rev_template) | 348 | static_data_template=git_rev_template, |
349 | hidden=True) | ||
355 | 350 | ||
356 | 351 | ||
357 | class BuildTasksTable(BuildTablesMixin): | 352 | class BuildTasksTable(BuildTablesMixin): |
@@ -425,11 +420,6 @@ class BuildTasksTable(BuildTablesMixin): | |||
425 | '{{data.recipe.name}}'\ | 420 | '{{data.recipe.name}}'\ |
426 | '</a>' | 421 | '</a>' |
427 | 422 | ||
428 | recipe_version_tmpl =\ | ||
429 | '<a href="{% url "recipe" extra.build.pk data.recipe.pk %}">'\ | ||
430 | '{{data.recipe.version}}'\ | ||
431 | '</a>' | ||
432 | |||
433 | def task_link_tmpl(val): | 423 | def task_link_tmpl(val): |
434 | return ('<a name="task-{{data.order}}"' | 424 | return ('<a name="task-{{data.order}}"' |
435 | 'href="{%% url "task" extra.build.pk data.pk %%}">' | 425 | 'href="{%% url "task" extra.build.pk data.pk %%}">' |
@@ -438,7 +428,13 @@ class BuildTasksTable(BuildTablesMixin): | |||
438 | 428 | ||
439 | self.add_column(title="Order", | 429 | self.add_column(title="Order", |
440 | static_data_name="order", | 430 | static_data_name="order", |
441 | static_data_template=task_link_tmpl('{{data.order}}'), | 431 | static_data_template='{{data.order}}', |
432 | orderable=True) | ||
433 | |||
434 | self.add_column(title="Task", | ||
435 | static_data_name="task_name", | ||
436 | static_data_template=task_link_tmpl( | ||
437 | "{{data.task_name}}"), | ||
442 | orderable=True) | 438 | orderable=True) |
443 | 439 | ||
444 | self.add_column(title="Recipe", | 440 | self.add_column(title="Recipe", |
@@ -447,34 +443,26 @@ class BuildTasksTable(BuildTablesMixin): | |||
447 | orderable=True) | 443 | orderable=True) |
448 | 444 | ||
449 | self.add_column(title="Recipe version", | 445 | self.add_column(title="Recipe version", |
450 | static_data_name='recipe__version', | 446 | field_name='recipe__version') |
451 | static_data_template=recipe_version_tmpl) | ||
452 | |||
453 | self.add_column(title="Task", | ||
454 | static_data_name="task_name", | ||
455 | static_data_template=task_link_tmpl( | ||
456 | "{{data.task_name}}"), | ||
457 | orderable=True) | ||
458 | 447 | ||
459 | self.add_column(title="Executed", | 448 | self.add_column(title="Executed", |
460 | static_data_name="task_executed", | 449 | static_data_name="task_executed", |
461 | static_data_template=task_link_tmpl( | 450 | static_data_template='{{data.get_executed_display}}', |
462 | "{{data.get_executed_display}}"), | ||
463 | filter_name='execution_outcome', | 451 | filter_name='execution_outcome', |
464 | orderable=True) | 452 | orderable=True) |
465 | 453 | ||
466 | self.static_context_extra['OUTCOME_FAILED'] = Task.OUTCOME_FAILED | 454 | self.static_context_extra['OUTCOME_FAILED'] = Task.OUTCOME_FAILED |
467 | outcome_tmpl = task_link_tmpl("{{data.outcome_text}}") | 455 | outcome_tmpl = '{{data.outcome_text}}' |
468 | outcome_tmpl = ('%s ' | 456 | outcome_tmpl = ('%s ' |
469 | '{%% if data.outcome = extra.OUTCOME_FAILED %%}' | 457 | '{%% if data.outcome = extra.OUTCOME_FAILED %%}' |
470 | '<a href="{%% url "build_artifact" extra.build.pk ' | 458 | '<a href="{%% url "build_artifact" extra.build.pk ' |
471 | ' "tasklogfile" data.pk %%}">' | 459 | ' "tasklogfile" data.pk %%}">' |
472 | ' <i class="icon-download-alt" ' | 460 | ' <span class="glyphicon glyphicon-download-alt' |
473 | ' title="Download task log file"></i>' | 461 | ' get-help" title="Download task log file"></span>' |
474 | '</a> {%% endif %%}' | 462 | '</a> {%% endif %%}' |
475 | '<i class="icon-question-sign get-help ' | 463 | '<span class="glyphicon glyphicon-question-sign' |
476 | 'hover-help" style="visibility: hidden;" ' | 464 | ' get-help hover-help" style="visibility: hidden;" ' |
477 | 'title="{{data.get_outcome_help}}"></i>' | 465 | 'title="{{data.get_outcome_help}}"></span>' |
478 | ) % outcome_tmpl | 466 | ) % outcome_tmpl |
479 | 467 | ||
480 | self.add_column(title="Outcome", | 468 | self.add_column(title="Outcome", |
@@ -483,10 +471,11 @@ class BuildTasksTable(BuildTablesMixin): | |||
483 | filter_name="task_outcome", | 471 | filter_name="task_outcome", |
484 | orderable=True) | 472 | orderable=True) |
485 | 473 | ||
474 | self.toggle_columns['sstate_result'] = len(self.columns) | ||
475 | |||
486 | self.add_column(title="Cache attempt", | 476 | self.add_column(title="Cache attempt", |
487 | static_data_name="sstate_result", | 477 | static_data_name="sstate_result", |
488 | static_data_template=task_link_tmpl( | 478 | static_data_template='{{data.sstate_text}}', |
489 | "{{data.sstate_text}}"), | ||
490 | filter_name="sstate_outcome", | 479 | filter_name="sstate_outcome", |
491 | orderable=True) | 480 | orderable=True) |
492 | 481 | ||
@@ -542,6 +531,7 @@ class BuildTimeTable(BuildTasksTable): | |||
542 | super(BuildTimeTable, self).setup_columns(**kwargs) | 531 | super(BuildTimeTable, self).setup_columns(**kwargs) |
543 | 532 | ||
544 | self.columns[self.toggle_columns['order']]['hidden'] = True | 533 | self.columns[self.toggle_columns['order']]['hidden'] = True |
534 | self.columns[self.toggle_columns['sstate_result']]['hidden'] = True | ||
545 | self.columns[self.toggle_columns['elapsed_time']]['hidden'] = False | 535 | self.columns[self.toggle_columns['elapsed_time']]['hidden'] = False |
546 | 536 | ||
547 | 537 | ||
@@ -556,6 +546,7 @@ class BuildCPUTimeTable(BuildTasksTable): | |||
556 | super(BuildCPUTimeTable, self).setup_columns(**kwargs) | 546 | super(BuildCPUTimeTable, self).setup_columns(**kwargs) |
557 | 547 | ||
558 | self.columns[self.toggle_columns['order']]['hidden'] = True | 548 | self.columns[self.toggle_columns['order']]['hidden'] = True |
549 | self.columns[self.toggle_columns['sstate_result']]['hidden'] = True | ||
559 | self.columns[self.toggle_columns['cpu_time_sys']]['hidden'] = False | 550 | self.columns[self.toggle_columns['cpu_time_sys']]['hidden'] = False |
560 | self.columns[self.toggle_columns['cpu_time_user']]['hidden'] = False | 551 | self.columns[self.toggle_columns['cpu_time_user']]['hidden'] = False |
561 | 552 | ||
@@ -571,4 +562,5 @@ class BuildIOTable(BuildTasksTable): | |||
571 | super(BuildIOTable, self).setup_columns(**kwargs) | 562 | super(BuildIOTable, self).setup_columns(**kwargs) |
572 | 563 | ||
573 | self.columns[self.toggle_columns['order']]['hidden'] = True | 564 | self.columns[self.toggle_columns['order']]['hidden'] = True |
565 | self.columns[self.toggle_columns['sstate_result']]['hidden'] = True | ||
574 | self.columns[self.toggle_columns['disk_io']]['hidden'] = False | 566 | self.columns[self.toggle_columns['disk_io']]['hidden'] = False |
diff --git a/bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html b/bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html index 52cc0569f7..eb4c656901 100644 --- a/bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html +++ b/bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html | |||
@@ -11,10 +11,10 @@ | |||
11 | {% endblock %} | 11 | {% endblock %} |
12 | 12 | ||
13 | {% block buildinfomain %} | 13 | {% block buildinfomain %} |
14 | <div class="span10"> | 14 | <div class="col-md-10"> |
15 | {# xhr_table_url is just the current url so leave it blank #} | 15 | {# xhr_table_url is just the current url so leave it blank #} |
16 | {% with xhr_table_url='' %} | 16 | {% with xhr_table_url='' %} |
17 | <div class="page-header"> | 17 | <div class="page-header build-data"> |
18 | <h1> | 18 | <h1> |
19 | {{title}} (<span class="table-count-{{table_name}}">0</span>) </h2> | 19 | {{title}} (<span class="table-count-{{table_name}}">0</span>) </h2> |
20 | </h1> | 20 | </h1> |