mirror_details.html 6.05 KB
Newer Older
Dan McGee's avatar
Dan McGee committed
1
{% extends "base.html" %}
2
{% load cycle from future %}
3
{% load static from staticfiles %}
Dan McGee's avatar
Dan McGee committed
4
{% load mirror_status %}
5
{% load flags %}
6
{% load admin_urls %}
Dan McGee's avatar
Dan McGee committed
7
8
9

{% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %}

10
11
{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}

Dan McGee's avatar
Dan McGee committed
12
{% block content %}
13
<div class="box">
Dan McGee's avatar
Dan McGee committed
14
15
    <h2>Mirror Details: {{ mirror.name }}</h2>

16
17
18
19
20
21
    {% if perms.mirrors.change_mirror %}
    <ul class="admin-actions">
        <li><a href="{% url 'admin:mirrors_mirror_change' mirror.pk %}" title="Edit mirror">Edit Mirror</a></li>
    </ul>
    {% endif %}

22
    <table class="compact">
Dan McGee's avatar
Dan McGee committed
23
24
25
        <tr>
            <th>Name:</th>
            <td>{{ mirror.name }}</td>
Dan McGee's avatar
Dan McGee committed
26
27
        </tr>
        <tr>
Dan McGee's avatar
Dan McGee committed
28
29
            <th>Tier:</th>
            <td>{{ mirror.get_tier_display }}</td>
Dan McGee's avatar
Dan McGee committed
30
31
32
        </tr>
        <tr>
            <th>Has ISOs:</th>
33
            <td>{{ mirror.isos|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
34
35
36
37
        </tr>
        {% if user.is_authenticated %}
        <tr>
            <th>Public:</th>
38
            <td>{{ mirror.public|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
39
40
41
        </tr>
        <tr>
            <th>Active:</th>
42
            <td>{{ mirror.active|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
43
        </tr>
Dan McGee's avatar
Dan McGee committed
44
45
46
47
        <tr>
            <th>Created:</th>
            <td>{{ mirror.created }}</td>
        </tr>
48
49
50
51
        <tr>
            <th>Last Modified:</th>
            <td>{{ mirror.last_modified }}</td>
        </tr>
Dan McGee's avatar
Dan McGee committed
52
53
54
55
56
57
        <tr>
            <th>Rsync IPs:</th>
            <td class="wrap">{{mirror.rsync_ips.all|join:', '}}</td>
        </tr>
        <tr>
            <th>Admin Email:</th>
Dan McGee's avatar
Dan McGee committed
58
            <td>{% if mirror.admin_email %}<a href="mailto:{{ mirror.admin_email }}">{{ mirror.admin_email }}</a>{% else %}None{% endif %}</td>
Dan McGee's avatar
Dan McGee committed
59
        </tr>
60
61
62
63
        <tr>
            <th>Alternate Email:</th>
            <td>{% if mirror.alternate_email %}<a href="mailto:{{ mirror.alternate_email }}">{{ mirror.alternate_email }}</a>{% else %}None{% endif %}</td>
        </tr>
64
65
66
67
        <tr>
            <th>Flyspray Issue:</th>
            <td>{% if mirror.bug %}<a href="https://bugs.archlinux.org/task/{{ mirror.bug }}">FS#{{ mirror.bug }}</a>{% endif %}</td>
        </tr>
Dan McGee's avatar
Dan McGee committed
68
69
        <tr>
            <th>Notes:</th>
Dan McGee's avatar
Dan McGee committed
70
            <td class="wrap">{{ mirror.notes|linebreaks }}</td>
Dan McGee's avatar
Dan McGee committed
71
72
        </tr>
        <tr>
Dan McGee's avatar
Dan McGee committed
73
74
75
76
77
            <th>Upstream:</th>
            <td>{% if mirror.upstream %}
                <a href="{{ mirror.upstream.get_absolute_url }}"
                    title="Mirror details for {{ mirror.upstream.name }}">{{ mirror.upstream.name }}</a>
                {% else %}None{% endif %}</td>
Dan McGee's avatar
Dan McGee committed
78
79
        </tr>
        <tr>
Dan McGee's avatar
Dan McGee committed
80
81
            <th>Downstream:</th>
            {% with mirror.downstream as ds_mirrors %}
82
            <td class="wrap">{% if ds_mirrors %}
Dan McGee's avatar
Dan McGee committed
83
84
                {% for ds in ds_mirrors %}
                <a href="{{ ds.get_absolute_url }}"
85
86
87
88
                    title="Mirror details for {{ ds.name }}">{{ ds.name }}</a>{% comment %}
                {% endcomment %}{% if not ds.active %} <span class="testing-dep">(inactive)</span>{% endif %}{% comment %}
                {% endcomment %}{% if not ds.public %} <span class="testing-dep">(private)</span>{% endif %}{% comment %}
                {% endcomment %}{% if not forloop.last %}, {% endif %}{% endfor %}
Dan McGee's avatar
Dan McGee committed
89
                {% else %}None{% endif %}</td>
Dan McGee's avatar
Dan McGee committed
90
91
            {% endwith %}
        </tr>
Dan McGee's avatar
Dan McGee committed
92
93
94
95
96
97
98
99
100
        {% endif %}
    </table>

    <h3>Available URLs</h3>

    <table id="available_urls" class="results">
        <thead>
            <tr>
                <th>Mirror URL</th>
101
102
                <th>Protocol</th>
                <th>Country</th>
Dan McGee's avatar
Dan McGee committed
103
104
105
106
107
                <th>IPv4</th>
                <th>IPv6</th>
                <th>Last Sync</th>
                <th>Completion %</th>
                <th>μ Delay (hh:mm)</th>
Dan McGee's avatar
Dan McGee committed
108
109
                <th>μ Duration (s)</th>
                <th>σ Duration (s)</th>
Dan McGee's avatar
Dan McGee committed
110
111
                <th>Score</th>
                <th>Details</th>
Dan McGee's avatar
Dan McGee committed
112
113
114
115
116
117
            </tr>
        </thead>
        <tbody>
            {% for m_url in urls %}
            <tr class="{% cycle 'odd' 'even' %}">
                <td>{% if m_url.protocol.is_download %}<a href="{{ m_url.url }}">{{ m_url.url }}</a>{% else %}{{ m_url.url }}{% endif %}</td>
118
                <td>{{ m_url.protocol }}</td>
119
                <td class="country">{% country_flag m_url.country %}{{ m_url.country.name }}</td>
120
121
                <td>{{ m_url.has_ipv4|yesno|capfirst }}</td>
                <td>{{ m_url.has_ipv6|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
122
123
124
                <td>{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}</td>
                <td>{{ m_url.completion_pct|percentage:1 }}</td>
                <td>{{ m_url.delay|duration|default:'unknown' }}</td>
125
126
127
                <td>{{ m_url.duration_avg|floatvalue:2 }}</td>
                <td>{{ m_url.duration_stddev|floatvalue:2 }}</td>
                <td>{{ m_url.score|floatvalue:1|default:'∞' }}</td>
Dan McGee's avatar
Dan McGee committed
128
                <td><a href="{{ m_url.id }}/">Details</a></td>
Dan McGee's avatar
Dan McGee committed
129
130
131
            </tr>
            {% endfor %}
        </tbody>
Dan McGee's avatar
Dan McGee committed
132
    </table>
133
134

    <h3>Error Log</h3>
135
    {% include "mirrors/error_table.html.jinja" %}
136
137
138
139
</div>

<div class="box">
    <h2>Mirror Status Charts</h2>
140

141
142
143
    <p>Periodic checks of the mirrors are done from various geographic
    locations, IP addresses, and using IPv4 or IPv6. These results are
    summarized in graphical form below.</p>
144

145
    <div id="charts-container"></div>
Dan McGee's avatar
Dan McGee committed
146
</div>
147
148
149
{% endblock %}

{% block script_block %}
150
{% load cdn %}{% jquery %}{% jquery_tablesorter %}
Dan McGee's avatar
Dan McGee committed
151
<script type="text/javascript" src="{% static "d3-3.0.6.min.js" %}"></script>
152
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
153
<script type="text/javascript" src="{% static "mirror_status.js" %}"></script>
Dan McGee's avatar
Dan McGee committed
154
155
156
<script type="text/javascript">
$(document).ready(function() {
    $("#available_urls:has(tbody tr)").tablesorter(
157
158
        {widgets: ['zebra'], sortList: [[1,0], [2,0]],
        headers: { 8: { sorter: 'mostlydigit' }, 9: { sorter: 'mostlydigit' }, 10: { sorter: 'mostlydigit' } } });
159
160
});
$(document).ready(function() {
161
    draw_graphs("/mirrors/locations/json/", "./json/", "#charts-container");
Dan McGee's avatar
Dan McGee committed
162
163
});
</script>
Dan McGee's avatar
Dan McGee committed
164
{% endblock %}