blob: 5d6b42ce80cff9a06afc860aaa608878bcc96468 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<template>
<b-container fluid>
<page-title />
<b-row>
<b-col md="8" lg="8" xl="6">
<page-section>
{{ $t('pageRebootBmc.rebootInformation') }}
<b-button variant="primary" class="d-block mt-5" @click="onClick">
{{ $t('pageRebootBmc.rebootBmc') }}
</b-button>
</page-section>
</b-col>
</b-row>
</b-container>
</template>
<script>
import PageTitle from '../../../components/Global/PageTitle';
import PageSection from '../../../components/Global/PageSection';
import BVToastMixin from '../../../components/Mixins/BVToastMixin';
export default {
name: 'RebootBmc',
components: { PageTitle, PageSection },
mixins: [BVToastMixin],
methods: {
onClick() {
this.$bvModal
.msgBoxConfirm(this.$t('pageRebootBmc.modal.confirmMessage'), {
title: this.$t('pageRebootBmc.modal.confirmTitle'),
okTitle: this.$t('global.action.confirm')
})
.then(confirmed => {
if (confirmed) this.rebootBmc();
});
},
rebootBmc() {
this.$store
.dispatch('controls/rebootBmc')
.then(message => this.successToast(message))
.catch(({ message }) => this.errorToast(message));
}
}
};
</script>
<style lang="scss" scoped></style>
|