From 52ab0bd50dda1d69e5d74cca9e8b4fba24a55bcd Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Tue, 14 Feb 2017 16:22:24 +1300 Subject: [PATCH] feat(UX): automatically change the state to dashboard when switching endpoint (#602) --- app/components/sidebar/sidebarController.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/components/sidebar/sidebarController.js b/app/components/sidebar/sidebarController.js index f58d8399a..152aa2c3e 100644 --- a/app/components/sidebar/sidebarController.js +++ b/app/components/sidebar/sidebarController.js @@ -9,10 +9,11 @@ function ($scope, $state, Settings, Config, EndpointService, StateManager, Messa $scope.uiVersion = Settings.uiVersion; $scope.switchEndpoint = function(endpoint) { - EndpointService.setActive(endpoint.Id).then(function success(data) { + EndpointService.setActive(endpoint.Id) + .then(function success(data) { StateManager.updateEndpointState(true) .then(function success() { - $state.reload(); + $state.go('dashboard'); }, function error(err) { Messages.error("Failure", err, "Unable to connect to the Docker endpoint"); });