From 6169f43df16d3816c73e9b1bd0d32e89cea9c415 Mon Sep 17 00:00:00 2001 From: KrupaNagabhushan Date: Wed, 18 May 2022 19:05:09 +0100 Subject: Fix UI not displaying directives list correctly Issue-ID: SDC-4010 Signed-off-by: KrupaNagabhushan Signed-off-by: andre.schmid Change-Id: Ie67972b14e973ea0415383732b07cb8c10075638 --- .../logic/service-dependencies/service-dependencies.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src/app') diff --git a/catalog-ui/src/app/ng2/components/logic/service-dependencies/service-dependencies.component.ts b/catalog-ui/src/app/ng2/components/logic/service-dependencies/service-dependencies.component.ts index 4d695593ec..54f9e1f091 100644 --- a/catalog-ui/src/app/ng2/components/logic/service-dependencies/service-dependencies.component.ts +++ b/catalog-ui/src/app/ng2/components/logic/service-dependencies/service-dependencies.component.ts @@ -33,6 +33,7 @@ import { TopologyTemplateService } from '../../../services/component-services/to import {CapabilitiesFilterPropertiesEditorComponent} from "../../../pages/composition/capabilities-filter-properties-editor/capabilities-filter-properties-editor.component"; import { CapabilitiesConstraintObjectUI} from "../capabilities-constraint/capabilities-constraint.component"; import {ToscaFilterConstraintType} from "../../../../models/tosca-filter-constraint-type.enum"; +import {CompositionService} from "../../../pages/composition/composition.service"; export class ConstraintObject { servicePropertyName: string; @@ -159,7 +160,10 @@ export class ServiceDependenciesComponent { @Input() componentInstanceCapabilitiesMap: Map; - constructor(private topologyTemplateService: TopologyTemplateService, private modalServiceNg2: ModalService, private translateService: TranslateService) { + constructor(private topologyTemplateService: TopologyTemplateService, + private modalServiceNg2: ModalService, + private translateService: TranslateService, + private compositionService: CompositionService) { } ngOnInit() { @@ -270,6 +274,9 @@ export class ServiceDependenciesComponent { this.compositeService.componentType, this.currentServiceInstance) .subscribe((updatedServiceIns: ComponentInstance) => { + const selectedComponentInstance = this.compositionService.getComponentInstances() + .find(componentInstance => componentInstance.uniqueId == this.currentServiceInstance.uniqueId); + selectedComponentInstance.directives = updatedServiceIns.directives; this.currentServiceInstance = new ComponentInstance(updatedServiceIns); this.isDependent = this.currentServiceInstance.isDependent(); this.dependencyStatus.emit(this.isDependent); -- cgit 1.2.3-korg