diff --git a/@overflow/discovery/component/discovery-infra-tree.component.ts b/@overflow/discovery/component/discovery-infra-tree.component.ts index 5fdcac7..89dafc0 100644 --- a/@overflow/discovery/component/discovery-infra-tree.component.ts +++ b/@overflow/discovery/component/discovery-infra-tree.component.ts @@ -360,7 +360,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges { saveTargets() { this.pending$ = of(true); - const targets: Target[] = []; + const infraIDs: number[] = []; this.selectedItems.forEach(node => { let infraID = node.data.infraID; if (null === infraID) { // 새로 발견된 Host or Service @@ -389,19 +389,12 @@ export class DiscoveryInfraTreeComponent implements OnChanges { console.log('INFRA ID not found.'); return; } - const target: Target = { - infra: { - id: infraID - }, - name: node.label, - sensorCount: 0, - }; - targets.push(target); + infraIDs.push(infraID); }); - console.log(targets); + console.log(infraIDs); - this.targetService.registAll(targets, this.probeHost.probe.id) + this.targetService.registAll(infraIDs, this.probeHost.probe.id) .pipe( tap(() => { }), diff --git a/@overflow/probe/component/probe-detail.component.html b/@overflow/probe/component/probe-detail.component.html index 9519a69..b8be0d4 100644 --- a/@overflow/probe/component/probe-detail.component.html +++ b/@overflow/probe/component/probe-detail.component.html @@ -3,11 +3,11 @@ - +
- +
diff --git a/@overflow/probe/component/probe-host.component.html b/@overflow/probe/component/probe-host.component.html index 0184bce..7333171 100644 --- a/@overflow/probe/component/probe-host.component.html +++ b/@overflow/probe/component/probe-host.component.html @@ -18,15 +18,15 @@
-
+
-
+
-
+
@@ -34,15 +34,15 @@
-
- +
+
-
+
-
+
diff --git a/@overflow/probe/component/probe-list.component.html b/@overflow/probe/component/probe-list.component.html index cf8fa43..fb97126 100644 --- a/@overflow/probe/component/probe-list.component.html +++ b/@overflow/probe/component/probe-list.component.html @@ -22,12 +22,12 @@ {{probeHost.probe.name}} {{getUptime(probeHost.probe)}} {{probeHost.probe.cidr}} - {{probeHost.infraHost.infraHostIPs[0].address}} - {{probeHost.infraHost.infraHostOS.name}} - {{probeHost.infraHost.infraZone.iface}} + {{probeHost.infraHost.infraHostIPs ? probeHost.infraHost.infraHostIPs[0].address : ''}} + {{probeHost.infraHost.infraHostOS ? probeHost.infraHost.infraHostOS.name : '' }} + {{probeHost.infraHost.infraZone ? probeHost.infraHost.infraZone.iface : ''}} {{probeHost.probe.targetCount}} {{probeHost.probe.authorizeDate | date: 'dd.MM.yyyy'}} - {{probeHost.probe.authorizeMember.name}} + {{probeHost.probe.authorizeMember.name || ''}} diff --git a/@overflow/target/service/target.service.ts b/@overflow/target/service/target.service.ts index 76aff06..45f4ab1 100644 --- a/@overflow/target/service/target.service.ts +++ b/@overflow/target/service/target.service.ts @@ -19,8 +19,8 @@ export class TargetService { return this.rpcService.call('TargetService.regist', target, probeID); } - public registAll(targets: Target[], probeID: number): Observable { - return this.rpcService.call('TargetService.registAll', targets, probeID); + public registAll(infraIDs: number[], probeID: number): Observable { + return this.rpcService.call('TargetService.registAll', infraIDs, probeID); } public remove(id: number, probeID: number) {