1<template>
2  <b-row>
3    <b-col xl="10">
4      <!-- Operation in progress alert -->
5      <alert v-if="isOperationInProgress" variant="info" class="mb-5">
6        <p>
7          {{ $t('pageFirmware.alert.operationInProgress') }}
8        </p>
9      </alert>
10      <!-- Power off server warning alert -->
11      <alert v-else-if="!isServerOff" variant="warning" class="mb-5">
12        <p class="mb-0">
13          {{ $t('pageFirmware.alert.serverMustBePoweredOffTo') }}
14        </p>
15        <ul class="m-0">
16          <li>
17            {{ $t('pageFirmware.alert.switchRunningAndBackupImages') }}
18          </li>
19          <li>
20            {{ $t('pageFirmware.alert.updateFirmware') }}
21          </li>
22        </ul>
23        <template #action>
24          <b-link to="/operations/server-power-operations">
25            {{ $t('pageFirmware.alert.viewServerPowerOperations') }}
26          </b-link>
27        </template>
28      </alert>
29    </b-col>
30  </b-row>
31</template>
32
33<script>
34import Alert from '@/components/Global/Alert';
35import { useI18n } from 'vue-i18n';
36
37export default {
38  components: { Alert },
39  props: {
40    isServerOff: {
41      required: true,
42      type: Boolean,
43      default: true,
44    },
45  },
46  data() {
47    return {
48      $t: useI18n().t,
49    };
50  },
51  computed: {
52    isOperationInProgress() {
53      return this.$store.getters['controls/isOperationInProgress'];
54    },
55  },
56};
57</script>
58