]> 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 == 'block_level' %}TOP {{amount}} block level metrics{% elif mode == 'obfuscation' %}obfuscation metrics{% elif mode == 'obfuscator' %}TOP {{amount}} obfuscating 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     {% elif mode == 'avg_peers' %}
19         <h1>TOP {{amount}} average peer count</h1>
20     {% elif mode == 'obfuscator' %}
21         <h1>TOP {{amount}} obfuscating software</h1>
22     {% elif mode == 'obfuscation' %}
23         <h1>obfuscation metrics</h1>
24     {% elif mode == 'block_level' %}
25         <h1>TOP {{amount}} block levels</h1>
26     {% endif %}
27 {% endblock %}
28
29 {% block content %}
30     <div class="scoreboard">
31         <table>
32             <thead>
33                 <th>№</th>
34                 <th>{% if mode in ('software', 'avg_peers', 'obfuscator') %}Software{% elif mode == 'obfuscation' %}obfuscation status{% elif mode == 'error_code' %}Error code{% else %}Instance{% endif %}</th>
35                 <th>{% if mode == 'reference' %}References{% elif mode == 'avg_peers' %}Average{% elif mode in('software', 'error_code', 'obfuscator', 'obfuscation', 'block_level') %}Total{% else %}Blocks{% endif %}</th>
36             </thead>
37
38             <tbody>
39             {% for entry in scores %}
40                 <tr>
41                     <td>{{loop.index}}</td>
42                     <td>
43                         {% if mode in ('software', 'command', 'error_code', 'avg_peers', 'obfuscator', 'obfuscation', 'block_level') %}
44                             {{entry['domain']}}
45                         {% elif entry['domain'] == None %}
46                             -
47                         {% else %}
48                             {% with domain=entry['domain'] %}
49                             {% include "widgets/links.tpl" %}
50                             {% endwith %}
51                         {% endif %}
52                     </td>
53                     <td>{{entry['score']}}</td>
54                 </tr>
55             {% endfor %}
56             </tbody>
57         </table>
58     </div>
59 {% endblock %}
60
61 {% block footer %}
62     {% if mode == 'error_code' %}
63         <div class="notes">
64             <h2>Please note to error codes:</h2>
65             <ul>
66                 <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>
67             </ul>
68         </div>
69     {% elif mode == 'obfuscation' %}
70         <div class="notes">
71             <h2>Please note to obfuscation status:</h2>
72             <ul>
73                 <li>Only supported networks are counted here.</li>
74                 <li><em>None</em> means not determined yet.</li>
75             </ul>
76         </div>
77     {% endif %}
78     <a href="{{base_url}}/">Index</a> /
79     {{ super() }}
80 {% endblock %}