summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-02-03Fix spacing issues in signoffs 'Show More' linksDan McGee
When we had a simple multi-line message here, we would end up with too much spacing wherever the link had planted itself due to the div adding visual whitespace. Remove the div completely when the link is clicked to remedy this. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03Remove some whitespace from index templateDan McGee
We had a lot going on here in the news section as far as Django template tags go, so remove some whitespace to prevent so many empty lines from being ommitted. This doesn't remove all of it from the generated HTML, but does cut it down significantly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03Run pngcrush and optipng over most static contentDan McGee
The programs have improved a bit and found some room for optimization, especially in the static logo content. Some files were reduced in size by 50% or more. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28Merge branch 'release'release_2013-01-28Dan McGee
2013-01-28Fix missing template variable for removed todolist packagesDan McGee
When there was no longer an attached package, running in template debug mode showed we were trying to dereference a variable that didn't exist. Fix the issue by adding a bit more to the if conditional block. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28Slight reorginization in the download page templateDan McGee
Move things up that don't belong to the torrent section; make magnet link more prominent by using a bulleted list. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28Use torrent view and checksums where appropriateDan McGee
We no longer need to link externally to these items since we have all the data available in the web application now. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28Extract torrent trackers into a settings variableDan McGee
This allows them to be overridden and changed in a central location, like we do with the SVN URL, PXE boot URL, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28Add MD5 and SHA1 fields for releasesDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28Don't error on empty torrent dataDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-27Fix todolist maintainer sortingDan McGee
And also fix up a place where we dereferenced a variable in a template that doesn't exist. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-25Merge branch 'on-the-plane'release_2013-01-25Dan McGee
2013-01-23Use more modern verison of string template formattingDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-23Use querysets for calls to get_object_or_404(Package)Dan McGee
This works better in most cases since we need the architecture and repository objects at some point during the view process. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22Slight optimization when searching for removed packageDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22Spice up the release listing page a bitDan McGee
Add JS tablesorter code and add some style to the yesno column. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22Override the default admin queryset for some modelsDan McGee
Because some attributes are optional or otherwise not auto-magically picked up by Django, we can help the performance of loading these pages a lot by forcing a select_related() on the queryset used by the admin. For something like signoff_specifications, this drops the query count from ~107 to 9 queries. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22Use a subquery rather than two queries in attach_maintainersDan McGee
Now that we are using a database that doesn't stink, it makes more sense to do all of the stuff we need to do down at the database level. This helps a lot when 500+ packages are in play at a given time, such as some of our larger rebuild todo lists. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22Show staging version on todolist view pageDan McGee
If one exists, it is easy enough to show it here so in-progress todolists can easily be cross-checked with the current state of the repository. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-21Switch to using the cached STATICFILES_STORAGE backendDan McGee
This should finally let us crank up the Expires: header to far-future values in production since updates to JS and CSS files will take effect immediately. Some minor removals were made from retro stylesheets as they were referencing files that don't actually exist because they were missing from the web archive. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-21Slight reorganization of urls.pyDan McGee
Move some of the not-so-frequently used resources further down in the list of URLs, which will ever so slightly speed up the resolver. Sitemaps don't need to be checked near as often, for instance. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20Fix error in get_requiredby() when checking providesrelease_2013-01-20Dan McGee
The query refactor in commit 1b1b516bd removed a queryset I didn't realize was getting used elsewhere in the function. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20Remove AlwaysCommitMiddlewareDan McGee
Let's just go with the Django database option for PostreSQL autocommit mode instead. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20Query performance enhancements in get_requiredby()Dan McGee
For packages with particularly long lists of provides (e.g. perl), the query was getting a bit out of control with the list of names passed in. However, changing it to simply do a subquery resulted in some really poor planning by PostgreSQL. Doing this as a custom 'WHERE' clause utilizing the 'UNION ALL' SQL operator works very well. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20Lengthen the mirror rsync IP address fieldDan McGee
Make it long enough to support a full-form IPv6 address with a subnet. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Add a view to download the torrent available for a given releaseDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Mark release version string as uniqueDan McGee
It should be unique anyway, but it is especially important now that we are using it in URL patterns for lookup. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Implement torrent data parsing and extraction via bencodeDan McGee
This allows uploading of the actual torrent file itself into the webapp and then pulling the relevant pieces of information out of it. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Add basic release list and details viewsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Add more metadata to releng Release modelDan McGee
Add a file_size field which we will use in the RSS feed, and also add a field for future storage of the torrent data itself. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Don't redefine mirror_url function every callDan McGee
If we pull this out and define it at the top level once, we save the interpreter a fair amount of work. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Publicize the releases feedDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Initial cut of a Releases RSS feedDan McGee
This is our first use of enclosures on the site as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Add double click event handler to hide imageDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-18Use a set instead of list when gathering package differencesDan McGee
If we implement the __eq__ and __hash__ methods, we can use a set to gather package difference objects and make deduplication of objects a lot more efficient. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-18Include 'files_last_update' in package sitemap queryDan McGee
We need this for the package files sitemap; else we are doing one query per package to retrieve this field. Whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-18Don't pull and sort mirror URLs unless we have toDan McGee
On the download page, the explicit sorted() call was forcing evaluation of the Django queryset, even if we never actually needed the results because the template fragment was cached. Wrap it all in a callable function which looks the same to the template, but saves us the cost of evaluation every single page view. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Convert all usages of flag icons to new spriterelease_2013-01-18Dan McGee
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-16Remove debugging print statementDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Rename famfamfam flags sprite PNG and CSSDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16More famfamfam flags style tweakingDan McGee
* Point default image at a blank spot in the PNG. * Remove dead style. * Don't use any crazy prefix matching stuff; just have separate class for default view. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Simplify famfamfam flags CSSDan McGee
Remove any redundant width and height declarations from individual countries and shorten the CSS class names. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Add famfamfam flags sprite image and CSSDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Add a little easter egg for people to findDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Tabs -> spaces in archweb.cssDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Clean up and make several migrations modernrelease_2013-01-15Dan McGee
This moves most migrations to the v2 format that have been presenting some issues. One missing depends_on relationship has been added, and we allow an index to not be dropped if it does not exist due to the shittyness in sqlite3 actually keeping indexes across DDL on that table. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Add new AlwaysCommitMiddleware to the stackDan McGee
The reason for this is documented in the middleware itself. Without this, pgbouncer is of little use to us since it has to throw away every connection we try to route through it because of unclean disconnects. In theory, with the switch to using pgbouncer for all WSGI originating connections and adding this middleware, we should see a notable decrease in connection time to the database. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Handle connection and transaction more properly in reporeadDan McGee
A few minor things are fixed here. One is PostgreSQL, and more specifically pgbouncer, don't like it when the connection is closed after psycopg2 has started an implicit transaction even for read-only queries. Ensure we call commit as our last database action in all cases. The other is related- Django in management commands doesn't ever call close on any database connection you may have been using, so PostgreSQL gets mad about this fact and logs a message saying such. Close the connection explicitly when we are done with it to play nice. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Support mirror status JSON by tierDan McGee
Just as we do for the normal status HTML view. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Ensure URLs without check data work on mirror details pageDan McGee
Less noticeable in production as the templates don't show '@@@INVALID@@@' there, but we were trying to access attributes that don't actually exist on certain mirror objects. Signed-off-by: Dan McGee <dan@archlinux.org>