From fe4b9ccdc68a311a273f1f7d97a6fd6438d0d406 Mon Sep 17 00:00:00 2001 From: ramya Date: Thu, 16 Dec 2021 18:57:44 +0530 Subject: [PATCH 1/2] worked on audit trail page search api --- .../OpsmxAuditClientServiceController.groovy | 5 +++-- .../gate/services/OpsmxAuditClientService.groovy | 12 +++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy index 5f65b49ca9..8cd03636a9 100644 --- a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy +++ b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy @@ -69,9 +69,10 @@ class OpsmxAuditClientServiceController { @RequestParam(value = "isTreeView", required = false) Boolean isTreeView, @RequestParam(value = "isLatest", required = false) Boolean isLatest, @RequestParam(value = "pageNo", required = false) Integer pageNo, - @RequestParam(value = "size", required = false) Integer size) { + @RequestParam(value = "pageLimit", required = false) Integer pageLimit, + @RequestParam(value = "search", required = false) String search) { - return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, size) + return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, pageLimit,search) } @ApiOperation(value = "Endpoint for audit-client rest services") diff --git a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy index ea05466b2d..97985caf15 100644 --- a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy +++ b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy @@ -16,6 +16,7 @@ package com.opsmx.spinnaker.gate.services +import org.springframework.web.bind.annotation.RequestParam import retrofit.client.Response import retrofit.http.GET import retrofit.http.Path @@ -37,13 +38,14 @@ interface OpsmxAuditClientService { @GET("/auditclientservice/{version}/{type}/{source}/{source1}") Object getAuditClientResponse3(@Path('version') String version, - @Path('type') String type, - @Path('source') String source, - @Path('source1') String source1, - @Query("isTreeView") Boolean isTreeView, + @Path('type') String type, + @Path('source') String source, + @Path('source1') String source1, + @Query("isTreeView") Boolean isTreeView, @Query("isLatest") Boolean isLatest, @Query("pageNo") Integer pageNo, - @Query("size") Integer size) + @Query("pageLimit") Integer pageLimit, + @Query("search") String search) @GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}") Object getAuditClientResponse4(@Path('version') String version, From 64fe3a91f9eaa18231a2f96ff5cfe3841ae9bd7e Mon Sep 17 00:00:00 2001 From: ramya Date: Mon, 20 Dec 2021 09:55:00 +0530 Subject: [PATCH 2/2] added noofdays param --- .../OpsmxAuditClientServiceController.groovy | 10 +++++----- .../gate/services/OpsmxAuditClientService.groovy | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy index 8cd03636a9..187d639c0e 100644 --- a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy +++ b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/controllers/OpsmxAuditClientServiceController.groovy @@ -70,9 +70,9 @@ class OpsmxAuditClientServiceController { @RequestParam(value = "isLatest", required = false) Boolean isLatest, @RequestParam(value = "pageNo", required = false) Integer pageNo, @RequestParam(value = "pageLimit", required = false) Integer pageLimit, + @RequestParam(value = "noOfDays", required = false) String noOfDays, @RequestParam(value = "search", required = false) String search) { - - return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, pageLimit,search) + return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, pageLimit,noOfDays,search) } @ApiOperation(value = "Endpoint for audit-client rest services") @@ -93,9 +93,9 @@ class OpsmxAuditClientServiceController { @PathVariable("source") String source, @PathVariable("source1") String source1, @PathVariable("source2") String source2, - @PathVariable("source3") String source3) { - - return opsmxAuditClientService.getAuditClientResponse5(version, type, source, source1, source2, source3) + @PathVariable("source3") String source3, + @RequestParam(value = "noOfDays", required = false) String noOfDays) { + return opsmxAuditClientService.getAuditClientResponse5(version, type, source, source1, source2, source3,noOfDays) } @ApiOperation(value = "Endpoint for audit-client rest services") diff --git a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy index 97985caf15..90924ebbbe 100644 --- a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy +++ b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/services/OpsmxAuditClientService.groovy @@ -45,6 +45,7 @@ interface OpsmxAuditClientService { @Query("isLatest") Boolean isLatest, @Query("pageNo") Integer pageNo, @Query("pageLimit") Integer pageLimit, + @Query("noOfDays") String noOfDays, @Query("search") String search) @GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}") @@ -60,7 +61,8 @@ interface OpsmxAuditClientService { @Path('source') String source, @Path('source1') String source1, @Path('source2') String source2, - @Path('source3') String source3) + @Path('source3') String source3, + @Query("noOfDays") String noOfDays) @GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}/{source3}/{source4}") Object getAuditClientResponse6(@Path('version') String version,