From 69844093aa77c41952017ed06ee50ba1b093f891 Mon Sep 17 00:00:00 2001 From: Werner Kramer Date: Fri, 19 Jan 2024 10:11:51 +0100 Subject: [PATCH 1/5] Refresh capabilites every 5 minutes --- src/services/useSsd/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/useSsd/index.ts b/src/services/useSsd/index.ts index 8eaa75e62..37a5cfbcc 100644 --- a/src/services/useSsd/index.ts +++ b/src/services/useSsd/index.ts @@ -20,6 +20,8 @@ export interface UseSsdReturn { dates: Ref } +const REFRESH_INTERVAL = 1000 * 60 * 5 // 5 minutes + function findGroup( capabilities: SsdGetCapabilitiesResponse, name: string, @@ -72,6 +74,7 @@ export function useSsd( } loadCapabilities() + setInterval(loadCapabilities, REFRESH_INTERVAL) watchEffect(() => { const groupIdValue = toValue(groupId) From f9ed178e22e7adb2dae9a1fa677991dfac1fc767 Mon Sep 17 00:00:00 2001 From: Werner Kramer Date: Fri, 19 Jan 2024 10:44:10 +0100 Subject: [PATCH 2/5] Set follow now to default every minute and correctly emit selectedData --- src/components/general/DateTimeSlider.vue | 54 ++++++++------ src/lib/utils/findDateIndex.test.ts | 89 +++++++++++++++++++++++ src/lib/utils/findDateIndex.ts | 31 ++++++++ 3 files changed, 153 insertions(+), 21 deletions(-) create mode 100644 src/lib/utils/findDateIndex.test.ts create mode 100644 src/lib/utils/findDateIndex.ts diff --git a/src/components/general/DateTimeSlider.vue b/src/components/general/DateTimeSlider.vue index fbb967e7c..8557b49c7 100644 --- a/src/components/general/DateTimeSlider.vue +++ b/src/components/general/DateTimeSlider.vue @@ -3,12 +3,12 @@