diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2020-08-28 19:11:59 +0100 |
---|---|---|
committer | Sébastien Determe <sebastien.determe@intl.att.com> | 2020-09-07 10:05:25 +0000 |
commit | de805023e2d1c8565efc9a707a82c9fc3903ab38 (patch) | |
tree | 2062200adf5cef5fb6526d735291e07247516dd7 /catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs | |
parent | 81c04901ba03a1b696c5198ec84cda767101aa3c (diff) |
Retrieve node_filter capabilities
Issue-ID: SDC-3270
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: Ieb1b3c4d31a50e73112fc34cdd8d5fd9ba9e6a30
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs')
2 files changed, 19 insertions, 20 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.html b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.html index 47351a46a1..508584d486 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.html +++ b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/service-dependencies-tab/service-dependencies-tab.component.html @@ -10,7 +10,8 @@ [selectedInstanceConstraints]="selectedInstanceConstraints" [readonly]="isViewOnly" (dependencyStatus)="notifyDependencyEventsObserver($event)" - (updateRulesListEvent)="updateSelectedInstanceConstraints($event)" + (updateNodeFilterProperties)="updateSelectedInstanceConstraints($event)" + (updateNodeFilterCapabilities)="updateSelectedInstanceCapabilitiesConstraints($event)" (loadRulesListEvent)="loadConstraints()"> </service-dependencies> </div> 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 fb0898d53e..43c38b58b0 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 @@ -1,28 +1,21 @@ - -import { Component, Input } from '@angular/core'; -import { Store } from '@ngxs/store'; +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'; -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 {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'; @Component({ selector: 'service-dependencies-tab', @@ -74,6 +67,11 @@ export class ServiceDependenciesTabComponent { this.selectedInstanceConstraints = this.componentInstancesConstraints[this.component.uniqueId].properties; } + public updateSelectedInstanceCapabilitiesConstraints = (constraintsList:Array<ConstraintObject>):void => { + this.componentInstancesConstraints[this.component.uniqueId].capabilities = constraintsList; + this.selectedInstanceConstraints = this.componentInstancesConstraints[this.component.uniqueId].capabilities; + } + private initInstancesWithProperties = (): void => { this.topologyTemplateService.getComponentInstanceProperties(this.metaData.componentType, this.metaData.uniqueId).subscribe((genericResponse: ComponentGenericResponse) => { this.componentInstanceProperties = genericResponse.componentInstancesProperties; |