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:
parent
c5552d1b8e
commit
781dad3e17
7 changed files with 188 additions and 47 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue