summaryrefslogtreecommitdiff
path: root/src/components/AppHeader
diff options
context:
space:
mode:
authorYoshie Muranaka <yoshiemuranaka@gmail.com>2020-02-07 23:18:45 +0300
committerGunnar Mills <gmills@us.ibm.com>2020-02-19 22:05:18 +0300
commiteb154bbc9f71a923563479919578bd5053795980 (patch)
tree94f8c3aa11b9a217785a886eccd59189e054c66c /src/components/AppHeader
parent1ace1d91e80425eeed482b33e21838acb7f7325a (diff)
downloadwebui-vue-eb154bbc9f71a923563479919578bd5053795980.tar.xz
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
Diffstat (limited to 'src/components/AppHeader')
-rw-r--r--src/components/AppHeader/AppHeader.vue5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/AppHeader/AppHeader.vue b/src/components/AppHeader/AppHeader.vue
index d411c1f1..e155a651 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 @@ export default {
getEvents() {
this.$store.dispatch('eventLog/getEventLogData');
},
+ refresh() {
+ this.$emit('refresh');
+ },
logout() {
this.$store.dispatch('authentication/logout');
}