Skip to content

Commit

Permalink
[pinpoint-apm#9317] Change api url
Browse files Browse the repository at this point in the history
  • Loading branch information
intr3p1d committed Nov 3, 2022
1 parent 0f88870 commit 86c3ba1
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
* @author intr3p1d
*/
@RestController
@RequestMapping(value = "/agents")
@RequestMapping(value = "v1/agents")
public class AgentListController {
private final AgentInfoService agentInfoService;

public AgentListController(AgentInfoService agentInfoService) {
this.agentInfoService = Objects.requireNonNull(agentInfoService, "agentInfoService");
}

@GetMapping(value = "/all")
@GetMapping(value = "/group-by-application")
public TreeView<InstancesList<AgentAndStatus>> getAllAgentsList() {
long timestamp = System.currentTimeMillis();
return getAllAgentsList(timestamp);
}

@GetMapping(value = "/all", params = {"from", "to"})
@GetMapping(value = "/group-by-application", params = {"from", "to"})
public TreeView<InstancesList<AgentAndStatus>> getAllAgentsList(
@RequestParam("from") long from,
@RequestParam("to") long to) {
Expand All @@ -48,7 +48,7 @@ public TreeView<InstancesList<AgentAndStatus>> getAllAgentsList(
return treeView(allAgentsList);
}

@GetMapping(value = "/all", params = {"timestamp"})
@GetMapping(value = "/group-by-application", params = {"timestamp"})
public TreeView<InstancesList<AgentAndStatus>> getAllAgentsList(
@RequestParam("timestamp") long timestamp) {
AgentsMapByApplication allAgentsList = this.agentInfoService.getAllAgentsList(AgentInfoFilter::accept, timestamp);
Expand All @@ -61,15 +61,15 @@ private static TreeView<InstancesList<AgentAndStatus>> treeView(AgentsMapByAppli
}


@GetMapping(value = "/v1", params = {"application", "sortBy"})
@GetMapping(value = "/group-by-host", params = {"application", "sortBy"})
public TreeView<InstancesList<AgentStatusAndLink>> getAgentsList(
@RequestParam("application") String applicationName,
@RequestParam("sortBy") SortByAgentInfo.Rules sortBy) {
long timestamp = System.currentTimeMillis();
return getAgentsList(applicationName, timestamp, sortBy);
}

@GetMapping(value = "/v1", params = {"application", "from", "to", "sortBy"})
@GetMapping(value = "/group-by-host", params = {"application", "from", "to", "sortBy"})
public TreeView<InstancesList<AgentStatusAndLink>> getAgentsList(
@RequestParam("application") String applicationName,
@RequestParam("from") long from,
Expand All @@ -83,7 +83,7 @@ public TreeView<InstancesList<AgentStatusAndLink>> getAgentsList(
return treeView(list);
}

@GetMapping(value = "/v1", params = {"application", "timestamp", "sortBy"})
@GetMapping(value = "/group-by-host", params = {"application", "timestamp", "sortBy"})
public TreeView<InstancesList<AgentStatusAndLink>> getAgentsList(
@RequestParam("application") String applicationName,
@RequestParam("timestamp") long timestamp,
Expand Down

0 comments on commit 86c3ba1

Please sign in to comment.