This commit is contained in:
insanity
2018-06-22 11:44:36 +09:00
parent 674b6860b3
commit 32b83f52a4
5 changed files with 20 additions and 27 deletions

View File

@@ -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(() => {
}),