diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-04-28 15:21:51 +0200 |
---|---|---|
committer | Grégoire Aubert <gregaubert@users.noreply.github.com> | 2017-05-01 16:23:17 +0200 |
commit | 15849bc5b5ebbc69d28435d5f62bb558246146dc (patch) | |
tree | 4a72ad0108189392439ac9f8a442bb9b0a61dca5 /server/sonar-web/src/main/js/apps | |
parent | b61f2e843c6e1e72a7f1a987b53bd9921eaa69cf (diff) | |
download | sonarqube-15849bc5b5ebbc69d28435d5f62bb558246146dc.tar.gz sonarqube-15849bc5b5ebbc69d28435d5f62bb558246146dc.zip |
Fix organization admin extension nav menu highlight
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r-- | server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js index d00979a8431..b71ded90831 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js @@ -135,10 +135,13 @@ export default class OrganizationNavigation extends React.PureComponent { location.pathname === `organizations/${organization.key}/projects` || location.pathname === `organizations/${organization.key}/projects/favorite`; - const adminActive = ADMIN_PATHS.some(path => + const adminPathsWithExtensions = (organization.adminPages || []) + .map(e => `extension/${e.key}`) + .concat(ADMIN_PATHS); + + const adminActive = adminPathsWithExtensions.some(path => location.pathname.endsWith(`organizations/${organization.key}/${path}`) ); - const moreActive = !adminActive && location.pathname.includes('/extension/'); return ( |