From e3ad2b78766e2a986a28461a6d04e0fe9893b39f Mon Sep 17 00:00:00 2001 From: snoop Date: Wed, 23 Aug 2017 16:25:24 +0900 Subject: [PATCH] fixed display name --- .../module/target/service/TargetDiscoveryService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java b/src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java index bfbf71c..775a5e6 100644 --- a/src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java +++ b/src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java @@ -1,5 +1,6 @@ package com.loafle.overflow.module.target.service; +import com.loafle.overflow.commons.utils.StringConvertor; import com.loafle.overflow.module.discovery.model.Host; import com.loafle.overflow.module.discovery.model.Port; import com.loafle.overflow.module.discovery.type.PortType; @@ -180,6 +181,7 @@ public class TargetDiscoveryService { InfraMachine infraMachine = new InfraMachine(); infraMachine.setProbe(probe); infraMachine.setInfraType(typeMachine); + infraMachine.setMeta(StringConvertor.intToIp(host.getIp())+"-MACHINE"); this.infraMachineService.regist(infraMachine); InfraOS infraOS = new InfraOS(); @@ -187,6 +189,7 @@ public class TargetDiscoveryService { infraOS.setVendor(MetaInfraVendor.CreateInfraVendorByOS(host.getOs())); infraOS.setInfraType(typeOS); infraOS.setProbe(probe); + infraOS.setMeta(StringConvertor.intToIp(host.getIp())+"-OS"); this.infraOSService.regist(infraOS); InfraHost newInfraHost = new InfraHost(); @@ -198,7 +201,7 @@ public class TargetDiscoveryService { if(host.isTarget()) { Target target = new Target(); - target.setDisplayName(String.valueOf(host.getIp()) + "-Host"); + target.setDisplayName(StringConvertor.intToIp(host.getIp()) + "-Host"); this.targetService.regist(target); newInfraHost.setTarget(target);