discovery target save
This commit is contained in:
parent
09f98c885c
commit
7c5ce366ed
|
@ -353,6 +353,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveTargets() {
|
saveTargets() {
|
||||||
|
this.pending$ = of(true);
|
||||||
const targets: Target[] = [];
|
const targets: Target[] = [];
|
||||||
this.selectedItems.forEach(node => {
|
this.selectedItems.forEach(node => {
|
||||||
let infraID = node.data.infraID;
|
let infraID = node.data.infraID;
|
||||||
|
@ -367,13 +368,20 @@ export class DiscoveryInfraTreeComponent implements OnChanges {
|
||||||
} else if (infra.metaInfraType.key === toMetaInfraType(MetaInfraTypeEnum.SERVICE).key) {
|
} else if (infra.metaInfraType.key === toMetaInfraType(MetaInfraTypeEnum.SERVICE).key) {
|
||||||
const infraService: InfraService = infra;
|
const infraService: InfraService = infra;
|
||||||
const service: Service = node.data.object;
|
const service: Service = node.data.object;
|
||||||
if (infraService.metaTargetServiceType.name === service.key &&
|
if (infraService.metaTargetServiceType.name === service.name &&
|
||||||
infraService.infraHostPort.infraHostIP.address === service.port.host.address) {
|
infraService.infraHostPort.infraHostIP.address === service.port.host.address &&
|
||||||
|
infraService.infraHostPort.port === service.port.portNumber
|
||||||
|
) {
|
||||||
infraID = infraService.id;
|
infraID = infraService.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null === infraID) {
|
||||||
|
console.log('INFRA ID not found.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const target: Target = {
|
const target: Target = {
|
||||||
infra: {
|
infra: {
|
||||||
id: infraID
|
id: infraID
|
||||||
|
@ -391,6 +399,7 @@ export class DiscoveryInfraTreeComponent implements OnChanges {
|
||||||
map((targets: Target[]) => {
|
map((targets: Target[]) => {
|
||||||
if (targets) {
|
if (targets) {
|
||||||
this.targetSaved = true;
|
this.targetSaved = true;
|
||||||
|
this.pending$ = of(false);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
catchError(error => {
|
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