aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2022-05-18 19:05:09 +0100
committerKrupa Nagabhushan <krupa.nagabhushan@est.tech>2022-05-18 19:25:03 +0000
commit6169f43df16d3816c73e9b1bd0d32e89cea9c415 (patch)
tree34c5d610fc143b4a103d3fe562c043303bd3c9a0
parente1a6a218bcc9070e3e67564f7555ae9d6574fb8d (diff)
Fix UI not displaying directives list correctly1.11.3
Issue-ID: SDC-4010 Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Signed-off-by: andre.schmid <andre.schmid@est.tech> Change-Id: Ie67972b14e973ea0415383732b07cb8c10075638
-rw-r--r--catalog-ui/src/app/ng2/components/logic/service-dependencies/service-dependencies.component.ts9
1 files changed, 8 insertions, 1 deletions
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<string, PropertyModel[]>;
- 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);