diff options
-rw-r--r-- | devel/views.py | 5 | ||||
-rw-r--r-- | main/models.py | 20 | ||||
-rw-r--r-- | templates/devel/index.html | 4 |
3 files changed, 22 insertions, 7 deletions
diff --git a/devel/views.py b/devel/views.py index f243d7d0..cbeaf156 100644 --- a/devel/views.py +++ b/devel/views.py @@ -36,7 +36,10 @@ def index(request): 'name': arch_name, 'count': Package.objects.filter(arch__exact = arch).count(), 'flagged': Package.objects.filter( - arch__exact = arch).filter(needupdate=True).count() + arch__exact = arch).filter(needupdate=True).count(), + 'flagnotest': Package.objects.filter( + arch__exact = arch).filter(needupdate=True).exclude( + repo=Package.REPOS['testing']).count() }) repo_stats = [] diff --git a/main/models.py b/main/models.py index 74f2cdbf..525a4ceb 100644 --- a/main/models.py +++ b/main/models.py @@ -70,14 +70,22 @@ class PackageManager(models.Manager): def get_flag_stats(self): results = [] # first the orphans - unflagged = self.filter(maintainer=0).count() - flagged = self.filter(maintainer=0).filter(needupdate=True).count() - results.append((User(id=0,first_name='Orphans'), unflagged, flagged)) + noflag = self.filter(maintainer=0).count() + flagged = self.filter(maintainer=0).filter(needupdate=True).count() + flagnotest = self.filter(maintainer=0).filter( + needupdate=True).exclude( + repo=Package.REPOS['testing']).count() + results.append( + (User(id=0,first_name='Orphans'), noflag, flagged, flagnotest)) # now the rest for maint in User.objects.all().order_by('first_name'): - unflagged = self.filter(maintainer=maint.id).count() - flagged = self.filter(maintainer=maint.id).filter(needupdate=True).count() - results.append((maint, unflagged, flagged)) + noflag = self.filter(maintainer=maint.id).count() + flagged = self.filter(maintainer=maint.id).filter( + needupdate=True).count() + flagnotest = self.filter(maintainer=maint.id).filter( + needupdate=True).exclude( + repo=Package.REPOS['testing']).count() + results.append((maint, noflag, flagged, flagnotest)) return results diff --git a/templates/devel/index.html b/templates/devel/index.html index 91055376..d993e3b8 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -29,12 +29,14 @@ <th width="50%">Arch</th> <th># Packages</th> <th># Flagged</th> + <th># Flagnotest</th> </tr> {% for arch in arches %} <tr class="{% cycle pkgr2,pkgr1 %}"> <td><strong>{{ arch.name }}</strong></td> <td><a href="/packages/?arch={{ arch.name }}"><strong>{{ arch.count }}</strong> packages</a></td> <td><a href="/packages/?arch={{ arch.name }}&flagged_only=y"><strong>{{ arch.flagged }}</strong> packages</a></td> + <td><a href="/packages/?arch={{ arch.name }}&flagged_only=y"><strong>{{ arch.flagnotest }}</strong> packages</a></td> </tr> {% endfor %} </table> @@ -66,12 +68,14 @@ <th width="50%">Maintainer</th> <th># Packages</th> <th># Flagged</th> + <th># Flagnotest</th> </tr> {% for maint in stats %} <tr class="{% cycle pkgr2,pkgr1 %}"> <td><strong>{{ maint.0.get_full_name }}</strong></td> <td><a href="/packages/?maint={{ maint.0.id }}"><strong>{{ maint.1 }}</strong> packages</a></td> <td><a href="/packages/?maint={{ maint.0.id }}&flagged_only=y"><strong>{{ maint.2 }}</strong> packages</a></td> + <td><a href="/packages/?maint={{ maint.0.id }}&flagged_only=y"><strong>{{ maint.3 }}</strong> packages</a></td> </tr> {% endfor %} </table> |