fixed display name
This commit is contained in:
parent
ca364b6c0e
commit
e3ad2b7876
|
@ -1,5 +1,6 @@
|
||||||
package com.loafle.overflow.module.target.service;
|
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.Host;
|
||||||
import com.loafle.overflow.module.discovery.model.Port;
|
import com.loafle.overflow.module.discovery.model.Port;
|
||||||
import com.loafle.overflow.module.discovery.type.PortType;
|
import com.loafle.overflow.module.discovery.type.PortType;
|
||||||
|
@ -180,6 +181,7 @@ public class TargetDiscoveryService {
|
||||||
InfraMachine infraMachine = new InfraMachine();
|
InfraMachine infraMachine = new InfraMachine();
|
||||||
infraMachine.setProbe(probe);
|
infraMachine.setProbe(probe);
|
||||||
infraMachine.setInfraType(typeMachine);
|
infraMachine.setInfraType(typeMachine);
|
||||||
|
infraMachine.setMeta(StringConvertor.intToIp(host.getIp())+"-MACHINE");
|
||||||
this.infraMachineService.regist(infraMachine);
|
this.infraMachineService.regist(infraMachine);
|
||||||
|
|
||||||
InfraOS infraOS = new InfraOS();
|
InfraOS infraOS = new InfraOS();
|
||||||
|
@ -187,6 +189,7 @@ public class TargetDiscoveryService {
|
||||||
infraOS.setVendor(MetaInfraVendor.CreateInfraVendorByOS(host.getOs()));
|
infraOS.setVendor(MetaInfraVendor.CreateInfraVendorByOS(host.getOs()));
|
||||||
infraOS.setInfraType(typeOS);
|
infraOS.setInfraType(typeOS);
|
||||||
infraOS.setProbe(probe);
|
infraOS.setProbe(probe);
|
||||||
|
infraOS.setMeta(StringConvertor.intToIp(host.getIp())+"-OS");
|
||||||
this.infraOSService.regist(infraOS);
|
this.infraOSService.regist(infraOS);
|
||||||
|
|
||||||
InfraHost newInfraHost = new InfraHost();
|
InfraHost newInfraHost = new InfraHost();
|
||||||
|
@ -198,7 +201,7 @@ public class TargetDiscoveryService {
|
||||||
|
|
||||||
if(host.isTarget()) {
|
if(host.isTarget()) {
|
||||||
Target target = new Target();
|
Target target = new Target();
|
||||||
target.setDisplayName(String.valueOf(host.getIp()) + "-Host");
|
target.setDisplayName(StringConvertor.intToIp(host.getIp()) + "-Host");
|
||||||
|
|
||||||
this.targetService.regist(target);
|
this.targetService.regist(target);
|
||||||
newInfraHost.setTarget(target);
|
newInfraHost.setTarget(target);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user