summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruser <user@node5.net>2024-03-26 16:18:23 +0100
committeruser <user@node5.net>2024-03-26 16:18:23 +0100
commit57ba2cc237203e85756cecd92202d4785b234850 (patch)
tree3dd85acb43e30fd7f157adeb7138ad5d128c8cb9
parent3d5575393bcd4214dae0d1c1c27c770cae57d324 (diff)
chart show 1 day to load faster
-rw-r--r--src/db_handler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db_handler.py b/src/db_handler.py
index 4d834e8..e900e4c 100644
--- a/src/db_handler.py
+++ b/src/db_handler.py
@@ -63,7 +63,7 @@ def get_histogram_detailed() -> str:
SELECT count(la.id) as total_count, date_trunc('hour', la.timestamp) as date, cn.ip
FROM login_attempt la
JOIN connection cn on cn.id = la.connection
-WHERE la.timestamp BETWEEN (select max(timestamp) from login_attempt) - interval '2 days' AND (select max(timestamp) from login_attempt)
+WHERE la.timestamp BETWEEN (select max(timestamp) from login_attempt) - interval '1 days' AND (select max(timestamp) from login_attempt)
GROUP BY date_trunc('hour', la.timestamp), cn.ip
ORDER BY COUNT(la.id) DESC
;