mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-13 23:45:25 +00:00
Added boot time to status page
This commit is contained in:
parent
061f6433d6
commit
3c86e824a2
2
lib/SvelteUi/app/dist/index.css
vendored
2
lib/SvelteUi/app/dist/index.css
vendored
File diff suppressed because one or more lines are too long
19
lib/SvelteUi/app/dist/index.js
vendored
19
lib/SvelteUi/app/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -2,10 +2,11 @@
|
||||
import { zeropad, monthnames } from './Helpers.js';
|
||||
|
||||
export let timestamp;
|
||||
export let fullTimeColor;
|
||||
</script>
|
||||
|
||||
{#if Math.abs(new Date().getTime()-timestamp.getTime()) < 300000 }
|
||||
{`${zeropad(timestamp.getDate())}. ${monthnames[timestamp.getMonth()]} ${zeropad(timestamp.getHours())}:${zeropad(timestamp.getMinutes())}`}
|
||||
{:else}
|
||||
<span class="text-red-500">{`${zeropad(timestamp.getDate())}.${zeropad(timestamp.getMonth())}.${timestamp.getFullYear()} ${zeropad(timestamp.getHours())}:${zeropad(timestamp.getMinutes())}`}</span>
|
||||
<span class="{fullTimeColor}">{`${zeropad(timestamp.getDate())}.${zeropad(timestamp.getMonth())}.${timestamp.getFullYear()} ${zeropad(timestamp.getHours())}:${zeropad(timestamp.getMinutes())}`}</span>
|
||||
{/if}
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
<a class="float-right" href='https://github.com/UtilitechAS/amsreader-firmware' target='_blank' rel="noreferrer" aria-label="GitHub"><img class="gh-logo" src={GitHubLogo} alt="GitHub repo"/></a>
|
||||
</div>
|
||||
<div class="flex-none my-auto px-2">
|
||||
<Clock timestamp={ data.c ? new Date(data.c * 1000) : new Date(0) } />
|
||||
<Clock timestamp={ data.c ? new Date(data.c * 1000) : new Date(0) } fullTimeColor="text-red-500" />
|
||||
</div>
|
||||
{#if sysinfo.vndcfg && sysinfo.usrcfg}
|
||||
<div class="flex-none px-1 mt-1" title="Configuration">
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
import { upgrade, getNextVersion, upgradeWarningText } from './UpgradeHelper';
|
||||
import DownloadIcon from './DownloadIcon.svelte';
|
||||
import { Link } from 'svelte-navigator';
|
||||
import Clock from './Clock.svelte';
|
||||
import Mask from './Mask.svelte';
|
||||
|
||||
export let data;
|
||||
@ -103,7 +104,15 @@
|
||||
AP MAC: {sysinfo.apmac}
|
||||
</div>
|
||||
<div class="my-2">
|
||||
Last boot: {getResetReason(sysinfo)} ({sysinfo.boot_reason})
|
||||
Last boot:
|
||||
{#if data.u > 0}
|
||||
<Clock timestamp={new Date(new Date().getTime() - (data.u * 1000))} fullTimeColor="" />
|
||||
{:else}
|
||||
-
|
||||
{/if}
|
||||
</div>
|
||||
<div class="my-2">
|
||||
Reason: {getResetReason(sysinfo)} ({sysinfo.boot_reason})
|
||||
</div>
|
||||
{/if}
|
||||
<div class="my-2">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user