feat(templates): add support for bind mounts in volumes

* #777 feat(templates): add support for binding to host path

* #777 feat(templates): add link to templates documentation

* refactor(templates): update warning style to match theme

* fix(templates): remove trailing comma

* refactor(templates): use bind instead of self declaration

* feat(templates): support readonly property in template volumes

* #777 refactor(templates): remove deprecation notice

* #777 refactor(templates): remove deprecated condition from template
pull/1169/head
Adam Snodgrass 2017-08-28 13:53:36 -05:00 committed by Anthony Lapenna
parent 8c68e92e74
commit c1e486bf43
2 changed files with 11 additions and 4 deletions

View File

@ -27,7 +27,7 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<span class="template-note" ng-bind-html="state.selectedTemplate.Note"></span>
<div class="template-note" ng-if="state.selectedTemplate.Note" ng-bind-html="state.selectedTemplate.Note"></div>
</div>
</div>
</div>

View File

@ -16,11 +16,18 @@ function TemplateViewModel(data) {
this.Volumes = [];
if (data.volumes) {
this.Volumes = data.volumes.map(function (v) {
return {
readOnly: false,
containerPath: v,
var volume = {
readOnly: v.readonly || false,
containerPath: v.container || v,
type: 'auto'
};
if (v.bind) {
volume.name = v.bind;
volume.type = 'bind';
}
return volume;
});
}
this.Ports = [];