From 7cc6488449e92b8f979fa46dcd686d86331aa6ea Mon Sep 17 00:00:00 2001 From: Ash Date: Thu, 24 Oct 2024 17:10:22 +0100 Subject: [PATCH] status fix --- server/src/js/components/latest-levels-auto-refresh.js | 4 ++-- server/views/partials/latest-levels.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/js/components/latest-levels-auto-refresh.js b/server/src/js/components/latest-levels-auto-refresh.js index 45be911e4..1442854ee 100644 --- a/server/src/js/components/latest-levels-auto-refresh.js +++ b/server/src/js/components/latest-levels-auto-refresh.js @@ -115,9 +115,9 @@ class LatestLevelsAutoRefresh { if (currentItem) { const currentTime = currentItem.querySelector('[data-item-time]') const currentValue = currentItem.querySelector('[data-item-value]') - const currentStatus = currentItem.getAttribute('data-item-status') - if (fetchedStatus === currentStatus) { + // if isSuspendedOrOffline + if (fetchedStatus === 'false') { if (fetchedValue?.textContent !== currentValue?.textContent) { clearInterval(this.timeAgoInterval) diff --git a/server/views/partials/latest-levels.html b/server/views/partials/latest-levels.html index 94dff5aa8..a221f04bd 100644 --- a/server/views/partials/latest-levels.html +++ b/server/views/partials/latest-levels.html @@ -3,7 +3,7 @@

Latest level{% if model.latestLevels.length > 1 %}s{% endif %}

{% for warnings in model.latestLevels %} -
+
{% if warnings.status == 'Suspended' or (warnings.status == 'Active' and warnings.latest_level == null) %}

Latest Level