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/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.html5
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/substitution-filter-tab/substitution-filter-tab.component.ts23
2 files changed, 10 insertions, 18 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 c8845deece..a9fad5a733 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
@@ -23,8 +23,9 @@
<substitution-filter
[compositeService]="metaData"
[currentServiceInstance]="component"
- [selectedInstanceProperties]="selectedInstanceProperties"
- [selectedInstanceSiblings]="selectedInstanceSiblings"
+ [parentServiceProperties]="parentServiceProperties"
+ [parentServiceInputs]="parentServiceInputs"
+ [selectedInstanceProperties]="parentServiceProperties"
[selectedInstanceConstraints]="selectedInstanceConstraints"
[readonly]="isViewOnly"
(hasSubstitutionFilter)="notifyDependencyEventsObserver($event)"
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 c4101ab2bc..bf8d1e43b1 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
@@ -21,7 +21,7 @@ import { Component, Input } from '@angular/core';
import { Store } from '@ngxs/store';
import {
Component as TopologyTemplate,
- FullComponentInstance,
+ FullComponentInstance, InputBEModel,
PropertiesGroup,
PropertyBEModel,
} from 'app/models';
@@ -47,7 +47,8 @@ export class SubstitutionFilterTabComponent {
selectedInstanceSiblings: ServiceInstanceObject[];
componentInstancesConstraints: any[];
selectedInstanceConstraints: ConstraintObject[];
- selectedInstanceProperties: PropertyBEModel[];
+ parentServiceProperties: PropertyBEModel[];
+ parentServiceInputs: InputBEModel[];
componentInstanceProperties: PropertiesGroup;
metaData: ComponentMetadata;
@@ -85,21 +86,11 @@ export class SubstitutionFilterTabComponent {
}
private initInstancesWithProperties = (): void => {
- this.topologyTemplateService.getComponentPropertiesSubstitutionFilter(this.metaData.componentType, this.metaData.uniqueId).subscribe((genericResponse: ComponentGenericResponse) => {
- this.selectedInstanceProperties = genericResponse.properties;
- this.updateInstanceAttributes();
+ this.topologyTemplateService.getComponentPropertiesAndInputsForSubstitutionFilter(this.metaData.componentType, this.metaData.uniqueId)
+ .subscribe((genericResponse: ComponentGenericResponse) => {
+ this.parentServiceProperties = genericResponse.properties;
+ this.parentServiceInputs = genericResponse.inputs;
});
}
- private updateInstanceAttributes = (): void => {
- if (this.isComponentInstanceSelected && this.componentInstanceProperties) {
- const instancesMappedList = this.compositionService.componentInstances.map((coInstance) => new ServiceInstanceObject({
- id: coInstance.uniqueId,
- name: coInstance.name,
- properties: this.componentInstanceProperties[coInstance.uniqueId] || []
- }));
- this.selectedInstanceProperties = this.componentInstanceProperties[this.component.uniqueId];
- this.selectedInstanceSiblings = instancesMappedList.filter((coInstance) => coInstance.id !== this.component.uniqueId);
- }
- }
}