blob: 184f0a3a4cc27e31f84ff57f1ef07f3b1e6a9136 [file] [log] [blame]
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -08001<template>
Shane Lin85b2d312024-11-12 15:43:24 +08002 <page-section :section-title="$t('pageFirmware.sectionTitleBiosCards')">
jason westoverd36ac8a2025-11-03 20:58:59 -06003 <b-row class="row-cols-1 row-cols-md-2">
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -08004 <!-- Running image -->
jason westoverd36ac8a2025-11-03 20:58:59 -06005 <b-col class="mb-3">
6 <b-card class="h-100">
7 <template #header>
8 <p class="fw-bold m-0">
9 {{ $t('pageFirmware.cardTitleRunning') }}
10 </p>
11 </template>
12 <dl class="mb-0">
13 <dt>{{ $t('pageFirmware.cardBodyVersion') }}</dt>
14 <dd class="mb-0">{{ runningVersion }}</dd>
15 </dl>
16 </b-card>
17 </b-col>
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -080018
19 <!-- Backup image -->
jason westoverd36ac8a2025-11-03 20:58:59 -060020 <b-col class="mb-3">
21 <b-card class="h-100">
22 <template #header>
23 <p class="fw-bold m-0">
24 {{ $t('pageFirmware.cardTitleBackup') }}
25 </p>
26 </template>
27 <dl class="mb-0">
28 <dt>{{ $t('pageFirmware.cardBodyVersion') }}</dt>
29 <dd class="mb-0">
30 <status-icon v-if="showBackupImageStatus" status="danger" />
31 <span
32 v-if="showBackupImageStatus"
33 class="visually-hidden-focusable"
34 >
35 {{ backupStatus }}
36 </span>
37 {{ backupVersion }}
38 </dd>
39 </dl>
40 </b-card>
41 </b-col>
42 </b-row>
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -080043 </page-section>
44</template>
45
46<script>
47import PageSection from '@/components/Global/PageSection';
Surya Vde23ea22024-07-11 15:19:46 +053048import { useI18n } from 'vue-i18n';
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -080049
50export default {
51 components: { PageSection },
Surya Vde23ea22024-07-11 15:19:46 +053052 data() {
53 return {
54 $t: useI18n().t,
55 };
56 },
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -080057 computed: {
58 running() {
Shane Lin85b2d312024-11-12 15:43:24 +080059 return this.$store.getters['firmware/activeBiosFirmware'];
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -080060 },
61 backup() {
Shane Lin85b2d312024-11-12 15:43:24 +080062 return this.$store.getters['firmware/backupBiosFirmware'];
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -080063 },
64 runningVersion() {
65 return this.running?.version || '--';
66 },
67 backupVersion() {
68 return this.backup?.version || '--';
69 },
70 backupStatus() {
71 return this.backup?.status || null;
72 },
73 showBackupImageStatus() {
74 return (
75 this.backupStatus === 'Critical' || this.backupStatus === 'Warning'
76 );
77 },
78 },
79};
80</script>
81
82<style lang="scss" scoped>
Yoshie Muranaka7bc85e42021-02-11 09:59:13 -080083.page-section {
84 margin-top: -$spacer * 1.5;
85}
86</style>