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