feat(templates): add support for the name property (#1680)

pull/1692/head
Anthony Lapenna 7 years ago committed by GitHub
parent b9a1c68ea0
commit 76aeee7237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save