From c0686760851a4716586dbbcbe2c9d069a67cb768 Mon Sep 17 00:00:00 2001 From: Ramya Ravi <72739416+ramyaravi-opsmx@users.noreply.github.com> Date: Mon, 20 Dec 2021 12:00:43 +0530 Subject: [PATCH] Op 10701 gate url (#100) * worked on audit trail page search api * added noofdays param --- .../OpsmxAuditClientServiceController.groovy | 13 +++++++------ .../gate/services/OpsmxAuditClientService.groovy | 16 ++++++++++------ 2 files changed, 17 insertions(+), 12 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..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 @@ -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) { - - return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, size) + @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,noOfDays,search) } @ApiOperation(value = "Endpoint for audit-client rest services") @@ -92,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 ea05466b2d..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 @@ -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,15 @@ 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("noOfDays") String noOfDays, + @Query("search") String search) @GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}") Object getAuditClientResponse4(@Path('version') String version, @@ -58,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,