blob: f1f9ce53b9c7851666c8fba86ae146e4a48a8563 [file] [log] [blame]
Dixsie Wolmers6a192d52021-09-02 15:26:58 -05001<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 Wolmers9726f9a2021-09-07 15:33:16 -050010 <dd>{{ dataFormatter(runningVersion) }}</dd>
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050011 <dt>{{ $t('pageOverview.backupVersion') }}</dt>
Dixsie Wolmers9726f9a2021-09-07 15:33:16 -050012 <dd>{{ dataFormatter(backupVersion) }}</dd>
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050013 </dl>
14 </b-col>
15 </b-row>
16 </overview-card>
17</template>
18
19<script>
20import OverviewCard from './OverviewCard';
Dixsie Wolmers9726f9a2021-09-07 15:33:16 -050021import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin';
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050022
23export default {
24 name: 'Firmware',
25 components: {
26 OverviewCard,
27 },
Dixsie Wolmers9726f9a2021-09-07 15:33:16 -050028 mixins: [DataFormatterMixin],
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050029 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>