1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(templates): add the ability to update the volume configuration (#590)

This commit is contained in:
Anthony Lapenna 2017-02-13 18:16:14 +13:00 committed by GitHub
parent c5552d1b8e
commit 781dad3e17
7 changed files with 188 additions and 47 deletions

View file

@ -7,7 +7,16 @@ function TemplateViewModel(data) {
this.Command = data.command ? data.command : '';
this.Network = data.network ? data.network : '';
this.Env = data.env ? data.env : [];
this.Volumes = data.volumes ? data.volumes : [];
this.Volumes = [];
if (data.volumes) {
this.Volumes = data.volumes.map(function (v) {
return {
readOnly: false,
containerPath: v,
type: 'auto'
};
});
}
this.Ports = [];
if (data.ports) {
this.Ports = data.ports.map(function (p) {