39 lines
1.1 KiB
Java
39 lines
1.1 KiB
Java
package io.wdd.rpc.controller;
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.wdd.common.response.R;
|
|
import io.wdd.rpc.agent.OctopusAgentService;
|
|
import io.wdd.server.beans.vo.ServerInfoVO;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import javax.annotation.Resource;
|
|
import java.util.Map;
|
|
|
|
@RestController
|
|
@RequestMapping("/octopus/server/agent")
|
|
@Api(value = "处理Agent核心内容的Controller", tags = "Agent")
|
|
public class AgentController {
|
|
|
|
@Resource
|
|
OctopusAgentService octopusAgentService;
|
|
|
|
@GetMapping("/version")
|
|
@ApiOperation("[版本] - 所有OctopusAgent")
|
|
public R<Map<String, String>> getAllAgentVersion(){
|
|
|
|
return R.ok(octopusAgentService.getAllAgentVersion());
|
|
}
|
|
|
|
@GetMapping("/coreInfo")
|
|
@ApiOperation("[核心信息] - 所有OctopusAgent")
|
|
public R<Map<String, ServerInfoVO>> getAllAgentCoreInfo(){
|
|
|
|
return R.ok(octopusAgentService.getAllAgentCoreInfo());
|
|
|
|
}
|
|
|
|
}
|