fixed target create

This commit is contained in:
snoop 2017-08-23 15:46:32 +09:00
parent 95b6222288
commit 631d3a1fd8

View File

@ -77,6 +77,17 @@ public class TargetDiscoveryService {
InfraService dbInfraService = this.infraServiceService.readByService(infraHost.getId(), port.getPortNumber(), portType);
if(dbInfraService != null) {
if(service.isTarget() && dbInfraService.getTarget() == null) {
Target targetService = new Target();
targetService.setDisplayName(service.getServiceName() + "-Service");
this.targetService.regist(targetService);
dbInfraService.setTarget(targetService);
this.infraServiceService.regist(dbInfraService);
}
continue;
}
InfraService infraService = new InfraService();
infraService.setHost(infraHost);
infraService.setPort(port.getPortNumber());