From 92b18f188105d5ba4b2c469cdfaedc7d2953d593 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Wed, 10 Aug 2022 14:50:08 +0100 Subject: Support TOSCA functions in Node Filters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds support to use tosca functions as value in the node property filters and substitution filters Change-Id: Id242691cc9ddd233245b58f052b9f0e2c7bbd66b Issue-ID: SDC-4128 Signed-off-by: André Schmid --- .../service-dependencies-tab.component.ts | 10 +++---- .../substitution-filter-tab.component.ts | 35 ++++++++++------------ 2 files changed, 20 insertions(+), 25 deletions(-) (limited to 'catalog-ui/src/app/ng2/pages/composition/panel') diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.ts b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.ts index f844dfae4c..ce1a43dd3b 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.ts @@ -11,13 +11,13 @@ import {DEPENDENCY_EVENTS} from 'app/utils/constants'; import {ComponentMetadata} from '../../../../../../models/component-metadata'; import {ServiceInstanceObject} from '../../../../../../models/service-instance-properties-and-interfaces'; import {EventListenerService} from '../../../../../../services/event-listener-service'; -import {ConstraintObject} from '../../../../../components/logic/service-dependencies/service-dependencies.component'; import {TopologyTemplateService} from '../../../../../services/component-services/topology-template.service'; import {ComponentGenericResponse} from '../../../../../services/responses/component-generic-response'; import {WorkspaceService} from '../../../../workspace/workspace.service'; import {SelectedComponentType} from '../../../common/store/graph.actions'; import {CompositionService} from '../../../composition.service'; -import {CapabilitiesConstraintObject} from "../../../../../components/logic/capabilities-constraint/capabilities-constraint.component"; +import {CapabilityFilterConstraint} from "../../../../../../models/capability-filter-constraint"; +import {FilterConstraint} from "../../../../../../models/filter-constraint"; @Component({ selector: 'service-dependencies-tab', @@ -29,7 +29,7 @@ export class ServiceDependenciesTabComponent { selectedInstanceSiblings: ServiceInstanceObject[]; componentInstancesConstraints: any[]; - selectedInstanceConstraints: ConstraintObject[]; + selectedInstanceConstraints: FilterConstraint[]; selectedInstanceProperties: PropertyBEModel[]; componentInstanceProperties: PropertiesGroup; componentInstanceCapabilityProperties: CapabilitiesGroup; @@ -68,12 +68,12 @@ export class ServiceDependenciesTabComponent { this.eventListenerService.notifyObservers(DEPENDENCY_EVENTS.ON_DEPENDENCY_CHANGE, isChecked); } - public updateSelectedInstanceConstraints = (constraintsList:Array):void => { + public updateSelectedInstanceConstraints = (constraintsList:Array):void => { this.componentInstancesConstraints[this.component.uniqueId].properties = constraintsList; this.selectedInstanceConstraints = this.componentInstancesConstraints[this.component.uniqueId].properties; } - public updateSelectedInstanceCapabilitiesConstraints = (constraintsList:Array):void => { + public updateSelectedInstanceCapabilitiesConstraints = (constraintsList:Array):void => { this.componentInstancesConstraints[this.component.uniqueId].capabilities = constraintsList; this.selectedInstanceConstraints = this.componentInstancesConstraints[this.component.uniqueId].capabilities; } 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 bf8d1e43b1..ac497ee98e 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 @@ -17,24 +17,19 @@ * ============LICENSE_END========================================================= */ -import { Component, Input } from '@angular/core'; -import { Store } from '@ngxs/store'; -import { - Component as TopologyTemplate, - FullComponentInstance, InputBEModel, - PropertiesGroup, - PropertyBEModel, -} from 'app/models'; -import { SUBSTITUTION_FILTER_EVENTS } from 'app/utils/constants'; -import { ComponentMetadata } from '../../../../../../models/component-metadata'; -import { ServiceInstanceObject } from '../../../../../../models/service-instance-properties-and-interfaces'; -import { EventListenerService } from '../../../../../../services/event-listener-service'; -import { ConstraintObject } from '../../../../../components/logic/service-dependencies/service-dependencies.component'; -import { TopologyTemplateService } from '../../../../../services/component-services/topology-template.service'; -import { ComponentGenericResponse } from '../../../../../services/responses/component-generic-response'; -import { WorkspaceService } from '../../../../workspace/workspace.service'; -import { SelectedComponentType } from '../../../common/store/graph.actions'; -import { CompositionService } from '../../../composition.service'; +import {Component, Input} from '@angular/core'; +import {Store} from '@ngxs/store'; +import {Component as TopologyTemplate, FullComponentInstance, InputBEModel, PropertiesGroup, PropertyBEModel,} from 'app/models'; +import {SUBSTITUTION_FILTER_EVENTS} from 'app/utils/constants'; +import {ComponentMetadata} from '../../../../../../models/component-metadata'; +import {ServiceInstanceObject} from '../../../../../../models/service-instance-properties-and-interfaces'; +import {EventListenerService} from '../../../../../../services/event-listener-service'; +import {TopologyTemplateService} from '../../../../../services/component-services/topology-template.service'; +import {ComponentGenericResponse} from '../../../../../services/responses/component-generic-response'; +import {WorkspaceService} from '../../../../workspace/workspace.service'; +import {SelectedComponentType} from '../../../common/store/graph.actions'; +import {CompositionService} from '../../../composition.service'; +import {FilterConstraint} from "../../../../../../models/filter-constraint"; @Component({ selector: 'substitution-filter-tab', @@ -46,7 +41,7 @@ export class SubstitutionFilterTabComponent { selectedInstanceSiblings: ServiceInstanceObject[]; componentInstancesConstraints: any[]; - selectedInstanceConstraints: ConstraintObject[]; + selectedInstanceConstraints: FilterConstraint[]; parentServiceProperties: PropertyBEModel[]; parentServiceInputs: InputBEModel[]; componentInstanceProperties: PropertiesGroup; @@ -80,7 +75,7 @@ export class SubstitutionFilterTabComponent { this.eventListenerService.notifyObservers(SUBSTITUTION_FILTER_EVENTS.ON_SUBSTITUTION_FILTER_CHANGE, isChecked); } - public updateSelectedInstanceConstraints = (constraintsList:Array):void => { + public updateSelectedInstanceConstraints = (constraintsList:Array):void => { this.componentInstancesConstraints[this.component.uniqueId].properties = constraintsList; this.selectedInstanceConstraints = this.componentInstancesConstraints[this.component.uniqueId].properties; } -- cgit 1.2.3-korg