From: Wouter Admiraal Date: Mon, 17 Dec 2018 12:46:53 +0000 (+0100) Subject: SONARCLOUD-301 Disable Custom Measures page on SonarCloud X-Git-Tag: 7.6~213 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a0f2c285cce09309029e75de7b69a41c32620aaa;p=sonarqube.git SONARCLOUD-301 Disable Custom Measures page on SonarCloud --- 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() && ( + + )}