summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/composition
diff options
context:
space:
mode:
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);