summaryrefslogtreecommitdiff
path: root/src/components/AppHeader/AppHeader.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/AppHeader/AppHeader.vue')
-rw-r--r--src/components/AppHeader/AppHeader.vue27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/components/AppHeader/AppHeader.vue b/src/components/AppHeader/AppHeader.vue
index 880c428f..d411c1f1 100644
--- a/src/components/AppHeader/AppHeader.vue
+++ b/src/components/AppHeader/AppHeader.vue
@@ -14,7 +14,7 @@
<b-nav>
<b-nav-item>
Health
- <status-icon :status="'danger'" />
+ <status-icon :status="healthStatusIcon" />
</b-nav-item>
<b-nav-item>
Power
@@ -46,6 +46,9 @@ export default {
hostStatus() {
return this.$store.getters['global/hostStatus'];
},
+ healthStatus() {
+ return this.$store.getters['eventLog/healthStatus'];
+ },
hostStatusIcon() {
switch (this.hostStatus) {
case 'on':
@@ -56,15 +59,31 @@ export default {
default:
return 'secondary';
}
+ },
+ healthStatusIcon() {
+ switch (this.healthStatus) {
+ case 'good':
+ return 'success';
+ case 'warning':
+ return 'warning';
+ case 'critical':
+ return 'danger';
+ default:
+ return 'secondary';
+ }
}
},
created() {
this.getHostInfo();
+ this.getEvents();
},
methods: {
getHostInfo() {
this.$store.dispatch('global/getHostStatus');
},
+ getEvents() {
+ this.$store.dispatch('eventLog/getEventLogData');
+ },
logout() {
this.$store.dispatch('authentication/logout');
}
@@ -84,6 +103,12 @@ export default {
transition-timing-function: cubic-bezier(0, 0, 0.3, 1);
}
}
+.navbar-dark {
+ .navbar-text,
+ .nav-link {
+ color: $white !important;
+ }
+}
.nav-item {
svg {
fill: $light;