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>
10          <dd>{{ dataFormatter(runningVersion) }}</dd>
11          <dt>{{ $t('pageOverview.backupVersion') }}</dt>
12          <dd>{{ dataFormatter(backupVersion) }}</dd>
13        </dl>
14      </b-col>
15    </b-row>
16  </overview-card>
17</template>
18
19<script>
20import OverviewCard from './OverviewCard';
21import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin';
22
23export default {
24  name: 'Firmware',
25  components: {
26    OverviewCard,
27  },
28  mixins: [DataFormatterMixin],
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>
50