aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2020-05-01 10:50:58 +0200
committersonartech <sonartech@sonarsource.com>2020-05-05 20:03:43 +0000
commitd2dc8046525bb4538ca4d7ba4c5bc91346e31596 (patch)
treec8c97ea7a96e9a2cff883a07573b16c14eb1aa13 /server/sonar-web/src/main/js/apps/quality-profiles
parentb994ce6100ae6664b1b08aafbaf763cefdf582cb (diff)
downloadsonarqube-d2dc8046525bb4538ca4d7ba4c5bc91346e31596.tar.gz
sonarqube-d2dc8046525bb4538ca4d7ba4c5bc91346e31596.zip
SONAR-13342 Fix faulty links
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileProjects-test.tsx.snap1
2 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx
index 06ae37a2e10..74a9a425c92 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx
@@ -24,6 +24,7 @@ import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { getProfileProjects } from '../../../api/quality-profiles';
+import { getProjectUrl } from '../../../helpers/urls';
import { Profile } from '../types';
import ChangeProjectsForm from './ChangeProjectsForm';
@@ -141,9 +142,7 @@ export default class ProfileProjects extends React.PureComponent<Props, State> {
<ul>
{projects.map(project => (
<li className="spacer-top js-profile-project" data-key={project.key} key={project.key}>
- <Link
- className="link-with-icon"
- to={{ pathname: '/dashboard', query: { id: project.key } }}>
+ <Link className="link-with-icon" to={getProjectUrl(project.key)}>
<QualifierIcon qualifier="TRK" /> <span>{project.name}</span>
</Link>
</li>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileProjects-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileProjects-test.tsx.snap
index de37df033c2..32a90773230 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileProjects-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileProjects-test.tsx.snap
@@ -69,6 +69,7 @@ exports[`should render correctly 2`] = `
Object {
"pathname": "/dashboard",
"query": Object {
+ "branch": undefined,
"id": "org.sonarsource.xml:xml",
},
}