Wrapping up for the night. Better alerts and things with the correct timezone...

This commit is contained in:
Scott Idem
2024-10-17 20:46:39 -04:00
parent 172763bc26
commit de24f0dc80
4 changed files with 25 additions and 6 deletions

View File

@@ -247,7 +247,8 @@ if (auto_refresh) {
</strong>
<span class="fas fa-exclamation-triangle mx-1" />
</div>
<div>
<div class="font-mono">
<span class="fas fa-comment-dots mx-1"></span>
{@html event_device_obj?.alert_msg ?? 'No message'}
</div>
{#if event_device_obj?.alert_on}
@@ -268,7 +269,8 @@ if (auto_refresh) {
</strong>
<span class="fas fa-laptop-code mx-1" />
</div>
<div>
<div class="font-mono">
<span class="fas fa-comment-dots mx-1"></span>
{@html event_device_obj?.status_msg ?? 'No message'}
</div>
{#if event_device_obj?.status_on}
@@ -296,7 +298,8 @@ if (auto_refresh) {
{/if}
<span class="fas fa-camera mx-1" />
</div>
<div>
<div class="font-mono text-black">
<span class="fas fa-comment-dots mx-1"></span>
{@html event_device_obj?.record_status_msg ?? 'No message'}
</div>
{#if event_device_obj?.record_status_on}
@@ -306,7 +309,7 @@ if (auto_refresh) {
{/if}
</div>
<div class="flex flex-col gap-1">
<div class="flex flex-col gap-1 text-gray-500 bg-gray-100">
<span>
<strong class="text-sm">hostname:</strong>
{event_device_obj?.info_hostname}
@@ -337,6 +340,19 @@ if (auto_refresh) {
>
{ae_util.iso_datetime_formatter(event_device_obj?.updated_on, 'time_iso_12_tz')}
</span>
{#if event_device_obj?.heartbeat}
<span class="fas fa-heartbeat mx-1"></span>
Heartbeat:
<span
class="px-1"
class:bg-yellow-200={ae_util.is_datetime_recent({datetime: event_device_obj?.heartbeat, minutes: 30})}
class:bg-green-200={ae_util.is_datetime_recent({datetime: event_device_obj?.heartbeat, minutes: 240})}
class:bg-blue-200={ae_util.is_datetime_recent({datetime: event_device_obj?.heartbeat, minutes: 2880})}
>
{ae_util.iso_datetime_formatter(event_device_obj?.heartbeat, 'time_iso_12_tz')}
</span>
{/if}
</div>
</div>