fixed display name

This commit is contained in:
snoop 2017-08-23 16:25:24 +09:00
parent ca364b6c0e
commit e3ad2b7876

View File

@ -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);