fix(service-details): fix an issue where secret target would be overwritten (#964)

pull/967/head
Anthony Lapenna 2017-06-29 08:37:05 +02:00 committed by GitHub
parent 1168e94534
commit 4adedf9436
2 changed files with 4 additions and 2 deletions

View File

@ -222,7 +222,9 @@ function ($q, $scope, $state, Service, ServiceHelper, SecretHelper, SecretServic
var secrets = []; var secrets = [];
angular.forEach(input.Secrets, function(secret) { angular.forEach(input.Secrets, function(secret) {
if (secret.model) { if (secret.model) {
secrets.push(SecretHelper.secretConfig(secret.model)); var s = SecretHelper.secretConfig(secret.model);
s.File.Name = s.SecretName;
secrets.push(s);
} }
}); });
config.TaskTemplate.ContainerSpec.Secrets = secrets; config.TaskTemplate.ContainerSpec.Secrets = secrets;

View File

@ -21,7 +21,7 @@ angular.module('portainer.helpers')
SecretID: secret.Id, SecretID: secret.Id,
SecretName: secret.Name, SecretName: secret.Name,
File: { File: {
Name: secret.Name, Name: secret.FileName,
UID: '0', UID: '0',
GID: '0', GID: '0',
Mode: 444 Mode: 444