diff options
author | Mathieu Suen <mathieu.suen@sonarsource.com> | 2022-10-19 22:59:57 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-10-24 20:04:04 +0000 |
commit | eb249087f989c12a7e25c72a91a8eb7cd3ef0a9d (patch) | |
tree | 4b2cddd7eb1efdddf62978eceebc3b50d9093f95 /server/sonar-web/src/main/js/apps/quality-profiles/home | |
parent | 3e5e886cab8c75cc587f4978510343e29bc33d95 (diff) | |
download | sonarqube-eb249087f989c12a7e25c72a91a8eb7cd3ef0a9d.tar.gz sonarqube-eb249087f989c12a7e25c72a91a8eb7cd3ef0a9d.zip |
SONAR-17221 Documentation links change to static documentation site
- Remove markdown injection
- Redirection for old documentation link to the static site
- Drop the static documentation app
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/home')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx | 11 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/PageHeader-test.tsx.snap | 55 |
2 files changed, 18 insertions, 48 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx index 0280b5b11d2..d9811232f4c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Actions } from '../../../api/quality-profiles'; -import Link from '../../../components/common/Link'; +import DocLink from '../../../components/common/DocLink'; import { Button } from '../../../components/controls/buttons'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import { Alert } from '../../../components/ui/Alert'; @@ -106,14 +106,9 @@ export class PageHeader extends React.PureComponent<Props, State> { {translate('quality_profiles.intro1')} <br /> {translate('quality_profiles.intro2')} - <Link - className="spacer-left" - target="_blank" - to={{ - pathname: '/documentation/instance-administration/quality-profiles/' - }}> + <DocLink className="spacer-left" to="/instance-administration/quality-profiles/"> {translate('learn_more')} - </Link> + </DocLink> </div> {this.state.restoreFormOpen && ( diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/PageHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/PageHeader-test.tsx.snap index b56ff86f837..3b2de8d69bd 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/PageHeader-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/PageHeader-test.tsx.snap @@ -15,17 +15,12 @@ exports[`should render correctly 1`] = ` quality_profiles.intro1 <br /> quality_profiles.intro2 - <ForwardRef(Link) + <withAppStateContext(DocLink) className="spacer-left" - target="_blank" - to={ - Object { - "pathname": "/documentation/instance-administration/quality-profiles/", - } - } + to="/instance-administration/quality-profiles/" > learn_more - </ForwardRef(Link)> + </withAppStateContext(DocLink)> </div> </header> `; @@ -63,17 +58,12 @@ exports[`should render correctly 2`] = ` quality_profiles.intro1 <br /> quality_profiles.intro2 - <ForwardRef(Link) + <withAppStateContext(DocLink) className="spacer-left" - target="_blank" - to={ - Object { - "pathname": "/documentation/instance-administration/quality-profiles/", - } - } + to="/instance-administration/quality-profiles/" > learn_more - </ForwardRef(Link)> + </withAppStateContext(DocLink)> </div> </header> `; @@ -117,17 +107,12 @@ exports[`should render correctly 3`] = ` quality_profiles.intro1 <br /> quality_profiles.intro2 - <ForwardRef(Link) + <withAppStateContext(DocLink) className="spacer-left" - target="_blank" - to={ - Object { - "pathname": "/documentation/instance-administration/quality-profiles/", - } - } + to="/instance-administration/quality-profiles/" > learn_more - </ForwardRef(Link)> + </withAppStateContext(DocLink)> </div> </header> `; @@ -165,17 +150,12 @@ exports[`should show a create form 1`] = ` quality_profiles.intro1 <br /> quality_profiles.intro2 - <ForwardRef(Link) + <withAppStateContext(DocLink) className="spacer-left" - target="_blank" - to={ - Object { - "pathname": "/documentation/instance-administration/quality-profiles/", - } - } + to="/instance-administration/quality-profiles/" > learn_more - </ForwardRef(Link)> + </withAppStateContext(DocLink)> </div> <CreateProfileForm languages={ @@ -253,17 +233,12 @@ exports[`should show a restore form 1`] = ` quality_profiles.intro1 <br /> quality_profiles.intro2 - <ForwardRef(Link) + <withAppStateContext(DocLink) className="spacer-left" - target="_blank" - to={ - Object { - "pathname": "/documentation/instance-administration/quality-profiles/", - } - } + to="/instance-administration/quality-profiles/" > learn_more - </ForwardRef(Link)> + </withAppStateContext(DocLink)> </div> <RestoreProfileForm onClose={[Function]} |