discovery target save
This commit is contained in:
parent
09f98c885c
commit
7c5ce366ed
|
@ -353,6 +353,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges {
|
|||
}
|
||||
|
||||
saveTargets() {
|
||||
this.pending$ = of(true);
|
||||
const targets: Target[] = [];
|
||||
this.selectedItems.forEach(node => {
|
||||
let infraID = node.data.infraID;
|
||||
|
@ -367,13 +368,20 @@ 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.key &&
|
||||
infraService.infraHostPort.infraHostIP.address === service.port.host.address) {
|
||||
if (infraService.metaTargetServiceType.name === service.name &&
|
||||
infraService.infraHostPort.infraHostIP.address === service.port.host.address &&
|
||||
infraService.infraHostPort.port === service.port.portNumber
|
||||
) {
|
||||
infraID = infraService.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (null === infraID) {
|
||||
console.log('INFRA ID not found.');
|
||||
return;
|
||||
}
|
||||
const target: Target = {
|
||||
infra: {
|
||||
id: infraID
|
||||
|
@ -391,6 +399,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges {
|
|||
map((targets: Target[]) => {
|
||||
if (targets) {
|
||||
this.targetSaved = true;
|
||||
this.pending$ = of(false);
|
||||
}
|
||||
}),
|
||||
catchError(error => {
|
||||
|
|
3704
package-lock.json
generated
3704
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user