Add refresh functionality in app header
Clicking refresh in the app header will update the :key
value for the router-view component, and trigger a
component re-render.
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I15da6d2d04fc311dfc092fbe840add950180124f
diff --git a/src/components/AppHeader/AppHeader.vue b/src/components/AppHeader/AppHeader.vue
index d411c1f..e155a65 100644
--- a/src/components/AppHeader/AppHeader.vue
+++ b/src/components/AppHeader/AppHeader.vue
@@ -20,7 +20,7 @@
Power
<status-icon :status="hostStatusIcon" />
</b-nav-item>
- <b-nav-item>
+ <b-nav-item @click="refresh">
Refresh
<icon-renew />
</b-nav-item>
@@ -84,6 +84,9 @@
getEvents() {
this.$store.dispatch('eventLog/getEventLogData');
},
+ refresh() {
+ this.$emit('refresh');
+ },
logout() {
this.$store.dispatch('authentication/logout');
}