]> git.mxchange.org Git - fba.git/blob - templates/views/scoreboard.html
Continued:
[fba.git] / templates / views / scoreboard.html
1 {% extends "base.html" %}
2
3 {% block title %}Scoreboard - {% if mode == 'software' %}TOP {{amount}} used software{% elif mode == 'avg_peers' %}TOP {{amount}} average peer count{% elif mode == 'command' %}TOP {{amount}} commands{% elif mode == 'error_code' %}TOP {{amount}} error codes{% elif mode == 'reference' %}TOP {{amount}} referencing instances{% elif mode == 'blocked' %}TOP {{amount}} deferated instances{% elif mode == 'blocker' %}TOP {{amount}} deferating instances{% endif %}{% endblock %}
4
5 {% block header %}
6     {% if mode == 'blocker' %}
7         <h1>Top {{amount}} defederating instances</h1>
8     {% elif mode == 'blocked' %}
9         <h1>Top {{amount}} defederated instances</h1>
10     {% elif mode == 'reference' %}
11         <h1>Top {{amount}} referencing instances</h1>
12     {% elif mode == 'software' %}
13         <h1>Top {{amount}} used software</h1>
14     {% elif mode == 'command' %}
15         <h1>TOP {{amount}} commands</h1>
16     {% elif mode == 'error_code' %}
17         <h1>TOP {{amount}} error codes</h1>
18     {% endif %}
19 {% endblock %}
20
21 {% block content %}
22     <div class="scoreboard">
23         <table>
24             <thead>
25                 <th>№</th>
26                 <th>{% if mode in ('software', 'avg_peers') %}Software{% elif mode == 'error_code' %}Error code{% else %}Instance{% endif %}</th>
27                 <th>{% if mode == 'reference' %}References{% elif mode == 'avg_peers' %}Average{% elif mode in('software', 'error_code') %}Total{% else %}Blocks{% endif %}</th>
28             </thead>
29
30             <tbody>
31             {% for entry in scores %}
32                 <tr>
33                     <td>{{loop.index}}</td>
34                     <td>
35                         {% if mode in ('software', 'command', 'error_code', 'avg_peers') %}
36                             {{entry['domain']}}
37                         {% elif entry['domain'] == None %}
38                             -
39                         {% else %}
40                             <a href="{{base_url}}/top?{% if mode == 'blocker' %}reverse{% elif mode in('blocked', 'reference') %}domain{% endif %}={{entry['domain']}}" rel="nofollow noopener noreferrer">{{entry['domain']}}</a>&nbsp;
41                             <a class="listlink" href="https://{{entry['domain']}}" rel="external" target="_blank">↗</a>
42                         {% endif %}
43                     </td>
44                     <td>{{entry['score']}}</td>
45                 </tr>
46             {% endfor %}
47             </tbody>
48         </table>
49     </div>
50 {% endblock %}
51
52 {% block footer %}
53     {% if mode == 'error_code' %}
54         <h2>Please note to error codes:</h2>
55         <ul>
56             <li>Error code 999 is fake and covers a lot of reasons why the domain/instance is not reachable. Mostly that the domain is not resolvable or the server refused connection.</li>
57         </ul>
58     {% endif %}
59     <a href="{{base_url}}/">Index</a> /
60     {{ super() }}
61 {% endblock %}