summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-09-08 15:35:21 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-09-08 15:35:21 +0300
commitfaf1dc6e9b2e414a0ad25f3e0bdc4d74de054c17 (patch)
tree25473ae3525940caa97fb9ba5c5b824687a5c9e2
parenta37630938e2a47331d1f7c0316d6333579478f79 (diff)
downloadwebui-vue-faf1dc6e9b2e414a0ad25f3e0bdc4d74de054c17.tar.xz
add live clock for DateTime
-rw-r--r--src/views/_sila/Overview/DateTime/DateTime.vue10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/views/_sila/Overview/DateTime/DateTime.vue b/src/views/_sila/Overview/DateTime/DateTime.vue
index db574863..3437a324 100644
--- a/src/views/_sila/Overview/DateTime/DateTime.vue
+++ b/src/views/_sila/Overview/DateTime/DateTime.vue
@@ -18,14 +18,14 @@
<b-col lg="3">
<dl>
<dt>{{ $t('pageDateTime.form.date') }}</dt>
- <dd v-if="bmcTime">{{ bmcTime | formatDate }}</dd>
+ <dd v-if="liveBmcTime">{{ liveBmcTime | formatDate }}</dd>
<dd v-else>--</dd>
</dl>
</b-col>
<b-col lg="3">
<dl>
<dt>{{ $t('pageDateTime.form.time.label') }}</dt>
- <dd v-if="bmcTime">{{ bmcTime | formatTime }}</dd>
+ <dd v-if="liveBmcTime">{{ liveBmcTime | formatTime }}</dd>
<dd v-else>--</dd>
</dl>
</b-col>
@@ -303,6 +303,12 @@ export default {
isNotAdmin() {
return this.$store.getters['authentication/role'] === 'ReadOnly';
},
+ liveBmcTime() {
+ if (!this.$store.getters['global/liveBmcTime']) {
+ return;
+ }
+ return new Date(this.$store.getters['global/liveBmcTime']);
+ },
bmcTime() {
return this.$store.getters['global/bmcTime'];
},