From 2152a9a43767cdd486fd8c93894f66a05083f53c Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Wed, 5 May 2021 15:31:04 +0100 Subject: Support for selection of capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib1a3e3e1a59fc84c62620932c408e231acf77024 Issue-ID: SDC-3580 Signed-off-by: André Schmid --- .../pages/composition/graph/composition-graph.component.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts') 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); -- cgit 1.2.3-korg