Insert possibility to set an ID for confirmation dialog and fix redirect to rollout overview (#445)
* redirect to rollout view if rollout is deleted and group targets shall be shown Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com> * Insert Id for confirmation dialogs Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
This commit is contained in:
committed by
Kai Zimmermann
parent
dd25af482a
commit
59107c521f
@@ -582,33 +582,33 @@ public class JpaDeploymentManagement implements DeploymentManagement {
|
||||
|
||||
@Override
|
||||
public List<Action> findActiveActionsByTarget(final String controllerId) {
|
||||
throwExceptionIfTargetFoesNotExist(controllerId);
|
||||
throwExceptionIfTargetDoesNotExist(controllerId);
|
||||
|
||||
return actionRepository.findByActiveAndTarget(controllerId, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Action> findInActiveActionsByTarget(final String controllerId) {
|
||||
throwExceptionIfTargetFoesNotExist(controllerId);
|
||||
throwExceptionIfTargetDoesNotExist(controllerId);
|
||||
|
||||
return actionRepository.findByActiveAndTarget(controllerId, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long countActionsByTarget(final String controllerId) {
|
||||
throwExceptionIfTargetFoesNotExist(controllerId);
|
||||
throwExceptionIfTargetDoesNotExist(controllerId);
|
||||
|
||||
return actionRepository.countByTargetControllerId(controllerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long countActionsByTarget(final String rsqlParam, final String controllerId) {
|
||||
throwExceptionIfTargetFoesNotExist(controllerId);
|
||||
throwExceptionIfTargetDoesNotExist(controllerId);
|
||||
|
||||
return actionRepository.count(createSpecificationFor(controllerId, rsqlParam));
|
||||
}
|
||||
|
||||
private void throwExceptionIfTargetFoesNotExist(final String controllerId) {
|
||||
private void throwExceptionIfTargetDoesNotExist(final String controllerId) {
|
||||
if (!targetRepository.existsByControllerId(controllerId)) {
|
||||
throw new EntityNotFoundException(Target.class, controllerId);
|
||||
}
|
||||
@@ -677,14 +677,14 @@ public class JpaDeploymentManagement implements DeploymentManagement {
|
||||
|
||||
@Override
|
||||
public Optional<DistributionSet> getAssignedDistributionSet(final String controllerId) {
|
||||
throwExceptionIfTargetFoesNotExist(controllerId);
|
||||
throwExceptionIfTargetDoesNotExist(controllerId);
|
||||
|
||||
return distributoinSetRepository.findAssignedToTarget(controllerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<DistributionSet> getInstalledDistributionSet(final String controllerId) {
|
||||
throwExceptionIfTargetFoesNotExist(controllerId);
|
||||
throwExceptionIfTargetDoesNotExist(controllerId);
|
||||
|
||||
return distributoinSetRepository.findInstalledAtTarget(controllerId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user