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

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

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

Dan McGee's avatar
Dan McGee committed
10
{% block content %}
11
<div class="box">
Dan McGee's avatar
Dan McGee committed
12
13
14

    <h2>Mirror Details: {{ mirror.name }}</h2>

15
    <table class="compact">
Dan McGee's avatar
Dan McGee committed
16
17
18
        <tr>
            <th>Name:</th>
            <td>{{ mirror.name }}</td>
Dan McGee's avatar
Dan McGee committed
19
20
        </tr>
        <tr>
Dan McGee's avatar
Dan McGee committed
21
22
            <th>Tier:</th>
            <td>{{ mirror.get_tier_display }}</td>
Dan McGee's avatar
Dan McGee committed
23
24
25
        </tr>
        <tr>
            <th>Has ISOs:</th>
26
            <td>{{ mirror.isos|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
27
28
29
30
        </tr>
        {% if user.is_authenticated %}
        <tr>
            <th>Public:</th>
31
            <td>{{ mirror.public|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
32
33
34
        </tr>
        <tr>
            <th>Active:</th>
35
            <td>{{ mirror.active|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
36
37
38
39
40
41
42
        </tr>
        <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
43
            <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
44
45
46
47
48
49
        </tr>
        <tr>
            <th>Notes:</th>
            <td>{{ mirror.notes|linebreaks }}</td>
        </tr>
        <tr>
Dan McGee's avatar
Dan McGee committed
50
51
52
53
54
            <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
55
56
        </tr>
        <tr>
Dan McGee's avatar
Dan McGee committed
57
58
59
60
61
            <th>Downstream:</th>
            {% with mirror.downstream as ds_mirrors %}
            <td>{% if ds_mirrors %}
                {% for ds in ds_mirrors %}
                <a href="{{ ds.get_absolute_url }}"
Dan McGee's avatar
Dan McGee committed
62
63
64
65
                    title="Mirror details for {{ ds.name }}">{{ ds.name }}</a>
                {% if not ds.active %}<span class="testing-dep">(inactive)</span>{% endif %}
                {% if not ds.public %}<span class="testing-dep">(private)</span>{% endif %}
                <br/>
Dan McGee's avatar
Dan McGee committed
66
                {% endfor %}
Dan McGee's avatar
Dan McGee committed
67
                {% else %}None{% endif %}</td>
Dan McGee's avatar
Dan McGee committed
68
69
            {% endwith %}
        </tr>
Dan McGee's avatar
Dan McGee committed
70
71
72
73
74
75
76
77
78
        {% endif %}
    </table>

    <h3>Available URLs</h3>

    <table id="available_urls" class="results">
        <thead>
            <tr>
                <th>Mirror URL</th>
79
80
                <th>Protocol</th>
                <th>Country</th>
Dan McGee's avatar
Dan McGee committed
81
82
83
84
85
86
87
88
89
90
91
92
93
94
                <th>IPv4</th>
                <th>IPv6</th>
                <th>Last Sync</th>
                <th>Completion %</th>
                <th>μ Delay (hh:mm)</th>
                <th>μ Duration (secs)</th>
                <th>σ Duration (secs)</th>
                <th>Mirror Score</th>
            </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>
95
                <td>{{ m_url.protocol }}</td>
96
                <td class="country">{% country_flag m_url.country %}{{ m_url.country.name }}</td>
97
98
                <td>{{ m_url.has_ipv4|yesno|capfirst }}</td>
                <td>{{ m_url.has_ipv6|yesno|capfirst }}</td>
Dan McGee's avatar
Dan McGee committed
99
100
101
102
103
104
105
106
107
                <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>
                <td>{{ m_url.duration_avg|floatformat:2 }}</td>
                <td>{{ m_url.duration_stddev|floatformat:2 }}</td>
                <td>{{ m_url.score|floatformat:1|default:'∞' }}</td>
            </tr>
            {% endfor %}
        </tbody>
Dan McGee's avatar
Dan McGee committed
108
    </table>
109
110
111
112

    <h3>Mirror Status Chart</h3>

    <div id="visualize-mirror" class="visualize-chart"></div>
Dan McGee's avatar
Dan McGee committed
113
</div>
114
{% load cdn %}{% jquery %}{% jquery_tablesorter %}
Dan McGee's avatar
Dan McGee committed
115
<script type="text/javascript" src="{% static "d3-3.0.6.min.js" %}"></script>
116
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
117
<script type="text/javascript" src="{% static "mirror_status.js" %}"></script>
Dan McGee's avatar
Dan McGee committed
118
119
120
<script type="text/javascript">
$(document).ready(function() {
    $("#available_urls:has(tbody tr)").tablesorter(
121
122
        {widgets: ['zebra'], sortList: [[1,0], [2,0]],
        headers: { 8: { sorter: 'mostlydigit' }, 9: { sorter: 'mostlydigit' }, 10: { sorter: 'mostlydigit' } } });
123
124
});
$(document).ready(function() {
125
    mirror_status("#visualize-mirror", "./json/");
Dan McGee's avatar
Dan McGee committed
126
127
});
</script>
Dan McGee's avatar
Dan McGee committed
128
{% endblock %}