From 85ef8652fce0cd1f81c7283dab6089f0b2437cc3 Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Tue, 10 Jun 2025 15:14:43 +0300 Subject: [PATCH] Refactoring/simplifying rest resources code (2) (#2444) Signed-off-by: Avgustin Marinov --- .../mgmt/rest/api/MgmtActionRestApi.java | 13 +++--- .../rest/api/MgmtDistributionSetRestApi.java | 15 ++++--- .../mgmt/rest/api/MgmtRolloutRestApi.java | 41 +++++++++---------- .../rest/resource/MgmtActionResource.java | 2 +- .../resource/MgmtDistributionSetResource.java | 2 +- .../rest/resource/MgmtRolloutResource.java | 6 +-- .../resource/mapper/MgmtRolloutMapper.java | 2 +- .../mapper/MgmtTargetFilterQueryMapper.java | 6 +-- .../ui/simple/view/DistributionSetView.java | 2 +- .../hawkbit/ui/simple/view/RolloutView.java | 8 ++-- .../hawkbit/ui/simple/view/TargetView.java | 2 +- 11 files changed, 47 insertions(+), 52 deletions(-) diff --git a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtActionRestApi.java b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtActionRestApi.java index 785b18563..1cc8d0c4b 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtActionRestApi.java +++ b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtActionRestApi.java @@ -42,11 +42,11 @@ public interface MgmtActionRestApi { /** * Handles the GET request of retrieving all actions. * + * @param rsqlParam the search parameter in the request URL, syntax {@code q=distributionSet.id==1} * @param pagingOffsetParam the offset of list of actions for pagination, might not be present in the rest request then default value will * be applied * @param pagingLimitParam the limit of the paged request, might not be present in the rest request then default value will be applied * @param sortParam the sorting parameter in the request URL, syntax {@code field:direction, field:direction} - * @param rsqlParam the search parameter in the request URL, syntax {@code q=distributionSet.id==1} * @param representationModeParam the representation mode parameter specifying whether a compact or a full representation shall be returned * @return a list of all actions for a defined or default page request with status OK. The response is always paged. In any failure the * JsonResponseExceptionHandler is handling the response. @@ -71,7 +71,11 @@ public interface MgmtActionRestApi { }) @GetMapping(value = MgmtRestConstants.ACTION_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }) ResponseEntity> getActions( - @RequestParam( + @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) + @Schema(description = """ + Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for + available fields.""") + String rsqlParam, @RequestParam( value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) @Schema(description = "The paging offset (default is 0)") @@ -88,11 +92,6 @@ public interface MgmtActionRestApi { The sequence of the sort criteria (multiple can be used) defines the sort order of the entities in the result.""") String sortParam, - @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) - @Schema(description = """ - Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for - available fields.""") - String rsqlParam, @RequestParam( value = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT) diff --git a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetRestApi.java b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetRestApi.java index 41671e2b6..b2f4829b5 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetRestApi.java +++ b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDistributionSetRestApi.java @@ -64,11 +64,11 @@ public interface MgmtDistributionSetRestApi { /** * Handles the GET request of retrieving all DistributionSets . * + * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @param pagingOffsetParam the offset of list of sets for pagination, might not be present in the rest request then default value will * be applied * @param pagingLimitParam the limit of the paged request, might not be present in the rest request then default value will be applied * @param sortParam the sorting parameter in the request URL, syntax {@code field:direction, field:direction} - * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @return a list of all set for a defined or default page request with status OK. The response is always paged. In any failure the * JsonResponseExceptionHandler is handling the response. */ @@ -94,7 +94,11 @@ public interface MgmtDistributionSetRestApi { @GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }) ResponseEntity> getDistributionSets( - @RequestParam( + @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) + @Schema(description = """ + Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for + available fields.""") + String rsqlParam, @RequestParam( value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) @Schema(description = "The paging offset (default is 0)") @@ -110,12 +114,7 @@ public interface MgmtDistributionSetRestApi { consists of the name of a field and the sort direction (ASC for ascending and DESC descending). The sequence of the sort criteria (multiple can be used) defines the sort order of the entities in the result.""") - String sortParam, - @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) - @Schema(description = """ - Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for - available fields.""") - String rsqlParam); + String sortParam); /** * Handles the GET request of retrieving a single DistributionSet . diff --git a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRolloutRestApi.java b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRolloutRestApi.java index 33afc4aba..12ad8df80 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRolloutRestApi.java +++ b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtRolloutRestApi.java @@ -50,11 +50,11 @@ public interface MgmtRolloutRestApi { /** * Handles the GET request of retrieving all rollouts. * + * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @param pagingOffsetParam the offset of list of rollouts for pagination, might not be present in the rest request then default value will * be applied * @param pagingLimitParam the limit of the paged request, might not be present in the rest request then default value will be applied * @param sortParam the sorting parameter in the request URL, syntax {@code field:direction, field:direction} - * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @param representationModeParam the representation mode parameter specifying whether a compact or a full representation shall be returned * @return a list of all rollouts for a defined or default page request with status OK. The response is always paged. In any failure the * JsonResponseExceptionHandler is handling the response. @@ -82,7 +82,11 @@ public interface MgmtRolloutRestApi { @GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }) ResponseEntity> getRollouts( - @RequestParam( + @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) + @Schema(description = """ + Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for + available fields.""") + String rsqlParam, @RequestParam( value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) @Schema(description = "The paging offset (default is 0)") @@ -99,11 +103,6 @@ public interface MgmtRolloutRestApi { The sequence of the sort criteria (multiple can be used) defines the sort order of the entities in the result.""") String sortParam, - @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) - @Schema(description = """ - Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for - available fields.""") - String rsqlParam, @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT) String representationModeParam); @@ -415,11 +414,11 @@ public interface MgmtRolloutRestApi { /** * Handles the GET request of retrieving all rollout groups referred to a rollout. * + * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @param pagingOffsetParam the offset of list of rollout groups for pagination, might not be present in the rest request then default value * will be applied * @param pagingLimitParam the limit of the paged request, might not be present in the rest request then default value will be applied * @param sortParam the sorting parameter in the request URL, syntax {@code field:direction, field:direction} - * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @param representationModeParam the representation mode parameter specifying whether a compact or a full representation shall be returned * @return a list of all rollout groups referred to a rollout for a defined or default page request with status OK. The response is always * paged. In any failure the JsonResponseExceptionHandler is handling the response. @@ -450,7 +449,11 @@ public interface MgmtRolloutRestApi { produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }) ResponseEntity> getRolloutGroups( @PathVariable("rolloutId") Long rolloutId, - @RequestParam( + @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) + @Schema(description = """ + Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for + available fields.""") + String rsqlParam, @RequestParam( value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) @Schema(description = "The paging offset (default is 0)") @@ -467,11 +470,6 @@ public interface MgmtRolloutRestApi { The sequence of the sort criteria (multiple can be used) defines the sort order of the entities in the result.""") String sortParam, - @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) - @Schema(description = """ - Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for - available fields.""") - String rsqlParam, @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT) String representationModeParam); @@ -516,11 +514,11 @@ public interface MgmtRolloutRestApi { * * @param rolloutId the ID of the rollout * @param groupId the ID of the rollout group + * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @param pagingOffsetParam the offset of list of rollout groups for pagination, might not be present in the rest request then default value * will be applied * @param pagingLimitParam the limit of the paged request, might not be present in the rest request then default value will be applied * @param sortParam the sorting parameter in the request URL, syntax {@code field:direction, field:direction} - * @param rsqlParam the search parameter in the request URL, syntax {@code q=name==abc} * @return a paged list of targets related to a specific rollout and rollout group. */ @Operation(summary = "Return all targets related to a specific rollout group", @@ -551,7 +549,11 @@ public interface MgmtRolloutRestApi { ResponseEntity> getRolloutGroupTargets( @PathVariable("rolloutId") Long rolloutId, @PathVariable("groupId") Long groupId, - @RequestParam( + @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) + @Schema(description = """ + Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for + available fields.""") + String rsqlParam, @RequestParam( value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) @Schema(description = "The paging offset (default is 0)") @@ -567,12 +569,7 @@ public interface MgmtRolloutRestApi { consists of the name of a field and the sort direction (ASC for ascending and DESC descending). The sequence of the sort criteria (multiple can be used) defines the sort order of the entities in the result.""") - String sortParam, - @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) - @Schema(description = """ - Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for - available fields.""") - String rsqlParam); + String sortParam); /** * Handles the POST request to force trigger processing next group of a rollout even success threshold isn't yet met diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResource.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResource.java index fa5a85b7f..6f6315b74 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResource.java +++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResource.java @@ -40,7 +40,7 @@ public class MgmtActionResource implements MgmtActionRestApi { @Override public ResponseEntity> getActions( - final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String rsqlParam, + final String rsqlParam, final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String representationModeParam) { final Pageable pageable = PagingUtility.toPageable(pagingOffsetParam, pagingLimitParam, sanitizeActionSortParam(sortParam)); diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResource.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResource.java index 93d04d99f..99bdf554d 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResource.java +++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResource.java @@ -118,7 +118,7 @@ public class MgmtDistributionSetResource implements MgmtDistributionSetRestApi { @Override public ResponseEntity> getDistributionSets( - final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String rsqlParam) { + final String rsqlParam, final int pagingOffsetParam, final int pagingLimitParam, final String sortParam) { final Pageable pageable = PagingUtility.toPageable(pagingOffsetParam, pagingLimitParam, sanitizeDistributionSetSortParam(sortParam)); final Slice findDsPage; final long countModulesAll; diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResource.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResource.java index 3f1de51e6..bfa5af011 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResource.java +++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResource.java @@ -85,7 +85,7 @@ public class MgmtRolloutResource implements MgmtRolloutRestApi { @Override public ResponseEntity> getRollouts( - final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String rsqlParam, + final String rsqlParam, final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String representationModeParam) { final Pageable pageable = PagingUtility.toPageable(pagingOffsetParam, pagingLimitParam, sanitizeRolloutSortParam(sortParam)); final boolean isFullMode = parseRepresentationMode(representationModeParam) == MgmtRepresentationMode.FULL; @@ -207,7 +207,7 @@ public class MgmtRolloutResource implements MgmtRolloutRestApi { @Override public ResponseEntity> getRolloutGroups( final Long rolloutId, - final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String rsqlParam, + final String rsqlParam, final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String representationModeParam) { final Pageable pageable = PagingUtility.toPageable(pagingOffsetParam, pagingLimitParam, sanitizeRolloutSortParam(sortParam)); final boolean isFullMode = parseRepresentationMode(representationModeParam) == MgmtRepresentationMode.FULL; @@ -249,7 +249,7 @@ public class MgmtRolloutResource implements MgmtRolloutRestApi { @Override public ResponseEntity> getRolloutGroupTargets( final Long rolloutId, final Long groupId, - final int pagingOffsetParam, final int pagingLimitParam, final String sortParam, final String rsqlParam) { + final String rsqlParam, final int pagingOffsetParam, final int pagingLimitParam, final String sortParam) { findRolloutOrThrowException(rolloutId); final Pageable pageable = PagingUtility.toPageable(pagingOffsetParam, pagingLimitParam, sanitizeRolloutSortParam(sortParam)); final Page rolloutGroupTargets; diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtRolloutMapper.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtRolloutMapper.java index 28848ad12..80cc42e18 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtRolloutMapper.java +++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtRolloutMapper.java @@ -113,7 +113,7 @@ public final class MgmtRolloutMapper { body.add(linkTo(methodOn(MgmtRolloutRestApi.class).deny(rollout.getId(), null)).withRel("deny").expand()); body.add(linkTo(methodOn(MgmtRolloutRestApi.class).getRolloutGroups( rollout.getId(), - REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE, REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE, null, null, null)) + null, REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE, REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE, null, null)) .withRel("groups").expand()); final DistributionSet distributionSet = rollout.getDistributionSet(); diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtTargetFilterQueryMapper.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtTargetFilterQueryMapper.java index d1fd81e3c..4ac65722e 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtTargetFilterQueryMapper.java +++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/mapper/MgmtTargetFilterQueryMapper.java @@ -73,9 +73,9 @@ public final class MgmtTargetFilterQueryMapper { if (isRepresentationFull && distributionSet != null) { targetRest.add( linkTo(methodOn(MgmtDistributionSetRestApi.class).getDistributionSets( - Integer.parseInt(MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET), - Integer.parseInt(MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT), null, - "name==" + distributionSet.getName() + ";version==" + distributionSet.getVersion())).withRel("DS").expand()); + "name==" + distributionSet.getName() + ";version==" + distributionSet.getVersion(), Integer.parseInt(MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET), + Integer.parseInt(MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT), null + )).withRel("DS").expand()); } return targetRest; diff --git a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/DistributionSetView.java b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/DistributionSetView.java index 295e6820b..057ba438b 100644 --- a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/DistributionSetView.java +++ b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/DistributionSetView.java @@ -81,7 +81,7 @@ public class DistributionSetView extends TableView { }, (query, rsqlFilter) -> Optional.ofNullable( hawkbitClient.getDistributionSetRestApi() - .getDistributionSets(query.getOffset(), query.getPageSize(), Constants.NAME_ASC, rsqlFilter) + .getDistributionSets(rsqlFilter, query.getOffset(), query.getPageSize(), Constants.NAME_ASC) .getBody()) .stream().flatMap(body -> body.getContent().stream()), e -> new CreateDialog(hawkbitClient).result(), diff --git a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/RolloutView.java b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/RolloutView.java index 3275e06d7..1a18b5453 100644 --- a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/RolloutView.java +++ b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/RolloutView.java @@ -91,7 +91,7 @@ public class RolloutView extends TableView { (query, rsqlFilter) -> Optional.ofNullable( hawkbitClient.getRolloutRestApi() .getRollouts( - query.getOffset(), query.getPageSize(), Constants.NAME_ASC, rsqlFilter, "full") + rsqlFilter, query.getOffset(), query.getPageSize(), Constants.NAME_ASC, "full") .getBody()).stream().flatMap(page -> page.getContent().stream()), selectionGrid -> new CreateDialog(hawkbitClient).result(), selectionGrid -> { @@ -243,8 +243,8 @@ public class RolloutView extends TableView { hawkbitClient.getRolloutRestApi() .getRolloutGroups( rollout.getId(), - query.getOffset(), query.getPageSize(), - null, null, "full") + null, query.getOffset(), query.getPageSize(), + null, "full") .getBody()) .stream().flatMap(body -> body.getContent().stream()) .skip(query.getOffset()) @@ -294,7 +294,7 @@ public class RolloutView extends TableView { this::readyToCreate, Optional.ofNullable( hawkbitClient.getDistributionSetRestApi() - .getDistributionSets(0, 30, Constants.NAME_ASC, null) + .getDistributionSets(null, 0, 30, Constants.NAME_ASC) .getBody()) .map(body -> body.getContent().toArray(new MgmtDistributionSet[0])) .orElseGet(() -> new MgmtDistributionSet[0])); diff --git a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/TargetView.java b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/TargetView.java index b4ae9139d..f1ecb9465 100644 --- a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/TargetView.java +++ b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/TargetView.java @@ -827,7 +827,7 @@ public class TargetView extends TableView { this::readyToAssign, Optional.ofNullable( hawkbitClient.getDistributionSetRestApi() - .getDistributionSets(0, 30, Constants.NAME_ASC, null) + .getDistributionSets(null, 0, 30, Constants.NAME_ASC) .getBody()) .map(body -> body.getContent().toArray(new MgmtDistributionSet[0])) .orElseGet(() -> new MgmtDistributionSet[0])