From: Roland Häder Date: Fri, 28 Jul 2023 07:50:49 +0000 (+0200) Subject: Fixed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b4529cd24df2e7cece7f8f2ea9e5dc72e8e88a5b;p=fba.git Fixed: - 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 --- diff --git a/fba/http/nodeinfo.py b/fba/http/nodeinfo.py index 9507844..7d7620a 100644 --- a/fba/http/nodeinfo.py +++ b/fba/http/nodeinfo.py @@ -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 diff --git a/templates/views/scoreboard.html b/templates/views/scoreboard.html index f76775d..2f41754 100644 --- a/templates/views/scoreboard.html +++ b/templates/views/scoreboard.html @@ -44,14 +44,16 @@ {{loop.index}} - {% 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' %} {{entry['domain']}} + {% elif mode == 'avg_peers' %} + {{entry['domain']}} {% elif mode in ('software', 'detection_mode', 'command') %} {{entry['domain']}} + {% elif entry['domain'] == None %} + - {% else %} {% with domain=entry['domain'] %} {% include "widgets/links.html" %}