summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-10-08Store latest news date in memcachedDan McGee1-2/+23
This saves two database queries each request, meaning no database hits at all if we are just going to return a 304 response. It also requires adding a post_save signal to ensure our cache is updated with the correct latest news date upon saving a news item. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-08Factor out common last modified code for news feedDan McGee1-7/+12
This will set up retrieving this value from memcached as well as some other changes to come. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07Factor check completion pct into mirror scoreDan McGee2-4/+10
Use it as the divisor in our slightly longer equation. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07mirrorcheck: record duration on file not found errorsDan McGee1-1/+16
On an HTTP 404, FTP 550, or inability to parse the lastsync file, record the duration of the check even though we couldn't get a time from the mirror. This allows for these checks to show up as completed but in error, which is more what. Previously, inability to parse the date was also recorded as a success, so change that to be a failure and record an error message with it. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07Add a merchandise storeDan McGee1-2/+4
And also update the lingo we use here, 'schwag' implies free and can be a bit confusing for people to see, especially non-English speakers. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-06Make it actually possible to upload a new dev imageDan McGee2-2/+2
We need to both submit the form with the correct encoding and then bind the form itself to request.FILES and not just request.POST. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Adding changing of user profile detailsAngel Velasquez3-6/+24
The idea of this patch is allow to the developers who have an account, to change their data without asking some admin to do it for them. Dan: put private email address field back as it is used for a different purpose; add some help text and field names as appropriate. Signed-off-by: Angel Velasquez <angvp@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Fix executable mode on imageDan McGee1-0/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Make AirVM image an actual PNGDan McGee1-0/+0
I saved this in here as a PNG when in fact it was a GIF. Use optipng to convert it and get a smaller file size. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Make it possible to override settingsDan McGee1-9/+15
By importing local settings at the end, you can override settings specified in settings.py. Helpful for something like the Django debug toolbar. The template loader needs to come last, however, in order to respect the TEMPLATE_DEBUG setting. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Make manage.py use python2 binaryDan McGee1-1/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Update AirVM brandingDan McGee4-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Make user profile a OneToOneFieldDan McGee6-6/+156
We had this set up as a unique ForeignKey before, which adds some indirection due to the RelatedManager object being there. By making it a OneToOneField, we can get the profile object directly, enforce uniqueness, and also use it in select_related() calls to make our profiles page a bit more efficient. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Switch another query to use is_downloadDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Add some select_related() magicDan McGee2-2/+2
Made obvious when poking around with the Django debug toolbar. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-04Todo list minor fixes and comments for laterDan McGee2-7/+10
When we show the edit todo list page, use a sorted list retrieved straight from the database instead of a unordered set() we create at the application level. Also add some comments for potential later improvements on transaction boundaries and async emailing. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-04reporead: ignore nicknames in name matching codeDan McGee1-0/+4
2010-10-02Fix an off by one error in math for check intervalDan McGee1-1/+5
Because we are averaging the interval and not the value, we need to subtract one from the total we are dividing by. Whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-01Allow donors to be invisibleDan McGee4-1/+156
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Update MirrorProtocol fixture dataDan McGee2-12/+17
Move it to the correct location and add the new field. Also tidy up some of the instructions dealing with loading this data. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Use new is_download fieldDan McGee2-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Add is_download field to mirror protocolsDan McGee4-1/+139
This will replace all the usages of '!= rsync' and 'is ftp or http' we have in the code with one check on a boolean flag. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Update READMEÁngel Velásquez1-22/+59
This was in dire need of a rewrite, so it gets one here. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Move most inline JS into script fileDan McGee7-122/+137
We're getting to the point where we are starting to have a good chunk of JS scattered about. Centralize a lot of it for maintenance and performance purposes. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Remove console.log statementsDan McGee1-2/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Add gitattributes fileDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Mirror status improvementsDan McGee4-25/+90
* Fix sorting issues. '', 'unknown', and '∞' should now always sort after anything else in the list. * Add a completion percentage column; this will tell you at a glance if a mirror is sometimes unresponsive. This should probably be incorporated into the mirror score. * Make a few more things dynamic in the template, like the time back the page reflects. * Add some additional template tags for formatting things. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-29Fix migration dependencies exposed after moving modelsDan McGee2-0/+8
When we moved some models from one app to another, we didn't do anything to ensure the tables were created at all initially. Enforce this by adding the minimal required dependencies- those migrations in the 'main' model that last touched the involved models moving between apps. Noticed-by: Angel Velasquez <angvp@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-25Add a basic mirror details pageDan McGee5-1/+78
Still some work to do here, but this covers the basics of the public view we can show for mirrors and their associated data. The upstream and downstream links should be working OK to aid navigation, but right now we have some potential dead links for non-authenticated users if they click a link to a "private" mirror. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-25Make general mirror list view publicDan McGee5-28/+30
Hide some columns when not logged in because they aren't relevant for the general public, but this will work nicely as a base page for all of our known mirrors. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-25Add note about mean syncing delayDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-25Give more information about mirror check runs and frequencyDan McGee3-19/+38
Show how many times the check has ran in the last 24 hours, as well as the average interval between checks. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-24Mirror status query refinementsDan McGee1-4/+4
Only show errors for active and public mirrors, and collapse two filter calls into just one for our normal status query. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-24Fix news permission checking in templatesDan McGee2-6/+6
We were still looking at the permissions on the main application; these need to be updated to point at the news application instead. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-23Update BBS and bugs links to use HTTPSDan McGee7-28/+28
Since we only do HTTPS now on these services, no point in sending someone through a useless redirect. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-23Get secure/unsecure checking actually workingDan McGee3-5/+19
We need a bit more, like actually having something relevant in the RequestContext object, in order for this to all work. Instead of putting the full request in just populate a 'secure' key with a boolean value indicating whether the request is secure. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-23Update newsletter/magazine linkDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Switch mirror status delay display to average delayDan McGee3-11/+27
This takes a bit more work to compute, but since we cache all of this anyway it isn't too big of deal. Using average delay instead of last delay will be a bit more fair on mirrors that have odd syncing schedules, as well as exposing those that only sync once a day. Also fix an issue that will arise with cutoff_time being calculated once, and adjust mirror score to treat hours delay as a float rather than an integer. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Allow generated mirrorlist to take status info into accountDan McGee4-11/+42
By using the mirror score we calculate, we can sort the mirrors in the generated mirrorlist for people. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Allow caching of mirror status infoDan McGee2-30/+48
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Fix self-closing anchor links for ChromeDan McGee1-3/+3
Apparently it can't parse a very normal looking <a/> because they forgot one of their original purposes doesn't require a body. Awesome. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Prevent 500 if no mirror checks have ranDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Merge branch 'mirror-check'Dan McGee12-5/+452
2010-09-22Add link to mirror status toolDan McGee2-4/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Add ordering, sorting, and a lot more info to mirror status pageDan McGee3-7/+60
This should get this to the point where it is releasable to the general public for their use and pleasure. Still not sure on how often the check should be run, and we probably want to incorporate this mined data into some other things like the mirror list generator. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Small updates to mirrorcheck commandDan McGee1-3/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Allow serving jQuery via HTTPS if secure request detectedDan McGee1-1/+6
Handles the concerns in FS#19045. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Add debugger when having to parse lastsync fileDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Add mirror status viewDan McGee6-0/+148
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Add 'mirrorcheck' commandDan McGee3-0/+149
This does the actual work of going out and checking the mirror status. In short, it polls every active mirror URL for the 'lastsync' file and then records the appropriate details. These include the contents of that file, how long the total time to retrieve took, and any errors encountered. In order to finish up a bit faster, we spawn several threads to do the actual work. This parallelization allows the whole check process to take around 30 seconds rather than several minutes. Signed-off-by: Dan McGee <dan@archlinux.org>