summaryrefslogtreecommitdiffstats
path: root/devel/views.py
AgeCommit message (Collapse)AuthorFilesLines
2013-02-27Use user.userprofile rather than user.get_profile()Dan McGee1-2/+2
The get_profile() function is deprecated as of Django 1.5. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03Use DeveloperKey model on package page and reportsDan McGee1-10/+23
This introduces the new model to the package page so subkey signings show up as attributed to the original developer. We also teach the mismatched signatures report to recognize all keys and subkeys of a given developer, cutting down on some of the bogus results. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Mark todolist packages as removed rather than deleting themDan McGee1-1/+1
This makes it easier to see the progression of a todolist and its contents easier since we are no longer losing the data. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Convert to using new todolist models everywhereDan McGee1-5/+7
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-11-16Use python set comprehension syntax supported in 2.7Dan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-25Exclude inactive developers in maintainer countDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-25Add a new column to developer repo statsDan McGee1-0/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-15Add JS-based filtering to the developer reportsDan McGee1-0/+4
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-05Split devel forms out of devel/views.pyDan McGee1-96/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-09Add flag requests to developer last action calculationDan McGee1-1/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-25Replace deprecated direct_to_template() with render() shortcutDan McGee1-8/+7
Now that Django actually provides a concise way to use a RequestContext object without instantiating it, we can use that rather than the old function-based generic view that worked well to do the same. Additionally, these function-based generic views will be gone in Django 1.5, so might as well make the move now. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-25Remove custom utc_now() function, use django.utils.timezone.now()Dan McGee1-6/+6
This was around from the time when we handled timezones sanely and Django did not; now that we are on 1.4 we no longer need our own code to handle this. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-08Use 3 decimal places for showing compression ratioDan McGee1-1/+1
Otherwise there are too many grouped under each value. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19Switch to usage of new Depend objectDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12Change to new time access methods in pgpdump codeDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02Ensure order_by default value is cleared when using distinct()Dan McGee1-2/+4
Otherwise the queryset returns nonsensical results. I find the design of this less than obvious but so be it; we can ensure the results work regardless of a default ordering on the model. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-30Add a "last action" column to developer clocks pageDan McGee1-7/+36
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-27Dev dashboard performance improvementDan McGee1-5/+10
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-27Incomplete-only todolists optimizationDan McGee1-2/+1
We can push this down to the database if we know in advance we only need the incomplete lists. This helps our call on the developer dashboard quite a bit; the time of the single query in question drops from >1300ms to around 40ms. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20UserProfile model and fields shuffleDan McGee1-1/+2
Move this model into the devel/ application, and move the PGPKeyField which is used only by these models into the application as well. This involves updating some old migrations along the way to ensure we don't reference a field class that no longer exists. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-09Change old packages report from two years to one yearDan McGee1-2/+2
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-07Add a mismatched signatures developer reportDan McGee1-2/+21
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-03-24Make all datetime objects fully timezone awareDan McGee1-20/+13
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-21Ensure clocks Expires header works in 59th minute of hourDan McGee1-2/+2
This was a rather careless oversight on my part. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-08Exclude all compressed manpagesDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-13Reduce false positives returned by uncompressed manpages reportDan McGee1-4/+6
Explicitly exclude '.html' files from the report. This fixes the issue noted in FS#28372. We also add `is_directory=False` to both the manpage and info page queries; this could help the database come up with a better plan. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05Adjust page and content caching lengths and decoratorsDan McGee1-4/+10
Remove never_cache from many places now that we don't actually need it since we aren't caching by default. Adjust our cache_function decorator times be shorter values, and also randomize them a bit to make cache invalidations not all line up. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12PyLint suggested cleanupsDan McGee1-9/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-09Prefilter packages when looking up uncompressed man/info pagesDan McGee1-19/+23
This vastly speeds up the reports if you just want to look at your own packages and not the complete list, especially if the list of packages you maintain is relatively short. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-03Exclude Latin Name from developer profile formDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21Better support for non-latin full namesDan McGee1-1/+1
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-11Show relevant signoffs on dashboardDan McGee1-0/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03Use UTC now everywhereDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-05Allow developer index to work with a non-authenticated userDan McGee1-1/+6
This is not the normal case given the decorator on the view, but during testing and development it is sometimes useful so others don't have to log in over a non-secure connection to check things out. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-28Add a bad compression ratio reportDan McGee1-1/+18
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Add (hidden) ability to search by last packagerDan McGee1-0/+2
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-15Refactor common select_related into manager methodDan McGee1-2/+2
For a Package object query, we almost always did .select_related('arch', 'repo). Refactor this into the manager as a 'normal()' method so we can avoid sprinkling the same logic everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Add a long out-of-date developer reportDan McGee1-1/+6
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-02Add a PGP key field on the dev profileDan McGee1-0/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-27Remove now uneeded pytz bug workaroundDan McGee1-3/+1
2011-05-15Allow screening developer reports by maintainerDan McGee1-4/+18
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-04Make uncompressed info query slightly easier on the databaseDan McGee1-1/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-02Add filesizeformat filter to sizes in reports/bigEvangelos Foutras1-1/+8
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-04-30Add unneeded orphans reportDan McGee1-1/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-30Change big packages reportDan McGee1-2/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-30Use single quotes only in dev report viewDan McGee1-9/+9
2011-04-26Developer reportsDan McGee1-5/+49
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-09Show more info about todolists on developer dashboardDan McGee1-2/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-09Rename local variables for clarityDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-29Work out kinks in create new user viewDan McGee1-6/+17
We allowed repo selection before, but never actually called save_m2m() so selections would have to be repeated on the next page. Add in group selection as well to the form, and ensure we do all of our database operations in one transaction so it is a lot easier to test and roll back if things go wrong. Signed-off-by: Dan McGee <dan@archlinux.org>