]> source.dussan.org Git - sonarqube.git/commitdiff
SONARCLOUD-301 Disable Custom Measures page on SonarCloud
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Mon, 17 Dec 2018 12:46:53 +0000 (13:46 +0100)
committerSonarTech <sonartech@sonarsource.com>
Fri, 21 Dec 2018 19:21:01 +0000 (20:21 +0100)
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx
server/sonar-web/src/main/js/app/utils/startReactApp.tsx

index 7aeec61ee843c05eec598643933003700eae166b..88e197a430fc2148c3db25a55f5d84e5cf316b16 100644 (file)
@@ -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<Props> {
   }
 
   renderCustomMeasuresLink() {
-    if (!this.getConfiguration().showManualMeasures) {
+    if (isSonarCloud() || !this.getConfiguration().showManualMeasures) {
       return null;
     }
     return (
index 721abda0ba5357f2041ba3cb37e1120a21116841..3b224a1b3e5df59521f71dde11f784bb1ffca7cf 100644 (file)
@@ -232,10 +232,12 @@ export default function startReactApp(
                     childRoutes={projectQualityProfilesRoutes}
                   />
                   <Route component={lazyLoad(() => import('../components/ProjectAdminContainer'))}>
-                    <RouteWithChildRoutes
-                      path="custom_measures"
-                      childRoutes={customMeasuresRoutes}
-                    />
+                    {!isSonarCloud() && (
+                      <RouteWithChildRoutes
+                        path="custom_measures"
+                        childRoutes={customMeasuresRoutes}
+                      />
+                    )}
                     <Route
                       path="project/admin/extension/:pluginKey/:extensionKey"
                       component={lazyLoad(() =>