summaryrefslogtreecommitdiff
path: root/src/views/Configuration
diff options
context:
space:
mode:
authorDixsie Wolmers <dixsie@ibm.com>2020-07-29 22:18:44 +0300
committerYoshie Muranaka <yoshiemuranaka@gmail.com>2020-08-07 17:17:59 +0300
commitfcda20013b8836e171a91c8c47c584449ffd7746 (patch)
tree8463119e20e77c3e99f5e243d82a02da71ae0135 /src/views/Configuration
parentb5c161b4b098e5f303cb81cd782c5abe88722456 (diff)
downloadwebui-vue-fcda20013b8836e171a91c8c47c584449ffd7746.tar.xz
Update Date and Time Settings to include UTC/offset label
Label updates allow the user to easily understand the expectation for entering time by using specific label text for "24 hour time" and removing parenthesis from the helper text as parenthesis are not needed to in the input field. UTC/offset is displayed based on user preference. Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I41f98d9d16f0a4a81af39ce9b25768a1c0b89f08
Diffstat (limited to 'src/views/Configuration')
-rw-r--r--src/views/Configuration/DateTimeSettings/DateTimeSettings.vue27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue
index f1b64751..3d9dc3b6 100644
--- a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue
+++ b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue
@@ -24,7 +24,7 @@
</b-col>
<b-col lg="3">
<dl>
- <dt>{{ $t('pageDateTimeSettings.form.time') }}</dt>
+ <dt>{{ $t('pageDateTimeSettings.form.time.label') }}</dt>
<dd v-if="bmcTime">{{ bmcTime | formatTime }}</dd>
<dd v-else>--</dd>
</dl>
@@ -52,7 +52,7 @@
:label="$t('pageDateTimeSettings.form.date')"
label-for="input-manual-date"
>
- <b-form-text id="date-format-help">(YYYY-MM-DD)</b-form-text>
+ <b-form-text id="date-format-help">YYYY-MM-DD</b-form-text>
<b-input-group>
<b-form-input
id="input-manual-date"
@@ -96,10 +96,12 @@
</b-col>
<b-col sm="6" lg="4" xl="3">
<b-form-group
- :label="$t('pageDateTimeSettings.form.time')"
+ :label="
+ $t('pageDateTimeSettings.form.time.timezone', { timezone })
+ "
label-for="input-manual-time"
>
- <b-form-text id="time-format-help">(HH:MM)</b-form-text>
+ <b-form-text id="time-format-help">HH:MM</b-form-text>
<b-input-group>
<b-form-input
id="input-manual-time"
@@ -206,6 +208,7 @@ import PageSection from '@/components/Global/PageSection';
import BVToastMixin from '@/components/Mixins/BVToastMixin';
import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
+import LocalTimezoneLabelMixin from '@/components/Mixins/LocalTimezoneLabelMixin';
import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
import { mapState } from 'vuex';
@@ -217,7 +220,12 @@ const isoTimeRegex = /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/;
export default {
name: 'DateTimeSettings',
components: { Alert, IconCalendar, PageTitle, PageSection },
- mixins: [BVToastMixin, LoadingBarMixin, VuelidateMixin],
+ mixins: [
+ BVToastMixin,
+ LoadingBarMixin,
+ LocalTimezoneLabelMixin,
+ VuelidateMixin
+ ],
data() {
return {
locale: this.$store.getters['global/languagePreference'],
@@ -264,6 +272,15 @@ export default {
...mapState('dateTime', ['ntpServers', 'isNtpProtocolEnabled']),
bmcTime() {
return this.$store.getters['global/bmcTime'];
+ },
+ isUtcDisplay() {
+ return this.$store.getters['global/isUtcDisplay'];
+ },
+ timezone() {
+ if (this.isUtcDisplay) {
+ return 'UTC';
+ }
+ return this.localOffset();
}
},
watch: {