diff options
author | Sandeepa Singh <sandeepa.singh@ibm.com> | 2021-07-14 13:32:22 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2021-08-10 22:20:42 +0300 |
commit | 68cbbe9014cbdcf7229a878f564d38f6d6199f25 (patch) | |
tree | cd7138959f405cb44b5d62000da9d364ed238b91 /src/views/Configuration/Firmware/FirmwareCardsBmc.vue | |
parent | 7affc529b7fba41193c4d48764707e9961cdd22d (diff) | |
download | webui-vue-68cbbe9014cbdcf7229a878f564d38f6d6199f25.tar.xz |
IA update: Update control section to operations
This is the third update to the information architecture changes and
has the following changes:
- The control section has been updated to operations
- The server led page has been removed
- The firmware page is moved to operations section
Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com>
Change-Id: I2e23da447890d7bee51892e1f782d5f2db6dded4
Diffstat (limited to 'src/views/Configuration/Firmware/FirmwareCardsBmc.vue')
-rw-r--r-- | src/views/Configuration/Firmware/FirmwareCardsBmc.vue | 136 |
1 files changed, 0 insertions, 136 deletions
diff --git a/src/views/Configuration/Firmware/FirmwareCardsBmc.vue b/src/views/Configuration/Firmware/FirmwareCardsBmc.vue deleted file mode 100644 index d79a8769..00000000 --- a/src/views/Configuration/Firmware/FirmwareCardsBmc.vue +++ /dev/null @@ -1,136 +0,0 @@ -<template> - <div> - <page-section :section-title="sectionTitle"> - <b-card-group deck> - <!-- Running image --> - <b-card> - <template #header> - <p class="font-weight-bold m-0"> - {{ $t('pageFirmware.cardTitleRunning') }} - </p> - </template> - <dl class="mb-0"> - <dt>{{ $t('pageFirmware.cardBodyVersion') }}</dt> - <dd class="mb-0">{{ runningVersion }}</dd> - </dl> - </b-card> - - <!-- Backup image --> - <b-card> - <template #header> - <p class="font-weight-bold m-0"> - {{ $t('pageFirmware.cardTitleBackup') }} - </p> - </template> - <dl> - <dt>{{ $t('pageFirmware.cardBodyVersion') }}</dt> - <dd> - <status-icon v-if="showBackupImageStatus" status="danger" /> - <span v-if="showBackupImageStatus" class="sr-only"> - {{ backupStatus }} - </span> - {{ backupVersion }} - </dd> - </dl> - <b-btn - v-if="!switchToBackupImageDisabled" - v-b-modal.modal-switch-to-running - data-test-id="firmware-button-switchToRunning" - variant="link" - size="sm" - class="py-0 px-1 mt-2" - :disabled="isPageDisabled || !backup" - > - <icon-switch class="d-none d-sm-inline-block" /> - {{ $t('pageFirmware.cardActionSwitchToRunning') }} - </b-btn> - </b-card> - </b-card-group> - </page-section> - <modal-switch-to-running :backup="backupVersion" @ok="switchToRunning" /> - </div> -</template> - -<script> -import IconSwitch from '@carbon/icons-vue/es/arrows--horizontal/20'; -import PageSection from '@/components/Global/PageSection'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; - -import ModalSwitchToRunning from './FirmwareModalSwitchToRunning'; - -export default { - components: { IconSwitch, ModalSwitchToRunning, PageSection }, - mixins: [BVToastMixin, LoadingBarMixin], - props: { - isPageDisabled: { - required: true, - type: Boolean, - default: false, - }, - }, - data() { - return { - loading, - switchToBackupImageDisabled: - process.env.VUE_APP_SWITCH_TO_BACKUP_IMAGE_DISABLED === 'true', - }; - }, - computed: { - isSingleFileUploadEnabled() { - return this.$store.getters['firmware/isSingleFileUploadEnabled']; - }, - sectionTitle() { - if (this.isSingleFileUploadEnabled) { - return this.$t('pageFirmware.sectionTitleBmcCardsCombined'); - } - return this.$t('pageFirmware.sectionTitleBmcCards'); - }, - running() { - return this.$store.getters['firmware/activeBmcFirmware']; - }, - backup() { - return this.$store.getters['firmware/backupBmcFirmware']; - }, - runningVersion() { - return this.running?.version || '--'; - }, - backupVersion() { - return this.backup?.version || '--'; - }, - backupStatus() { - return this.backup?.status || null; - }, - showBackupImageStatus() { - return ( - this.backupStatus === 'Critical' || this.backupStatus === 'Warning' - ); - }, - }, - methods: { - switchToRunning() { - this.startLoader(); - const timerId = setTimeout(() => { - this.endLoader(); - this.infoToast(this.$t('pageFirmware.toast.verifySwitchMessage'), { - title: this.$t('pageFirmware.toast.verifySwitch'), - refreshAction: true, - }); - }, 60000); - - this.$store - .dispatch('firmware/switchBmcFirmwareAndReboot') - .then(() => - this.infoToast(this.$t('pageFirmware.toast.rebootStartedMessage'), { - title: this.$t('pageFirmware.toast.rebootStarted'), - }) - ) - .catch(({ message }) => { - this.errorToast(message); - clearTimeout(timerId); - this.endLoader(); - }); - }, - }, -}; -</script> |