summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-12-22 21:50:58 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-12-22 21:50:58 -0500
commit2bfec5b17ca3ee3ea3b347c029b9d8dad3c5b4d0 (patch)
tree6bda86f6489fbdfdce67d282b20586fc6032735b /templates
parent3579e3cb34a53abd16da3af78be738c2a4dd0d5c (diff)
parent36f5e1df9afbeac1d04fee38dde4c28f81144a20 (diff)
Merge tag 'release_2013-12-19' into archweb-generic
Mirror URL page, other random stuff
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/index.html12
-rw-r--r--templates/devel/admin_log.html2
-rw-r--r--templates/mirrors/mirror_details.html10
-rw-r--r--templates/mirrors/url_details.html89
-rw-r--r--templates/public/index.html2
5 files changed, 107 insertions, 8 deletions
diff --git a/templates/admin/index.html b/templates/admin/index.html
index 203206d5..fddd55e5 100644
--- a/templates/admin/index.html
+++ b/templates/admin/index.html
@@ -31,11 +31,15 @@
{% if app_list %}
{% for app in app_list %}
- <div class="module">
- <table summary="{% blocktrans with name=app.name %}Models available in the {{ name }} application.{% endblocktrans %}">
- <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with name=app.name %}{{ name }}{% endblocktrans %}</a></caption>
+ <div class="app-{{ app.app_label }} module">
+ <table>
+ <caption>
+ <a href="{{ app.app_url }}" class="section" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">
+ {% blocktrans with name=app.name %}{{ name }}{% endblocktrans %}
+ </a>
+ </caption>
{% for model in app.models %}
- <tr>
+ <tr class="model-{{ model.object_name|lower }}">
{% if model.admin_url %}
<th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
{% else %}
diff --git a/templates/devel/admin_log.html b/templates/devel/admin_log.html
index 1629c104..05130491 100644
--- a/templates/devel/admin_log.html
+++ b/templates/devel/admin_log.html
@@ -48,7 +48,7 @@
{% if entry.is_deletion %}
{{ entry.object_repr }}
{% else %}
- <a href="/admin/{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
+ <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
{% endif %}
</td>
<td>{{ entry.change_message }}</td>
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index 0913a506..b75c5316 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -42,6 +42,10 @@
<td>{{ mirror.active|yesno|capfirst }}</td>
</tr>
<tr>
+ <th>Created:</th>
+ <td>{{ mirror.created }}</td>
+ </tr>
+ <tr>
<th>Rsync IPs:</th>
<td class="wrap">{{mirror.rsync_ips.all|join:', '}}</td>
</tr>
@@ -59,7 +63,7 @@
</tr>
<tr>
<th>Notes:</th>
- <td>{{ mirror.notes|linebreaks }}</td>
+ <td class="wrap">{{ mirror.notes|linebreaks }}</td>
</tr>
<tr>
<th>Upstream:</th>
@@ -99,7 +103,8 @@
<th>μ Delay (hh:mm)</th>
<th>μ Duration (secs)</th>
<th>σ Duration (secs)</th>
- <th>Mirror Score</th>
+ <th>Score</th>
+ <th>Details</th>
</tr>
</thead>
<tbody>
@@ -116,6 +121,7 @@
<td>{{ m_url.duration_avg|floatvalue:2 }}</td>
<td>{{ m_url.duration_stddev|floatvalue:2 }}</td>
<td>{{ m_url.score|floatvalue:1|default:'∞' }}</td>
+ <td><a href="{{ m_url.id }}/">Details</a></td>
</tr>
{% endfor %}
</tbody>
diff --git a/templates/mirrors/url_details.html b/templates/mirrors/url_details.html
new file mode 100644
index 00000000..0b9d2916
--- /dev/null
+++ b/templates/mirrors/url_details.html
@@ -0,0 +1,89 @@
+{% extends "base.html" %}
+{% load cycle from future %}
+{% load static from staticfiles %}
+{% load mirror_status %}
+{% load flags %}
+
+{% block title %}Arch Linux - {{ url.url }} - URL Details{% endblock %}
+
+{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}
+
+{% block content %}
+<div class="box">
+ <h2>URL Details: {{ url.url }}</h2>
+
+ <table class="compact">
+ <tr>
+ <th>URL:</th>
+ <td>{{ url.url }}</td>
+ </tr>
+ <tr>
+ <th>Protocol:</th>
+ <td>{{ url.protocol }}</td>
+ </tr>
+ <tr>
+ <th>Country:</th>
+ <td class="country">{% country_flag url.country %}{{ url.country.name }}</td>
+ </tr>
+ <tr>
+ <th>IPv4:</th>
+ <td>{{ url.has_ipv4|yesno|capfirst }}</td>
+ </tr>
+ <tr>
+ <th>IPv6:</th>
+ <td>{{ url.has_ipv6|yesno|capfirst }}</td>
+ </tr>
+ {% if user.is_authenticated %}
+ <tr>
+ <th>Active:</th>
+ <td>{{ url.active|yesno|capfirst }}</td>
+ </tr>
+ <tr>
+ <th>Created:</th>
+ <td>{{ url.created }}</td>
+ </tr>
+ {% endif %}
+ </table>
+
+ <h3>Check Logs</h3>
+
+ <table id="check_logs" class="results">
+ <thead>
+ <tr>
+ <th>Check Time</th>
+ <th>Check Location</th>
+ <th>Check IP</th>
+ <th>Last Sync</th>
+ <th>Delay (hh:mm)</th>
+ <th>Duration (secs)</th>
+ <th>Success?</th>
+ <th>Error Message</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for log in logs %}<tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ log.check_time|date:'Y-m-d H:i' }}</td>
+ <td class="country">{% country_flag log.location.country %}{{ log.location.country.name }}</td>
+ <td>{{ log.location.source_ip }}</td>
+ <td>{{ log.last_sync|date:'Y-m-d H:i' }}</td>
+ <td>{{ log.delay|duration }}</td>
+ <td>{{ log.duration|floatvalue }}</td>
+ <td>{{ log.is_success|yesno|capfirst }}</td>
+ <td class="wrap">{{ log.error|linebreaksbr }}</td>
+ </tr>{% endfor %}
+ </tbody>
+ </table>
+</div>
+{% endblock %}
+
+{% block script_block %}
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
+<script type="text/javascript" src="{% static "archweb.js" %}"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $("#check_logs:has(tbody tr)").tablesorter(
+ {widgets: ['zebra'], sortList: [[0,1]],
+ headers: { 5: { sorter: 'mostlydigit' } } });
+});
+</script>
+{% endblock %}
diff --git a/templates/public/index.html b/templates/public/index.html
index b263a308..bc0fae0c 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -106,7 +106,7 @@
</div>
{% endcache %}
-{% cache 59 main-page-right secure %}
+{% cache 115 main-page-right secure %}
<div id="nav-sidebar" class="widget">
<h4>Documentation</h4>