From 80e7d19726a95b40727b7f35b9ad80b436b14b93 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 27 Apr 2012 09:24:34 -0500 Subject: Dev dashboard performance improvement Rather than one query per cell in the arches and repos statistics tables, we can group these together up front using Django annotations. This means we only need one query per table. In my local instance with all of the staging repos imported, this reduces the total query count on this page from 56 to 26, a rather marked improvement. Signed-off-by: Dan McGee --- templates/devel/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index a0ccb91f..c67cf277 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -194,10 +194,10 @@ {{ arch.name }} - {{ arch.packages.count }} packages + {{ arch.total_ct }} packages - {{ arch.packages.flagged.count }} packages + {{ arch.flagged_ct }} packages {% endfor %} @@ -224,10 +224,10 @@ {{ repo.name }} - {{ repo.packages.count }} packages + {{ repo.total_ct }} packages - {{ repo.packages.flagged.count }} packages + {{ repo.flagged_ct }} packages {% endfor %} -- cgit v1.2.3-2-g168b From 942f73deba9b6e13da8b4e801ddd98bee3e0b90d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 29 Apr 2012 19:00:41 -0500 Subject: Make colspan match number of columns in developer dashboard Signed-off-by: Dan McGee --- templates/devel/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index c67cf277..d1bd4d2c 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -39,7 +39,7 @@ {{ pkg.last_update|date }} {% empty %} - No flagged packages to display + No flagged packages to display {% endfor %} -- cgit v1.2.3-2-g168b From 8383a071608329c7683f7a710030ce945bd20b4d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 8 Jul 2012 23:30:48 -0500 Subject: Add a new jquery_tablesorter CDN template tag And use it everywhere we were including the file before. This should make updating the version a heck of a lot easier. Signed-off-by: Dan McGee --- templates/devel/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index d1bd4d2c..ad8ee0ee 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -291,8 +291,7 @@ {# #dash-by-developer #} {% endcache %} -{% load cdn %}{% jquery %} - +{% load cdn %}{% jquery %}{% jquery_tablesorter %} {% endblock %} -- cgit v1.2.3-2-g168b From 05f309d7e57a66d9309abbf19b4328bad514b978 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 24 Sep 2012 21:13:02 -0500 Subject: Add a new column to developer repo stats Signed-off-by: Dan McGee --- templates/devel/index.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index 488b6755..a07a4190 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -216,6 +216,7 @@ Repository # Packages # Flagged + # Maintainers @@ -228,6 +229,8 @@ {{ repo.flagged_ct }} packages + {{ repo.maintainer_ct }} maintainers + {% endfor %} -- cgit v1.2.3-2-g168b From c8ece67cec9c421ac0c711554edd34f022623b45 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 28 Dec 2012 00:27:20 -0600 Subject: Convert to using new todolist models everywhere This is a rather widespread set of changes converting usage to the new todo list and todo list package model recently introduced. The data migration is not included in this commit. After this commit, the old model should no longer be referenced anywhere. Signed-off-by: Dan McGee --- templates/devel/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index a07a4190..57151041 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -59,11 +59,11 @@ {% for todopkg in todopkgs %} - {{ todopkg.list.name }} + {{ todopkg.todolist.name }} {% pkg_details_link todopkg.pkg %} - {{ todopkg.pkg.repo.name }} - {{ todopkg.pkg.arch.name }} + {{ todopkg.repo.name }} + {{ todopkg.arch.name }} {{ todopkg.pkg.maintainers|join:', ' }} {% empty %} @@ -90,7 +90,7 @@ {{ todo.name }} - {{ todo.date_added|date }} + {{ todo.created|date }} {{ todo.creator.get_full_name }} {{ todo.description|urlize }} {{ todo.pkg_count }} -- cgit v1.2.3-2-g168b From ee507a5b81d7a21eaa67da4c848522a5a97d2e3c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 28 Dec 2012 14:44:09 -0600 Subject: Add a todolist package details link template tag Given the way we retrieve certain related objects, it makes more sense to use a custom tag here rather than our generic package details link tag. When viewing a large todolist, this saves significantly on the number of queries we need to build the page. Signed-off-by: Dan McGee --- templates/devel/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'templates/devel/index.html') diff --git a/templates/devel/index.html b/templates/devel/index.html index 57151041..6d304409 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -2,6 +2,7 @@ {% load static from staticfiles %} {% load cache %} {% load package_extras %} +{% load todolists %} {% block title %}Arch Linux - Developer Dashboard{% endblock %} @@ -61,7 +62,7 @@ {{ todopkg.todolist.name }} - {% pkg_details_link todopkg.pkg %} + {% todopkg_details_link todopkg %} {{ todopkg.repo.name }} {{ todopkg.arch.name }} {{ todopkg.pkg.maintainers|join:', ' }} -- cgit v1.2.3-2-g168b