diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-09-08 12:22:06 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-09-08 12:22:06 +0300 |
commit | ee569d625c448a195cb4f8f759c755d187979b59 (patch) | |
tree | 76e08cc74abc6d132654669cb6cebc797abc6e9a | |
parent | 5576c673db5fe41289095006b1a1370391e6f563 (diff) | |
download | webui-vue-ee569d625c448a195cb4f8f759c755d187979b59.tar.xz |
SILABMC-304: fx time upd after redirect from another page
-rw-r--r-- | src/views/_sila/Overview/DateTime/DateTime.vue | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/views/_sila/Overview/DateTime/DateTime.vue b/src/views/_sila/Overview/DateTime/DateTime.vue index e4bc89b7..3beec1e8 100644 --- a/src/views/_sila/Overview/DateTime/DateTime.vue +++ b/src/views/_sila/Overview/DateTime/DateTime.vue @@ -324,24 +324,20 @@ export default { }, watch: { ntpServers() { - this.setNtpValues(); + this.getNtpValues(); }, manualDate() { this.emitChange(); }, bmcTime() { - this.form.manual.date = this.$options.filters.formatDate( - this.$store.getters['global/bmcTime'] - ); - this.form.manual.time = this.$options.filters - .formatTime(this.$store.getters['global/bmcTime']) - .slice(0, 5); + this.getBmcTime(); }, }, created() { this.startLoader(); this.$store.dispatch('dateTime/getNtpData').finally(() => { - this.setNtpValues(); + this.getNtpValues(); + this.getBmcTime(); this.endLoader(); this.isBusy = false; }); @@ -354,7 +350,7 @@ export default { manualDate: this.manualDate ? new Date(this.manualDate) : null, }); }, - setNtpValues() { + getNtpValues() { this.form.configurationSelected = this.isNtpProtocolEnabled ? 'ntp' : 'manual'; @@ -364,6 +360,14 @@ export default { this.form.ntp.thirdAddress = '', ] = [this.ntpServers[0], this.ntpServers[1], this.ntpServers[2]]; }, + getBmcTime() { + this.form.manual.date = this.$options.filters.formatDate( + this.$store.getters['global/bmcTime'] + ); + this.form.manual.time = this.$options.filters + .formatTime(this.$store.getters['global/bmcTime']) + .slice(0, 5); + }, submitForm() { this.$v.$touch(); if (this.$v.$invalid) return; |