This commit is contained in:
insanity 2018-06-06 14:51:18 +09:00
parent e34aed3474
commit 120fc677fc

View File

@ -113,7 +113,7 @@ public class CentralTargetService implements TargetService {
InfraHost infraHost = this.registInfraHostByDiscoveredHost(host, probeId); InfraHost infraHost = this.registInfraHostByDiscoveredHost(host, probeId);
Target target = new Target(); Target target = new Target();
target.setInfra(infraHost); target.setInfra(infraHost);
String displayName = host.getIpv6() == null ? host.getIpv6() : host.getIpv4(); String displayName = (host.getIpv6() == null || host.getIpv6().trim().isEmpty() ? host.getIpv6() : host.getIpv4();
target.setDisplayName(displayName); target.setDisplayName(displayName);
targets.add(this.targetDAO.save(target)); targets.add(this.targetDAO.save(target));
} }