mirror of https://github.com/portainer/portainer
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 templatepull/1169/head
parent
8c68e92e74
commit
c1e486bf43
|
@ -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>
|
||||
|
|
|
@ -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 = [];
|
||||
|
|
Loading…
Reference in New Issue