Browse Source

SONARCLOUD-301 Disable Custom Measures page on SonarCloud

tags/7.6
Wouter Admiraal 5 years ago
parent
commit
a0f2c285cc

+ 2
- 1
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx View 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 (

+ 6
- 4
server/sonar-web/src/main/js/app/utils/startReactApp.tsx View 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(() =>

Loading…
Cancel
Save