mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
feat(UX): automatically change the state to dashboard when switching endpoint (#602)
This commit is contained in:
parent
73082f1674
commit
52ab0bd50d
1 changed files with 3 additions and 2 deletions
|
@ -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");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue