Skip to content

Commit

Permalink
fix: 作业执行详情-步骤-主机信息需要显示主机快照数据,而不是当前的数据 TencentBlueKing#2494
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu096 committed Oct 10, 2023
1 parent d3541f0 commit 5784263
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,20 @@ public class HostDTO implements Cloneable {
private String ipv6;

/**
* agent状态,0-异常,1-正常
* agent存活状态,0-异常,1-正常
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer alive;

/**
* 操作系统
*/
private String os;
/**
* 主机名称
*/
private String hostname;

@Deprecated
public HostDTO(Long bkCloudId, String ip) {
this.bkCloudId = bkCloudId;
Expand Down Expand Up @@ -172,6 +181,8 @@ public static HostInfoVO toVO(HostDTO hostDTO) {
cloudAreaInfo.setId(hostDTO.getBkCloudId());
cloudAreaInfo.setName(hostDTO.getBkCloudName());
hostInfoVO.setCloudArea(cloudAreaInfo);
hostInfoVO.setOs(hostDTO.getOs());
hostInfoVO.setHostName(hostDTO.getHostname());
return hostInfoVO;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,8 @@ private void fillHostsDetail(Collection<HostDTO> hosts, Map<String, HostDTO> hos
host.setIp(hostDetail.getIp());
host.setIpv6(hostDetail.getIpv6());
host.setBkCloudName(hostDetail.getBkCloudName());
host.setOs(hostDetail.getOs());
host.setAlive(hostDetail.getAlive());
});
}
}
Expand Down

0 comments on commit 5784263

Please sign in to comment.