From eb154bbc9f71a923563479919578bd5053795980 Mon Sep 17 00:00:00 2001
From: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Date: Fri, 7 Feb 2020 12:18:45 -0800
Subject: 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
---
 src/components/AppHeader/AppHeader.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/components/AppHeader/AppHeader.vue')

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');
     }
-- 
cgit v1.2.3

