summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-09-08 16:37:09 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-09-08 16:37:09 +0300
commitb7e299589a6b714e24f5df5d772887aa1c7ee58e (patch)
tree6b4729423c0cb8b5c536b54a08432fff4eeaa324
parentfd00b8d6a01dce5051f6b7c5d08fc07a43bcf03c (diff)
downloadwebui-vue-b7e299589a6b714e24f5df5d772887aa1c7ee58e.tar.xz
fx refresh loader
-rw-r--r--src/components/_sila/AppHeader/AppHeader.vue23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/components/_sila/AppHeader/AppHeader.vue b/src/components/_sila/AppHeader/AppHeader.vue
index 64e9d1e5..963cd7fd 100644
--- a/src/components/_sila/AppHeader/AppHeader.vue
+++ b/src/components/_sila/AppHeader/AppHeader.vue
@@ -226,6 +226,7 @@ import IconRenew from '@carbon/icons-vue/es/renew/20';
import IconNotification from '@carbon/icons-vue/es/notification/20';
import StatusIcon from '@/components/Global/StatusIcon';
import LoadingBar from '@/components/Global/LoadingBar';
+import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin';
export default {
name: 'AppHeader',
@@ -238,7 +239,7 @@ export default {
LoadingBar,
IconNotification,
},
- mixins: [BVToastMixin],
+ mixins: [BVToastMixin, LoadingBarMixin],
props: {
routerKey: {
type: Number,
@@ -337,9 +338,14 @@ export default {
// Reset auth state to check if user is authenticated based
// on available browser cookies
this.$store.dispatch('authentication/resetStoreState');
- this.getSystemInfo();
- this.getEvents();
- this.getBmcTime();
+ setTimeout(() => {
+ this.startLoader();
+ Promise.all([
+ this.$store.dispatch('global/getSystemInfo'),
+ this.$store.dispatch('eventLog/getEventLogData'),
+ this.$store.dispatch('global/getBmcTime'),
+ ]).finally(() => this.endLoader());
+ }, 0);
},
mounted() {
this.$root.$on(
@@ -361,15 +367,6 @@ export default {
return logs.reverse().slice(0, 5);
},
- getSystemInfo() {
- this.$store.dispatch('global/getSystemInfo');
- },
- getEvents() {
- this.$store.dispatch('eventLog/getEventLogData');
- },
- getBmcTime() {
- this.$store.dispatch('global/getBmcTime');
- },
refresh() {
this.$emit('refresh');
},