mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(templates): use the set field instead of default (#164)
This commit is contained in:
parent
7c5c693f17
commit
3c75c5fe25
2 changed files with 3 additions and 3 deletions
|
@ -76,7 +76,7 @@ function createConfigFromTemplate(template) {
|
|||
containerConfig.Image = template.image;
|
||||
if (template.env) {
|
||||
template.env.forEach(function (v) {
|
||||
if (v.value || v.default) {
|
||||
if (v.value || v.set) {
|
||||
var val;
|
||||
if (v.type && v.type === 'container') {
|
||||
if ($scope.swarm && $scope.formValues.network.Scope === 'global') {
|
||||
|
@ -86,7 +86,7 @@ function createConfigFromTemplate(template) {
|
|||
val = container.NetworkSettings.Networks[Object.keys(container.NetworkSettings.Networks)[0]].IPAddress;
|
||||
}
|
||||
} else {
|
||||
val = v.default ? v.default : v.value;
|
||||
val = v.set ? v.set : v.value;
|
||||
}
|
||||
containerConfig.Env.push(v.name + "=" + val);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue