diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2021-11-18 10:29:39 +0000 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2021-12-06 11:51:31 +0000 |
commit | d5edf5274286e9808dfabf2f49a03a1ba235b70c (patch) | |
tree | 7e746ee88b36b19bdd91fb1c55a0bf97d0bfbca7 /catalog-ui/src/app/ng2/components/logic | |
parent | fbc285a47209b763ef3bf7b64e7e0c6e3e1a5202 (diff) |
Add node filter with getInput function
Support get_input functions for creating node and substitution filters
Issue-ID: SDC-3793
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: Ie00f621be8418b4a9c88afcbbc07d80c22165e9b
Diffstat (limited to 'catalog-ui/src/app/ng2/components/logic')
2 files changed, 12 insertions, 8 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 f9f9286fe5..35e80dc70a 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 @@ -134,6 +134,7 @@ export class ServiceDependenciesComponent { isDependent: boolean; isLoading: boolean; parentServiceInputs: InputBEModel[] = []; + parentServiceProperties: PropertyBEModel[] = []; constraintProperties: ConstraintObject[] = []; constraintCapabilities: CapabilitiesConstraintObject[] = []; operatorTypes: any[]; @@ -167,8 +168,10 @@ export class ServiceDependenciesComponent { {label: '<', value: OPERATOR_TYPES.LESS_THAN}, {label: '=', value: OPERATOR_TYPES.EQUAL} ]; - this.topologyTemplateService.getComponentInputsWithProperties(this.compositeService.componentType, this.compositeService.uniqueId).subscribe((result: ComponentGenericResponse) => { + this.topologyTemplateService.getComponentInputsWithProperties(this.compositeService.componentType, this.compositeService.uniqueId) + .subscribe((result: ComponentGenericResponse) => { this.parentServiceInputs = result.inputs; + this.parentServiceProperties = result.properties; }); this.loadNodeFilter(); this.translateService.languageChangedObservable.subscribe((lang) => { @@ -300,6 +303,7 @@ export class ServiceDependenciesComponent { operatorTypes: this.operatorTypes, compositeServiceName: this.compositeService.name, parentServiceInputs: this.parentServiceInputs, + parentServiceProperties: this.parentServiceProperties, selectedInstanceProperties: this.selectedInstanceProperties, selectedInstanceSiblings: this.selectedInstanceSiblings } @@ -406,6 +410,7 @@ export class ServiceDependenciesComponent { operatorTypes: this.operatorTypes, compositeServiceName: this.compositeService.name, parentServiceInputs: this.parentServiceInputs, + parentServiceProperties: this.parentServiceProperties, selectedInstanceProperties: this.selectedInstanceProperties, selectedInstanceSiblings: this.selectedInstanceSiblings } diff --git a/catalog-ui/src/app/ng2/components/logic/substitution-filter/substitution-filter.component.ts b/catalog-ui/src/app/ng2/components/logic/substitution-filter/substitution-filter.component.ts index e0754af549..7671d653e4 100644 --- a/catalog-ui/src/app/ng2/components/logic/substitution-filter/substitution-filter.component.ts +++ b/catalog-ui/src/app/ng2/components/logic/substitution-filter/substitution-filter.component.ts @@ -30,7 +30,6 @@ import {ServiceDependenciesEditorComponent} from 'app/ng2/pages/service-dependen import {ModalService} from 'app/ng2/services/modal.service'; import {TranslateService} from 'app/ng2/shared/translator/translate.service'; import {ComponentMetadata} from '../../../../models/component-metadata'; -import {ServiceInstanceObject} from '../../../../models/service-instance-properties-and-interfaces'; import {TopologyTemplateService} from '../../../services/component-services/topology-template.service'; import {ToscaFilterConstraintType} from "../../../../models/tosca-filter-constraint-type.enum"; @@ -112,7 +111,6 @@ class I18nTexts { export class SubstitutionFilterComponent { modalInstance: ComponentRef<ModalComponent>; isLoading: boolean; - parentServiceInputs: InputBEModel[] = []; operatorTypes: any[]; constraintProperties: ConstraintObject[] = []; PROPERTIES: string = ToscaFilterConstraintType.PROPERTIES; @@ -120,9 +118,10 @@ export class SubstitutionFilterComponent { @Input() readonly: boolean; @Input() compositeService: ComponentMetadata; @Input() currentServiceInstance: ComponentInstance; - @Input() selectedInstanceSiblings: ServiceInstanceObject[]; @Input() selectedInstanceConstraints: ConstraintObject[] = []; @Input() selectedInstanceProperties: PropertyBEModel[] = []; + @Input() parentServiceProperties: PropertyBEModel[] = []; + @Input() parentServiceInputs: InputBEModel[] = []; @Output() updateSubstitutionFilterProperties: EventEmitter<ConstraintObject[]> = new EventEmitter<ConstraintObject[]>(); @Output() updateConstraintListEvent: EventEmitter<ConstraintObject[]> = new EventEmitter<ConstraintObject[]>(); @Output() loadConstraintListEvent: EventEmitter<any> = new EventEmitter(); @@ -176,8 +175,8 @@ export class SubstitutionFilterComponent { operatorTypes: this.operatorTypes, compositeServiceName: this.compositeService.name, parentServiceInputs: this.parentServiceInputs, - selectedInstanceProperties: this.selectedInstanceProperties, - selectedInstanceSiblings: this.selectedInstanceSiblings + parentServiceProperties: this.parentServiceProperties, + selectedInstanceProperties: this.parentServiceProperties, } ); this.modalInstance.instance.open(); @@ -216,8 +215,8 @@ export class SubstitutionFilterComponent { operatorTypes: this.operatorTypes, compositeServiceName: this.compositeService.name, parentServiceInputs: this.parentServiceInputs, - selectedInstanceProperties: this.selectedInstanceProperties, - selectedInstanceSiblings: this.selectedInstanceSiblings + parentServiceProperties: this.parentServiceProperties, + selectedInstanceProperties: this.parentServiceProperties, } ); this.modalInstance.instance.open(); |