From 09f98c885c5d79e7078bd82d67db97a06f93a760 Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 21 Jun 2018 20:17:07 +0900 Subject: [PATCH] ing --- .../component/discovery-infra-tree.component.ts | 12 ++++++------ .../discovery/component/search-filter.component.ts | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/@overflow/discovery/component/discovery-infra-tree.component.ts b/@overflow/discovery/component/discovery-infra-tree.component.ts index 3bea84a..450d3b2 100644 --- a/@overflow/discovery/component/discovery-infra-tree.component.ts +++ b/@overflow/discovery/component/discovery-infra-tree.component.ts @@ -147,7 +147,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges { addInfraHost(infraHost: InfraHost) { const target: Target = this.checkAlreadyTarget(infraHost.id); - const ip = infraHost.infraHostIPs[0].address + const ip = infraHost.infraHostIPs[0].address; const idx = this.findHostIndex(ip); this.hostNode.splice(idx, 0, { type: 'HOST', @@ -261,7 +261,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges { addService(service: Service) { let exist = false; this.infraServices.forEach(infraService => { - if (infraService.metaTargetServiceType.name === service.name && + if (infraService.metaTargetServiceType.name === service.key && infraService.infraHostPort.port === service.port.portNumber && infraService.infraHostPort.infraHostIP.address === service.port.host.address ) { @@ -274,10 +274,10 @@ export class DiscoveryInfraTreeComponent implements OnChanges { } const targetHostNode = this.findHostNodeByService(service.port.host.address); - const idx = this.findServiceIndex(targetHostNode.children, service.name); + const idx = this.findServiceIndex(targetHostNode.children, service.key); targetHostNode.children.splice(idx, 0, { type: 'SERVICE', - label: service.name + ' (' + service.port.portNumber + ')', + label: service.key + ' (' + service.port.portNumber + ')', data: { target: null, date: null, @@ -285,7 +285,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges { portNumber: service.port.portNumber, object: service, InfraID: null, - name: service.name + name: service.key }, }); @@ -367,7 +367,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges { } else if (infra.metaInfraType.key === toMetaInfraType(MetaInfraTypeEnum.SERVICE).key) { const infraService: InfraService = infra; const service: Service = node.data.object; - if (infraService.metaTargetServiceType.name === service.name && + if (infraService.metaTargetServiceType.name === service.key && infraService.infraHostPort.infraHostIP.address === service.port.host.address) { infraID = infraService.id; } diff --git a/@overflow/discovery/component/search-filter.component.ts b/@overflow/discovery/component/search-filter.component.ts index 9b354f2..926f6db 100644 --- a/@overflow/discovery/component/search-filter.component.ts +++ b/@overflow/discovery/component/search-filter.component.ts @@ -36,20 +36,20 @@ export class SearchFilterComponent implements OnInit { } addService(service: Service) { - if (service.name.indexOf('Not Supported Service') >= 0) { - const tempName = service.name.split('Perhaps ')[1].split('[')[0]; - service.name = '*' + tempName; + if (service.key.indexOf('Not Supported Service') >= 0) { + const tempName = service.key.split('Perhaps ')[1].split('[')[0]; + service.key = '*' + tempName; } let exist = false; this.services.forEach(value => { - if (value.name === service.name) { + if (value.key === service.key) { exist = true; return; } }); if (!exist) { this.services.push(service); - this.filterServices[service.name] = true; + this.filterServices[service.key] = true; } this.serviceSelect.emit(this.filterServices); }