From dcbb859a259082bf8d0587a63385ece44c697e45 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 23 Jun 2011 20:13:01 -0500 Subject: Add (hidden) ability to search by last packager This is used from the developer dashboard to add a new column to the stats of # of packages for a given developer where they were the last to do the packaging. Signed-off-by: Dan McGee --- templates/devel/index.html | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index 2a0058d3..f9ca2135 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -182,10 +182,10 @@

Stats by Repository

{# dash-by-arch #} {% endcache %} -{% cache 60 dev-dash-by-maintainer %} -
+{% cache 60 dev-dash-by-developer %} +
-

Stats by Maintainer

+

Stats by Developer

{% if perms.main.change_package %}

Look for stale relations

@@ -195,17 +195,24 @@

Stats by Maintainer

Maintainer - # Packages + # Maintained # Flagged + # Last Packager - Orphan + Orphan/Unknown - {{ orphan.package_count }} packages + {{ orphan.package_count }} packages + - {{ orphan.flagged_count }} packages + {{ orphan.flagged_count }} packages + + + {{ orphan.updated_count }} packages + @@ -214,15 +221,21 @@

Stats by Maintainer

{{ maint.get_full_name }} - {{ maint.package_count }} packages + {{ maint.package_count }} packages + - {{ maint.flagged_count }} packages + {{ maint.flagged_count }} packages + + + {{ maint.updated_count }} packages + {% endfor %} -
{# #dash-by-maintainer #} +
{# #dash-by-developer #} {% endcache %} {% load cdn %}{% jquery %} @@ -236,9 +249,11 @@

Stats by Maintainer

{widgets: ['zebra'], sortList: [[0,0], [1,0]]}); $("#dash-todo:not(:has(tbody tr.empty))").tablesorter( {widgets: ['zebra'], sortList: [[1,1]]}); - $(".dash-stats").tablesorter( - {widgets: ['zebra'], sortList: [[0,0]], - headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' } } }); + $(".dash-stats").tablesorter({ + widgets: ['zebra'], + sortList: [[0,0]], + headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' }, 3: { sorter: 'pkgcount' } } + }); }); {% endblock %} -- cgit v1.2.3-54-g00ecf From d3f1763efefef9ff5095a49b075b27b38df83d16 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 28 Jun 2011 00:12:45 -0500 Subject: Add a bad compression ratio report Signed-off-by: Dan McGee --- devel/views.py | 19 ++++++++++++++++++- templates/devel/index.html | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'templates/devel/index.html') diff --git a/devel/views.py b/devel/views.py index 4399b73f..79eef318 100644 --- a/devel/views.py +++ b/devel/views.py @@ -6,7 +6,7 @@ from django.contrib.sites.models import Site from django.core.mail import send_mail from django.db import transaction -from django.db.models import Q +from django.db.models import F, Q from django.http import Http404 from django.shortcuts import get_object_or_404 from django.template import loader, Context @@ -163,6 +163,23 @@ def report(request, report, username=None): package.compressed_size) package.installed_size_pretty = filesizeformat( package.installed_size) + elif report == 'badcompression': + title = 'Packages that have little need for compression' + cutoff = 0.90 * F('installed_size') + packages = packages.filter(compressed_size__gt=0, installed_size__gt=0, + compressed_size__gte=cutoff).order_by('-compressed_size') + names = [ 'Compressed Size', 'Installed Size', 'Ratio', 'Type' ] + attrs = [ 'compressed_size_pretty', 'installed_size_pretty', + 'ratio', 'compress_type' ] + # Format the compressed and installed sizes with MB/GB/etc suffixes + for package in packages: + package.compressed_size_pretty = filesizeformat( + package.compressed_size) + package.installed_size_pretty = filesizeformat( + package.installed_size) + ratio = package.compressed_size / float(package.installed_size) + package.ratio = '%.2f' % ratio + package.compress_type = package.filename.split('.')[-1] elif report == 'uncompressed-man': title = 'Packages with uncompressed manpages' # magic going on here! Checking for all '.1'...'.9' extensions diff --git a/templates/devel/index.html b/templates/devel/index.html index f9ca2135..1689319b 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -115,6 +115,9 @@

Developer Reports

  • Uncompressed Info Pages: Self-explanatory (yours only)
  • +
  • Bad Compression: + Packages with a compression ratio of less than 10% + (yours only)
  • Unneeded Orphans: Packages that have no maintainer and are not required by any other package in any repository
  • -- cgit v1.2.3-54-g00ecf From ae12aa58fd6c6965b3eadcf3843ea68602069c60 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 25 Jul 2011 12:27:46 -0500 Subject: Small template updates * Show full version in developer dashboard out of date pane * Link packages on flag confirmation screen Signed-off-by: Dan McGee --- templates/devel/index.html | 2 +- templates/packages/flag_confirmed.html | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index 1689319b..ad101145 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -27,7 +27,7 @@

    My Flagged Packages

    {{ pkg.pkgname }} {{ pkg.repo.name }} - {{ pkg.pkgver }} + {{ pkg.full_version }} {{ pkg.arch.name }} {{ pkg.flag_date|date }} {{ pkg.last_update|date }} diff --git a/templates/packages/flag_confirmed.html b/templates/packages/flag_confirmed.html index 02c24f72..9ef316cb 100644 --- a/templates/packages/flag_confirmed.html +++ b/templates/packages/flag_confirmed.html @@ -4,12 +4,13 @@ {% block content %}
    -

    Package Flagged - {{ package.pkgname }}

    +

    Package Flagged - {{ package.pkgname }}

    Thank you, the maintainers have been notified the following packages are out-of-date:

      {% for pkg in packages %} -
    • {{ pkg.pkgname }} {{ pkg.full_version }} [{{ pkg.repo.name|lower }}] ({{ pkg.arch.name }})
    • +
    • {{ pkg.pkgname }} {{ pkg.full_version }} [{{ pkg.repo.name|lower }}] ({{ pkg.arch.name }})
    • {% endfor %}
    -- cgit v1.2.3-54-g00ecf