summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2007-12-30 12:13:47 -0800
committereliott <eliott@cactuswax.net>2007-12-30 12:13:47 -0800
commit77f51431d300f99f4d23ed9a72de2c693d2aef2a (patch)
treef1f4f5fca3ec7962dfe9afd02104c6d8c15cecf3
parentef8c17e0fd7ad1bc9a86f82cc8c290b6f049a20a (diff)
downloadarchweb-77f51431d300f99f4d23ed9a72de2c693d2aef2a.tar.gz
archweb-77f51431d300f99f4d23ed9a72de2c693d2aef2a.zip
Feature for FS#8988
-rw-r--r--devel/views.py14
-rw-r--r--templates/devel/index.html21
2 files changed, 33 insertions, 2 deletions
diff --git a/devel/views.py b/devel/views.py
index 449190f2..bf49346f 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -31,8 +31,20 @@ def index(request):
else:
pkgs = None
+ repo_stats = []
+ for repo in Repo.objects.all():
+ repo_stats.append({
+ 'name': repo.name,
+ 'count': Package.objects.filter(repo__exact = repo).count(),
+ 'flagged': Package.objects.filter(repo__exact = repo).filter(needupdate=True).count()
+ })
+
return render_response(request, 'devel/index.html',
- {'stats':stats, 'pkgs':pkgs, 'todos':todos, 'maint':thismaint})
+ {'stats':stats,
+ 'pkgs':pkgs,
+ 'todos':todos,
+ 'maint':thismaint,
+ 'repos': repo_stats})
@login_required
#@is_maintainer
diff --git a/templates/devel/index.html b/templates/devel/index.html
index 2617de9f..0c468cee 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -21,9 +21,28 @@
</div>
<br /><br />
{% endif %}
+
+ <div class="greybox">
+ <h3 class="title">Repository Package Stats</h3>
+ <table class="results" width="100%">
+ <tr>
+ <th>Repository</th>
+ <th># Package</th>
+ <th># Flagged</th>
+ </tr>
+ {% for repo in repos %}
+ <tr>
+ <td><a href="/packages/?repo={{ repo.name }}">{{ repo.name }}</a></td>
+ <td><strong>{{ repo.count }}</strong> packages</td>
+ <td><strong>{{ repo.flagged }}</strong> packages</td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ <br /><br />
<div class="greybox">
- <h3 class="title">Flagged Package Stats</h3>
+ <h3 class="title">Maintainer Package Stats</h3>
<table class="results" width="100%">
<tr>
<th>Maintainer</th>