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

fix(service-details): fix an issue with the '=' separator in env variable values (#370)

This commit is contained in:
Anthony Lapenna 2016-11-25 20:48:12 +09:00 committed by GitHub
parent b3a641e15a
commit 367a275672

View file

@ -164,7 +164,8 @@ function ($scope, $stateParams, $state, Service, ServiceHelper, Task, Node, Mess
if (env) {
var variables = [];
env.forEach(function(variable) {
var keyValue = variable.split('=');
var idx = variable.indexOf('=');
var keyValue = [variable.slice(0,idx), variable.slice(idx+1)];
var originalValue = (keyValue.length > 1) ? keyValue[1] : '';
variables.push({ key: keyValue[0], value: originalValue, originalValue: originalValue, added: true});
});