aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-04-28 15:21:51 +0200
committerGrégoire Aubert <gregaubert@users.noreply.github.com>2017-05-01 16:23:17 +0200
commit15849bc5b5ebbc69d28435d5f62bb558246146dc (patch)
tree4a72ad0108189392439ac9f8a442bb9b0a61dca5 /server/sonar-web/src/main/js/apps
parentb61f2e843c6e1e72a7f1a987b53bd9921eaa69cf (diff)
downloadsonarqube-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.js7
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 (