diff options
author | Derick Montague <derick.montague@ibm.com> | 2020-10-22 00:20:00 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2020-11-03 19:47:51 +0300 |
commit | 602e98aa32f82fd3b0c3d250c7cc1f8da971db24 (patch) | |
tree | 2894194868ff987718a8b19f112b8106d662aa83 /src/views/Configuration/DateTimeSettings/DateTimeSettings.vue | |
parent | 47165201c79b3d2c4ccc62a49a9c75d038ee8fe6 (diff) | |
download | webui-vue-602e98aa32f82fd3b0c3d250c7cc1f8da971db24.tar.xz |
Update linting packages to use latest
- 99% of changes were small syntax changes that were changed by the
lint command. There were a couple of small manual changes to meet the
property order patterns established as part of the vue:recommended
guidelines.
There are rules that were set from errors to warnings and new stories
are being opened to address those issues.
Testing:
- Successfully ran npm run serve
- Successfully ran npm run lint
- Verified functionality works as expected, e.g. success and failure use cases
- Resolved any JavaScript errors thrown to the console
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: Ie082f31c73ccbe8a60afa8f88a9ef6dbf33d9fd2
Diffstat (limited to 'src/views/Configuration/DateTimeSettings/DateTimeSettings.vue')
-rw-r--r-- | src/views/Configuration/DateTimeSettings/DateTimeSettings.vue | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue index 33e097c4..79cdbc1e 100644 --- a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue +++ b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue @@ -84,7 +84,7 @@ button-variant="link" aria-controls="input-manual-date" > - <template v-slot:button-content> + <template #button-content> <icon-calendar :title="$t('global.calendar.openDatePicker')" aria-hidden="true" @@ -227,8 +227,12 @@ export default { BVToastMixin, LoadingBarMixin, LocalTimezoneLabelMixin, - VuelidateMixin + VuelidateMixin, ], + beforeRouteLeave(to, from, next) { + this.hideLoader(); + next(); + }, data() { return { locale: this.$store.getters['global/languagePreference'], @@ -236,10 +240,10 @@ export default { configurationSelected: '', manual: { date: '', - time: '' + time: '', }, - ntp: { firstAddress: '', secondAddress: '', thirdAddress: '' } - } + ntp: { firstAddress: '', secondAddress: '', thirdAddress: '' }, + }, }; }, validations() { @@ -247,28 +251,28 @@ export default { form: { manual: { date: { - required: requiredIf(function() { + required: requiredIf(function () { return this.form.configurationSelected === 'manual'; }), - pattern: helpers.regex('pattern', isoDateRegex) + pattern: helpers.regex('pattern', isoDateRegex), }, time: { - required: requiredIf(function() { + required: requiredIf(function () { return this.form.configurationSelected === 'manual'; }), - pattern: helpers.regex('pattern', isoTimeRegex) - } + pattern: helpers.regex('pattern', isoTimeRegex), + }, }, ntp: { firstAddress: { - required: requiredIf(function() { + required: requiredIf(function () { return this.form.configurationSelected === 'ntp'; - }) + }), }, secondAddress: {}, - thirdAddress: {} - } - } + thirdAddress: {}, + }, + }, }; }, computed: { @@ -284,7 +288,7 @@ export default { return 'UTC'; } return this.localOffset(); - } + }, }, watch: { ntpServers() { @@ -300,25 +304,21 @@ export default { this.form.manual.time = this.$options.filters .formatTime(this.$store.getters['global/bmcTime']) .slice(0, 5); - } + }, }, created() { this.startLoader(); Promise.all([ this.$store.dispatch('global/getBmcTime'), - this.$store.dispatch('dateTime/getNtpData') + this.$store.dispatch('dateTime/getNtpData'), ]).finally(() => this.endLoader()); }, - beforeRouteLeave(to, from, next) { - this.hideLoader(); - next(); - }, methods: { emitChange() { if (this.$v.$invalid) return; this.$v.$reset(); //reset to re-validate on blur this.$emit('change', { - manualDate: this.manualDate ? new Date(this.manualDate) : null + manualDate: this.manualDate ? new Date(this.manualDate) : null, }); }, setNtpValues() { @@ -367,13 +367,13 @@ export default { dateTimeForm.ntpServersArray = [ ntpFirstAddress, ntpSecondAddress, - ntpThirdAddress + ntpThirdAddress, ]; } this.$store .dispatch('dateTime/updateDateTimeSettings', dateTimeForm) - .then(success => { + .then((success) => { this.successToast(success); if (!isNTPEnabled) return; // Shift address up if second address is empty @@ -407,7 +407,7 @@ export default { timeArray[1] // User input minute ); return new Date(utcDate); - } - } + }, + }, }; </script> |