diff options
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()); |