summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/urls.py1
-rw-r--r--devel/views.py22
-rw-r--r--media/archweb.css1
-rw-r--r--media/django-jsi18n.js35
-rw-r--r--releng/fixtures/clockchoices.json55
-rw-r--r--releng/views.py5
-rw-r--r--templates/devel/index.html22
-rw-r--r--templates/devel/packages.html8
8 files changed, 96 insertions, 53 deletions
diff --git a/devel/urls.py b/devel/urls.py
index 9bf50f45..8759562e 100644
--- a/devel/urls.py
+++ b/devel/urls.py
@@ -7,6 +7,7 @@ urlpatterns = patterns('devel.views',
(r'^$', 'index'),
(r'^newuser/$', 'new_user_form'),
(r'^profile/$', 'change_profile'),
+ (r'^reports/(?P<report>.*)/(?P<username>.*)/$', 'report'),
(r'^reports/(?P<report>.*)/$', 'report'),
)
diff --git a/devel/views.py b/devel/views.py
index 5d34cc41..c0d10285 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -128,18 +128,21 @@ def change_profile(request):
{'form': form, 'profile_form': profile_form})
@login_required
-def report(request, report):
+def report(request, report, username=None):
title = 'Developer Report'
packages = Package.objects.select_related('arch', 'repo')
- names = attrs = None
+ names = attrs = user = None
+
if report == 'old':
title = 'Packages last built more than two years ago'
cutoff = datetime.now() - timedelta(days=730)
- packages = packages.filter(build_date__lt=cutoff).order_by('build_date')
+ packages = packages.filter(
+ build_date__lt=cutoff).order_by('build_date')
elif report == 'big':
title = 'Packages with compressed size > 50 MiB'
cutoff = 50 * 1024 * 1024
- packages = packages.filter(compressed_size__gte=cutoff).order_by('-compressed_size')
+ packages = packages.filter(
+ compressed_size__gte=cutoff).order_by('-compressed_size')
names = [ 'Compressed Size', 'Installed Size' ]
attrs = [ 'compressed_size_pretty', 'installed_size_pretty' ]
# Format the compressed and installed sizes with MB/GB/etc suffixes
@@ -175,8 +178,19 @@ def report(request, report):
else:
raise Http404
+ if username:
+ user = get_object_or_404(User, username=username, is_active=True)
+ maintained = PackageRelation.objects.filter(user=user,
+ type=PackageRelation.MAINTAINER).values('pkgbase')
+ packages = packages.filter(pkgbase__in=maintained)
+
+ maints = User.objects.filter(id__in=PackageRelation.objects.filter(
+ type=PackageRelation.MAINTAINER).values('user'))
+
context = {
+ 'all_maintainers': maints,
'title': title,
+ 'maintainer': user,
'packages': packages,
'column_names': names,
'column_attrs': attrs,
diff --git a/media/archweb.css b/media/archweb.css
index ab88c86f..ee4fd169 100644
--- a/media/archweb.css
+++ b/media/archweb.css
@@ -264,6 +264,7 @@ ul.admin-actions li { display: inline; padding-left: 1.5em; }
#releng-feedback label { width: auto; display: inline; font-weight: normal; }
#releng-feedback ul { padding-left: 1em; }
#releng-feedback li { list-style: none; }
+#releng-feedback ul+.helptext { position: relative; top: -0.9em; }
/* highlight current website in the navbar */
#archnavbar.anb-home ul li#anb-home a { color: white !important; }
diff --git a/media/django-jsi18n.js b/media/django-jsi18n.js
deleted file mode 100644
index 83562c1a..00000000
--- a/media/django-jsi18n.js
+++ /dev/null
@@ -1,35 +0,0 @@
-
-/* gettext library */
-
-var catalog = new Array();
-
-function pluralidx(count) { return (count == 1) ? 0 : 1; }
-
-
-function gettext(msgid) {
- var value = catalog[msgid];
- if (typeof(value) == 'undefined') {
- return msgid;
- } else {
- return (typeof(value) == 'string') ? value : value[0];
- }
-}
-
-function ngettext(singular, plural, count) {
- value = catalog[singular];
- if (typeof(value) == 'undefined') {
- return (count == 1) ? singular : plural;
- } else {
- return value[pluralidx(count)];
- }
-}
-
-function gettext_noop(msgid) { return msgid; }
-
-function interpolate(fmt, obj, named) {
- if (named) {
- return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
- } else {
- return fmt.replace(/%s/g, function(match){return String(obj.shift())});
- }
-}
diff --git a/releng/fixtures/clockchoices.json b/releng/fixtures/clockchoices.json
index f328801a..d2d4eb80 100644
--- a/releng/fixtures/clockchoices.json
+++ b/releng/fixtures/clockchoices.json
@@ -3,21 +3,70 @@
"pk": 1,
"model": "releng.clockchoice",
"fields": {
- "name": "unchanged"
+ "name": "default region/timezone, keep clock"
}
},
{
"pk": 2,
"model": "releng.clockchoice",
"fields": {
- "name": "configured manually"
+ "name": "default region/timezone, change clock manually (UTC)"
}
},
{
"pk": 3,
"model": "releng.clockchoice",
"fields": {
- "name": "NTP"
+ "name": "default region/timezone, change clock with NTP (UTC)"
+ }
+ },
+ {
+ "pk": 4,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "default region/timezone, change clock manually (localtime)"
+ }
+ },
+ {
+ "pk": 5,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "default region/timezone, change clock with NTP (localtime)"
+ }
+ },
+ {
+ "pk": 6,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, keep clock"
+ }
+ },
+ {
+ "pk": 7,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock manually (UTC)"
+ }
+ },
+ {
+ "pk": 8,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock with NTP (UTC)"
+ }
+ },
+ {
+ "pk": 9,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock manually (localtime)"
+ }
+ },
+ {
+ "pk": 10,
+ "model": "releng.clockchoice",
+ "fields": {
+ "name": "update region/timezone, change clock with NTP (localtime)"
}
}
]
diff --git a/releng/views.py b/releng/views.py
index a810bbbc..3180a9ed 100644
--- a/releng/views.py
+++ b/releng/views.py
@@ -14,7 +14,8 @@ def standard_field(model, empty_label=None, help_text=None, required=True):
help_text=help_text, required=required)
class TestForm(forms.ModelForm):
- iso = forms.ModelChoiceField(queryset=Iso.objects.filter(active=True))
+ iso = forms.ModelChoiceField(queryset=Iso.objects.filter(
+ active=True).order_by('-id'))
architecture = standard_field(Architecture)
iso_type = standard_field(IsoType)
boot_type = standard_field(BootType)
@@ -121,7 +122,7 @@ def test_results_for(request, option, value):
raise Http404
option_model = getattr(Test, option).field.rel.to
real_value = get_object_or_404(option_model, pk=value)
- test_list = real_value.test_set.order_by("iso__name", "pk")
+ test_list = real_value.test_set.order_by('-iso__name', '-pk')
context = {
'option': option,
'value': real_value,
diff --git a/templates/devel/index.html b/templates/devel/index.html
index 5913cdde..7b728a91 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -100,13 +100,21 @@
<h3>Developer Reports</h3>
<ul>
- <li><a href="reports/big/">Big</a>: All packages with compressed size &gt; 50 MiB</li>
- <li><a href="reports/old/">Old</a>: Packages last built more than two years ago</li>
- <li><a href="reports/uncompressed-man/">Uncompressed Manpages</a>: Self-explanatory</li>
- <li><a href="reports/uncompressed-info/">Uncompressed Info Pages</a>: Self-explanatory</li>
- <li><a href="reports/unneeded-orphans/">Unneeded Orphans</a>: Packages
- that have no maintainer and are not required by any other package in
- any repository</li>
+ <li><a href="reports/big/">Big</a>:
+ All packages with compressed size &gt; 50 MiB
+ (<a href="reports/big/{{ user.username }}/">yours only</a>)</li>
+ <li><a href="reports/old/">Old</a>:
+ Packages last built more than two years ago
+ (<a href="reports/old/{{ user.username }}/">yours only</a>)</li>
+ <li><a href="reports/uncompressed-man/">Uncompressed Manpages</a>:
+ Self-explanatory
+ (<a href="reports/uncompressed-man/{{ user.username }}/">yours only</a>)</li>
+ <li><a href="reports/uncompressed-info/">Uncompressed Info Pages</a>:
+ Self-explanatory
+ (<a href="reports/uncompressed-info/{{ user.username }}/">yours only</a>)</li>
+ <li><a href="reports/unneeded-orphans/">Unneeded Orphans</a>:
+ Packages that have no maintainer and are not required by any other
+ package in any repository</li>
</ul>
</div><!-- #dev-dashboard -->
diff --git a/templates/devel/packages.html b/templates/devel/packages.html
index e0988c03..051ee4a3 100644
--- a/templates/devel/packages.html
+++ b/templates/devel/packages.html
@@ -5,8 +5,12 @@
{% block content %}
<div class="box">
- <h2>{{ title }}</h2>
- <p>{{ packages|length }} package{{ packages|pluralize }} found.</p>
+ <h2>{{ title }}{% if maintainer %},
+ maintained by {{ maintainer.get_full_name }}{% endif%}</h2>
+ <p>{{ packages|length }} package{{ packages|pluralize }} found.
+ {% if maintainer %}This report only includes packages maintained by
+ {{ maintainer.get_full_name }} ({{ maintainer.username }}).{% endif %}
+ </p>
<table class="results">
<thead>
<tr>