From fe2b6d8426bcde6d04749120464b2faa3dc0170c Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Mon, 8 Jul 2024 12:18:31 +0200 Subject: [PATCH] chg: [app:live-logs] Improved notification activity chart --- notification.py | 10 +++++++++- src/components/TheLiveLogs.vue | 24 ++++++++++++++++++------ src/socket.js | 7 +++++-- tailwind.config.js | 7 +++++-- 4 files changed, 37 insertions(+), 11 deletions(-) diff --git a/notification.py b/notification.py index 8628419..d08f87d 100644 --- a/notification.py +++ b/notification.py @@ -28,7 +28,15 @@ def get_notifications() -> list[dict]: def get_notifications_history() -> list[dict]: - return list(db.NOTIFICATION_HISTORY) + return { + 'history': list(db.NOTIFICATION_HISTORY), + 'config': { + 'buffer_resolution_per_minute': db.NOTIFICATION_HISTORY_BUFFER_RESOLUTION_PER_MIN, + 'buffer_timestamp_min': db.NOTIFICATION_HISTORY_BUFFER_TIMESPAN_MIN, + 'frequency': db.NOTIFICATION_HISTORY_FREQUENCY, + 'notification_history_size': db.notification_history_size, + }, + } def reset_notifications(): diff --git a/src/components/TheLiveLogs.vue b/src/components/TheLiveLogs.vue index b3f3ca5..4252636 100644 --- a/src/components/TheLiveLogs.vue +++ b/src/components/TheLiveLogs.vue @@ -1,6 +1,6 @@