summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-12 00:13:25 +0100
committerDan McGee <dan@archlinux.org>2011-03-14 14:32:54 +0100
commitad2a9ac23af0d4610e079741070c4408a4c6ce16 (patch)
tree299525d28b35ee2dc6d902b626514519c8ef45cd /devel
parentc4a335d5da78ca4558cea8500ae78db9e3be74ff (diff)
downloadarchweb-ad2a9ac23af0d4610e079741070c4408a4c6ce16.tar.gz
archweb-ad2a9ac23af0d4610e079741070c4408a4c6ce16.tar.xz
Show orphan package counts in maintainer dashboard table
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/devel/views.py b/devel/views.py
index 46387f7..5b8965d 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -36,11 +36,22 @@ def index(request):
maintainers = get_annotated_maintainers()
+ maintained = PackageRelation.objects.filter(
+ type=PackageRelation.MAINTAINER).values('pkgbase')
+ total_orphans = Package.objects.exclude(pkgbase__in=maintained).count()
+ total_flagged_orphans = Package.objects.filter(
+ flag_date__isnull=False).exclude(pkgbase__in=maintained).count()
+ orphan = {
+ 'package_count': total_orphans,
+ 'flagged_count': total_flagged_orphans,
+ }
+
page_dict = {
'todos': Todolist.objects.incomplete().order_by('-date_added'),
'repos': Repo.objects.all(),
'arches': Arch.objects.all(),
'maintainers': maintainers,
+ 'orphan': orphan,
'flagged' : flagged,
'todopkgs' : todopkgs,
}