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';
35
36export default {
37  components: { Alert },
38  props: {
39    isServerOff: {
40      required: true,
41      type: Boolean,
42    },
43  },
44  computed: {
45    isOperationInProgress() {
46      return this.$store.getters['controls/isOperationInProgress'];
47    },
48  },
49};
50</script>
51