diff options
author | 2020-09-17 15:11:30 +0100 | |
---|---|---|
committer | 2020-10-23 14:49:33 +0000 | |
commit | a5a46f26d043b70cd9a44fed05b0e8ba184318fb (patch) | |
tree | 97582d3263a48658f8a84367684e1eb40ba4624e /catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs | |
parent | 9714961d2950d00ae66be01e20c1ebb8552a82e9 (diff) |
Fix for substitution filter properties
Issue-ID: SDC-3325
Change-Id: If26bf895a0a2f914fb9c2b36e53466df9b7999fe
Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs')
2 files changed, 13 insertions, 26 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.html b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.html index d0656959f8..c8845deece 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.html +++ b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.html @@ -20,19 +20,15 @@ <ng2-expand-collapse state="0"> <header sdc-tooltip tooltip-text="{{input.title}}">{{input.title}}</header> - <content> - <div *ngIf="isComponentInstanceSelected"> - <substitution-filter - [compositeService]="metaData" - [currentServiceInstance]="component" - [selectedInstanceProperties]="selectedInstanceProperties" - [selectedInstanceSiblings]="selectedInstanceSiblings" - [selectedInstanceConstraints]="selectedInstanceConstraints" - [readonly]="isViewOnly" - (hasSubstitutionFilter)="notifyDependencyEventsObserver($event)" - (updateConstraintListEvent)="updateSelectedInstanceConstraints($event)" - (loadConstraintListEvent)="loadConstraints()"> - </substitution-filter> - </div> - </content> + <substitution-filter + [compositeService]="metaData" + [currentServiceInstance]="component" + [selectedInstanceProperties]="selectedInstanceProperties" + [selectedInstanceSiblings]="selectedInstanceSiblings" + [selectedInstanceConstraints]="selectedInstanceConstraints" + [readonly]="isViewOnly" + (hasSubstitutionFilter)="notifyDependencyEventsObserver($event)" + (updateConstraintListEvent)="updateSelectedInstanceConstraints($event)" + (loadConstraintListEvent)="loadConstraints()"> + </substitution-filter> </ng2-expand-collapse> diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.ts b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.ts index 20868e388b..2b5648c27f 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.ts @@ -20,14 +20,8 @@ import { Component, Input } from '@angular/core'; import { Store } from '@ngxs/store'; import { - CapabilitiesGroup, - Capability, Component as TopologyTemplate, - ComponentInstance, FullComponentInstance, - InputBEModel, - InputsGroup, - InterfaceModel, PropertiesGroup, PropertyBEModel, } from 'app/models'; @@ -73,8 +67,6 @@ export class SubstitutionFilterTabComponent { this.metaData = this.workspaceService.metadata; this.isComponentInstanceSelected = this.componentType === SelectedComponentType.COMPONENT_INSTANCE; this.initInstancesWithProperties(); - this.loadConstraints(); - this.initInstancesWithProperties(); } public loadConstraints = (): void => { @@ -93,13 +85,12 @@ export class SubstitutionFilterTabComponent { } private initInstancesWithProperties = (): void => { - this.topologyTemplateService.getComponentInstanceProperties(this.metaData.componentType, this.metaData.uniqueId).subscribe((genericResponse: ComponentGenericResponse) => { - this.componentInstanceProperties = genericResponse.componentInstancesProperties; + this.topologyTemplateService.getComponentPropertiesSubstitutionFilter(this.metaData.componentType, this.metaData.uniqueId).subscribe((genericResponse: ComponentGenericResponse) => { + this.selectedInstanceProperties = genericResponse.properties; this.updateInstanceAttributes(); }); } - private updateInstanceAttributes = (): void => { if (this.isComponentInstanceSelected && this.componentInstanceProperties) { const instancesMappedList = this.compositionService.componentInstances.map((coInstance) => new ServiceInstanceObject({ |