Commit Graph

34 Commits

Author SHA1 Message Date
Jelle van der Waa
6489bd1a2e Port mirrors to pure django template 2017-05-02 21:13:56 +02:00
Dan McGee
886d2934ec Break out available URLs into Jinja2 template
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08 14:12:32 -06:00
Dan McGee
713ab837ba Convert mirror status tables to Jinja2
Yay for way improved performance. Local testing showed render times
going from 265 ms to 135 ms.

Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08 14:00:09 -06:00
Dan McGee
9335d3330b Save some space, (secs) -> (s)
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01 15:53:23 -05:00
Dan McGee
945337177d Add last_modified column to mirrors
This will make it easier in the future to clear out inactive mirrors
that haven't been touched in a while.

Signed-off-by: Dan McGee <dan@archlinux.org>
2014-03-29 11:56:32 -05:00
Dan McGee
36f5e1df9a Allow mirror notes to wrap
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-18 21:23:47 -06:00
Dan McGee
79aef280dd Add mirror URL details page
This will allow those that care about mirrors to zoom into URL-level
details for each mirror and examine the individual check results.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-15 13:28:13 -06:00
Dan McGee
5d74a99c6b Don't list downstream mirrors one per line
This looks really crazy on our current Tier 1 mirrors, as some of them
have tons of downstream mirrors. Instead, do what we did on the package
details page and allow wrapping of the comma-separated list.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14 11:38:20 -06:00
Dan McGee
97ca3f7286 Add Flyspray Issue to mirror details template
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14 11:31:40 -06:00
Dan McGee
9adc2e5312 Stop using Django-provided floatformat template tag
It turns out this is a HUGE part of our slow mirror status template
rendering, due to the internal workings. Everything is converted to a
Python decimal object which is way slower than just staying in native
floating point. Given we are always dealing with floats when we need to
do our formatting, a home-rolled template tag can accomplish this much
faster.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-27 17:53:37 -05:00
Dan McGee
86f9d6788e Django 1.6 upgrade, deprecation cleanup
PendingDeprecationWarning: 'The `cycle` template tag is changing to
escape its arguments; the non-autoescaping version is deprecated. Load
it from the `future` tag library to start using the new behavior.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-06 21:10:52 -06:00
Dan McGee
845769e156 Show alternate email on mirror details page
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-07-13 09:51:33 -05:00
Dan McGee
8c614b4abb Add 'Edit Mirror' link to mirror details page
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-21 20:35:50 -05:00
Dan McGee
8097a1fdef Add mirror error logs to mirror details page
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-10 18:10:04 -05:00
Dan McGee
3e085183bf Move all script blocks into {% script_block %} section
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-20 11:28:12 -05:00
Dan McGee
9b07cb1ebd Draw one mirror status graph per check location
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-14 15:08:25 -05:00
Dan McGee
e4e88638b6 Turn visualize-mirror into a CSS class 2013-04-14 14:01:52 -05:00
Dan McGee
82947873d6 Upgrade D3 to 3.0.6
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08 21:19:17 -06:00
Dan McGee
0b930fd921 Convert all usages of flag icons to new sprite
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-16 00:36:17 -06:00
Dan McGee
6f0ae6746b Drop country column from mirror table
We now always look for this information at the URL level, not the mirror
level. This simplifies quite a bit of code in and around the mirror
views.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14 01:05:54 -06:00
Dan McGee
2b9519996a Update D3 to 3.0.0
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27 16:43:01 -06:00
Dan McGee
59f5b6ed55 Mirror details style and JS cleanup
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-13 10:21:02 -06:00
Dan McGee
07d2fc5d35 Add initial version of mirror status chart
Still have some hardcoded stuff to rip out and replace to make this a
bit more dynamic on things like sizing, but for now, this is a great
start.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-10 15:41:09 -06:00
Dan McGee
8383a07160 Add a new jquery_tablesorter CDN template tag
And use it everywhere we were including the file before. This should
make updating the version a heck of a lot easier.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08 23:33:44 -05:00
Dan McGee
9616aec563 Add empty 'alt' attribute for all country flag images
These are all used purely for decoration, and the country name itself is
right next to the flag image, so we can safely mark these as "invisible"
to screen readers, text browsers, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26 12:05:57 -05:00
Dan McGee
021e7717e0 Add country flag to individual mirror details page
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25 02:34:18 -05:00
Dan McGee
640e0f5864 Finish django countries implementation
* Add a migration to drop the old countries field.
* Update all templates/views/utility methods to point at the new country
  field and dereference it as necessary.
* Add the flags images to a few views where it makes sense.
* Cleanup the download page layout quite a bit.
* Bump the mirror status JSON version to 3; add country_code attribute.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25 01:51:58 -05:00
Dan McGee
116751e4ba Rename mirror country fields to country_old in prep for normalization
We're going to move to using ISO 2 character codes via django countries,
so start by moving the old data out of the way first.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25 00:00:36 -05:00
Dan McGee
3e2e4d4ef8 Convert STATIC_URL usage to {% static %} template tag
This is a lot more flexible and will allow more than just simple
prefixing of the static file resources.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 12:37:19 -05:00
Dan McGee
943ef2e8e4 Convert to and enable staticfiles contrib application
This moves our site static files into the sitestatic directory if they
are shared resources, and also moves a handful of things (such as the
artwork logos) into application-specific static/ directories. This
allows the staticfiles contrib app to work after a few settings tweaks,
a run of collectstatic, and massaging the hardcoded '/media/' prefix out
of our templates.

Django 1.4 is going to make this a lot easier to move things to a CDN
and provides better template tags; for now this is setting the stage
before we can move to that.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 23:06:10 -06:00
Dan McGee
a52c2744bf Add capfirst filter to yesno usage in templates
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 16:16:32 -05:00
Dan McGee
6fa773bcab Link email address if available
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-29 02:15:27 -05:00
Dan McGee
5df255a5b6 Enhance the mirror details page
Get the URLs with their performance data showing up, and simplify the
top part for non-authenticated users while adding more detail for
logged-in users.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-28 18:26:55 -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