]> git.mxchange.org Git - fba.git/blobdiff - templates/views/scoreboard.html
Continued:
[fba.git] / templates / views / scoreboard.html
index de3453beb56fb942b285a01975904e82da7ebff5..b4615e13dd3b2b0c488067984d6a184a527dce18 100644 (file)
@@ -1,18 +1,28 @@
 {% extends "base.html" %}
 
-{% block title %}scoreboard - {% if software %}TOP {{software}} used software{% elif originator %}TOP {{originator}} scripts{% elif reference %}TOP {{reference}} referencing instances{% elif blocked %}TOP {{blocked}} deferated instances{% elif blockers %}TOP {{blockers}} deferating instances{% endif %}{% endblock %}
+{% 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 %}
 
 {% block header %}
-    {% if blockers %}
-        <h1>Top {{blockers}} defederating instances</h1>
-    {% elif blocked %}
-        <h1>Top {{blocked}} defederated instances</h1>
-    {% elif reference %}
-        <h1>Top {{reference}} referencing instances</h1>
-    {% elif software %}
-        <h1>Top {{software}} used software</h1>
-    {% elif originator %}
-        <h1>TOP {{originator}} scripts</h1>
+    {% if mode == 'blocker' %}
+        <h1>Top {{amount}} defederating instances</h1>
+    {% elif mode == 'blocked' %}
+        <h1>Top {{amount}} defederated instances</h1>
+    {% elif mode == 'reference' %}
+        <h1>Top {{amount}} referencing instances</h1>
+    {% elif mode == 'software' %}
+        <h1>Top {{amount}} used software</h1>
+    {% elif mode == 'command' %}
+        <h1>TOP {{amount}} commands</h1>
+    {% elif mode == 'error_code' %}
+        <h1>TOP {{amount}} error codes</h1>
+    {% elif mode == 'avg_peers' %}
+        <h1>TOP {{amount}} average peer count</h1>
+    {% elif mode == 'obfuscator' %}
+        <h1>TOP {{amount}} obfuscating software</h1>
+    {% elif mode == 'obfuscation' %}
+        <h1>obfuscation metrics</h1>
+    {% elif mode == 'block_level' %}
+        <h1>TOP {{amount}} block levels</h1>
     {% endif %}
 {% endblock %}
 
@@ -21,8 +31,8 @@
         <table>
             <thead>
                 <th>№</th>
-                <th>{% if software %}Software{% else %}Instance{% endif %}</th>
-                <th>{% if reference %}References{% elif software %}Total{% else %}Blocks{% endif %}</th>
+                <th>{% if mode in ('software', 'avg_peers', 'obfuscator') %}Software{% elif mode == 'obfuscation' %}obfuscation status{% elif mode == 'error_code' %}Error code{% else %}Instance{% endif %}</th>
+                <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>
             </thead>
 
             <tbody>
                 <tr>
                     <td>{{loop.index}}</td>
                     <td>
-                        {% if software %}
-                            {{entry['domain']}}
-                        {% elif originator %}
+                        {% if mode in ('software', 'command', 'error_code', 'avg_peers', 'obfuscator', 'obfuscation', 'block_level') %}
                             {{entry['domain']}}
                         {% elif entry['domain'] == None %}
                             -
                         {% else %}
-                            <a href="{{base_url}}/top?{% if blockers %}reverse{% elif blocked or reference %}domain{% endif %}={{entry['domain']}}" rel="nofollow noopener noreferrer">{{entry['domain']}}</a>&nbsp;
-                            <a class="listlink" href="https://{{entry['domain']}}" rel="external" target="_blank">↗</a>
+                            {% with domain=entry['domain'] %}
+                            {% include "widgets/links.tpl" %}
+                            {% endwith %}
                         {% endif %}
                     </td>
-                    <td>{{entry['highscore']}}</td>
+                    <td>{{entry['score']}}</td>
                 </tr>
             {% endfor %}
             </tbody>
 {% endblock %}
 
 {% block footer %}
+    {% if mode == 'error_code' %}
+        <div class="notes">
+            <h2>Please note to error codes:</h2>
+            <ul>
+                <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>
+            </ul>
+        </div>
+    {% elif mode == 'obfuscation' %}
+        <div class="notes">
+            <h2>Please note to obfuscation status:</h2>
+            <ul>
+                <li>Only supported networks are counted here.</li>
+                <li><em>None</em> means not determined yet.</li>
+            </ul>
+        </div>
+    {% endif %}
     <a href="{{base_url}}/">Index</a> /
     {{ super() }}
 {% endblock %}