diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2022-08-25 10:45:27 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-08-29 20:02:53 +0000 |
commit | 06f6244b0ae2fd288e05fbdd0bd077a0da9066c4 (patch) | |
tree | 5c1cc37e9aee4859a31321b83d32eafad07f2c14 /server/sonar-web/src/main/js/apps/projectDump | |
parent | c757692a0a8d02998bfd8839c2612e17011013a7 (diff) | |
download | sonarqube-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')
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 |