mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(app): redirect to home if no endpoint is set (#2601)
* refactor(stacks): set newstack state as a child state of stacks * fix(docker): add check on docker states for endpoint * refactor(app): remove redirect notification
This commit is contained in:
parent
86c60807cd
commit
8160fe4717
3 changed files with 23 additions and 3 deletions
|
@ -5,7 +5,17 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
var docker = {
|
||||
name: 'docker',
|
||||
parent: 'root',
|
||||
abstract: true
|
||||
abstract: true,
|
||||
resolve: {
|
||||
endpointID: ['EndpointProvider', '$state',
|
||||
function (EndpointProvider, $state) {
|
||||
var id = EndpointProvider.endpointID();
|
||||
if (!id) {
|
||||
return $state.go('portainer.home');
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
var configs = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue