diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-19 11:34:05 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-20 14:23:26 +0200 |
commit | 7e8dcbf63a1c80dd7031d8b24793384d04361b0f (patch) | |
tree | ac1f7ff812492729fe143fb1a8f81e3bdc935aec /server | |
parent | 40952163a1997e04d1eadef927b0fd17cbd0f81d (diff) | |
download | sonarqube-7e8dcbf63a1c80dd7031d8b24793384d04361b0f.tar.gz sonarqube-7e8dcbf63a1c80dd7031d8b24793384d04361b0f.zip |
LICENSE-75 display support page in administration
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js index 6f2c84d6e6e..69cbec3e6dd 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js @@ -70,14 +70,21 @@ class SettingsNav extends React.PureComponent { const isSecurity = this.isSecurityActive(); const isProjects = this.isProjectsActive(); const isSystem = this.isSystemActive(); + const isSupport = this.isSomethingActive(['/admin/extension/license/support']); const securityClassName = classNames('dropdown-toggle', { active: isSecurity }); const projectsClassName = classNames('dropdown-toggle', { active: isProjects }); const systemClassName = classNames('dropdown-toggle', { active: isSystem }); const configurationClassNames = classNames('dropdown-toggle', { - active: !isSecurity && !isProjects && !isSystem + active: !isSecurity && !isProjects && !isSystem && !isSupport }); + const extensionsWithoutSupport = this.props.extensions.filter( + extension => extension.key !== 'license/support' + ); + + const hasSupportExtension = extensionsWithoutSupport.length < this.props.extensions.length; + return ( <ContextNavBar id="context-navigation" height={65}> <h1 className="navbar-context-header"> @@ -109,7 +116,7 @@ class SettingsNav extends React.PureComponent { {translate('custom_metrics.page')} </IndexLink> </li> - {this.props.extensions.map(this.renderExtension)} + {extensionsWithoutSupport.map(this.renderExtension)} </ul> </li> @@ -184,6 +191,14 @@ class SettingsNav extends React.PureComponent { </li> </ul> </li> + + {hasSupportExtension && ( + <li> + <IndexLink to="/admin/extension/license/support" activeClassName="active"> + {translate('support')} + </IndexLink> + </li> + )} </NavBarTabs> </ContextNavBar> ); |