]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 24 Aug 2023 20:29:19 +0000 (22:29 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 24 Aug 2023 20:29:19 +0000 (22:29 +0200)
- fetch all data in /list view
- added total_peers and total_blocks to be exposed

daemon.py
templates/views/list.html

index f298737b9adc6e1d2119466007dafb191a50466d..53a50f6d7549e47121369fe8059374a661d704da 100755 (executable)
--- 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 \
index 260537d77ae6c69893e8930277daaa887faf3c3a..70c8f86d5334b5b78ed6a5d1e577cb51709a1f1b 100644 (file)
@@ -34,6 +34,8 @@
             <th>Software</th>
             <th>Detection mode</th>
             <th>Command</th>
+            <th>Total peers</th>
+            <th>Total blocks</th>
             <th>First added</th>
             <th>Last updated</th>
         </thead>
@@ -62,6 +64,8 @@
                     {% endwith %}
                 </td>
                 <td><code>{{row['command']}}</code></td>
+                <td>{{row['total_peers']}}</td>
+                <td>{{row['total_blocks']}}</td>
                 <td>{{row['first_seen']}}</td>
                 <td>{{row['last_updated']}}</td>
             </tr>