| Yoshie Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 1 | <template> |
| Shane Lin | 85b2d31 | 2024-11-12 15:43:24 +0800 | [diff] [blame] | 2 | <page-section :section-title="$t('pageFirmware.sectionTitleBiosCards')"> |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 3 | <b-row class="row-cols-1 row-cols-md-2"> |
| Yoshie Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 4 | <!-- Running image --> |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 5 | <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 Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 18 | |
| 19 | <!-- Backup image --> |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 20 | <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 Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 43 | </page-section> |
| 44 | </template> |
| 45 | |
| 46 | <script> |
| 47 | import PageSection from '@/components/Global/PageSection'; |
| Surya V | de23ea2 | 2024-07-11 15:19:46 +0530 | [diff] [blame] | 48 | import { useI18n } from 'vue-i18n'; |
| Yoshie Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 49 | |
| 50 | export default { |
| 51 | components: { PageSection }, |
| Surya V | de23ea2 | 2024-07-11 15:19:46 +0530 | [diff] [blame] | 52 | data() { |
| 53 | return { |
| 54 | $t: useI18n().t, |
| 55 | }; |
| 56 | }, |
| Yoshie Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 57 | computed: { |
| 58 | running() { |
| Shane Lin | 85b2d31 | 2024-11-12 15:43:24 +0800 | [diff] [blame] | 59 | return this.$store.getters['firmware/activeBiosFirmware']; |
| Yoshie Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 60 | }, |
| 61 | backup() { |
| Shane Lin | 85b2d31 | 2024-11-12 15:43:24 +0800 | [diff] [blame] | 62 | return this.$store.getters['firmware/backupBiosFirmware']; |
| Yoshie Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 63 | }, |
| 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 Muranaka | 7bc85e4 | 2021-02-11 09:59:13 -0800 | [diff] [blame] | 83 | .page-section { |
| 84 | margin-top: -$spacer * 1.5; |
| 85 | } |
| 86 | </style> |