File tree Expand file tree Collapse file tree
backend/src/main/java/com/park/utmstack/web/rest/agent_manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,14 +69,18 @@ public ResponseEntity<List<AgentDTO>> listAgents(
6969 }
7070
7171 @ GetMapping ("/agents-with-commands" )
72- public ResponseEntity <List <AgentDTO >> listAgentsWithCommands () {
72+ public ResponseEntity <List <AgentDTO >> listAgentsWithCommands (
73+ @ RequestParam (required = false ) Integer pageNumber ,
74+ @ RequestParam (required = false ) Integer pageSize ,
75+ @ RequestParam (required = false ) String searchQuery ,
76+ @ RequestParam (required = false ) String sortBy ) {
7377 final String ctx = CLASSNAME + ".listAgentsWithCommands" ;
7478 try {
7579 ListRequest request = ListRequest .newBuilder ()
76- .setPageNumber (1 )
77- .setPageSize (1000000 )
78- .setSearchQuery ("" )
79- .setSortBy ("" )
80+ .setPageNumber (pageNumber != null ? pageNumber : 0 )
81+ .setPageSize (pageSize != null ? pageSize : 1000000 )
82+ .setSearchQuery (searchQuery != null ? searchQuery : "" )
83+ .setSortBy (sortBy != null ? sortBy : "" )
8084 .build ();
8185 ListAgentsResponseDTO response = agentGrpcService .listAgentWithCommands (request );
8286 List <AgentDTO > agentDTOList = response .getAgents ();
You can’t perform that action at this time.
0 commit comments