Refresh current page when refresh hit

This will refresh all controller data on the current
page.

Testing: Verified firmware and network settings were updated
when refresh button was hit.

Resolves openbmc/openbmc#2927

Change-Id: I1e16c3d4a9cd0947b46bb0c9856062e549e0ba6e
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/app/common/directives/app-header.js b/app/common/directives/app-header.js
index 4c49501..1ba55ba 100644
--- a/app/common/directives/app-header.js
+++ b/app/common/directives/app-header.js
@@ -10,7 +10,8 @@
                 'scope': {
                    'path': '='
                 },
-                'controller': ['$rootScope', '$scope','dataService', 'userModel', '$location', function($rootScope, $scope, dataService, userModel, $location){
+                'controller': ['$rootScope', '$scope','dataService', 'userModel', '$location', '$route',
+                function($rootScope, $scope, dataService, userModel, $location, $route){
                     $scope.dataService = dataService;
 
                     $scope.loadServerHealth = function(){
@@ -62,8 +63,9 @@
                     }
 
                     $scope.refresh = function(){
+                        //reload current page controllers and header
                         loadData();
-                        $scope.$emit('refresh-data');
+                        $route.reload();
                         //Add flash class to header timestamp on click of refresh
                         var myEl = angular.element( document.querySelector( '.header__refresh' ) );
                         myEl.addClass('flash');