Reload the page on a Cancel

When the Cancel button is hit on the network
settings page, reload the page, refreshing the
network settings.

Change-Id: Icc3d51e9b319bd70f7c7ab5b911b17728b5273b4
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/configuration/controllers/network-controller.html b/app/configuration/controllers/network-controller.html
index 6c494d0..343ec4e 100644
--- a/app/configuration/controllers/network-controller.html
+++ b/app/configuration/controllers/network-controller.html
@@ -82,7 +82,7 @@
 			</fieldset>
 			<div class="network-config__submit-wrapper">
 				<button type="button" class="btn-primary inline" ng-click="setNetworkSettings()">Save settings</button>
-				<button type="button" class="btn-secondary inline">Cancel</button>
+				<button type="button" class="btn-secondary inline" ng-click="refresh()">Cancel</button>
 			</div>
 			<p class="success-msg set_network_success" ng-show="set_network_success" role="alert">Success! Network settings changed!</p>
 			<p class="set_network_error error-msg" ng-show="set_network_error" role="alert">Error setting {{set_network_error}}!</p>
diff --git a/app/configuration/controllers/network-controller.js b/app/configuration/controllers/network-controller.js
index b3d33f9..9f7cd3b 100644
--- a/app/configuration/controllers/network-controller.js
+++ b/app/configuration/controllers/network-controller.js
@@ -10,8 +10,8 @@
   'use strict';
 
   angular.module('app.configuration').controller('networkController', [
-    '$scope', '$window', 'APIUtils', 'dataService',
-    function($scope, $window, APIUtils, dataService) {
+    '$scope', '$window', 'APIUtils', 'dataService', '$route',
+    function($scope, $window, APIUtils, dataService, $route) {
       $scope.dataService = dataService;
       $scope.network = {};
       $scope.interface = {};
@@ -43,6 +43,9 @@
                   $scope.set_network_error = 'MAC Address';
                 });
       };
+      $scope.refresh = function() {
+        $route.reload();
+      };
       APIUtils.getNetworkInfo().then(function(data) {
         $scope.network = data.formatted_data;
         $scope.hostname = data.hostname;