summaryrefslogtreecommitdiff
path: root/src/views/_sila/Overview/DateTime/DateTime.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/_sila/Overview/DateTime/DateTime.vue')
-rw-r--r--src/views/_sila/Overview/DateTime/DateTime.vue26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/views/_sila/Overview/DateTime/DateTime.vue b/src/views/_sila/Overview/DateTime/DateTime.vue
index 3437a324..55193d64 100644
--- a/src/views/_sila/Overview/DateTime/DateTime.vue
+++ b/src/views/_sila/Overview/DateTime/DateTime.vue
@@ -38,6 +38,21 @@
:disabled="loading"
label-sr-only
>
+ <b-row class="mt-3 ml-3">
+ <b-col sm="6" lg="4" xl="3">
+ <b-form-group
+ :label="$t('pageDateTime.timezone')"
+ label-for="time-zone-select"
+ >
+ <b-form-select
+ id="time-zone-select"
+ v-model="timeZone"
+ :options="timeZones()"
+ >
+ </b-form-select>
+ </b-form-group>
+ </b-col>
+ </b-row>
<b-form-radio
v-model="form.configurationSelected"
value="manual"
@@ -252,6 +267,8 @@ export default {
},
data() {
return {
+ timeZone: null,
+ timeZoneOptions: null,
locale: this.$store.getters['global/languagePreference'],
form: {
configurationSelected: '',
@@ -312,6 +329,9 @@ export default {
bmcTime() {
return this.$store.getters['global/bmcTime'];
},
+ storeTimeZone() {
+ return this.$store.getters['global/timeZone'];
+ },
ntpOptionSelected() {
return this.form.configurationSelected === 'ntp';
},
@@ -344,6 +364,7 @@ export default {
this.$store.dispatch('dateTime/getNtpData').finally(() => {
this.getNtpValues();
this.getBmcTime();
+ this.getTimeZone();
this.endLoader();
this.isBusy = false;
});
@@ -356,6 +377,9 @@ export default {
manualDate: this.manualDate ? new Date(this.manualDate) : null,
});
},
+ getTimeZone() {
+ this.timeZone = this.storeTimeZone;
+ },
getNtpValues() {
this.form.configurationSelected = this.isNtpProtocolEnabled
? 'ntp'
@@ -377,6 +401,7 @@ export default {
submitForm() {
this.$v.$touch();
if (this.$v.$invalid) return;
+
this.startLoader();
let dateTimeForm = {};
@@ -428,6 +453,7 @@ export default {
this.successToast(success);
});
}
+ this.$store.dispatch('global/changeTimeZone', this.timeZone);
})
.catch(({ message }) => this.errorToast(message))
.finally(() => {