From c904c093693c49436a0d5cedd23b4fd4b8b70438 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 1 Dec 2014 22:40:34 -0600 Subject: Update to latest django-jinja release Signed-off-by: Dan McGee --- requirements.txt | 2 +- requirements_prod.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index e1acd2e9..473535b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ IPy==0.81 Jinja2==2.7.3 Markdown==2.4.1 bencode==1.0 -django-jinja==1.0.4 +django-jinja==1.0.5 django_countries==3.0.1 jsmin==2.0.11 pgpdump==1.5 diff --git a/requirements_prod.txt b/requirements_prod.txt index ef535eb8..bb7567f3 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -4,7 +4,7 @@ IPy==0.81 Jinja2==2.7.3 Markdown==2.4.1 bencode==1.0 -django-jinja==1.0.4 +django-jinja==1.0.5 django_countries==3.0.1 jsmin==2.0.11 pgpdump==1.5 -- cgit v1.2.3 From e12f88f1d6ab15dd4fbd828f4c2689657bcfa5a2 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 2 Dec 2014 14:48:16 -0600 Subject: Fix filtering of minor versions on differences page This has been broken for a long time; looks like it happened when we switched over to using our standard details tag and no longer emit a element unconditionally. Signed-off-by: Dan McGee --- sitestatic/archweb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 0c4059a9..5f6e5e97 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -283,12 +283,12 @@ function filter_packages() { var cells = $(this).children('td'); /* all this just to get the split version out of the table cell */ - var ver_a = cells.eq(2).find('span').text().match(pat); + var ver_a = cells.eq(2).text().match(pat); if (!ver_a) { return true; } - var ver_b = cells.eq(3).find('span').text().match(pat); + var ver_b = cells.eq(3).text().match(pat); if (!ver_b) { return true; } -- cgit v1.2.3 From dca00e7aabc057d0069606fec6261cc571ddcb71 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 2 Dec 2014 14:53:38 -0600 Subject: Filter maintainer list on packages page by allowed repos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do this elsewhere on the master keys page, so do the same thing here. Noticed-by: Johannes Löthberg Signed-off-by: Dan McGee --- packages/views/search.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/views/search.py b/packages/views/search.py index 0b776d79..e4cd0423 100644 --- a/packages/views/search.py +++ b/packages/views/search.py @@ -6,6 +6,7 @@ from django.db.models import Q from django.http import HttpResponse from django.views.generic import ListView +from devel.models import UserProfile from main.models import Package, Arch, Repo from main.utils import empty_response, make_choice from ..models import PackageRelation @@ -36,14 +37,16 @@ class PackageSearchForm(forms.Form): self.fields['arch'].choices = make_choice( [arch.name for arch in Arch.objects.all()]) self.fields['q'].widget.attrs.update({"size": "30"}) - maints = User.objects.filter(is_active=True).order_by( + + profile_ids = UserProfile.allowed_repos.through.objects.values('userprofile_id') + people = User.objects.filter( + is_active=True, userprofile__id__in=profile_ids).order_by( 'first_name', 'last_name') - self.fields['maintainer'].choices = \ - [('', 'All'), ('orphan', 'Orphan')] + \ - [(m.username, m.get_full_name()) for m in maints] - self.fields['packager'].choices = \ - [('', 'All'), ('unknown', 'Unknown')] + \ - [(m.username, m.get_full_name()) for m in maints] + people = [('', 'All'), ('orphan', 'Orphan')] + \ + [(p.username, p.get_full_name()) for p in people] + + self.fields['maintainer'].choices = people + self.fields['packager'].choices = people def exact_matches(self): # only do exact match search if 'q' is sole parameter -- cgit v1.2.3 From 92437ffb21b42c5e2b58af496448f64e8292442b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 2 Dec 2014 15:11:58 -0600 Subject: Filter maintainer list on developer dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank Johannes for this one. Only reason I didn't take his patches is for consistency with the way we were already doing this on the master keys page. Noticed-by: Johannes Löthberg Signed-off-by: Dan McGee --- devel/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devel/utils.py b/devel/utils.py index 0cafbb59..68ae5bdc 100644 --- a/devel/utils.py +++ b/devel/utils.py @@ -5,13 +5,16 @@ from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.db import connection from django.db.models import Count, Q +from devel.models import UserProfile from main.utils import cache_function from main.models import Package from packages.models import PackageRelation @cache_function(283) def get_annotated_maintainers(): - maintainers = User.objects.filter(is_active=True).order_by( + profile_ids = UserProfile.allowed_repos.through.objects.values('userprofile_id') + maintainers = User.objects.filter( + is_active=True, userprofile__id__in=profile_ids).order_by( 'first_name', 'last_name') # annotate the maintainers with # of maintained and flagged packages -- cgit v1.2.3 From 0fc409ef089ed35f545d0f9fdef53f42bbe5be50 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 2 Dec 2014 15:13:24 -0600 Subject: Make dev stats section look better when loading Signed-off-by: Dan McGee --- templates/devel/index.html | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/templates/devel/index.html b/templates/devel/index.html index 147917a0..e9330734 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -157,8 +157,11 @@ {# #dev-dashboard #} -
-

Enable Javascript to get more useful info here.

+
+
+

Developer Stats

+

Enable JavaScript to get more useful info here.

+
{% endblock %} @@ -167,8 +170,12 @@