diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2020-10-28 14:55:59 +0000 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2020-12-15 14:24:44 +0000 |
commit | 3f816f6fdeb32061c77ab9799e18f2cb41ce8ea7 (patch) | |
tree | 80d691573407de4ef21fce1d8a8980bfb2307b1f /catalog-ui/src/app/ng2/pages/composition | |
parent | f528d75ebe61acdfc241cb970e95589a54c1caff (diff) |
Set directives and node_filters in any node type
Allows to set directives and node_filters in any node type.
Issue-ID: SDC-3404
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: Ib75821e27bf949f841c990b1353f156eda2ae8f0
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition')
3 files changed, 6 insertions, 9 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/capabilities-filter-properties-editor/capabilities-filter-properties-editor.component.ts b/catalog-ui/src/app/ng2/pages/composition/capabilities-filter-properties-editor/capabilities-filter-properties-editor.component.ts index 1205556ee0..2cd4f4d1c7 100644 --- a/catalog-ui/src/app/ng2/pages/composition/capabilities-filter-properties-editor/capabilities-filter-properties-editor.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/capabilities-filter-properties-editor/capabilities-filter-properties-editor.component.ts @@ -135,9 +135,11 @@ export class CapabilitiesFilterPropertiesEditorComponent { if (!this.currentRule.sourceName && this.currentRule.sourceType === this.SOURCE_TYPES.STATIC.value) { this.currentRule.sourceName = this.SOURCE_TYPES.STATIC.value; } - this.selectedCapabilitiesPropertyObject = Array.from(this.input.componentInstanceCapabilitiesMap - .get(this.currentRule.capabilityName)) - .find(property => property.name == this.currentRule.servicePropertyName); + if (!this.input.componentInstanceCapabilitiesMap){ + this.selectedCapabilitiesPropertyObject = Array.from(this.input.componentInstanceCapabilitiesMap + .get(this.currentRule.capabilityName)) + .find(property => property.name == this.currentRule.servicePropertyName); + } this.updateOperatorTypesList(); this.updateSourceTypesRelatedValues(); } diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap b/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap index 2c96e92c7e..beae93e7bd 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap +++ b/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap @@ -11,7 +11,6 @@ exports[`composition-panel component should match current snapshot of compositio isVF={[Function Function]} selectedComponentIsServiceProxyInstance={[Function Function]} selectedComponentIsServiceSubstitutionInstance={[Function Function]} - selectedComponentIsVfcInstance={[Function Function]} setActive={[Function Function]} store={[Function Store]} toggleSidebarDisplay={[Function Function]} diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts b/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts index 4feaac8272..2fce002844 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts @@ -151,7 +151,7 @@ export class CompositionPanelComponent { if (component.isService() && (this.selectedComponentIsServiceProxyInstance() || this.selectedComponentIsServiceSubstitutionInstance())) { this.tabs.push(tabs.consumption); this.tabs.push(tabs.dependencies); - } else if (component.isResource() && this.selectedComponentIsVfcInstance()) { + } else if (component.isResource() && this.isComponentInstanceSelected()) { this.tabs.push(tabs.dependencies); } @@ -185,8 +185,4 @@ export class CompositionPanelComponent { private selectedComponentIsServiceSubstitutionInstance = (): boolean => { return this.isComponentInstanceSelected() && this.selectedComponent.isServiceSubstitution(); } - - private selectedComponentIsVfcInstance = (): boolean => { - return this.isComponentInstanceSelected() && this.selectedComponent.isVFC(); - } } |