Age | Commit message (Collapse) | Author |
|
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
This was in dire need of a rewrite, so it gets one here.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
* 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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Handles the concerns in FS#19045.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
And make sure it is unique through a few queries and some magic.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These should get us all set to have more useful URLs for the news items.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Initially, this needs to allow null so that we can add in slugs for all of
our old news items.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
When moving the news model and updating the content type, I forgot to update
these strings to reflect the new permission name. Whoops.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Using the right index in the array might help; we were comparing pkgver
again and not pkgrel at all.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add last modified date as a column, and fix up some other small display,
sorting, and ordering issues.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Set up a default DATE_FORMAT in settings.py and use it everywhere we do the
'|date' template filter rather than hardcoding the value in the template.
This also fixes a regression with news date/time now that we changed the
field to store both date and time.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
By using the condition decorator (in a slightly odd way because these are
class-based views), we can cut down a lot on the response time for returning
304 status code for feeds that haven't changed. The decorator means we no
longer have to completely render the view to see if we can return a 304
status code.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This will come in handy when determining whether resources are out of date,
such as our news RSS feed. Also bump the Date fields to DateTime fields for
sake of sorting and if we have more than one news item on the same date.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|