From 5c977976d9450b50faeb33ba5bd1b5deaabcc3b5 Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Thu, 30 Apr 2020 09:48:23 -0700 Subject: Add loading bar to Server power operations page Signed-off-by: Yoshie Muranaka Change-Id: I823279c6865fa1ecff2f0443d735477e03fbf417 --- .../Control/ServerPowerOperations/ServerPowerOperations.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/views/Control/ServerPowerOperations/ServerPowerOperations.vue') diff --git a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue index 01fc661e7..441217f20 100644 --- a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue +++ b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue @@ -108,11 +108,12 @@ import PageTitle from '../../../components/Global/PageTitle'; import PageSection from '../../../components/Global/PageSection'; import BVToastMixin from '../../../components/Mixins/BVToastMixin'; import BootSettings from './BootSettings'; +import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; export default { name: 'ServerPowerOperations', components: { PageTitle, PageSection, BootSettings }, - mixins: [BVToastMixin], + mixins: [BVToastMixin, LoadingBarMixin], data() { return { form: { @@ -132,6 +133,13 @@ export default { return this.$store.getters['hostBootSettings/overrideEnabled']; } }, + created() { + this.startLoader(); + }, + beforeRouteLeave(to, from, next) { + this.hideLoader(); + next(); + }, methods: { powerOn() { this.$store.dispatch('controls/hostPowerOn'); -- cgit v1.2.3