|
|
@ -475,7 +475,7 @@ angular.module('portainer.docker').controller('ServiceController', [
|
|
|
|
'';
|
|
|
|
'';
|
|
|
|
if (oldCredSpecId && !credSpecId) {
|
|
|
|
if (oldCredSpecId && !credSpecId) {
|
|
|
|
delete config.TaskTemplate.ContainerSpec.Privileges.CredentialSpec;
|
|
|
|
delete config.TaskTemplate.ContainerSpec.Privileges.CredentialSpec;
|
|
|
|
} else if (oldCredSpecId !== credSpec) {
|
|
|
|
} else if (credSpec && oldCredSpecId !== credSpec) {
|
|
|
|
config.TaskTemplate.ContainerSpec.Privileges = {
|
|
|
|
config.TaskTemplate.ContainerSpec.Privileges = {
|
|
|
|
...(config.TaskTemplate.ContainerSpec.Privileges || {}),
|
|
|
|
...(config.TaskTemplate.ContainerSpec.Privileges || {}),
|
|
|
|
CredentialSpec: {
|
|
|
|
CredentialSpec: {
|
|
|
@ -855,6 +855,10 @@ angular.module('portainer.docker').controller('ServiceController', [
|
|
|
|
|
|
|
|
|
|
|
|
$scope.filterConfigs = filterConfigs;
|
|
|
|
$scope.filterConfigs = filterConfigs;
|
|
|
|
function filterConfigs(configs) {
|
|
|
|
function filterConfigs(configs) {
|
|
|
|
|
|
|
|
if (!configs) {
|
|
|
|
|
|
|
|
return [];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return configs.filter((config) => $scope.service.ServiceConfigs.every((serviceConfig) => config.Id !== serviceConfig.Id));
|
|
|
|
return configs.filter((config) => $scope.service.ServiceConfigs.every((serviceConfig) => config.Id !== serviceConfig.Id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|