From 8047ae3d83ba0718fb7a42907036157e5c680b85 Mon Sep 17 00:00:00 2001
From: "Andrey V.Kosteltsev" <AKosteltsev@IBS.RU>
Date: Mon, 4 Jul 2022 23:59:32 +0300
Subject: IBS: _sila UI theme

---
 src/views/_sila/Overview/OverviewFirmware.vue | 49 +++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 src/views/_sila/Overview/OverviewFirmware.vue

(limited to 'src/views/_sila/Overview/OverviewFirmware.vue')

diff --git a/src/views/_sila/Overview/OverviewFirmware.vue b/src/views/_sila/Overview/OverviewFirmware.vue
new file mode 100644
index 00000000..f1f9ce53
--- /dev/null
+++ b/src/views/_sila/Overview/OverviewFirmware.vue
@@ -0,0 +1,49 @@
+<template>
+  <overview-card
+    :title="$t('pageOverview.firmwareInformation')"
+    :to="`/operations/firmware`"
+  >
+    <b-row class="mt-3">
+      <b-col>
+        <dl>
+          <dt>{{ $t('pageOverview.runningVersion') }}</dt>
+          <dd>{{ dataFormatter(runningVersion) }}</dd>
+          <dt>{{ $t('pageOverview.backupVersion') }}</dt>
+          <dd>{{ dataFormatter(backupVersion) }}</dd>
+        </dl>
+      </b-col>
+    </b-row>
+  </overview-card>
+</template>
+
+<script>
+import OverviewCard from './OverviewCard';
+import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin';
+
+export default {
+  name: 'Firmware',
+  components: {
+    OverviewCard,
+  },
+  mixins: [DataFormatterMixin],
+  computed: {
+    backupBmcFirmware() {
+      return this.$store.getters['firmware/backupBmcFirmware'];
+    },
+    backupVersion() {
+      return this.backupBmcFirmware?.version;
+    },
+    activeBmcFirmware() {
+      return this.$store.getters[`firmware/activeBmcFirmware`];
+    },
+    runningVersion() {
+      return this.activeBmcFirmware?.version;
+    },
+  },
+  created() {
+    this.$store.dispatch('firmware/getFirmwareInformation').finally(() => {
+      this.$root.$emit('overview-firmware-complete');
+    });
+  },
+};
+</script>
-- 
cgit v1.2.3

