From a0f2c285cce09309029e75de7b69a41c32620aaa Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Mon, 17 Dec 2018 13:46:53 +0100 Subject: [PATCH] SONARCLOUD-301 Disable Custom Measures page on SonarCloud --- .../app/components/nav/component/ComponentNavMenu.tsx | 3 ++- .../sonar-web/src/main/js/app/utils/startReactApp.tsx | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx index 7aeec61ee84..88e197a430f 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx @@ -31,6 +31,7 @@ import { import { translate } from '../../../../helpers/l10n'; import DropdownIcon from '../../../../components/icons-components/DropdownIcon'; import { withAppState } from '../../../../components/withAppState'; +import { isSonarCloud } from '../../../../helpers/system'; const SETTINGS_URLS = [ '/project/admin', @@ -328,7 +329,7 @@ export class ComponentNavMenu extends React.PureComponent { } renderCustomMeasuresLink() { - if (!this.getConfiguration().showManualMeasures) { + if (isSonarCloud() || !this.getConfiguration().showManualMeasures) { return null; } return ( diff --git a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx index 721abda0ba5..3b224a1b3e5 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx @@ -232,10 +232,12 @@ export default function startReactApp( childRoutes={projectQualityProfilesRoutes} /> import('../components/ProjectAdminContainer'))}> - + {!isSonarCloud() && ( + + )} -- 2.39.5