Feature soft autoassignment (#789)
* Repository layer and database migration * Changed target filter management to update auto assignment action type together with distribution set, extended mgmt API, adapted auto assign checker/scheduler, changed auto assign distribution set select table to combobox, added filter functionality (needs refactoring) * Refactored auto assignment dialog window, added soft/forced option group, restructured action type option group layout * Added forced icon to target filter table autoassignment cell for the forced auto assign actions * First working draft of distribution set select combobox for auto assignment window * Optimised filtering queries, added alphabetical sorting on distribution set name and version * Refactoring of distribution bean query for lazy loading * Distribution set combobox refactoring and comments * Added verification of auto assign distribution set validity (completed, not deleted), exdended target filter query fields with auto assign action type field, added rsql filter tests, added repository layer tests * Added mgmt API tests * Changed target filter rest docu tests to include auto-assignment type * Updated hawkbit docs with auto-assignment description * Added debouncing to key and value input fields of metadata popup layout to get rid of unnecessary value change events, removed redundant set value call in common dialog window, minimizing the repaint components calls * Fixed sonar findings * Reverted changes of common dialog window validaton, setting the value of the field explicitly as before, until we rethink the whole concept of validaton mechanism * Fixed review findings * Removed rsql filtering by filter auto-assign action type, due to missing conversion of disallowed timeforced action type * Small fix regarding usage of page request * Updated sql script version for flyway * Extended tests for soft deleted distribution sets for auto-assignment and filter string within distribution set specification builder Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
This commit is contained in:
committed by
Stefan Behl
parent
185f88e19b
commit
664c467920
@@ -22,82 +22,98 @@ public enum SpServerError {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_ENTITY_ALRREADY_EXISTS("hawkbit.server.error.repo.entitiyAlreayExists", "The given entity already exists in database"),
|
||||
SP_REPO_ENTITY_ALRREADY_EXISTS("hawkbit.server.error.repo.entitiyAlreayExists",
|
||||
"The given entity already exists in database"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_CONSTRAINT_VIOLATION("hawkbit.server.error.repo.constraintViolation", "The given entity cannot be saved due to Constraint Violation"),
|
||||
SP_REPO_CONSTRAINT_VIOLATION("hawkbit.server.error.repo.constraintViolation",
|
||||
"The given entity cannot be saved due to Constraint Violation"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_INVALID_TARGET_ADDRESS("hawkbit.server.error.repo.invalidTargetAddress", "The target address is not well formed"),
|
||||
SP_REPO_INVALID_TARGET_ADDRESS("hawkbit.server.error.repo.invalidTargetAddress",
|
||||
"The target address is not well formed"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_ENTITY_NOT_EXISTS("hawkbit.server.error.repo.entitiyNotFound", "The given entity does not exist in the repository"),
|
||||
SP_REPO_ENTITY_NOT_EXISTS("hawkbit.server.error.repo.entitiyNotFound",
|
||||
"The given entity does not exist in the repository"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_CONCURRENT_MODIFICATION("hawkbit.server.error.repo.concurrentModification", "The given entity has been changed by another user/session"),
|
||||
SP_REPO_CONCURRENT_MODIFICATION("hawkbit.server.error.repo.concurrentModification",
|
||||
"The given entity has been changed by another user/session"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_TARGET_ATTRIBUTES_INVALID("hawkbit.server.error.repo.invalidTargetAttributes", "The given target attributes are invalid"),
|
||||
SP_TARGET_ATTRIBUTES_INVALID("hawkbit.server.error.repo.invalidTargetAttributes",
|
||||
"The given target attributes are invalid"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REST_SORT_PARAM_SYNTAX("hawkbit.server.error.rest.param.sortParamSyntax", "The given sort paramter is not well formed"),
|
||||
SP_REST_SORT_PARAM_SYNTAX("hawkbit.server.error.rest.param.sortParamSyntax",
|
||||
"The given sort paramter is not well formed"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REST_RSQL_SEARCH_PARAM_SYNTAX("hawkbit.server.error.rest.param.rsqlParamSyntax", "The given search paramter is not well formed"),
|
||||
SP_REST_RSQL_SEARCH_PARAM_SYNTAX("hawkbit.server.error.rest.param.rsqlParamSyntax",
|
||||
"The given search paramter is not well formed"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REST_RSQL_PARAM_INVALID_FIELD("hawkbit.server.error.rest.param.rsqlInvalidField", "The given search parameter field does not exist"),
|
||||
SP_REST_RSQL_PARAM_INVALID_FIELD("hawkbit.server.error.rest.param.rsqlInvalidField",
|
||||
"The given search parameter field does not exist"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REST_SORT_PARAM_INVALID_FIELD("hawkbit.server.error.rest.param.invalidField", "The given sort parameter field does not exist"),
|
||||
SP_REST_SORT_PARAM_INVALID_FIELD("hawkbit.server.error.rest.param.invalidField",
|
||||
"The given sort parameter field does not exist"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REST_SORT_PARAM_INVALID_DIRECTION("hawkbit.server.error.rest.param.invalidDirection", "The given sort parameter direction does not exist"),
|
||||
SP_REST_SORT_PARAM_INVALID_DIRECTION("hawkbit.server.error.rest.param.invalidDirection",
|
||||
"The given sort parameter direction does not exist"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REST_BODY_NOT_READABLE("hawkbit.server.error.rest.body.notReadable", "The given request body is not well formed"),
|
||||
SP_REST_BODY_NOT_READABLE("hawkbit.server.error.rest.body.notReadable",
|
||||
"The given request body is not well formed"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_ARTIFACT_UPLOAD_FAILED("hawkbit.server.error.artifact.uploadFailed", "Upload of artifact failed with internal server error."),
|
||||
SP_ARTIFACT_UPLOAD_FAILED("hawkbit.server.error.artifact.uploadFailed",
|
||||
"Upload of artifact failed with internal server error."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_ARTIFACT_UPLOAD_FAILED_MD5_MATCH("hawkbit.server.error.artifact.uploadFailed.checksum.md5.match", "Upload of artifact failed as the provided MD5 checksum did not match with the provided artifact."),
|
||||
SP_ARTIFACT_UPLOAD_FAILED_MD5_MATCH("hawkbit.server.error.artifact.uploadFailed.checksum.md5.match",
|
||||
"Upload of artifact failed as the provided MD5 checksum did not match with the provided artifact."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_ARTIFACT_UPLOAD_FAILED_SHA1_MATCH("hawkbit.server.error.artifact.uploadFailed.checksum.sha1.match", "Upload of artifact failed as the provided SHA1 checksum did not match with the provided artifact."),
|
||||
SP_ARTIFACT_UPLOAD_FAILED_SHA1_MATCH("hawkbit.server.error.artifact.uploadFailed.checksum.sha1.match",
|
||||
"Upload of artifact failed as the provided SHA1 checksum did not match with the provided artifact."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_DS_CREATION_FAILED_MISSING_MODULE("hawkbit.server.error.distributionset.creationFailed.missingModule", "Creation if Distribution Set failed as module is missing that is configured as mandatory."),
|
||||
SP_DS_CREATION_FAILED_MISSING_MODULE("hawkbit.server.error.distributionset.creationFailed.missingModule",
|
||||
"Creation if Distribution Set failed as module is missing that is configured as mandatory."),
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -107,12 +123,14 @@ public enum SpServerError {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_ARTIFACT_DELETE_FAILED("hawkbit.server.error.artifact.deleteFailed", "Deletion of artifact failed with internal server error."),
|
||||
SP_ARTIFACT_DELETE_FAILED("hawkbit.server.error.artifact.deleteFailed",
|
||||
"Deletion of artifact failed with internal server error."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_ARTIFACT_LOAD_FAILED("hawkbit.server.error.artifact.loadFailed", "Load of artifact failed with internal server error."),
|
||||
SP_ARTIFACT_LOAD_FAILED("hawkbit.server.error.artifact.loadFailed",
|
||||
"Load of artifact failed with internal server error."),
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -123,33 +141,39 @@ public enum SpServerError {
|
||||
* error message, which describes that the action can not be canceled cause
|
||||
* the action is inactive.
|
||||
*/
|
||||
SP_ACTION_NOT_CANCELABLE("hawkbit.server.error.action.notcancelable", "Only active actions which are in status pending are canceable."),
|
||||
SP_ACTION_NOT_CANCELABLE("hawkbit.server.error.action.notcancelable",
|
||||
"Only active actions which are in status pending are canceable."),
|
||||
|
||||
/**
|
||||
* error message, which describes that the action can not be force quit
|
||||
* cause the action is inactive.
|
||||
*/
|
||||
SP_ACTION_NOT_FORCE_QUITABLE("hawkbit.server.error.action.notforcequitable", "Only active actions which are in status pending can be force quit."),
|
||||
SP_ACTION_NOT_FORCE_QUITABLE("hawkbit.server.error.action.notforcequitable",
|
||||
"Only active actions which are in status pending can be force quit."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_DS_INCOMPLETE("hawkbit.server.error.distributionset.incomplete", "Distribution set is assigned to a a target that is incomplete (i.e. mandatory modules are missing)"),
|
||||
SP_DS_INCOMPLETE("hawkbit.server.error.distributionset.incomplete",
|
||||
"Distribution set is assigned to a target that is incomplete (i.e. mandatory modules are missing)"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_DS_TYPE_UNDEFINED("hawkbit.server.error.distributionset.type.undefined", "Distribution set type is not yet defined. Modules cannot be added until definition."),
|
||||
SP_DS_TYPE_UNDEFINED("hawkbit.server.error.distributionset.type.undefined",
|
||||
"Distribution set type is not yet defined. Modules cannot be added until definition."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_DS_MODULE_UNSUPPORTED("hawkbit.server.error.distributionset.modules.unsupported", "Distribution set type does not contain the given module, i.e. is incompatible."),
|
||||
SP_DS_MODULE_UNSUPPORTED("hawkbit.server.error.distributionset.modules.unsupported",
|
||||
"Distribution set type does not contain the given module, i.e. is incompatible."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_TENANT_NOT_EXISTS("hawkbit.server.error.repo.tenantNotExists", "The entity cannot be inserted due the tenant does not exists"),
|
||||
SP_REPO_TENANT_NOT_EXISTS("hawkbit.server.error.repo.tenantNotExists",
|
||||
"The entity cannot be inserted due the tenant does not exists"),
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -159,12 +183,14 @@ public enum SpServerError {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_ENTITY_READ_ONLY("hawkbit.server.error.entityreadonly", "The given entity is read only and the change cannot be completed."),
|
||||
SP_REPO_ENTITY_READ_ONLY("hawkbit.server.error.entityreadonly",
|
||||
"The given entity is read only and the change cannot be completed."),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_CONFIGURATION_VALUE_INVALID("hawkbit.server.error.configValueInvalid", "The given configuration value is invalid."),
|
||||
SP_CONFIGURATION_VALUE_INVALID("hawkbit.server.error.configValueInvalid",
|
||||
"The given configuration value is invalid."),
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -173,22 +199,40 @@ public enum SpServerError {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_ROLLOUT_ILLEGAL_STATE("hawkbit.server.error.rollout.illegalstate", "The rollout is in the wrong state for the requested operation"),
|
||||
SP_ROLLOUT_ILLEGAL_STATE("hawkbit.server.error.rollout.illegalstate",
|
||||
"The rollout is in the wrong state for the requested operation"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_ROLLOUT_VERIFICATION_FAILED("hawkbit.server.error.rollout.verificationFailed", "The rollout configuration could not be verified successfully"),
|
||||
SP_ROLLOUT_VERIFICATION_FAILED("hawkbit.server.error.rollout.verificationFailed",
|
||||
"The rollout configuration could not be verified successfully"),
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SP_REPO_OPERATION_NOT_SUPPORTED("hawkbit.server.error.operation.notSupported", "Operation or method is (no longer) supported by service."),
|
||||
SP_REPO_OPERATION_NOT_SUPPORTED("hawkbit.server.error.operation.notSupported",
|
||||
"Operation or method is (no longer) supported by service."),
|
||||
|
||||
/**
|
||||
* Error message informing that the maintenance schedule is invalid.
|
||||
*/
|
||||
SP_MAINTENANCE_SCHEDULE_INVALID("hawkbit.server.error.maintenanceScheduleInvalid", "Information for schedule, duration or timezone is missing; or there is no valid maintenance window available in future.");
|
||||
SP_MAINTENANCE_SCHEDULE_INVALID("hawkbit.server.error.maintenanceScheduleInvalid",
|
||||
"Information for schedule, duration or timezone is missing; or there is no valid maintenance window available in future."),
|
||||
|
||||
/**
|
||||
* Error message informing that the action type for auto-assignment is
|
||||
* invalid.
|
||||
*/
|
||||
SP_AUTO_ASSIGN_ACTION_TYPE_INVALID("hawkbit.server.error.repo.invalidAutoAssignActionType",
|
||||
"The given action type for auto-assignment is invalid: allowed values are FORCED and SOFT"),
|
||||
|
||||
/**
|
||||
* Error message informing that the distribution set for auto-assignment is
|
||||
* invalid.
|
||||
*/
|
||||
SP_AUTO_ASSIGN_DISTRIBUTION_SET_INVALID("hawkbit.server.error.repo.invalidAutoAssignDistributionSet",
|
||||
"The given distribution set for auto-assignment is invalid: it is either incomplete (i.e. mandatory modules are missing) or soft deleted");
|
||||
|
||||
private final String key;
|
||||
private final String message;
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum TargetFilterQueryFields implements FieldNameProvider {
|
||||
NAME("name"),
|
||||
|
||||
/**
|
||||
* distribution set which is set as auto assign distribution set
|
||||
* Distribution set for auto-assignment.
|
||||
*/
|
||||
AUTOASSIGNDISTRIBUTIONSET("autoAssignDistributionSet", "name", "version");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user