blob: 129125324fe7c42c125462b5a5728a1a5c6fd3a1 [file] [log] [blame]
Yoshie Muranakac11d3892020-02-19 08:07:40 -08001<template>
Yoshie Muranaka3111b6f2020-04-21 19:48:38 -07002 <b-container fluid="xl">
Yoshie Muranakac11d3892020-02-19 08:07:40 -08003 <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'),
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080031 okTitle: this.$t('global.action.confirm')
Yoshie Muranakac11d3892020-02-19 08:07:40 -080032 })
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>