diff options
-rw-r--r-- | devel/views.py | 11 | ||||
-rw-r--r-- | templates/devel/index.html | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/devel/views.py b/devel/views.py index 46387f7a..5b8965d8 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, } diff --git a/templates/devel/index.html b/templates/devel/index.html index 08ca249a..fb4ed4ab 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -166,6 +166,15 @@ <th># Packages</th> <th># Flagged</th> </tr> + <tr class="even"> + <td><em>Orphan</em></td> + <td><a href="/packages/?maintainer=orphan" + title="View all orphan packages"> + <strong>{{ orphan.package_count }}</strong> packages</a></td> + <td><a href="/packages/?maintainer=orphan&flagged=Flagged" + title="View all flagged orphan packages"> + <strong>{{ orphan.flagged_count }}</strong> packages</a></td> + </tr> </thead> <tbody> {% for maint in maintainers %} |