summaryrefslogtreecommitdiff
path: root/src/views/Configuration/Firmware
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2020-10-22 00:20:00 +0300
committerDerick Montague <derick.montague@ibm.com>2020-11-03 19:47:51 +0300
commit602e98aa32f82fd3b0c3d250c7cc1f8da971db24 (patch)
tree2894194868ff987718a8b19f112b8106d662aa83 /src/views/Configuration/Firmware
parent47165201c79b3d2c4ccc62a49a9c75d038ee8fe6 (diff)
downloadwebui-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/Firmware')
-rw-r--r--src/views/Configuration/Firmware/Firmware.vue60
-rw-r--r--src/views/Configuration/Firmware/FirmwareModalRebootBackupBmc.vue8
2 files changed, 34 insertions, 34 deletions
diff --git a/src/views/Configuration/Firmware/Firmware.vue b/src/views/Configuration/Firmware/Firmware.vue
index e1f97c4e..48c29ebc 100644
--- a/src/views/Configuration/Firmware/Firmware.vue
+++ b/src/views/Configuration/Firmware/Firmware.vue
@@ -8,7 +8,7 @@
<b-card-group deck>
<!-- Current FW -->
<b-card header-bg-variant="success">
- <template v-slot:header>
+ <template #header>
<dl class="mb-0">
<dt>{{ $t('pageFirmware.current') }}</dt>
<dd class="mb-0">{{ bmcFirmwareCurrentVersion }}</dd>
@@ -18,12 +18,12 @@
<dt>{{ $t('pageFirmware.state') }}:</dt>
<dd>{{ bmcFirmwareCurrentState }}</dd>
</dl>
- <template v-slot:footer></template>
+ <template #footer></template>
</b-card>
<!-- Backup FW -->
<b-card footer-class="p-0">
- <template v-slot:header>
+ <template #header>
<dl class="mb-0">
<dt>{{ $t('pageFirmware.backup') }}</dt>
<dd class="mb-0">{{ bmcFirmwareBackupVersion }}</dd>
@@ -33,7 +33,7 @@
<dt>{{ $t('pageFirmware.state') }}:</dt>
<dd>{{ bmcFirmwareBackupState }}</dd>
</dl>
- <template v-slot:footer>
+ <template #footer>
<b-btn
v-b-modal.modal-reboot-backup-bmc
:disabled="!bmcFirmwareBackupVersion"
@@ -53,7 +53,7 @@
<b-card-group deck>
<!-- Current FW -->
<b-card header-bg-variant="success">
- <template v-slot:header>
+ <template #header>
<dl class="mb-0">
<dt>{{ $t('pageFirmware.current') }}</dt>
<dd class="mb-0">{{ hostFirmwareCurrentVersion }}</dd>
@@ -68,7 +68,7 @@
<!-- Backup FW -->
<b-card>
- <template v-slot:header>
+ <template #header>
<dl class="mb-0">
<dt>{{ $t('pageFirmware.backup') }}</dt>
<dd class="mb-0">{{ hostFirmwareBackupVersion }}</dd>
@@ -212,16 +212,21 @@ export default {
ModalRebootBackupBmc,
ModalUpload,
PageSection,
- PageTitle
+ PageTitle,
},
mixins: [BVToastMixin, LoadingBarMixin, VuelidateMixin],
+ beforeRouteLeave(to, from, next) {
+ this.hideLoader();
+ this.clearRebootTimeout();
+ next();
+ },
data() {
return {
isWorkstationSelected: true,
file: null,
tftpIpAddress: null,
tftpFileName: null,
- timeoutId: null
+ timeoutId: null,
};
},
computed: {
@@ -233,16 +238,16 @@ export default {
'hostFirmwareCurrentVersion',
'hostFirmwareCurrentState',
'hostFirmwareBackupVersion',
- 'hostFirmwareBackupState'
- ])
+ 'hostFirmwareBackupState',
+ ]),
},
watch: {
- isWorkstationSelected: function() {
+ isWorkstationSelected: function () {
this.$v.$reset();
this.file = null;
this.tftpIpAddress = null;
this.tftpFileName = null;
- }
+ },
},
created() {
this.startLoader();
@@ -251,28 +256,23 @@ export default {
.dispatch('firmware/getFirmwareInformation')
.finally(() => this.endLoader());
},
- beforeRouteLeave(to, from, next) {
- this.hideLoader();
- this.clearRebootTimeout();
- next();
- },
validations() {
return {
file: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return this.isWorkstationSelected;
- })
+ }),
},
tftpIpAddress: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return !this.isWorkstationSelected;
- })
+ }),
},
tftpFileName: {
- required: requiredIf(function() {
+ required: requiredIf(function () {
return !this.isWorkstationSelected;
- })
- }
+ }),
+ },
};
},
methods: {
@@ -292,7 +292,7 @@ export default {
dispatchWorkstationUpload() {
this.$store
.dispatch('firmware/uploadFirmware', this.file)
- .then(success =>
+ .then((success) =>
this.infoToast(
success,
this.$t('pageFirmware.toast.successUploadTitle')
@@ -306,11 +306,11 @@ export default {
dispatchTftpUpload() {
const data = {
address: this.tftpIpAddress,
- filename: this.tftpFileName
+ filename: this.tftpFileName,
};
this.$store
.dispatch('firmware/uploadFirmwareTFTP', data)
- .then(success =>
+ .then((success) =>
this.infoToast(
success,
this.$t('pageFirmware.toast.successUploadTitle')
@@ -325,7 +325,7 @@ export default {
this.setRebootTimeout();
this.$store
.dispatch('firmware/switchBmcFirmware')
- .then(success =>
+ .then((success) =>
this.infoToast(success, this.$t('global.status.success'))
)
.catch(({ message }) => {
@@ -355,8 +355,8 @@ export default {
this.$v.$touch();
if (this.$v.$invalid) return;
this.$bvModal.show('modal-upload');
- }
- }
+ },
+ },
};
</script>
diff --git a/src/views/Configuration/Firmware/FirmwareModalRebootBackupBmc.vue b/src/views/Configuration/Firmware/FirmwareModalRebootBackupBmc.vue
index 06ab65d9..8f9a8f8c 100644
--- a/src/views/Configuration/Firmware/FirmwareModalRebootBackupBmc.vue
+++ b/src/views/Configuration/Firmware/FirmwareModalRebootBackupBmc.vue
@@ -22,12 +22,12 @@ export default {
props: {
current: {
type: String,
- required: true
+ required: true,
},
backup: {
type: String,
- required: true
- }
- }
+ required: true,
+ },
+ },
};
</script>