]>
Commit | Line | Data |
---|---|---|
95483f04 MT |
1 | {% extends "../base.html" %} |
2 | ||
3 | {% block title %}{{ _("Mirrors") }}{% end block %} | |
4 | ||
5 | {% block content %} | |
7a9e9176 MT |
6 | {% set total = sum((len(m) for c, m in mirrors.items())) %} |
7 | ||
8 | <h4 class="my-5 text-muted text-center"> | |
9 | {{ _("We are currently running %s mirror servers") % total }} | |
10 | </h4> | |
11 | ||
12 | {% set countries = sorted(mirrors, key=lambda c: c.name) %} | |
13 | ||
95483f04 MT |
14 | <div class="row justify-content-center"> |
15 | <div class="col-12 col-md-6"> | |
7a9e9176 MT |
16 | {% for country in countries %} |
17 | <a name="{{ country.alpha2 }}"></a> | |
18 | <div class="my-4 d-flex justify-content-between "> | |
19 | <div> | |
20 | <h4 class="mb-0">{{ country.name }}</h4> | |
21 | <span class="small text-muted"> | |
22 | {{ _("One Mirror", "%(num)s Mirrors", len(mirrors[country])) % { "num" : len(mirrors[country]) } }} | |
23 | </span> | |
24 | </div> | |
25 | ||
26 | <h4 class="flag-icon flag-icon-{{ country.alpha2.lower() }}"></h4> | |
27 | </div> | |
28 | ||
29 | <div class="list-group"> | |
30 | {% for m in mirrors[country] %} | |
31 | <a href="/mirrors/{{ m.hostname }}" class="list-group-item list-group-item-action | |
32 | list-group-item-{% if m.state == "UP" %}success{% elif m.state == "DOWN" %}danger{% else %}warning{% end %} | |
33 | flex-column align-items-start"> | |
34 | <h5 class="mb-1">{{ m.hostname }}</h5> | |
35 | ||
36 | {% if m.owner %} | |
37 | <p class="mb-0 text-truncate text-muted">{{ m.owner }}</p> | |
38 | {% end %} | |
39 | </a> | |
40 | {% end %} | |
41 | </div> | |
42 | {% end %} | |
95483f04 MT |
43 | </div> |
44 | </div> | |
45 | {% end block %} |