]> git.mxchange.org Git - fba.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Fri, 28 Jul 2023 07:50:49 +0000 (09:50 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 28 Jul 2023 07:50:49 +0000 (09:50 +0200)
- also need to check if data[json] has at least one entry
- mode=avg_peers shows software names, let's link to /list?mode=software here

fba/http/nodeinfo.py
templates/views/scoreboard.html

index 9507844d15c41d292e12c15980b556767a032bc1..7d7620ad9d658240216011bb2108dbe5f76fc0da 100644 (file)
@@ -153,7 +153,7 @@ def fetch_wellknown_nodeinfo(domain: str) -> dict:
         )
         logger.debug("data[]='%s'", type(data))
 
-        if "error_message" not in data and "json" in data:
+        if "error_message" not in data and "json" in data and len(data["json"]) > 0:
             logger.debug("path='%s' returned valid json()=%d", path, len(data["json"]))
             break
 
index f76775d55037e8bff1c0e1bb8d465d2f0ff3c4ba..2f41754235becb322094c7446d2e40bebc802878 100644 (file)
                 <tr>
                     <td>{{loop.index}}</td>
                     <td>
-                        {% if mode in ('error_code', 'avg_peers', 'obfuscator', 'obfuscation') %}
+                        {% if mode in ('error_code', 'obfuscator', 'obfuscation') %}
                             {{entry['domain']}}
-                        {% elif entry['domain'] == None %}
-                            -
                         {% elif mode == 'block_level' %}
                             <a href="top?mode={{mode}}&amp;value={{entry['domain']}}&amp;amount=50">{{entry['domain']}}</a>
+                        {% elif mode == 'avg_peers' %}
+                            <a href="list?mode=software&amp;value={{entry['domain']}}&amp;amount=50">{{entry['domain']}}</a>
                         {% elif mode in ('software', 'detection_mode', 'command') %}
                             <a href="list?mode={{mode}}&amp;value={{entry['domain']}}&amp;amount=50">{{entry['domain']}}</a>
+                        {% elif entry['domain'] == None %}
+                            -
                         {% else %}
                             {% with domain=entry['domain'] %}
                             {% include "widgets/links.html" %}