blob: 183cab75a784d4dace7eb1fc5fce1203c5010f64 [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 {
Surya Vde23ea22024-07-11 15:19:46 +053033 data() {
34 return {
35 $t: useI18n().t,
36 };
37 },
Yoshie Muranaka33d755f2021-02-18 15:24:14 -080038 computed: {
39 runningBmc() {
40 return this.$store.getters['firmware/activeBmcFirmware'];
41 },
42 runningBmcVersion() {
43 return this.runningBmc?.version || '--';
44 },
45 isSingleFileUploadEnabled() {
46 return this.$store.getters['firmware/isSingleFileUploadEnabled'];
47 },
48 },
49};
50</script>