summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-05-31Whoops, committed a little bit too muchrelease_2013-05-31Dan McGee1-3/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-31Honor mirror URL active attribute in several placesDan McGee4-7/+14
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-31Add active column to mirror URLsDan McGee2-0/+84
2013-05-26Bump several requirements versionsDan McGee2-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-21Add 'Edit Mirror' link to mirror details pageDan McGee1-1/+7
For those that have permissions to do so. Makes it a heck of a lot easier to navigate around and enable or disable mirrors as necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-21Begin removal of FTP mirror supportDan McGee6-37/+10
FTP is a terrible protocol these days compared to HTTP. IPv6 support is spotty at best, it is much slower for the connect/begin transfer cycle, and overall just doesn't provide anything HTTP does better. Start killing bits that we've added to treat FTP as a first-class protocol and regulate it to the back seat. The expectation here is once this commit goes live to the production site, the FTP mirror URLs themselves will get removed completely from the database, and the FTP protocol object itself will get deleted. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-12Fix reporead issue with temporary database filesrelease_2013-05-12Dan McGee1-3/+4
We shouldn't be tripping ourselves up on "hidden" files. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-10Merge branch 'mirror-errors'Dan McGee5-33/+39
2013-05-10Add a 'last touched by' column to todolist detail viewDan McGee3-3/+7
This allows you to see very easily who last manipulated a package todolist item in case you have a need to know. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-10Add mirror error logs to mirror details pageDan McGee2-2/+12
Give a window of 7 days for logs here rather than the default 24 hours we do on the main status page since we are only retrieving details for a single mirror with a handful of URLs. This should make it easier to have all information regarding one mirror in a single location. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-10Pull mirror error table into inclusion templateDan McGee3-25/+25
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-10Simplify with statements by using new syntaxDan McGee1-6/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-23When retrieving signoff specs, select the arch object as wellrelease_2013-04-27Dan McGee1-1/+2
Otherwise we do one query per row in the signoff table to fetch the architecture and it's required_signoffs value, which is less than ideal. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-22Use required_signoffs value when creating signoff specsDan McGee4-8/+16
And respect it elsewhere when we create a fake default specification because a real one does not exist yet. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-22Add 'required_signoffs' field to Arch modelDan McGee4-24/+141
This will indicate how many signoffs are required for packages of the given architecture. Set the default to 2 as it currently stands. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-21Load developer dashboard stats via $.load() callDan McGee1-8/+14
This completes the separation started in an earlier commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-21Move stats portion of developer dashboard to separate viewDan McGee4-128/+142
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-21Fix sorting of file size values in jQuery tablesorterDan McGee2-1/+17
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-20Fix parsing issues when query string keys contain unicodeDan McGee1-0/+6
This is dirty, but it works. There is probably a better and cleaner way to do all of this, but for now just fix it quickly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20Unbreak the package differences pageDan McGee1-2/+0
We had a weird conditional around everything on the page that doesn't really need to be there. Remove it. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20Minor CSS cleanups/tweaksDan McGee1-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20Move all script blocks into {% script_block %} sectionrelease_2013-04-20Dan McGee20-0/+52
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-20Fix some None issues with sqlite3 and mirror statusDan McGee1-2/+4
If certain attributes came back from the database as NULL, we had issues parsing them. Pass None/NULL straight through rather than trying to type-convert. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20Remove {% spaceless %} tag from a few more placesDan McGee4-18/+8
This tag is simply not worth the time it takes to do what it does. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20Remove spaceless from depends and required by template fragmentsDan McGee2-5/+4
This was a bit of premature optimization, and ends up slowing the page generation a good amount since we have to run this ~400 times on some packages with long depends or required by lists. Webserver compression should handle this just fine and not result in too much page bloat. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Sort required by entries by dependency typeDan McGee1-2/+10
We were doing this for depends entries already, and we can do the same for required by entries via some absolutely awesome SQL query magic and injecting a few more things to our already crazy query. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Various minor code cleanups and fixesrelease_2013-04-16Dan McGee25-44/+23
Most of these were suggested by PyCharm, and include everything from little syntax issues and other bad smells to dead or bad code. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Add shortcut for HEAD requests on slower viewsDan McGee3-1/+15
We sometimes see some web bots and crawlers make HEAD requests to verify existence of certain pages in the application. However, they are less than kind as 20-50 requests might arrive at the same time, and package search and details pages are some of the slowest rendering pages we have due to the Django template engine. Rather than waste time generating the content only to throw it away, response as soon as we can with either a 404 or 200 response as appropriate, omitting the 'Content-Length' header completely, which seems to be acceptable by the HTTP spec. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Remove COUNTRY_LOOKUP global variableDan McGee1-3/+3
This is only used in one place, so it makes more sense for it to not be globally accessible. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Grab author when loading news item detailsDan McGee1-1/+1
Saves a query to the database. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Use require_safe decorator rather than require_GETDan McGee1-3/+3
This was added in Django 1.4, and ensures both GET and HEAD requests, but not POST requests, are allowed through. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-14Tweaks to mirror status chart generationrelease_2013-04-14Dan McGee1-10/+12
* Use 'jQuery' rather than '$' * Use same colors for URLs in every chart for clarity Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-14Draw one mirror status graph per check locationDan McGee3-23/+60
Rather than lump it all together and have odd spikes depending on which side of the Atlantic checked a mirror in a given timeslot, draw a chart per check location. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-14Turn visualize-mirror into a CSS classDan McGee2-5/+5
2013-04-14Add a JSON view for retrieving mirror check locationsDan McGee2-2/+32
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-14Fix missing attribute error in replacment find codeDan McGee1-1/+2
Whoops. Just introduced this when ensuring we look for both the packgae in other repositories as well as any replacments. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-14Remove cache_function decorator from a few spotsDan McGee2-6/+1
The benefit of these storage operations might be outweighed by the cost, especially given how infrequently these functions are called. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-14Reduce mirror status query madnessDan McGee1-55/+91
Move completely to custom SQL for this logic. The Django ORM just doesn't play nice with the kind of query we are looking to do, so it is easier to do using raw SQL. The biggest pain factor here is in supporting sqlite as it doesn't have nearly the capabilities in handling datetime types directly in the database, as well as having some different type conversion necessities. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-13Show replacments for package if it has been removedDan McGee2-0/+11
This covers the case where we can't find the package in any other repositories, but it was removed recently enough that we have a found package update object. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-13Add additional pg_trgm indexes for quicker searchesDan McGee1-0/+3
This allows our normal keyword-based search to be index-optimized rather than always doing full table scans. It requires the pg_trgm extension which is shipped out of the box with any sane install of PostgreSQL. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-13Support only a single mirror ID in error/status retrievalDan McGee2-11/+11
This simplifies things and makes injecting this single mirror ID into custom SQL a whole lot easier. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-13Calculate average URL delay in the databaseDan McGee1-19/+30
Rather than doing this in the Python code and needing 12,000+ rows returned from the database, we can do it in the database and get fewer than 300 rows back. If I recall correctly, the reason this was not done originally was due to our usage of MySQL and some really bad date math/overflow stuff it did when the interval between last_sync and check_time were greater than about a week. Luckily, we have switched to using a more sane database. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-10Allow mirror rsync IPs to be IPv4/IPv6 addresses or networksrelease_2013-04-10Dan McGee6-15/+138
This gives us a bunch more flexibility on this field, and now supports all the options that the rsync config file supports. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-08Bump psycopg2 requirements.txt versionDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-29Update some package requirementsDan McGee2-6/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-29Remove old-style build date parsingDan McGee1-7/+3
This was added in 2010 in commit e95c4563e32 as a short-term fix. The short-term is up. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-29Add IP family lookup to CheckLocation modelDan McGee1-0/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-13mirrorcheck: s/if/elif/ when determining what check function to runrelease_2013-03-13Dan McGee1-1/+1
This was a silly thinko here; it caused the logs to fill up with a bunch of 'unknown url type: rsync' errors. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-12Don't check FTP + IPv6 combinationDan McGee1-1/+15
Very few, if any, FTP servers support connections over IPv6. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-11Remove function caching in packages/utilsDan McGee1-3/+1
We don't see these called enough to make caching the data worth it. Signed-off-by: Dan McGee <dan@archlinux.org>