blob: c51b362bd3254456c3b58b95733a44e74341c314 [file] [log] [blame]
Yoshie Muranaka33d755f2021-02-18 15:24:14 -08001<template>
2 <b-modal
3 id="modal-update-firmware"
4 :title="$t('pageFirmware.sectionTitleUpdateFirmware')"
5 :ok-title="$t('pageFirmware.form.updateFirmware.startUpdate')"
6 :cancel-title="$t('global.action.cancel')"
7 @ok="$emit('ok')"
8 >
9 <template v-if="isSingleFileUploadEnabled">
10 <p>
11 {{ $t('pageFirmware.modal.updateFirmwareInfo') }}
12 </p>
13 <p>
14 {{
15 $t('pageFirmware.modal.updateFirmwareInfo2', {
16 running: runningBmcVersion,
17 })
18 }}
19 </p>
20 <p class="m-0">
21 {{ $t('pageFirmware.modal.updateFirmwareInfo3') }}
22 </p>
23 </template>
24 <template v-else>
25 {{ $t('pageFirmware.modal.updateFirmwareInfoDefault') }}
26 </template>
27 </b-modal>
28</template>
29
30<script>
Surya Vde23ea22024-07-11 15:19:46 +053031import { useI18n } from 'vue-i18n';
Yoshie Muranaka33d755f2021-02-18 15:24:14 -080032export default {
Hariharan Rangasamyc5d60f52025-10-31 12:58:56 +053033 emits: ['ok'],
Surya Vde23ea22024-07-11 15:19:46 +053034 data() {
35 return {
36 $t: useI18n().t,
37 };
38 },
Yoshie Muranaka33d755f2021-02-18 15:24:14 -080039 computed: {
40 runningBmc() {
41 return this.$store.getters['firmware/activeBmcFirmware'];
42 },
43 runningBmcVersion() {
44 return this.runningBmc?.version || '--';
45 },
46 isSingleFileUploadEnabled() {
47 return this.$store.getters['firmware/isSingleFileUploadEnabled'];
48 },
49 },
50};
51</script>