From 18cb7fe426d7ac726cf40002a507a57f6cf3ffed Mon Sep 17 00:00:00 2001 From: Dave Lerner Date: Wed, 6 Apr 2016 14:44:41 +0100 Subject: bitbake: toaster: add rev dep column to image detail pages Add a column to the custom image pages that shows the reverse dependencies in a format matching the dependencies column: - either blank or a button showing the count of reverse dependencies, - when the button is clicked, a popover appears showing the list of reverse dependencies, with each package's size, and the total size of all of the reverse dependencies. The implementation adds a packages table method to retreive the reverse dependency total size, and adds a separate 'popover' html template. Both of these changes follow the pattern for the dependencies column. [YOCTO #9163] (Bitbake rev: 2f978dccaa1ec82c7ad350bdc1cd9500000984eb) Signed-off-by: Dave Lerner Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/tables.py | 6 ++++++ .../templates/snippets/pkg_revdependencies_popover.html | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html (limited to 'bitbake/lib/toaster/toastergui') diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index 385d65895d..2cc2f4eb7b 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py @@ -725,6 +725,12 @@ class PackagesTable(ToasterTable): static_data_template='\ {% include "snippets/pkg_dependencies_popover.html" %}') + self.add_column(title="Reverse dependencies", + static_data_name="reverse_dependencies", + static_data_template='\ + {% include "snippets/pkg_revdependencies_popover.html" %}', + hidden=True) + self.add_column(title="Recipe", field_name="recipe__name", orderable=True, diff --git a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html new file mode 100644 index 0000000000..453a9d0137 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html @@ -0,0 +1,14 @@ +{# Popover that displays the reverse dependencies and sizes of a package 'data' used in the Packages table #} +{% with data.package_dependencies_target.all_depends.count as dep_count %} +{% load projecttags %} +{% if dep_count %} + + {{dep_count}} + +{% endif %} +{% endwith %} -- cgit v1.2.3-54-g00ecf