Commit Graph

130 Commits

Author SHA1 Message Date
Dan McGee
4a5714fba7 Revert "Change old packages report from two years to one year"
This reverts commit 8d3a1a1c50.
Turns out we aren't updating packages quite as often anymore. There are
currently 1900+ packages in the repos built more than one year ago.

Signed-off-by: Dan McGee <dan@archlinux.org>

Conflicts:
	devel/views.py
2014-01-26 12:55:33 -06:00
Dan McGee
a38665c652 Admin template updates for Django 1.6
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-15 12:23:50 -06:00
Dan McGee
86f9d6788e Django 1.6 upgrade, deprecation cleanup
PendingDeprecationWarning: 'The `cycle` template tag is changing to
escape its arguments; the non-autoescaping version is deprecated. Load
it from the `future` tag library to start using the new behavior.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-06 21:10:52 -06:00
Dan McGee
a8203a0a17 Load developer dashboard stats via $.load() call
This completes the separation started in an earlier commit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-21 20:37:44 -05:00
Dan McGee
66412aa103 Move stats portion of developer dashboard to separate view
This stuff is all below the fold when the page first loads, and adds a
good amount of loading time to the developer dashboard. Split it out,
where it will be wired back and hooked up via an AJAX insertion in a
future commit. Both parts work standalone as is in this commit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-21 20:29:17 -05:00
Dan McGee
ecf57207c0 Fix sorting of file size values in jQuery tablesorter
The dumbass currency parser was matching values like '1.5 GB', causing
the actual sorting to not work right since the magnitude values of GB
values are obviously different than MB. Remove it fully from the parser
list so our actual parser matches and we sort correctly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-21 20:06:14 -05:00
Dan McGee
3e085183bf Move all script blocks into {% script_block %} section
I added this a while back, but didn't roll it out to all templates.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20 11:28:12 -05:00
Dan McGee
0b930fd921 Convert all usages of flag icons to new sprite
This uses a new template tag to avoid repeating construction of the
necessary HTML element all over the place. The site should look exactly
as it did before, except now you don't have to download 20+ images to
see some pages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16 00:36:17 -06:00
Dan McGee
ee507a5b81 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 <dan@archlinux.org>
2012-12-28 14:48:29 -06:00
Dan McGee
c8ece67cec 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 <dan@archlinux.org>
2012-12-28 14:48:29 -06:00
Dan McGee
8a8542ede6 Use multiple separate document.ready() handlers
If one of them breaks, we don't want to prevent the rest of the on-load
events from firing. This is currently a problem on some browsers with
the versions of jQuery and tablesorter we are using.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-11 10:02:26 -06:00
Dan McGee
05f309d7e5 Add a new column to developer repo stats
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-24 21:13:02 -05:00
Dan McGee
a2034fc80d Add JS-based filtering to the developer reports
This can use the todolist filtering functions we made more generic in a
previous commit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-15 09:14:36 -05:00
Dan McGee
acf252f7f3 Add some HTML5-ization in JS of various input attributes
On the login page, give focus to the username box when the page loads as
well as turning autocorrection and auto-capitalization off on the
username box.

For the developer profile page, we can add some minor validation and
typing of certain form fields that allow things like iPhone and Android
to customize the presented keyboard to the user, as well as allowing
browsers to do some client-side validation.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-05 09:29:38 -05:00
Dan McGee
978a5c61a5 Add flag requests to developer last action calculation
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08 19:34:37 -05:00
Dan McGee
2a221fa72f Upgrade to jQuery 1.7.2 and a maintained tablesorter
This touches a wide variety of files as well as makes updates to some of
our own code to be fully compatible. We also use some of the newer
locale/accent sorting features of tablesorter to make tables with
developer names sort in a more sane fashion.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-28 17:52:52 -05:00
Dan McGee
8383a07160 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 <dan@archlinux.org>
2012-07-08 23:33:44 -05:00
Dan McGee
25a2fbc7c1 Add a "last action" column to developer clocks page
This allows people to easily see if a developer has done anything
recently that we can easily grab a date for. Obviously this doesn't
include all sources of activity, so the list of things checked is
clearly stated at the top.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-29 19:15:19 -05:00
Dan McGee
942f73deba Make colspan match number of columns in developer dashboard
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-29 19:00:41 -05:00
Dan McGee
80e7d19726 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 <dan@archlinux.org>
2012-04-27 09:24:34 -05:00
Dan McGee
15c94b2061 Make sorting by time on clocks page more predictable
This is a little bit of a hack but works well. Add the timezone name to
the end of the sort so those in the same time zone end up next to each
other. For timezones like CEST that have many different specifiers, it
makes more sense to group them by 'Europe/Berlin', 'Europe/Paris', etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-27 09:12:26 -05:00
Dan McGee
104aec2726 Add migration to auto-populate developer countries, display flags
Add a quick and dirty migration to derive country info from the
developer-provided timezone, and display the flag next to the location
if we have it available on the clocks and developer profiles pages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26 13:25:15 -05:00
Dan McGee
8d3a1a1c50 Change old packages report from two years to one year
Now that all packages are getting more attention, we can shorten the
time period on the report to a shorter date range.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-08 20:51:12 -05:00
Dan McGee
1a2f117037 Add a mismatched signatures developer report
This finds odd signatures in our repositories, which includes signature
times not matching with build dates, different signer and packager, etc.

We enhance our user lookup helper class to look up users by PGP key.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07 14:53:08 -05:00
Dan McGee
48aec15343 Revert "Add some dev dashboard info regarding signed package count"
This reverts commit 797185faed. Now that
all packages in the Arch repos are signed, this column isn't very useful
as it just reflects the total package count.

Conflicts:

	packages/views.py -> packages/views/search.py

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 17:10:22 -05:00
Dan McGee
3e2e4d4ef8 Convert STATIC_URL usage to {% static %} template tag
This is a lot more flexible and will allow more than just simple
prefixing of the static file resources.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 12:37:19 -05:00
Dan McGee
90e08b4863 Make all datetime objects fully timezone aware
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to
ensure we don't mix aware and non-aware datetime objects when dealing
with datetimes in the code. Add a utc_now() helper method that we can
use most places, and ensure there is always a timezone attached when
necessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
0545e3e0ec Django 1.4 admin and admin media changes
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
d7d01e3c59 Add testing version column to dashboard flagged packages table
As requested in FS#28298.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-06 23:43:39 -06:00
Dan McGee
943ef2e8e4 Convert to and enable staticfiles contrib application
This moves our site static files into the sitestatic directory if they
are shared resources, and also moves a handful of things (such as the
artwork logos) into application-specific static/ directories. This
allows the staticfiles contrib app to work after a few settings tweaks,
a run of collectstatic, and massaging the hardcoded '/media/' prefix out
of our templates.

Django 1.4 is going to make this a lot easier to move things to a CDN
and provides better template tags; for now this is setting the stage
before we can move to that.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 23:06:10 -06:00
Dan McGee
9279d9a04c Fix minor validation error
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30 12:29:21 -06:00
Dan McGee
85657db05d Better support for non-latin full names
Add a 'latin_name' field to the user profile so we can better support
those developers with names in non-Latin scripts, and yet still show a
Latin name as necessary on the developer profile page. This field only
shows up if populated.

Also, use consistent sorting everywhere- rather than using username,
always use first_name and last_name fields.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21 10:08:23 -06:00
Dan McGee
64f5799ef7 Fix up empty table display on dev dashboard
Fix the colspan for the existing tables, and add a notice for the new
signoffs table which did not have one.

Thanks-to: Andrea Scarpino <andrea@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-15 15:15:08 -06:00
Dan McGee
022692b3f3 Show relevant signoffs on dashboard
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-11 10:43:18 -06:00
Dan McGee
1cde4d45da Fix invalid markup on dev dashboard
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-12 09:08:28 -05:00
Dan McGee
797185faed Add some dev dashboard info regarding signed package count
This adds a column similar to the flagged package count for the number
of signed packages in a given architecture or repository. It is up to
the user to do some simple math to figure out the number of unsigned
packages.

Also, add 'signed' as a hidden search field option similar to what we
did for packager.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19 08:44:22 -05:00
Dan McGee
156b91eb59 Use new package details link tag in templates
This replaces a lot of boilerplate we had everywhere, and makes sure
things like the title are consistent across all links.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09 23:16:00 -05:00
Dan McGee
ae12aa58fd Small template updates
* Show full version in developer dashboard out of date pane
* Link packages on flag confirmation screen

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-25 12:27:46 -05:00
Dan McGee
f3262790b3 Convert tabs to spaces in devel packages template
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05 09:47:54 -05:00
Dan McGee
d3f1763efe Add a bad compression ratio report
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-28 00:12:45 -05:00
Dan McGee
dcbb859a25 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 <dan@archlinux.org>
2011-06-23 20:13:01 -05:00
Dan McGee
037f67bb3c Link to stale relations page
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14 18:35:26 -05:00
Dan McGee
3284b30255 Add a long out-of-date developer report
This shows packages that have been marked out of date for more than 90
days in the repos.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13 13:18:28 -05:00
Dan McGee
f04de80528 Allow screening developer reports by maintainer
A simple link is added for each user, but the URLs are flexible enough
to screen by any maintainer if you know how they are constructed.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-15 11:25:17 -05:00
Evangelos Foutras
8de1bd0639 Add filesizeformat filter to sizes in reports/big
We also add a new 'filesize' tablesorter parser that handles all the
suffixes found in django's filesizeformat filter.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-02 10:50:10 -05:00
Dan McGee
5379348c93 Add unneeded orphans report
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-29 18:21:43 -05:00
Dan McGee
e58eb76a1a Change big packages report
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-29 18:21:10 -05:00
Dan McGee
174d04ad03 Add links to developer reports
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-25 18:17:56 -05:00
Dan McGee
381e0a7872 Developer reports
This commit adds four initial developer reports that are hopefully
useful to developers and packages in checking up on the state of things.
They include:

* big : the 100 biggest packages in the repos
* old : packages built > 2 years ago
* uncompressed-man : self-explanatory
* uncompressed-info : self-explanatory

There should obviously be some sort of index page to access all of
these, so that will be coming soon.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-25 18:09:39 -05:00
Dan McGee
96c59b1dc2 Add some simple template caching on developer dashboard
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-16 07:25:47 -05:00