From 0834078c0901f25bc312a9cc470dd5a8953c1ccf Mon Sep 17 00:00:00 2001 From: jsonwan Date: Wed, 3 Jan 2024 17:17:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf:=20=E6=8F=90=E4=BE=9B=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E8=AF=A6=E6=83=85=E4=B8=8E=E6=AD=A5=E9=AA=A4=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=BB=93=E6=9E=9C=E6=9F=A5=E8=AF=A2=E7=9A=84APIGW?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20#2596?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 步骤详情接口中主机信息添加agentId与agent状态字段 --- .../bk-api-gateway/v3/zh/get_step_instance_detail.md | 2 ++ .../tencent/bk/job/common/esb/model/job/EsbIpDTO.java | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md b/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md index cc8f731bda..36def5c7ec 100644 --- a/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md +++ b/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md @@ -203,6 +203,8 @@ | bk_cloud_id | long | 否 | 管控区域ID | | ip | string | 否 | IP | | ipv6 | string | 否 | IPv6 | +| bk_agent_id | string | 否 | Agent ID | +| alive | int | 否 | Agent是否正常,取值为:1-正常,0-异常 | ##### topo_node diff --git a/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java b/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java index d8e5f6de6a..b87878ce51 100644 --- a/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java +++ b/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java @@ -64,6 +64,14 @@ public class EsbIpDTO { @JsonPropertyDescription("ipv6") private String ipv6; + @JsonProperty("bk_agent_id") + @JsonPropertyDescription("Agent Id") + private String agentId; + + @JsonProperty("alive") + @JsonPropertyDescription("Agent是否正常") + private Integer alive; + public EsbIpDTO(Long hostId, Long bkCloudId, String ip) { this.hostId = hostId; this.bkCloudId = bkCloudId; @@ -90,6 +98,8 @@ public static EsbIpDTO fromHost(HostDTO host) { esbIp.setIp(host.getIp()); esbIp.setIpv6(host.getIpv6()); esbIp.setHostId(host.getHostId()); + esbIp.setAgentId(host.getAgentId()); + esbIp.setAlive(host.getAlive()); return esbIp; } From 9b9a49c5890b2c1c906542886f5e94d006048146 Mon Sep 17 00:00:00 2001 From: jsonwan Date: Wed, 3 Jan 2024 17:43:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?perf:=20=E6=8F=90=E4=BE=9B=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E8=AF=A6=E6=83=85=E4=B8=8E=E6=AD=A5=E9=AA=A4=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=BB=93=E6=9E=9C=E6=9F=A5=E8=AF=A2=E7=9A=84APIGW?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20#2596?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 步骤详情接口中主机信息添加agentId与agent状态字段 --- .../bk-api-gateway/v3/zh/get_step_instance_detail.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md b/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md index 36def5c7ec..a929f43e05 100644 --- a/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md +++ b/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md @@ -60,7 +60,9 @@ "bk_host_id": 1, "bk_cloud_id": 0, "ip": "192.168.1.1", - "ipv6": null + "ipv6": null, + "bk_agent_id": "020000000052540079809816967513755991", + "alive": 1 }], "topo_node_list": [{ "node_type": "set", @@ -88,7 +90,9 @@ "bk_host_id": 1, "bk_cloud_id": 0, "ip": "192.168.1.1", - "ipv6": null + "ipv6": null, + "bk_agent_id": "020000000052540079809816967513755991", + "alive": 1 }], "topo_node_list": [{ "node_type": "set", @@ -118,7 +122,9 @@ "bk_host_id": 1, "bk_cloud_id": 0, "ip": "192.168.1.1", - "ipv6": null + "ipv6": null, + "bk_agent_id": "020000000052540079809816967513755991", + "alive": 1 }], "topo_node_list": [{ "node_type": "set",