From 58d4af812d1a25205a37659c8f7abfbd43427a60 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..1d90546 100644 --- a/src/components/TheLiveLogs.vue +++ b/src/components/TheLiveLogs.vue @@ -1,6 +1,6 @@