mirror of https://github.com/portainer/portainer
feat(templates): add support for the name property (#1680)
parent
b9a1c68ea0
commit
76aeee7237
|
@ -1,5 +1,6 @@
|
|||
function StackTemplateViewModel(data) {
|
||||
this.Type = data.type;
|
||||
this.Name = data.name;
|
||||
this.Title = data.title;
|
||||
this.Description = data.description;
|
||||
this.Note = data.note;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
function TemplateViewModel(data) {
|
||||
this.Type = data.type;
|
||||
this.Name = data.name;
|
||||
this.Title = data.title;
|
||||
this.Description = data.description;
|
||||
this.Note = data.note;
|
||||
|
@ -45,5 +46,5 @@ function TemplateViewModel(data) {
|
|||
};
|
||||
});
|
||||
}
|
||||
this.Hosts = data.hosts ? data.hosts : [];
|
||||
this.Hosts = data.hosts ? data.hosts : [];
|
||||
}
|
||||
|
|
|
@ -178,6 +178,12 @@ function ($scope, $q, $state, $transition$, $anchorScroll, $filter, ContainerSer
|
|||
$scope.formValues.network = _.find($scope.availableNetworks, function(o) { return o.Name === 'bridge'; });
|
||||
}
|
||||
|
||||
if (selectedTemplate.Name) {
|
||||
$scope.formValues.name = selectedTemplate.Name;
|
||||
} else {
|
||||
$scope.formValues.name = '';
|
||||
}
|
||||
|
||||
$anchorScroll('view-top');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue