summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Zakharov <m.zakharov@IBS.RU>2022-09-08 12:30:31 +0300
committerMaksim Zakharov <m.zakharov@IBS.RU>2022-09-08 12:30:31 +0300
commit5f5d04c90c06bc7ccdf6c981d9c8de3199266f49 (patch)
tree2cefb8a77ba74caf90eee79c2f8dbe4faa4e5007
parenta37630938e2a47331d1f7c0316d6333579478f79 (diff)
downloadwebui-vue-5f5d04c90c06bc7ccdf6c981d9c8de3199266f49.tar.xz
fix overviev time
-rw-r--r--src/views/_sila/Overview/OverviewQuickLinks.vue18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/views/_sila/Overview/OverviewQuickLinks.vue b/src/views/_sila/Overview/OverviewQuickLinks.vue
index ad82ee6f..ca069fe0 100644
--- a/src/views/_sila/Overview/OverviewQuickLinks.vue
+++ b/src/views/_sila/Overview/OverviewQuickLinks.vue
@@ -5,7 +5,11 @@
<dl>
<dt>{{ $t('pageOverview.bmcTime') }}</dt>
<dd v-if="liveBmcTime" data-test-id="overviewQuickLinks-text-bmcTime">
- {{ liveBmcTime | formatDate }} {{ liveBmcTime | formatTime }}
+ {{ liveBmcTime | formatDate }}
+ <span style="display: inline-block; width: 68px">{{
+ liveClock
+ }}</span>
+ {{ isUtcDisplay ? $t('pageProfileSettings.UTC') : timezone }}
</dd>
<dd v-else>--</dd>
</dl>
@@ -28,13 +32,14 @@
<script>
import ArrowRight16 from '@carbon/icons-vue/es/arrow--right/16';
import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin';
+import LocalTimezoneLabelMixin from '@/components/_sila/Mixins/LocalTimezoneLabelMixin';
export default {
name: 'QuickLinks',
components: {
IconArrowRight: ArrowRight16,
},
- mixins: [BVToastMixin],
+ mixins: [BVToastMixin, LocalTimezoneLabelMixin],
computed: {
liveBmcTime() {
if (!this.$store.getters['global/liveBmcTime']) {
@@ -42,6 +47,15 @@ export default {
}
return new Date(this.$store.getters['global/liveBmcTime']);
},
+ liveClock() {
+ return this.$store.getters['global/liveClock'];
+ },
+ timezone() {
+ return this.localOffset();
+ },
+ isUtcDisplay() {
+ return this.$store.getters['global/isUtcDisplay'];
+ },
},
created() {
Promise.all([this.$store.dispatch('global/getBmcTime')]).finally(() => {