diff options
author | 2021-10-13 16:01:51 +0100 | |
---|---|---|
committer | 2021-10-21 17:07:40 +0100 | |
commit | 68eed7997aab4aa4f785085303aab61cf8e16a31 (patch) | |
tree | 119f4857936e217a063ce5342134b2ce11a6f3c6 /catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts | |
parent | cef866edcf8a14ede6762297dd9ab04b1f3d0375 (diff) |
Make Service base type optional
Issue-ID: SDC-3759
Change-Id: I8adf112966ee9303fc965a74cec7203274acd735
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts | 13 |
1 files changed, 12 insertions, 1 deletions
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 6ed73b3384..3422cc142d 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 @@ -264,7 +264,7 @@ export class CompositionPanelComponent { this.tabs.push(tabs.apiArtifacts); } - if((component.isService() || this.isVF()) && !this.isComponentInstanceSelected()){ + if (this.showSubstitutionFilterTab(component)) { this.tabs.push(tabs.substitutionFilter); } @@ -279,6 +279,17 @@ export class CompositionPanelComponent { } + private showSubstitutionFilterTab(component): boolean { + if ((component.isService() || this.isVF()) && !this.isComponentInstanceSelected()) { + if (component.isService()) { + return (<Service>component).isSubstituteCandidate(); + } + return true; + } + + return false; + } + private toggleSidebarDisplay = () => { // this.withSidebar = !this.withSidebar; this.store.dispatch(new OnSidebarOpenOrCloseAction()); |