1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-30 10:49:40 +02:00

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
This commit is contained in:
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

@ -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 = [];