mirror of https://github.com/portainer/portainer
parent
fdc11dbe3a
commit
8f32d58fae
|
@ -457,6 +457,16 @@ angular.module('portainer.app', [])
|
||||||
var templates = {
|
var templates = {
|
||||||
name: 'portainer.templates',
|
name: 'portainer.templates',
|
||||||
url: '/templates',
|
url: '/templates',
|
||||||
|
resolve: {
|
||||||
|
endpointID: ['EndpointProvider', '$state',
|
||||||
|
function (EndpointProvider, $state) {
|
||||||
|
var id = EndpointProvider.endpointID();
|
||||||
|
if (!id) {
|
||||||
|
return $state.go('portainer.home');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
views: {
|
views: {
|
||||||
'content@': {
|
'content@': {
|
||||||
templateUrl: 'app/portainer/views/templates/templates.html',
|
templateUrl: 'app/portainer/views/templates/templates.html',
|
||||||
|
|
Loading…
Reference in New Issue