1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 13:59:40 +02:00

feat(services): add the ability to specify a target for secrets (#1365)

This commit is contained in:
Thomas Krzero 2017-11-20 14:44:23 +01:00 committed by Anthony Lapenna
parent 6b9f3dad7a
commit 3ee2e20f8e
4 changed files with 42 additions and 12 deletions

View file

@ -82,7 +82,7 @@ function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, C
};
$scope.addSecret = function() {
$scope.formValues.Secrets.push({});
$scope.formValues.Secrets.push({ overrideTarget: false });
};
$scope.removeSecret = function(index) {
@ -275,6 +275,9 @@ function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, C
if (secret.model) {
var s = SecretHelper.secretConfig(secret.model);
s.File.Name = s.SecretName;
if (secret.overrideTarget && secret.target && secret.target !== '') {
s.File.Name = secret.target;
}
secrets.push(s);
}
});