aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/composition/graph
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2021-05-05 15:31:04 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-05-15 06:21:13 +0000
commit2152a9a43767cdd486fd8c93894f66a05083f53c (patch)
treecbb64fc5680ba724bc317e27f6a20802d5b38502 /catalog-ui/src/app/ng2/pages/composition/graph
parente3de4c9d214983d38a7d66e89dae5d4bba170ca3 (diff)
Support for selection of capabilities
Change-Id: Ib1a3e3e1a59fc84c62620932c408e231acf77024 Issue-ID: SDC-3580 Signed-off-by: André Schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition/graph')
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts b/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts
index 3cab4b300f..8d2357d6ad 100644
--- a/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts
@@ -25,7 +25,8 @@ import {
ZoneInstanceAssignmentType,
ZoneInstanceMode,
ZoneInstanceType,
- Requirement
+ Requirement,
+ Capability
} from 'app/models';
import { ForwardingPath } from 'app/models/forwarding-path';
import { CompositionCiServicePathLink } from 'app/models/graph/graph-links/composition-graph-links/composition-ci-service-path-link';
@@ -649,6 +650,14 @@ export class CompositionGraphComponent implements AfterViewInit {
.find(r => r.uniqueId === requirement.uniqueId).external = requirement.external;
});
+ this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_COMPONENT_INSTANCE_CAPABILITY_EXTERNAL_CHANGED,
+ (uniqueId: string, capability: Capability) => {
+ const graphCapability = this._cy.getElementById(uniqueId).data()
+ .componentInstance.capabilities[capability.type].find(cap => cap.uniqueId === capability.uniqueId);
+ graphCapability.external = capability.external;
+ }
+ );
+
this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_DELETE_COMPONENT_INSTANCE, (componentInstanceId: string) => {
const nodeToDelete = this._cy.getElementById(componentInstanceId);
this.nodesGraphUtils.deleteNode(this._cy, this.topologyTemplate, nodeToDelete);