summaryrefslogtreecommitdiffstats
path: root/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorDave Lerner <dave.lerner@windriver.com>2016-04-06 14:44:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-06 23:08:34 +0100
commit2f978dccaa1ec82c7ad350bdc1cd9500000984eb (patch)
tree7293e5a3e1a72b18cd1d6f349e9b9e3cfe111385 /lib/toaster/orm/models.py
parentf50fff03b3de02e73a3cc2eb9935f7c345dbddc4 (diff)
downloadbitbake-2f978dccaa1ec82c7ad350bdc1cd9500000984eb.tar.gz
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] Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/orm/models.py')
-rw-r--r--lib/toaster/orm/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 2a01184a7..68c307299 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -822,6 +822,13 @@ class Package_DependencyManager(models.Manager):
"""
return self.all().aggregate(Sum('depends_on__size'))
+ def get_total_revdeps_size(self):
+ """ Returns the total file size of all the packages that depend on
+ this package.
+ """
+ return self.all().aggregate(Sum('package_id__size'))
+
+
def all_depends(self):
""" Returns just the depends packages and not any other dep_type """
return self.filter(Q(dep_type=Package_Dependency.TYPE_RDEPENDS) |