aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/details
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-06-29 15:44:13 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-07-04 16:29:36 +0200
commite843bd39520a3c97948b9920ae9db6c525cada95 (patch)
tree8c2dee8c762d70948a36a748cbb87b56c2bee937 /server/sonar-web/src/main/js/apps/quality-profiles/details
parent06ee234f17c62f3296deb212e9b1ab20d812db42 (diff)
downloadsonarqube-e843bd39520a3c97948b9920ae9db6c525cada95.tar.gz
sonarqube-e843bd39520a3c97948b9920ae9db6c525cada95.zip
SONAR-9483 Add link to the rules and highlight compared quality profiles
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/details')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.js8
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesSonarWayComparison-test.js.snap1
2 files changed, 8 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.js
index 97427ee1d34..edf0ab821b4 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.js
@@ -21,6 +21,7 @@
import React from 'react';
import { Link } from 'react-router';
import Tooltip from '../../../components/controls/Tooltip';
+import { getRulesUrl } from '../../../helpers/urls';
import { translate } from '../../../helpers/l10n';
type Props = {
@@ -31,6 +32,11 @@ type Props = {
};
export default function ProfileRulesSonarWayComparison(props: Props) {
+ const url = getRulesUrl(
+ { qprofile: props.profile, activation: false, compareToProfile: props.sonarway },
+ props.organization
+ );
+
return (
<div className="quality-profile-rules-sonarway-missing clearfix">
<span className="pull-left">
@@ -39,7 +45,7 @@ export default function ProfileRulesSonarWayComparison(props: Props) {
<i className="icon-help spacer-left" />
</Tooltip>
</span>
- <Link className="pull-right">
+ <Link className="pull-right" to={url}>
{props.sonarWayMissingRules}
</Link>
</div>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesSonarWayComparison-test.js.snap b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesSonarWayComparison-test.js.snap
index 6864b28e71b..9d9c67072bf 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesSonarWayComparison-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesSonarWayComparison-test.js.snap
@@ -21,6 +21,7 @@ exports[`should render correctly 1`] = `
className="pull-right"
onlyActiveOnIndex={false}
style={Object {}}
+ to="/organizations/foo/rules#qprofile=bar|activation=false|compareToProfile=baz"
>
158
</Link>