Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 1 | <template> |
| 2 | <overview-card |
| 3 | :title="$t('pageOverview.firmwareInformation')" |
| 4 | :to="`/operations/firmware`" |
| 5 | > |
| 6 | <b-row class="mt-3"> |
| 7 | <b-col> |
| 8 | <dl> |
| 9 | <dt>{{ $t('pageOverview.runningVersion') }}</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 10 | <dd>{{ dataFormatter(runningVersion) }}</dd> |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 11 | <dt>{{ $t('pageOverview.backupVersion') }}</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 12 | <dd>{{ dataFormatter(backupVersion) }}</dd> |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 13 | </dl> |
| 14 | </b-col> |
| 15 | </b-row> |
| 16 | </overview-card> |
| 17 | </template> |
| 18 | |
| 19 | <script> |
| 20 | import OverviewCard from './OverviewCard'; |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 21 | import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 22 | |
| 23 | export default { |
| 24 | name: 'Firmware', |
| 25 | components: { |
| 26 | OverviewCard, |
| 27 | }, |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 28 | mixins: [DataFormatterMixin], |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 29 | computed: { |
| 30 | backupBmcFirmware() { |
| 31 | return this.$store.getters['firmware/backupBmcFirmware']; |
| 32 | }, |
| 33 | backupVersion() { |
| 34 | return this.backupBmcFirmware?.version; |
| 35 | }, |
| 36 | activeBmcFirmware() { |
| 37 | return this.$store.getters[`firmware/activeBmcFirmware`]; |
| 38 | }, |
| 39 | runningVersion() { |
| 40 | return this.activeBmcFirmware?.version; |
| 41 | }, |
| 42 | }, |
| 43 | created() { |
| 44 | this.$store.dispatch('firmware/getFirmwareInformation').finally(() => { |
| 45 | this.$root.$emit('overview-firmware-complete'); |
| 46 | }); |
| 47 | }, |
| 48 | }; |
| 49 | </script> |