aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/composition
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-12-02 09:58:42 +0000
committerMichael Morris <michael.morris@est.tech>2021-12-07 09:06:39 +0000
commite97081649ac9b8655d45fe7781800a5e717dea07 (patch)
treeed1d6ab42e8d4fec138f6bf30e2461e987ada7fc /catalog-ui/src/app/ng2/pages/composition
parenta7dd2ece847fa88dda4912994f2e5220bd4adb7b (diff)
Fix Node Filter faults
Issue-ID: SDC-3798 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: If8f3cbed8bf63bc1667e279b48ac0c2488d6a350
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition')
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts7
1 files changed, 7 insertions, 0 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 8d2357d6ad..1328747f88 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
@@ -387,6 +387,7 @@ export class CompositionGraphComponent implements AfterViewInit {
}
private loadCompositionData = () => {
+ console.log("Loading composition data....")
this.loaderService.activate();
this.topologyTemplateService.getComponentCompositionData(this.topologyTemplateId, this.topologyTemplateType).subscribe((response: ComponentGenericResponse) => {
if (this.topologyTemplateType === ComponentType.SERVICE) {
@@ -658,6 +659,12 @@ export class CompositionGraphComponent implements AfterViewInit {
}
);
+ this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_CREATE_COMPONENT_INSTANCE, () => {
+ this._cy.elements().remove();
+ this.loadCompositionData();
+ this.selectTopologyTemplate();
+ });
+
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);