Commit Graph

769 Commits

Author SHA1 Message Date
Dan McGee
1946d3d144 Fix README instructions
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-08 16:48:33 -05:00
Dan McGee
f8c2a15510 Ensure last modified times use UTC
We were cheating before and using non-UTC times; adjust the values we get
back from the database as appropriate so our times are not bogus.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07 19:57:31 -05:00
Dan McGee
fc6e7113c4 Store package feed last modified date in memcached
Just like what we did for news items, we can do the same for packages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07 19:52:31 -05:00
Dan McGee
2016a9d6f7 Move import to top level
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07 19:45:09 -05:00
Dan McGee
b2acd5cb94 Store latest news date in memcached
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-07 19:43:13 -05:00
Dan McGee
cf7bf2de29 Factor out common last modified code for news feed
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-07 19:16:40 -05:00
Dan McGee
82f3b02f60 Factor check completion pct into mirror score
Use it as the divisor in our slightly longer equation.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07 08:09:07 -05:00
Dan McGee
2e299273e2 mirrorcheck: record duration on file not found errors
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-07 08:07:03 -05:00
Dan McGee
5fce0e249c Add a merchandise store
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-06 19:46:44 -05:00
Dan McGee
9e7e1a5ea6 Make it actually possible to upload a new dev image
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-06 01:05:29 -05:00
Angel Velasquez
d6d9a08e63 Adding changing of user profile details
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-05 15:11:50 -05:00
Dan McGee
d66d0e4300 Fix executable mode on image
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05 12:24:01 -05:00
Dan McGee
35bcc1bc5f Make AirVM image an actual PNG
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-05 12:17:06 -05:00
Dan McGee
2b8f7772ad Make it possible to override settings
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-05 11:55:30 -05:00
Dan McGee
3972ba3bd2 Make manage.py use python2 binary
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05 11:55:26 -05:00
Dan McGee
79a5f0334c Update AirVM branding
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05 11:54:17 -05:00
Dan McGee
82eb9de993 Make user profile a OneToOneField
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-04 17:44:40 -05:00
Dan McGee
e847030d83 Switch another query to use is_download
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-04 17:40:38 -05:00
Dan McGee
11f0db759b Add some select_related() magic
Made obvious when poking around with the Django debug toolbar.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-04 17:37:39 -05:00
Dan McGee
0e58a2e49f Todo list minor fixes and comments for later
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-04 16:35:31 -05:00
Dan McGee
5e509529f0 reporead: ignore nicknames in name matching code 2010-10-04 13:29:01 -05:00
Dan McGee
ed49122429 Fix an off by one error in math for check interval
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-01 18:08:54 -05:00
Dan McGee
77f65bdc0c Allow donors to be invisible
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-01 13:05:22 -05:00
Dan McGee
ed6fbafb35 Update MirrorProtocol fixture data
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-30 14:36:38 -05:00
Dan McGee
bb84f9c96c Use new is_download field
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30 14:32:54 -05:00
Dan McGee
3ebe31bdad Add is_download field to mirror protocols
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-30 14:20:45 -05:00
Ángel Velásquez
6eb2ad2e17 Update README
This was in dire need of a rewrite, so it gets one here.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30 14:06:15 -05:00
Dan McGee
3682fb285b Move most inline JS into script file
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-30 13:15:20 -05:00
Dan McGee
0eac9698c6 Remove console.log statements
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30 12:53:06 -05:00
Dan McGee
1da1869715 Add gitattributes file
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30 12:51:36 -05:00
Dan McGee
2c13364880 Mirror status improvements
* 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-30 12:47:30 -05:00
Dan McGee
7def999b0a Fix migration dependencies exposed after moving models
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-29 15:16:39 -05:00
Dan McGee
bc5a5781bf Add a basic mirror details page
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-24 19:39:37 -05:00
Dan McGee
1c6099f4b2 Make general mirror list view public
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-24 19:39:37 -05:00
Dan McGee
46dec16346 Add note about mean syncing delay
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-24 19:39:36 -05:00
Dan McGee
10fca82816 Give more information about mirror check runs and frequency
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-24 19:39:36 -05:00
Dan McGee
e82e953aa2 Mirror status query refinements
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-24 13:26:08 -05:00
Dan McGee
00e9dce4db Fix news permission checking in templates
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-24 11:12:31 -05:00
Dan McGee
d0170b7fc9 Update BBS and bugs links to use HTTPS
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-22 23:24:00 -05:00
Dan McGee
47c95a2821 Get secure/unsecure checking actually working
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-22 23:16:13 -05:00
Dan McGee
66d6d33c9b Update newsletter/magazine link
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22 18:17:11 -05:00
Dan McGee
0dba93a9fc Switch mirror status delay display to average delay
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-22 13:28:12 -05:00
Dan McGee
550ef2eeeb Allow generated mirrorlist to take status info into account
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-21 18:58:34 -05:00
Dan McGee
5b87b21ccd Allow caching of mirror status info
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21 18:31:26 -05:00
Dan McGee
818028562d Fix self-closing anchor links for Chrome
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-21 18:14:53 -05:00
Dan McGee
753329659e Prevent 500 if no mirror checks have ran
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21 17:43:39 -05:00
Dan McGee
b3883820a2 Merge branch 'mirror-check' 2010-09-21 17:39:46 -05:00
Dan McGee
8ff8190c5c Add link to mirror status tool
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21 17:39:39 -05:00
Dan McGee
2a296af10d Add ordering, sorting, and a lot more info to mirror status page
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-21 17:30:14 -05:00
Dan McGee
b8a78408ff Small updates to mirrorcheck command
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21 17:29:45 -05:00