aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projectDump
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2022-08-25 10:45:27 +0200
committersonartech <sonartech@sonarsource.com>2022-08-29 20:02:53 +0000
commit06f6244b0ae2fd288e05fbdd0bd077a0da9066c4 (patch)
tree5c1cc37e9aee4859a31321b83d32eafad07f2c14 /server/sonar-web/src/main/js/apps/projectDump
parentc757692a0a8d02998bfd8839c2612e17011013a7 (diff)
downloadsonarqube-06f6244b0ae2fd288e05fbdd0bd077a0da9066c4.tar.gz
sonarqube-06f6244b0ae2fd288e05fbdd0bd077a0da9066c4.zip
SONAR-17027 Align the way we display links (internal & external) in the UI
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectDump')
-rw-r--r--server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Export-test.tsx.snap6
-rw-r--r--server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Import-test.tsx.snap4
4 files changed, 9 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx b/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx
index 37d4a78600b..473e17fbaec 100644
--- a/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx
+++ b/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx
@@ -19,6 +19,7 @@
*/
import * as React from 'react';
import { doExport } from '../../../api/project-dump';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import DateFromNow from '../../../components/intl/DateFromNow';
import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
@@ -110,9 +111,9 @@ export default class Export extends React.Component<Props> {
<div className="boxed-group-inner">
<Alert id="export-in-progress" variant="error">
{translate('project_dump.failed_export')}
- <a className="spacer-left" href={detailsUrl}>
+ <Link className="spacer-left" to={detailsUrl}>
{translate('project_dump.see_details')}
- </a>
+ </Link>
</Alert>
{this.renderExport()}
diff --git a/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx b/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx
index 39a28c846ef..39c61a03b37 100644
--- a/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx
+++ b/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx
@@ -19,8 +19,8 @@
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { doImport } from '../../../api/project-dump';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import DateFromNow from '../../../components/intl/DateFromNow';
import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
diff --git a/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Export-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Export-test.tsx.snap
index 788257b21d0..8e02d72a15c 100644
--- a/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Export-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Export-test.tsx.snap
@@ -126,12 +126,12 @@ exports[`should render correctly: task failed 1`] = `
variant="error"
>
project_dump.failed_export
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="/project/background_tasks?id=key&status=FAILED&taskType=PROJECT_EXPORT"
+ to="/project/background_tasks?id=key&status=FAILED&taskType=PROJECT_EXPORT"
>
project_dump.see_details
- </a>
+ </ForwardRef(Link)>
</Alert>
<div>
<div
diff --git a/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Import-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Import-test.tsx.snap
index 0c62310f98d..7c3c0bd960b 100644
--- a/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Import-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Import-test.tsx.snap
@@ -41,7 +41,7 @@ exports[`should render correctly: failed 1`] = `
variant="error"
>
project_dump.failed_import
- <Link
+ <ForwardRef(Link)
className="spacer-left"
to={
Object {
@@ -52,7 +52,7 @@ exports[`should render correctly: failed 1`] = `
}
>
project_dump.see_details
- </Link>
+ </ForwardRef(Link)>
</Alert>
<div>
<div