Hide loader on Reboot BMC page

Added beforeRouteLeave component guard to make sure loader bar
is hidden before navigating to a new page. This will make sure
that the loading bar always starts from 0, if the user navigates
to another page before the inital load completes.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I16e57203123069160575f4c288bdbc5bad44e669
diff --git a/src/views/Control/RebootBmc/RebootBmc.vue b/src/views/Control/RebootBmc/RebootBmc.vue
index 7bd9877..0a4bafe 100644
--- a/src/views/Control/RebootBmc/RebootBmc.vue
+++ b/src/views/Control/RebootBmc/RebootBmc.vue
@@ -54,6 +54,10 @@
       .dispatch('controls/getLastBmcRebootTime')
       .finally(() => this.endLoader());
   },
+  beforeRouteLeave(to, from, next) {
+    this.hideLoader();
+    next();
+  },
   methods: {
     onClick() {
       this.$bvModal