From: Roland Häder Date: Thu, 24 Aug 2023 20:29:19 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0a03048fe8453bb27d5875287675aa221c31b099;p=fba.git Continued: - fetch all data in /list view - added total_peers and total_blocks to be exposed --- diff --git a/daemon.py b/daemon.py index f298737..53a50f6 100755 --- a/daemon.py +++ b/daemon.py @@ -115,7 +115,7 @@ def api_list(request: Request, mode: str, value: str, amount: int): if mode in ("detection_mode", "software", "command", "origin"): database.cursor.execute( - f"SELECT domain, origin, software, detection_mode, command, total_peers, total_blocks, first_seen, last_updated \ + f"SELECT * \ FROM instances \ WHERE {mode} = ? \ ORDER BY domain \ diff --git a/templates/views/list.html b/templates/views/list.html index 260537d..70c8f86 100644 --- a/templates/views/list.html +++ b/templates/views/list.html @@ -34,6 +34,8 @@ Software Detection mode Command + Total peers + Total blocks First added Last updated @@ -62,6 +64,8 @@ {% endwith %} {{row['command']}} + {{row['total_peers']}} + {{row['total_blocks']}} {{row['first_seen']}} {{row['last_updated']}}