summaryrefslogtreecommitdiffstats
path: root/templates/mirrors
AgeCommit message (Collapse)AuthorFilesLines
2019-03-17templates: Add tag for d3jsJelle van der Waa1-2/+1
Create a simple tag for outputting the d3js <script> html so updating will be easier and the version has be changed in one file. Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
2019-02-22templates: remove deprecated projection propertyJelle van der Waa4-4/+4
The media="projection" property is read by browsers but does not match anything remove it so our site is valid HTML. Closes: #184 Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-02-18mirrors: replace self-written floatvalue with floatformatJelle van der Waa3-7/+7
In 2013 floatformat was very slow in the mirror status page, these days floatformat is not that much slower.
2019-02-18Implement CSP for archwebJelle van der Waa4-4/+4
Add django-csp as dependency to be able to set CSP inside django's settings and allow setting a CSP_NONCE for inline <script>'s in templates. Since archweb heavily uses this pattern it's the best compromise.
2018-04-08Stop loading cycle from future everywhereJohannes Löthberg2-2/+0
It's available already since we're no longer in the past, and can't load from future *in* the future. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-01-29More code refactoring / tests (#79)jelle van der Waa6-2/+4
* main: move tests to main/tests Move the templatetags tests to main/tests/test_templatetags. * main: Add test for templatetags country Create a test for the templatetag country_flag. * main: remove duplicate floatvalue floatvalue is only used in the mirrors templates and the same exact function exists in the mirror_status templatetags. * main: Remove duplicate hours filter The hours filter is also defined in the mirror_status and only used in mirrors. * main: move percentage filter to mirrors Move the percentage filter to the only user of it and add a test for basic use cases. * main: remove duplicate duration implementation The duration templatetag filter is also defined in mirror_status.py * templates: remove unrequired import flags * main: Add missing testcase for country_flag Add the None test case, so that the function is fully covered. * todolists: create tests for Todolist model Add basic tests for the Todolist model
2017-12-28Require mirror.change_mirror perm to see emailsJohannes Löthberg1-0/+2
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-05-22Remove invalid filter call from mirrors/status_table.htmlEvangelos Foutras1-2/+2
The filter was passed an undefined variable which caused the template to be rendered as empty. Since the other table columns default to an empty string instead of "unknown", simply remove the default:"unknown" filter. Also correct a closing %} tag.
2017-05-02mirrors: rename .jinja to htmlJelle van der Waa2-1/+1
2017-05-02Port mirrors to pure django templateJelle van der Waa7-49/+56
2017-02-17Remove scored based mirrorlist sortingFlorian Pritz2-3/+3
Users may use the returned mirror list as-is without sorting it themselves. This may lead to the first mirror in the list being overloaded. Prevent this by not returning a sorted list. References: https://lists.archlinux.org/pipermail/arch-dev-public/2017-January/028681.html Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-07Fix URL details page when checks don't have locationsrelease_2015-04-09Dan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Add details links to third mirror status tableDan McGee1-3/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Break out available URLs into Jinja2 templateDan McGee4-40/+38
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Make delay a property, not a functionDan McGee1-27/+27
And re-indent the URL details log template now that we've broken it out. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Convert mirror status tables to Jinja2Dan McGee5-39/+35
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-08Convert some of URL details to Jinja2Dan McGee2-28/+29
Anytime we have a loop with >100 items, the Django template engine begins to be the bottleneck. This one is relatively straightforward to convert, and sets the stage for converting the mirror status page as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-02Mirror view tweaks and enhancementsDan McGee1-1/+7
* Add country column to main mirror list overview page. Most mirrors are strictly in one country, so do a little magic to show the right country if it makes sense. * Use new way of getting country names so we respect the overrides now present in the django_countries package. * Make the country selection box on the mirrorlist generation page a lot taller by default so it is easier to use. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Add details link to mirror status pagerelease_2014-09-01Dan McGee3-1/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Save some space, (secs) -> (s)Dan McGee3-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-03-29Add last_modified column to mirrorsDan McGee1-0/+4
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>
2013-12-23A few more tweaks to the URL details templateDan McGee1-1/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-18Allow mirror notes to wraprelease_2013-12-19Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-15Add mirror URL details pageDan McGee2-1/+96
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-14Don't list downstream mirrors one per linerelease_2013-12-14Dan McGee1-6/+5
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-14Add Flyspray Issue to mirror details templateDan McGee1-0/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14Fix double space in templateDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-27Stop using Django-provided floatformat template tagrelease_2013-11-30Dan McGee3-8/+8
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-06Django 1.6 upgrade, deprecation cleanupDan McGee4-0/+4
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-07-13Show alternate email on mirror details pageDan McGee1-0/+4
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 McGee1-2/+0
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-10Add mirror error logs to mirror details pageDan McGee1-0/+3
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-20Move all script blocks into {% script_block %} sectionrelease_2013-04-20Dan McGee2-0/+6
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-20Remove {% spaceless %} tag from a few more placesDan McGee2-8/+4
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-14Draw one mirror status graph per check locationDan McGee1-3/+9
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 McGee1-1/+1
2013-03-05Add link to get HTTPS-only mirrorlistDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08Upgrade D3 to 3.0.6release_2013-02-08Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Convert all usages of flag icons to new spriterelease_2013-01-18Dan McGee3-3/+10
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-14Drop country column from mirror tableDan McGee5-12/+10
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>
2012-12-27Update D3 to 3.0.0Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-13Mirror details style and JS cleanupDan McGee1-3/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-12Prefetch the available protocols on the mirror overview pageDan McGee1-1/+1
Otherwise we are doing one query per mirror, which at this point is over 100 separate queries. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-10Add initial version of mirror status chartDan McGee1-0/+7
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-07-08Add a new jquery_tablesorter CDN template tagDan McGee3-6/+3
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-05-13Add ability to restrict status report to single tierrelease_2012-05-13Dan McGee1-2/+2
This should make it easier to catch errors in our Tier 1 mirrors. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-13Add rsync support to mirrorcheck and other small improvementsDan McGee1-2/+2
The main changes in this patch implement rsync:// protocol checking support by calling the rsync binary, requested in FS#29878. We track and log much of the same things as we already do for FTP and HTTP URLs- check time, last sync, total check duration, etc. Also added in this patch is a configurable timeout value which defaults to the previous hardcoded value of 10 seconds; this can be passed as an option to the mirrorcheck command. Signed-off-by: Dan McGee <dan@archlinux.org>