"dependencies": {
"@emotion/react": "11.10.0",
"@emotion/styled": "11.10.0",
- "@types/diff": "5.0.2",
"classnames": "2.3.1",
"clipboard": "2.0.11",
"core-js": "3.21.1",
"@types/d3-selection": "1.3.2",
"@types/d3-shape": "1.2.4",
"@types/d3-zoom": "1.7.3",
+ "@types/diff": "5.0.2",
"@types/dompurify": "2.3.3",
"@types/enzyme": "3.10.5",
"@types/jest": "27.4.1",
*/
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
-import { Link } from 'react-router-dom';
+import Link from '../../components/common/Link';
import { translate } from '../../helpers/l10n';
export default function ComponentContainerNotFound() {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import InstanceMessage from '../../components/common/InstanceMessage';
+import Link from '../../components/common/Link';
import { Alert } from '../../components/ui/Alert';
import { getEdition } from '../../helpers/editions';
import { translate, translateWithParameters } from '../../helpers/l10n';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../components/common/Link';
import { Button } from '../../components/controls/buttons';
import Modal from '../../components/controls/Modal';
import { isInput } from '../../helpers/keyboardEventHelpers';
*/
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
-import { Link } from 'react-router-dom';
+import Link from '../../components/common/Link';
import { translate } from '../../helpers/l10n';
import SimpleContainer from './SimpleContainer';
<li
className="page-footer-menu-item"
>
- <Link
+ <ForwardRef(Link)
to="/documentation"
>
footer.documentation
- </Link>
+ </ForwardRef(Link)>
</li>
<li
className="page-footer-menu-item"
<li
className="page-footer-menu-item"
>
- <Link
+ <ForwardRef(Link)
to="/web_api"
>
footer.web_api
- </Link>
+ </ForwardRef(Link)>
</li>
</ul>
</div>
<li
className="page-footer-menu-item"
>
- <Link
+ <ForwardRef(Link)
to="/documentation"
>
footer.documentation
- </Link>
+ </ForwardRef(Link)>
</li>
<li
className="page-footer-menu-item"
<li
className="page-footer-menu-item"
>
- <Link
+ <ForwardRef(Link)
to="/documentation"
>
footer.documentation
- </Link>
+ </ForwardRef(Link)>
</li>
<li
className="page-footer-menu-item"
<li
className="page-footer-menu-item"
>
- <Link
+ <ForwardRef(Link)
to="/web_api"
>
footer.web_api
- </Link>
+ </ForwardRef(Link)>
</li>
</ul>
</div>
<h2>
keyboard_shortcuts.title
</h2>
- <Link
+ <ForwardRef(Link)
onClick={[Function]}
to="/account"
>
keyboard_shortcuts.disable_link
- </Link>
+ </ForwardRef(Link)>
</div>
<div
className="modal-body modal-container markdown display-flex-start shortcuts-modal"
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { Alert, AlertProps } from '../../../components/ui/Alert';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { queryToSearch } from '../../../helpers/urls';
id="indexation.completed_with_error"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/background_tasks",
}
>
indexation.completed_with_error.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="indexation.admin_link"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/background_tasks",
}
>
background_tasks.page
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="indexation.progression_with_error"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/background_tasks",
}
>
indexation.progression_with_error.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import { last } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import QualifierIcon from '../../../../components/icons/QualifierIcon';
import { isMainBranch } from '../../../../helpers/branch-like';
import { getComponentOverviewUrl } from '../../../../helpers/urls';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { STATUSES } from '../../../../apps/background-tasks/constants';
+import Link from '../../../../components/common/Link';
import { Location, withRouter } from '../../../../components/hoc/withRouter';
import { Alert } from '../../../../components/ui/Alert';
import { hasMessage, translate } from '../../../../helpers/l10n';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { isValidLicense } from '../../../../api/editions';
+import Link from '../../../../components/common/Link';
import { Alert } from '../../../../components/ui/Alert';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { AppState } from '../../../../types/appstate';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../../../apps/settings/constants';
+import Link from '../../../../components/common/Link';
import { Alert } from '../../../../components/ui/Alert';
import { translate } from '../../../../helpers/l10n';
import { getProjectSettingsUrl } from '../../../../helpers/urls';
import * as React from 'react';
import { useIntl } from 'react-intl';
import BranchStatus from '../../../../components/common/BranchStatus';
+import Link from '../../../../components/common/Link';
import HomePageSelect from '../../../../components/controls/HomePageSelect';
-import DetachIcon from '../../../../components/icons/DetachIcon';
import { formatterOption } from '../../../../components/intl/DateTimeFormatter';
import { isBranch, isPullRequest } from '../../../../helpers/branch-like';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
{isPullRequest(branchLike) && (
<div className="navbar-context-meta-secondary display-inline-flex-center">
{branchLike.url !== undefined && (
- <a
- className="display-inline-flex-center big-spacer-right"
- href={branchLike.url}
- rel="noopener noreferrer"
- target="_blank">
+ <Link
+ className="link-no-underline big-spacer-right"
+ to={branchLike.url}
+ target="_blank"
+ size={12}>
{translate('branches.see_the_pr')}
- <DetachIcon className="little-spacer-left" size={12} />
- </a>
+ </Link>
)}
<BranchStatus branchLike={branchLike} component={component} />
</div>
>
Foo
</span>
- <Link
+ <ForwardRef(Link)
to="/admin/extension/license/app"
>
license.component_navigation.button.LICENSING
.
- </Link>
+ </ForwardRef(Link)>
</Alert>
`;
>
Foo
</span>
- <Link
+ <ForwardRef(Link)
to="/admin/extension/license/app"
>
license.component_navigation.button.LICENSING_LOC
.
- </Link>
+ </ForwardRef(Link)>
</Alert>
`;
id="component_navigation.pr_deco.error_detected_X"
values={
Object {
- "action": <Link
+ "action": <ForwardRef(Link)
to={
Object {
"pathname": "/project/settings",
}
>
component_navigation.pr_deco.action.check_project_settings
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
<div
className="navbar-context-meta-secondary display-inline-flex-center"
>
- <a
- className="display-inline-flex-center big-spacer-right"
- href="https://example.com/pull/1234"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
+ className="link-no-underline big-spacer-right"
+ size={12}
target="_blank"
+ to="https://example.com/pull/1234"
>
branches.see_the_pr
- <DetachIcon
- className="little-spacer-left"
- size={12}
- />
- </a>
+ </ForwardRef(Link)>
<withBranchStatus(BranchStatus)
branchLike={
Object {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import DocumentationTooltip from '../../../../../components/common/DocumentationTooltip';
+import Link from '../../../../../components/common/Link';
import HelpTooltip from '../../../../../components/controls/HelpTooltip';
import BranchLikeIcon from '../../../../../components/icons/BranchLikeIcon';
import DropdownIcon from '../../../../../components/icons/DropdownIcon';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../../components/common/Link';
import { DropdownOverlay } from '../../../../../components/controls/Dropdown';
import SearchBox from '../../../../../components/controls/SearchBox';
import { Router, withRouter } from '../../../../../components/hoc/withRouter';
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../../../components/common/Link';
import SearchBox from '../../../../../../components/controls/SearchBox';
import { KeyboardKeys } from '../../../../../../helpers/keycodes';
import {
<hr
className="spacer-top spacer-bottom"
/>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/project/admin/extension/developer-server/application-console",
}
>
application.branches.link
- </Link>
+ </ForwardRef(Link)>
</React.Fragment>
}
>
<div
className="hint-container text-right"
>
- <Link
+ <ForwardRef(Link)
onClick={[Function]}
to={
Object {
}
>
branch_like_navigation.manage
- </Link>
+ </ForwardRef(Link)>
</div>
</DropdownOverlay>
`;
<div
className="hint-container text-right"
>
- <Link
+ <ForwardRef(Link)
onClick={[Function]}
to={
Object {
}
>
branch_like_navigation.manage
- </Link>
+ </ForwardRef(Link)>
</div>
</DropdownOverlay>
`;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../../../components/common/Link';
import { translate } from '../../../../../../helpers/l10n';
import { getQualityGateUrl } from '../../../../../../helpers/urls';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { searchRules } from '../../../../../../api/rules';
+import Link from '../../../../../../components/common/Link';
import Tooltip from '../../../../../../components/controls/Tooltip';
import { translate, translateWithParameters } from '../../../../../../helpers/l10n';
import { getQualityProfileUrl } from '../../../../../../helpers/urls';
CSS
)
</span>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/profiles/show",
>
name
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</li>
</ul>
CSS
)
</span>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/profiles/show",
>
name
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</li>
</Tooltip>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { translate } from '../../../../helpers/l10n';
import { getBaseUrl } from '../../../../helpers/system';
import { AppState } from '../../../../types/appstate';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link, NavLink } from 'react-router-dom';
+import { NavLink } from 'react-router-dom';
import { isMySet } from '../../../../apps/issues/utils';
+import Link from '../../../../components/common/Link';
import Dropdown from '../../../../components/controls/Dropdown';
import DropdownIcon from '../../../../components/icons/DropdownIcon';
import { translate } from '../../../../helpers/l10n';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import Dropdown from '../../../../components/controls/Dropdown';
import { Router, withRouter } from '../../../../components/hoc/withRouter';
import Avatar from '../../../../components/ui/Avatar';
renderAnonymous() {
return (
<div>
- <a className="navbar-login" href="/sessions/new" onClick={this.handleLogin}>
+ <Link className="navbar-login" to="/sessions/new" onClick={this.handleLogin}>
{translate('layout.login')}
- </a>
+ </Link>
</div>
);
}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly: default 1`] = `
-<Link
+<ForwardRef(Link)
className="navbar-brand"
to="/"
>
title="layout.sonar.slogan"
width={83}
/>
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render correctly: with logo 1`] = `
-<Link
+<ForwardRef(Link)
className="navbar-brand"
to="/"
>
title="layout.sonar.slogan"
width={100}
/>
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render correctly: with logo and width 1`] = `
-<Link
+<ForwardRef(Link)
className="navbar-brand"
to="/"
>
title="layout.sonar.slogan"
width="200"
/>
-</Link>
+</ForwardRef(Link)>
`;
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { Alert } from '../../../../components/ui/Alert';
import { translate } from '../../../../helpers/l10n';
import { getInstance } from '../../../../helpers/system';
values={
Object {
"instance": undefined,
- "link": <Link
+ "link": <ForwardRef(Link)
to="/admin/background_tasks"
>
background_tasks.page
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import ClockIcon from '../../../components/icons/ClockIcon';
import FavoriteIcon from '../../../components/icons/FavoriteIcon';
import QualifierIcon from '../../../components/icons/QualifierIcon';
key="foo"
role="option"
>
- <Link
+ <ForwardRef(Link)
data-key="foo"
onClick={[MockFunction]}
onFocus={[Function]}
foo
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
key="foo"
role="option"
>
- <Link
+ <ForwardRef(Link)
data-key="foo"
onClick={[MockFunction]}
onFocus={[Function]}
foo
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
key="foo"
role="option"
>
- <Link
+ <ForwardRef(Link)
data-key="foo"
onClick={[MockFunction]}
onFocus={[Function]}
foo
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
key="foo"
role="option"
>
- <Link
+ <ForwardRef(Link)
data-key="foo"
onClick={[MockFunction]}
onFocus={[Function]}
foo
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
key="foo"
role="option"
>
- <Link
+ <ForwardRef(Link)
data-key="foo"
onClick={[MockFunction]}
onFocus={[Function]}
foo
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
import { getSystemUpgrades } from '../../../../api/system';
import { Alert } from '../../../../components/ui/Alert';
import DismissableAlert from '../../../../components/ui/DismissableAlert';
-import { mockUpgrades } from '../../../../helpers/mocks/system-upgrades';
+import { mockSystemUpgrade } from '../../../../helpers/mocks/system-upgrades';
import { mockAppState, mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
import { waitAndUpdate } from '../../../../helpers/testUtils';
import { Permissions } from '../../../../types/permissions';
import { UpdateNotification } from '../UpdateNotification';
jest.mock('../../../../api/system', () => {
- const { mockUpgrades } = jest.requireActual('../../../../helpers/mocks/system-upgrades');
+ const { mockSystemUpgrade } = jest.requireActual('../../../../helpers/mocks/system-upgrades');
return {
getSystemUpgrades: jest
.fn()
- .mockResolvedValue({ upgrades: [mockUpgrades({ version: '9.1' })], latestLTS: '8.9' })
+ .mockResolvedValue({ upgrades: [mockSystemUpgrade({ version: '9.1' })], latestLTS: '8.9' })
};
});
it('should show prompt when no lts date', async () => {
(getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
- upgrades: [mockUpgrades({ version: '8.9', releaseDate: 'INVALID' })],
+ upgrades: [mockSystemUpgrade({ version: '8.9', releaseDate: 'INVALID' })],
latestLTS: '8.9'
});
const wrapper = shallowRender({
it('should show prompt when minor upgrade', async () => {
(getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
- upgrades: [mockUpgrades({ version: '9.2' }), mockUpgrades({ version: '9.1' })],
+ upgrades: [mockSystemUpgrade({ version: '9.2' }), mockSystemUpgrade({ version: '9.1' })],
latestLTS: '8.9'
});
const wrapper = shallowRender({
it('should show prompt when patch upgrade', async () => {
(getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
- upgrades: [mockUpgrades({ version: '9.2' }), mockUpgrades({ version: '9.1.1' })],
+ upgrades: [mockSystemUpgrade({ version: '9.2' }), mockSystemUpgrade({ version: '9.1.1' })],
latestLTS: '8.9'
});
const wrapper = shallowRender({
it('should show prompt when lts upgrade', async () => {
(getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
upgrades: [
- mockUpgrades({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
- mockUpgrades({ version: '9.2' }),
- mockUpgrades({ version: '9.1.1' })
+ mockSystemUpgrade({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
+ mockSystemUpgrade({ version: '9.2' }),
+ mockSystemUpgrade({ version: '9.1.1' })
],
latestLTS: '8.9'
});
ltsDate.setMonth(ltsDate.getMonth() - 7);
(getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
upgrades: [
- mockUpgrades({ version: '8.9', releaseDate: formatDate(ltsDate) }),
- mockUpgrades({ version: '9.2' }),
- mockUpgrades({ version: '9.1.1' })
+ mockSystemUpgrade({ version: '8.9', releaseDate: formatDate(ltsDate) }),
+ mockSystemUpgrade({ version: '9.2' }),
+ mockSystemUpgrade({ version: '9.1.1' })
],
latestLTS: '8.9'
});
it('should show correct alert when not dismissable', async () => {
(getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
upgrades: [
- mockUpgrades({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
- mockUpgrades({ version: '9.2' }),
- mockUpgrades({ version: '9.1.1' })
+ mockSystemUpgrade({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
+ mockSystemUpgrade({ version: '9.2' }),
+ mockSystemUpgrade({ version: '9.1.1' })
],
latestLTS: '8.9'
});
border-bottom-color: var(--primary);
}
+a svg,
+a img {
+ vertical-align: middle;
+}
+
.link-no-underline {
border-bottom-color: transparent !important;
}
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import MetaLink from '../../../app/components/nav/component/projectInformation/meta/MetaLink';
+import Link from '../../../components/common/Link';
import HelpTooltip from '../../../components/controls/HelpTooltip';
import DateFromNow from '../../../components/intl/DateFromNow';
import Level from '../../../components/ui/Level';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import DateRangeInput from '../../../components/controls/DateRangeInput';
import Radio from '../../../components/controls/Radio';
import Suggestions from '../../../components/embed-docs-modal/Suggestions';
values={
Object {
"housekeeping": "audit_logs.housekeeping_policy.Monthly",
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"hash": "#auditLogs",
}
>
audit_logs.page.description.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
values={
Object {
"housekeeping": "audit_logs.housekeeping_policy.Trimestrial",
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"hash": "#auditLogs",
}
>
audit_logs.page.description.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
values={
Object {
"housekeeping": "audit_logs.housekeeping_policy.Weekly",
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"hash": "#auditLogs",
}
>
audit_logs.page.description.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
values={
Object {
"housekeeping": "audit_logs.housekeeping_policy.Yearly",
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"hash": "#auditLogs",
}
>
audit_logs.page.description.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
import Workers from './Workers';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
export default function NoWorkersSupportPopup() {
{translate('background_tasks.add_more_workers.text')}
</p>
<p>
- <a
- href="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
- rel="noopener noreferrer"
+ <Link
+ to="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
target="_blank">
{translate('learn_more')}
- </a>
+ </Link>
</p>
</>
);
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import BranchIcon from '../../../components/icons/BranchIcon';
import PullRequestIcon from '../../../components/icons/PullRequestIcon';
import QualifierIcon from '../../../components/icons/QualifierIcon';
background_tasks.add_more_workers.text
</p>
<p>
- <a
- href="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
target="_blank"
+ to="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
>
learn_more
- </a>
+ </ForwardRef(Link)>
</p>
</Fragment>
`;
qualifier="TRK"
/>
</span>
- <Link
+ <ForwardRef(Link)
className="spacer-right"
to={
Object {
}
>
Foo
- </Link>
+ </ForwardRef(Link)>
<TaskType
type="REPORT"
/>
<BranchIcon
className="little-spacer-right"
/>
- <Link
+ <ForwardRef(Link)
className="spacer-right"
to={
Object {
</span>
feature
</span>
- </Link>
+ </ForwardRef(Link)>
<TaskType
type="REPORT"
/>
<BranchIcon
className="little-spacer-right"
/>
- <Link
+ <ForwardRef(Link)
className="spacer-right"
to={
Object {
</span>
branch-6.7
</span>
- </Link>
+ </ForwardRef(Link)>
<TaskType
type="REPORT"
/>
qualifier="VW"
/>
</span>
- <Link
+ <ForwardRef(Link)
className="spacer-right"
to={
Object {
}
>
Foo
- </Link>
+ </ForwardRef(Link)>
<TaskType
type="REPORT"
/>
<PullRequestIcon
className="little-spacer-right"
/>
- <Link
+ <ForwardRef(Link)
className="spacer-right"
to={
Object {
</span>
pr-89
</span>
- </Link>
+ </ForwardRef(Link)>
<TaskType
type="REPORT"
/>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
import BranchIcon from '../../../components/icons/BranchIcon';
import QualifierIcon from '../../../components/icons/QualifierIcon';
import { getBranchLikeQuery } from '../../../helpers/branch-like';
foo:src/index.tsx"
>
- <Link
+ <ForwardRef(Link)
className="display-inline-flex-center link-no-underline"
to={
Object {
<span>
index.tsx
</span>
- </Link>
+ </ForwardRef(Link)>
</span>
`;
foo"
>
- <Link
+ <ForwardRef(Link)
className="display-inline-flex-center link-no-underline"
to={
Object {
<span>
Foo
</span>
- </Link>
+ </ForwardRef(Link)>
</span>
`;
foo"
>
- <Link
+ <ForwardRef(Link)
className="display-inline-flex-center link-no-underline"
to={
Object {
<span>
Foo
</span>
- </Link>
+ </ForwardRef(Link)>
</span>
<span
className="text-ellipsis spacer-left"
foo"
>
- <Link
+ <ForwardRef(Link)
className="display-inline-flex-center link-no-underline"
to={
Object {
<span>
Foo
</span>
- </Link>
+ </ForwardRef(Link)>
</span>
<span
className="spacer-left badge flex-1"
expect(screen.getByText('coding_rules.context.others.description.first')).toBeInTheDocument();
const productBoardLink = screen.getByRole('link', {
- name: 'coding_rules.context.others.feedback_description.link'
+ name: 'opens_in_new_window coding_rules.context.others.feedback_description.link'
});
expect(productBoardLink).toBeInTheDocument();
expect(productBoardLink).toHaveAttribute('target', '_blank');
*/
import { sortBy } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { deleteRule, searchRules } from '../../../api/rules';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import ConfirmButton from '../../../components/controls/ConfirmButton';
import SeverityHelper from '../../../components/shared/SeverityHelper';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { getFacet } from '../../../api/issues';
import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
+import Link from '../../../components/common/Link';
import Tooltip from '../../../components/controls/Tooltip';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
import { translate } from '../../../helpers/l10n';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { ButtonLink } from '../../../components/controls/buttons';
import Dropdown from '../../../components/controls/Dropdown';
import HelpTooltip from '../../../components/controls/HelpTooltip';
*/
import { filter } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { activateRule, deactivateRule, Profile } from '../../../api/quality-profiles';
import InstanceMessage from '../../../components/common/InstanceMessage';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import ConfirmButton from '../../../components/controls/ConfirmButton';
import Tooltip from '../../../components/controls/Tooltip';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { deactivateRule, Profile } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import ConfirmButton from '../../../components/controls/ConfirmButton';
import Tooltip from '../../../components/controls/Tooltip';
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { deactivateRule } from '../../../../api/quality-profiles';
+import Link from '../../../../components/common/Link';
import { mockQualityProfile, mockRule } from '../../../../helpers/testMocks';
import { mockEvent, waitAndUpdate } from '../../../../helpers/testUtils';
import RuleListItem from '../RuleListItem';
className="little-spacer-left"
>
(
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/issues",
}
>
18
- </Link>
+ </ForwardRef(Link)>
)
</span>
</h2>
<td
className="coding-rules-detail-list-parameters"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/issues",
}
>
13
- </Link>
+ </ForwardRef(Link)>
</td>
</tr>
<tr
<td
className="coding-rules-detail-list-parameters"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/issues",
}
>
5
- </Link>
+ </ForwardRef(Link)>
</td>
</tr>
</tbody>
>
squid:S1133
</span>
- <Link
+ <ForwardRef(Link)
className="coding-rules-detail-permalink link-no-underline spacer-left text-middle"
title="permalink"
to={
}
>
<LinkIcon />
- </Link>
+ </ForwardRef(Link)>
<SimilarRulesFilter
onFilterChange={[MockFunction]}
rule={
<div
className="coding-rule-title"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
onClick={[Function]}
to={
}
>
Use foo
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
<td
<div
className="coding-rule-title"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
onClick={[Function]}
to={
}
>
Use foo
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
<td
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import LanguageDistribution from '../../../components/charts/LanguageDistribution';
+import Link from '../../../components/common/Link';
import Tooltip from '../../../components/controls/Tooltip';
import HistoryIcon from '../../../components/icons/HistoryIcon';
import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
<Tooltip
overlay="component_measures.show_metric_history"
>
- <Link
+ <ForwardRef(Link)
className="js-show-history spacer-left button button-small"
to={
Object {
}
>
<HistoryIcon />
- </Link>
+ </ForwardRef(Link)>
</Tooltip>
</div>
<div
<Tooltip
overlay="component_measures.show_metric_history"
>
- <Link
+ <ForwardRef(Link)
className="js-show-history spacer-left button button-small"
to={
Object {
}
>
<HistoryIcon />
- </Link>
+ </ForwardRef(Link)>
</Tooltip>
</div>
<div
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import OriginalBubbleChart from '../../../components/charts/BubbleChart';
import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend';
+import Link from '../../../components/common/Link';
import HelpTooltip from '../../../components/controls/HelpTooltip';
import { RATING_COLORS } from '../../../helpers/constants';
import {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link, To } from 'react-router-dom';
+import { To } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import BranchIcon from '../../../components/icons/BranchIcon';
import LinkIcon from '../../../components/icons/LinkIcon';
import QualifierIcon from '../../../components/icons/QualifierIcon';
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import {
mockComponentMeasure,
mockComponentMeasureEnhanced
<div
className="text-center small spacer-top spacer-bottom"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/component_measures",
}
>
component_measures.overview.see_data_as_list
- </Link>
+ </ForwardRef(Link)>
</div>
<BubbleChart
displayXGrid={true}
<div
className="text-center small spacer-top spacer-bottom"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/component_measures",
}
>
component_measures.overview.see_data_as_list
- </Link>
+ </ForwardRef(Link)>
</div>
<BubbleChart
displayXGrid={true}
<div
className="text-center small spacer-top spacer-bottom"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/component_measures",
}
>
component_measures.overview.see_data_as_list
- </Link>
+ </ForwardRef(Link)>
</div>
<BubbleChart
displayXGrid={true}
<div
className="text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
id="component-measures-component-link-foo"
to={
develop
</span>
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
`;
<div
className="text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
id="component-measures-component-link-foo"
to={
branches.main_branch
</span>
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
`;
<div
className="text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
id="component-measures-component-link-foo"
to={
Foo
</span>
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
`;
<div
className="text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
id="component-measures-component-link-foo"
to={
Foo
</span>
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
`;
<div
className="text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
id="component-measures-component-link-foo"
to={
develop
</span>
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
`;
<div
className="text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
id="component-measures-component-link-foo"
to={
branches.main_branch
</span>
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
`;
<div
className="text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
id="component-measures-component-link-foo:src/index.tsx"
to={
index.tsx
</span>
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
`;
import classNames from 'classnames';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
+import Link from '../../../components/common/Link';
import { SubmitButton } from '../../../components/controls/buttons';
import ValidationInput from '../../../components/controls/ValidationInput';
-import DetachIcon from '../../../components/icons/DetachIcon';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
import { translate } from '../../../helpers/l10n';
import { AlmSettingsInstance } from '../../../types/alm-settings';
defaultMessage={translate('onboarding.create_project.pat_help.instructions', alm)}
values={{
link: url ? (
- <a
- className="link-no-underline"
- href={getAzurePatUrl(url)}
- rel="noopener noreferrer"
- target="_blank">
- <DetachIcon className="little-spacer-right" />
- <span>
- {translate('onboarding.create_project.pat_help.instructions.link', alm)}
- </span>
- </a>
+ <Link className="link-no-underline" to={getAzurePatUrl(url)} target="_blank">
+ {translate('onboarding.create_project.pat_help.instructions.link', alm)}
+ </Link>
) : (
translate('onboarding.create_project.pat_help.instructions.link', alm)
),
import classNames from 'classnames';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';
import ListFooter from '../../../components/controls/ListFooter';
import Radio from '../../../components/controls/Radio';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import SearchBox from '../../../components/controls/SearchBox';
import { Alert } from '../../../components/ui/Alert';
import { uniqBy } from 'lodash';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import ListFooter from '../../../components/controls/ListFooter';
import { Alert } from '../../../components/ui/Alert';
import { translate, translateWithParameters } from '../../../helpers/l10n';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import SearchBox from '../../../components/controls/SearchBox';
import Tooltip from '../../../components/controls/Tooltip';
import CheckIcon from '../../../components/icons/CheckIcon';
-import DetachIcon from '../../../components/icons/DetachIcon';
import QualifierIcon from '../../../components/icons/QualifierIcon';
import { Alert } from '../../../components/ui/Alert';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
</Tooltip>
</td>
<td>
- <a
+ <Link
className="display-inline-flex-center big-spacer-right"
- href={getRepositoryUrl(repository.workspace, repository.slug)}
- rel="noopener noreferrer"
+ to={getRepositoryUrl(repository.workspace, repository.slug)}
target="_blank">
- <DetachIcon className="little-spacer-right" />
{translate('onboarding.create_project.bitbucketcloud.link')}
- </a>
+ </Link>
</td>
{repository.sqProjectKey ? (
<td>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import SearchBox from '../../../components/controls/SearchBox';
import { Alert } from '../../../components/ui/Alert';
import { translate } from '../../../helpers/l10n';
import classNames from 'classnames';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';
import Radio from '../../../components/controls/Radio';
import CheckIcon from '../../../components/icons/CheckIcon';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import ListFooter from '../../../components/controls/ListFooter';
import Radio from '../../../components/controls/Radio';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import ListFooter from '../../../components/controls/ListFooter';
import SearchBox from '../../../components/controls/SearchBox';
import Tooltip from '../../../components/controls/Tooltip';
import CheckIcon from '../../../components/icons/CheckIcon';
-import DetachIcon from '../../../components/icons/DetachIcon';
import QualifierIcon from '../../../components/icons/QualifierIcon';
import { Alert } from '../../../components/ui/Alert';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
</Tooltip>
</td>
<td>
- <a
+ <Link
className="display-inline-flex-center big-spacer-right"
- href={project.url}
- rel="noopener noreferrer"
+ to={project.url}
target="_blank">
- <DetachIcon className="little-spacer-right" />
{translate('onboarding.create_project.gitlab.link')}
- </a>
+ </Link>
</td>
{project.sqProjectKey ? (
<td>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { Alert } from '../../../components/ui/Alert';
import { translate } from '../../../helpers/l10n';
import { getGlobalSettingsUrl } from '../../../helpers/urls';
id="onboarding.create_project.pat_help.instructions"
values={
Object {
- "link": <a
+ "link": <ForwardRef(Link)
className="link-no-underline"
- href="http://www.example.com/_usersSettings/tokens"
- rel="noopener noreferrer"
target="_blank"
+ to="http://www.example.com/_usersSettings/tokens"
>
- <DetachIcon
- className="little-spacer-right"
- />
- <span>
- onboarding.create_project.pat_help.instructions.link.azure
- </span>
- </a>,
+ onboarding.create_project.pat_help.instructions.link.azure
+ </ForwardRef(Link)>,
"scope": <strong>
<em>
Code (Read & Write)
id="onboarding.create_project.pat_help.instructions"
values={
Object {
- "link": <a
+ "link": <ForwardRef(Link)
className="link-no-underline"
- href="http://www.example.com/_usersSettings/tokens"
- rel="noopener noreferrer"
target="_blank"
+ to="http://www.example.com/_usersSettings/tokens"
>
- <DetachIcon
- className="little-spacer-right"
- />
- <span>
- onboarding.create_project.pat_help.instructions.link.azure
- </span>
- </a>,
+ onboarding.create_project.pat_help.instructions.link.azure
+ </ForwardRef(Link)>,
"scope": <strong>
<em>
Code (Read & Write)
id="onboarding.create_project.pat_help.instructions"
values={
Object {
- "link": <a
+ "link": <ForwardRef(Link)
className="link-no-underline"
- href="http://www.example.com/_usersSettings/tokens"
- rel="noopener noreferrer"
target="_blank"
+ to="http://www.example.com/_usersSettings/tokens"
>
- <DetachIcon
- className="little-spacer-right"
- />
- <span>
- onboarding.create_project.pat_help.instructions.link.azure
- </span>
- </a>,
+ onboarding.create_project.pat_help.instructions.link.azure
+ </ForwardRef(Link)>,
"scope": <strong>
<em>
Code (Read & Write)
<div
className="little-spacer-bottom text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
title="SQ Name"
to={
Object {
}
>
SQ Name
- </Link>
+ </ForwardRef(Link)>
</div>
<em>
onboarding.create_project.repository_imported
<div
className="little-spacer-bottom text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
title="SQ Name"
to={
Object {
}
>
SQ Name
- </Link>
+ </ForwardRef(Link)>
</div>
<em>
onboarding.create_project.repository_imported
values={
Object {
"alm": "onboarding.alm.azure",
- "url": <Link
+ "url": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/settings",
}
>
settings.page
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.create_project.azure.no_projects"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/projects/create",
}
>
onboarding.create_project.update_your_token
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.create_project.bitbucketcloud.no_projects"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/projects/create",
}
>
onboarding.create_project.update_your_token
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://bitbucket.org/worksapce/import-slug"
- rel="noopener noreferrer"
target="_blank"
+ to="https://bitbucket.org/worksapce/import-slug"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.bitbucketcloud.link
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<strong
className="project-name display-inline-block text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
qualifier="TRK"
/>
Repo
- </Link>
+ </ForwardRef(Link)>
</strong>
</Tooltip>
<br />
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://bitbucket.org/worksapce/project__repo"
- rel="noopener noreferrer"
target="_blank"
+ to="https://bitbucket.org/worksapce/project__repo"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.bitbucketcloud.link
- </a>
+ </ForwardRef(Link)>
</td>
<td>
<span
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://bitbucket.org/worksapce/project__repo"
- rel="noopener noreferrer"
target="_blank"
+ to="https://bitbucket.org/worksapce/project__repo"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.bitbucketcloud.link
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://bitbucket.org/worksapce/project__repo"
- rel="noopener noreferrer"
target="_blank"
+ to="https://bitbucket.org/worksapce/project__repo"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.bitbucketcloud.link
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<strong
className="project-name display-inline-block text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
qualifier="TRK"
/>
Repo
- </Link>
+ </ForwardRef(Link)>
</strong>
</Tooltip>
<br />
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://bitbucket.org/worksapce/project__repo"
- rel="noopener noreferrer"
target="_blank"
+ to="https://bitbucket.org/worksapce/project__repo"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.bitbucketcloud.link
- </a>
+ </ForwardRef(Link)>
</td>
<td>
<span
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://bitbucket.org/worksapce/project__repo"
- rel="noopener noreferrer"
target="_blank"
+ to="https://bitbucket.org/worksapce/project__repo"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.bitbucketcloud.link
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
id="onboarding.create_project.no_bbs_projects"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/projects/create",
}
>
onboarding.create_project.update_your_token
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
<strong
title="Bar"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Bar
- </Link>
+ </ForwardRef(Link)>
</strong>
</div>
<em>
<strong
title="Bar"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Bar
- </Link>
+ </ForwardRef(Link)>
</strong>
</div>
<em>
<strong
title="Bar"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Bar
- </Link>
+ </ForwardRef(Link)>
</strong>
</div>
<em>
<strong
title="Bar"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Bar
- </Link>
+ </ForwardRef(Link)>
</strong>
</div>
<em>
id="onboarding.create_project.no_bbs_repos"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/projects/create",
}
>
onboarding.create_project.update_your_token
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
<strong
title="Bar"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Bar
- </Link>
+ </ForwardRef(Link)>
</strong>
</div>
<em>
<strong
title="Bar"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Bar
- </Link>
+ </ForwardRef(Link)>
</strong>
</div>
<em>
id="onboarding.create_project.github.warning.message_admin"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to="/admin/settings?category=almintegration"
>
onboarding.create_project.github.warning.message_admin.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
<div
className="display-flex-center max-width-100"
>
- <Link
+ <ForwardRef(Link)
className="display-flex-center max-width-60"
to={
Object {
>
repository 1
</span>
- </Link>
+ </ForwardRef(Link)>
<em
className="display-flex-center small big-spacer-left flex-0"
>
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
- rel="noopener noreferrer"
target="_blank"
+ to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.gitlab.link
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<strong
className="project-name display-inline-block text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
qualifier="TRK"
/>
Already Imported
- </Link>
+ </ForwardRef(Link)>
</strong>
</Tooltip>
<br />
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
- rel="noopener noreferrer"
target="_blank"
+ to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.gitlab.link
- </a>
+ </ForwardRef(Link)>
</td>
<td>
<span
id="onboarding.create_project.gitlab.no_projects"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/projects/create",
}
>
onboarding.create_project.update_your_token
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
- rel="noopener noreferrer"
target="_blank"
+ to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.gitlab.link
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<strong
className="project-name display-inline-block text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
qualifier="TRK"
/>
Already Imported
- </Link>
+ </ForwardRef(Link)>
</strong>
</Tooltip>
<br />
</Tooltip>
</td>
<td>
- <a
+ <ForwardRef(Link)
className="display-inline-flex-center big-spacer-right"
- href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
- rel="noopener noreferrer"
target="_blank"
+ to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
>
- <DetachIcon
- className="little-spacer-right"
- />
onboarding.create_project.gitlab.link
- </a>
+ </ForwardRef(Link)>
</td>
<td>
<span
id="onboarding.create_project.gitlab.no_projects"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/projects/create",
}
>
onboarding.create_project.update_your_token
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
values={
Object {
"alm": "onboarding.alm.bitbucket",
- "url": <Link
+ "url": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/settings",
}
>
settings.page
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
import { DocNavigationItem } from 'Docs/@types/types';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
-import { Link, useLocation, useParams } from 'react-router-dom';
+import { useLocation, useParams } from 'react-router-dom';
import { getInstalledPlugins } from '../../../api/plugins';
import { getPluginStaticFileContent } from '../../../api/static';
import NotFound from '../../../app/components/NotFound';
import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
+import Link from '../../../components/common/Link';
import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
import DocMarkdownBlock from '../../../components/docs/DocMarkdownBlock';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { testPathAgainstUrl } from '../navTreeUtils';
import { DocumentationEntry } from '../utils';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { Dict } from '../../../types/types';
import { cutWords, DocumentationEntry, highlightMarks } from '../utils';
label="documentation.skip_to_nav"
weight={10}
/>
- <Link
+ <ForwardRef(Link)
to="/documentation/"
>
<h1>
documentation.page
</h1>
- </Link>
+ </ForwardRef(Link)>
</div>
<Sidebar
navigation={
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should not render a high depth differently than a depth of 3 1`] = `
-<Link
+<ForwardRef(Link)
className="list-group-item depth-3"
key="/bar"
to="/documentation/bar"
<h3
className="list-group-item-heading"
/>
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render correctly 1`] = `
-<Link
+<ForwardRef(Link)
className="list-group-item"
key="/bar"
to="/documentation/bar"
<h3
className="list-group-item-heading"
/>
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render correctly if the current node matches the splat 1`] = `
-<Link
+<ForwardRef(Link)
className="list-group-item active"
key="/bar"
to="/documentation/bar"
<h3
className="list-group-item-heading"
/>
-</Link>
+</ForwardRef(Link)>
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SearchResultEntry should render 1`] = `
-<Link
+<ForwardRef(Link)
className="list-group-item active"
to="/documentation/foo/bar"
>
}
}
/>
-</Link>
+</ForwardRef(Link)>
`;
exports[`SearchResultText should correctly extract exact matches 1`] = `
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { setIssueAssignee } from '../../../api/issues';
+import Link from '../../../components/common/Link';
import LinkIcon from '../../../components/icons/LinkIcon';
import { updateIssue } from '../../../components/issue/actions';
import IssueActionsBar from '../../../components/issue/components/IssueActionsBar';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { ButtonIcon } from '../../../components/controls/buttons';
import { ClipboardIconButton } from '../../../components/controls/clipboard';
import ExpandSnippetIcon from '../../../components/icons/ExpandSnippetIcon';
<div
className="flex-0 big-spacer-left"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"hash": "",
}
>
source_viewer.view_all_issues
- </Link>
+ </ForwardRef(Link)>
</div>
<DeferredSpinner
className="little-spacer-right"
<div
className="flex-0 big-spacer-left"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"hash": "",
}
>
source_viewer.view_all_issues
- </Link>
+ </ForwardRef(Link)>
</div>
<DeferredSpinner
className="little-spacer-right"
<div
className="flex-0 big-spacer-left"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"hash": "",
}
>
source_viewer.view_all_issues
- </Link>
+ </ForwardRef(Link)>
</div>
<DeferredSpinner
className="little-spacer-right"
import { FormattedMessage } from 'react-intl';
import { getMigrationStatus, getSystemStatus, migrateDatabase } from '../../../api/system';
import InstanceMessage from '../../../components/common/InstanceMessage';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import DateFromNow from '../../../components/intl/DateFromNow';
import TimeFormatter from '../../../components/intl/TimeFormatter';
{translate('maintenance.all_systems_opetational')}
</p>
<p className="maintenance-text text-center">
- <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+ <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
</p>
</>
)}
id="maintenance.sonarqube_is_under_maintenance.1"
values={{
link: (
- <a
- href="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
- target="_blank"
- rel="noopener noreferrer">
+ <Link
+ to="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
+ target="_blank">
{translate('maintenance.sonarqube_is_under_maintenance_link.1')}
- </a>
+ </Link>
)
}}
/>
id="maintenance.sonarqube_is_under_maintenance.2"
values={{
link: (
- <a
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- target="_blank"
- rel="noopener noreferrer">
+ <Link
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
+ target="_blank">
{translate('maintenance.sonarqube_is_under_maintenance_link.2')}
- </a>
+ </Link>
)
}}
/>
{translate('maintenance.database_is_up_to_date')}
</h1>
<p className="maintenance-text text-center">
- <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+ <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
</p>
</>
)}
{translate('maintenance.database_is_up_to_date')}
</h1>
<p className="maintenance-text text-center">
- <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+ <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
</p>
</>
)}
id="maintenance.sonarqube_is_under_maintenance.1"
values={
Object {
- "link": <a
- href="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
>
maintenance.sonarqube_is_under_maintenance_link.1
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="maintenance.sonarqube_is_under_maintenance.2"
values={
Object {
- "link": <a
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
maintenance.sonarqube_is_under_maintenance_link.2
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="maintenance.sonarqube_is_under_maintenance.1"
values={
Object {
- "link": <a
- href="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
>
maintenance.sonarqube_is_under_maintenance_link.1
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="maintenance.sonarqube_is_under_maintenance.2"
values={
Object {
- "link": <a
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
maintenance.sonarqube_is_under_maintenance_link.2
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
<p
className="maintenance-text text-center"
>
- <a
- href="/"
+ <ForwardRef(Link)
+ to="/"
>
layout.home
- </a>
+ </ForwardRef(Link)>
</p>
</div>
</div>
<p
className="maintenance-text text-center"
>
- <a
- href="/"
+ <ForwardRef(Link)
+ to="/"
>
layout.home
- </a>
+ </ForwardRef(Link)>
</p>
</div>
</div>
<p
className="maintenance-text text-center"
>
- <a
- href="/"
+ <ForwardRef(Link)
+ to="/"
>
layout.home
- </a>
+ </ForwardRef(Link)>
</p>
</div>
</div>
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import {
getAvailablePlugins,
getInstalledPlugins,
getPluginUpdates
} from '../../api/plugins';
import { getValues, setSimpleSettingValue } from '../../api/settings';
+import Link from '../../components/common/Link';
import Suggestions from '../../components/embed-docs-modal/Suggestions';
import { Location, Router, withRouter } from '../../components/hoc/withRouter';
import { Alert } from '../../components/ui/Alert';
id="marketplace.page.plugins.description2"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/instance-administration/marketplace/"
>
marketplace.page.plugins.description2.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="marketplace.page.plugins.description2"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/instance-administration/marketplace/"
>
marketplace.page.plugins.description2.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { ResetButtonLink } from '../../../components/controls/buttons';
import Modal from '../../../components/controls/Modal';
import { translate } from '../../../helpers/l10n';
*/
import * as React from 'react';
import { installPlugin, uninstallPlugin, updatePlugin } from '../../../api/plugins';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import Checkbox from '../../../components/controls/Checkbox';
import Tooltip from '../../../components/controls/Tooltip';
<p className="little-spacer-bottom">
{translate('marketplace.available_under_commercial_license')}
</p>
- <a href={plugin.homepageUrl} target="_blank" rel="noopener noreferrer">
- {translate('marketplace.learn_more')}
- </a>
+ {plugin.homepageUrl && (
+ <Link to={plugin.homepageUrl} target="_blank">
+ {translate('marketplace.learn_more')}
+ </Link>
+ )}
</div>
)}
{isInstalledPlugin(plugin) && (
>
marketplace.available_under_commercial_license
</p>
- <a
- rel="noopener noreferrer"
- target="_blank"
- >
- marketplace.learn_more
- </a>
</div>
</div>
`;
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
+import Link from '../../../components/common/Link';
import DismissableAlert from '../../../components/ui/DismissableAlert';
import { translate } from '../../../helpers/l10n';
import { queryToSearch } from '../../../helpers/urls';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { getBranchLikeQuery } from '../../../helpers/branch-like';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/system';
id="overview.measures.empty_link"
values={
Object {
- "learn_more_link": <Link
+ "learn_more_link": <ForwardRef(Link)
to="/documentation/user-guide/clean-as-you-code/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.project.next_steps.set_up_ci"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/tutorials",
}
>
overview.project.next_steps.links.set_up_ci
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.project.next_steps.set_up_pr_deco_and_ci.admin"
values={
Object {
- "link_ci": <Link
+ "link_ci": <ForwardRef(Link)
to={
Object {
"pathname": "/tutorials",
}
>
overview.project.next_steps.links.set_up_ci
- </Link>,
- "link_project_settings": <Link
+ </ForwardRef(Link)>,
+ "link_project_settings": <ForwardRef(Link)
to={
Object {
"pathname": "/project/settings",
}
>
overview.project.next_steps.links.project_settings
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.project.next_steps.set_up_pr_deco_and_ci"
values={
Object {
- "link_ci": <Link
+ "link_ci": <ForwardRef(Link)
to={
Object {
"pathname": "/tutorials",
}
>
overview.project.next_steps.links.set_up_ci
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.project.next_steps.set_up_pr_deco.admin"
values={
Object {
- "link_project_settings": <Link
+ "link_project_settings": <ForwardRef(Link)
to={
Object {
"pathname": "/project/settings",
}
>
overview.project.next_steps.links.project_settings
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.measures.empty_link"
values={
Object {
- "learn_more_link": <Link
+ "learn_more_link": <ForwardRef(Link)
to="/documentation/user-guide/clean-as-you-code/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.measures.empty_link"
values={
Object {
- "learn_more_link": <Link
+ "learn_more_link": <ForwardRef(Link)
to="/documentation/user-guide/clean-as-you-code/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.measures.empty_link"
values={
Object {
- "learn_more_link": <Link
+ "learn_more_link": <ForwardRef(Link)
to="/documentation/user-guide/clean-as-you-code/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import HelpTooltip from '../../../components/controls/HelpTooltip';
import { getLeakValue } from '../../../components/measure/utils';
import { getBranchLikeQuery } from '../../../helpers/branch-like';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link, Path } from 'react-router-dom';
+import { Path } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
import Measure from '../../../components/measure/Measure';
import DrilldownLink from '../../../components/shared/DrilldownLink';
exports[`should render correctly for bugs 1`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.bugs.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<BugIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correctly for bugs 2`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_bugs.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<BugIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correctly for code smells 1`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.code_smells.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<CodeSmellIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correctly for code smells 2`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_code_smells.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<CodeSmellIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correctly for hotspots 1`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.security_hotspots.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<SecurityHotspotIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correctly for hotspots 2`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_security_hotspots.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<SecurityHotspotIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correctly for vulnerabilities 1`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.vulnerabilities.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<VulnerabilityIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correctly for vulnerabilities 2`] = `
<Fragment>
- <Link
+ <ForwardRef(Link)
aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_vulnerabilities.name"
className="overview-measures-value text-light"
to={
}
>
1
- </Link>
+ </ForwardRef(Link)>
<VulnerabilityIcon
className="big-spacer-left little-spacer-right"
/>
exports[`should render correclty 2`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should render correclty 3`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should render correclty 4`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should render correclty 5`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should render correclty 6`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should render correclty 7`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should render correclty 8`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should render correclty 9`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
exports[`should work with branch 1`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="overview-quality-gate-condition overview-quality-gate-condition-error"
to={
Object {
</span>
</div>
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
import classNames from 'classnames';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
import HelpTooltip from '../../../components/controls/HelpTooltip';
import HelpIcon from '../../../components/icons/HelpIcon';
import { translate } from '../../../helpers/l10n';
id="overview.quality_gate.conditions_on_new_code"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/quality_gates/show/30",
}
>
overview.quality_gate
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="overview.quality_gate.conditions_on_new_code"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/quality_gates/show/30",
}
>
overview.quality_gate
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { queryToSearch } from '../../../helpers/urls';
import { PermissionTemplate } from '../../../types/types';
import { PERMISSION_TEMPLATES_PATH } from '../utils';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
import { PermissionTemplate } from '../../../types/types';
import { PERMISSION_TEMPLATES_PATH } from '../utils';
<td
className="little-padded-left little-padded-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/admin/permission_templates",
>
test
</strong>
- </Link>
+ </ForwardRef(Link)>
<div
className="spacer-top js-defaults"
>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { ButtonLink } from '../../../components/controls/buttons';
import BranchIcon from '../../../components/icons/BranchIcon';
import DropdownIcon from '../../../components/icons/DropdownIcon';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { ResetButtonLink } from '../../../components/controls/buttons';
import DropdownIcon from '../../../components/icons/DropdownIcon';
import Level from '../../../components/ui/Level';
/>
master
</span>,
- "project": <Link
+ "project": <ForwardRef(Link)
onClick={[Function]}
title="Foo"
to={
}
>
Foo
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
/>
master
</span>,
- "project": <Link
+ "project": <ForwardRef(Link)
onClick={[Function]}
title="Bar"
to={
}
>
Bar
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
/>
feature-x
</span>,
- "project": <Link
+ "project": <ForwardRef(Link)
onClick={[Function]}
title="Foo"
to={
}
>
Foo
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
/>
master
</span>,
- "project": <Link
+ "project": <ForwardRef(Link)
onClick={[Function]}
title="Bar"
to={
}
>
Bar
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
<div
className="flex-1 text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
onClick={[Function]}
title="Foo"
to={
>
Foo
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</li>
<li
<div
className="flex-1 text-ellipsis"
>
- <Link
+ <ForwardRef(Link)
onClick={[Function]}
title="Bar"
to={
>
Bar
</span>
- </Link>
+ </ForwardRef(Link)>
</div>
</li>
</ul>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
export interface AppHeaderProps {
id="project_baseline.page.description"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to="/documentation/project-administration/new-code-period/"
>
project_baseline.page.description.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="project_baseline.page.description2"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to="/admin/settings?category=new_code_period"
>
project_baseline.page.description2.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="project_baseline.page.description"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to="/documentation/project-administration/new-code-period/"
>
project_baseline.page.description.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
import { translate } from '../../../helpers/l10n';
import { formatMeasure } from '../../../helpers/measures';
id="project_branch_pull_request.lifetime_information.admin"
values={
Object {
- "settings": <Link
+ "settings": <ForwardRef(Link)
to="/admin/settings"
>
settings.page
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
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';
<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()}
*/
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';
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
variant="error"
>
project_dump.failed_import
- <Link
+ <ForwardRef(Link)
className="spacer-left"
to={
Object {
}
>
project_dump.see_details
- </Link>
+ </ForwardRef(Link)>
</Alert>
<div>
<div
*/
import * as React from 'react';
import isValidUri from '../../app/utils/isValidUri';
+import Link from '../../components/common/Link';
import { Button } from '../../components/controls/buttons';
import ConfirmButton from '../../components/controls/ConfirmButton';
import ProjectLinkIcon from '../../components/icons/ProjectLinkIcon';
<td className="nowrap">{this.renderName(link)}</td>
<td className="nowrap js-url">
{isValidUri(link.url) ? (
- <a href={link.url} rel="nofollow noreferrer noopener" target="_blank">
+ <Link to={link.url} target="_blank">
{link.url}
- </a>
+ </Link>
) : (
link.url
)}
<td
className="nowrap js-url"
>
- <a
- href="http://example.com"
- rel="nofollow noreferrer noopener"
+ <ForwardRef(Link)
target="_blank"
+ to="http://example.com"
>
http://example.com
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap"
<td
className="nowrap js-url"
>
- <a
- href="http://example.com"
- rel="nofollow noreferrer noopener"
+ <ForwardRef(Link)
target="_blank"
+ to="http://example.com"
>
http://example.com
- </a>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap"
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { components, OptionProps } from 'react-select';
import A11ySkipTarget from '../../components/a11y/A11ySkipTarget';
import DisableableSelectOption from '../../components/common/DisableableSelectOption';
+import Link from '../../components/common/Link';
import { SubmitButton } from '../../components/controls/buttons';
import HelpTooltip from '../../components/controls/HelpTooltip';
import Radio from '../../components/controls/Radio';
id="project_quality_gate.no_condition_on_new_code"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/quality_gates/show/3",
}
>
project_quality_gate.no_condition.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
import { groupBy, orderBy } from 'lodash';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
-import { Link } from 'react-router-dom';
import { Profile } from '../../api/quality-profiles';
import A11ySkipTarget from '../../components/a11y/A11ySkipTarget';
+import Link from '../../components/common/Link';
import { Button } from '../../components/controls/buttons';
import HelpTooltip from '../../components/controls/HelpTooltip';
import Suggestions from '../../components/embed-docs-modal/Suggestions';
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
<td
className="nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="text-right"
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { components, OptionProps } from 'react-select';
import DisableableSelectOption from '../../../components/common/DisableableSelectOption';
+import Link from '../../../components/common/Link';
import { BasicSelectOption } from '../../../components/controls/Select';
import { translate } from '../../../helpers/l10n';
import { getQualityProfileUrl } from '../../../helpers/urls';
<p>
project_quality_profile.add_language_modal.profile_unavailable_no_active_rules
</p>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/profiles/show",
}
>
project_quality_profile.add_language_modal.go_to_profile
- </Link>
+ </ForwardRef(Link)>
</React.Fragment>
`;
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import '../../../components/common/EmptySearch.css';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
import { queryToSearch } from '../../../helpers/urls';
import { Dict } from '../../../types/types';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
export default function NoFavoriteProjects() {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { getAlmSettings } from '../../../api/alm-settings';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import Dropdown from '../../../components/controls/Dropdown';
import DropdownIcon from '../../../components/icons/DropdownIcon';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import ChevronsIcon from '../../../components/icons/ChevronsIcon';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/system';
<p
className="big-spacer-top"
>
- <Link
+ <ForwardRef(Link)
className="button"
to="/projects/all"
>
projects.explore_projects
- </Link>
+ </ForwardRef(Link)>
</p>
</div>
</div>
<li
className="bordered-top little-padded-top"
>
- <Link
+ <ForwardRef(Link)
className="display-flex-center"
to={
Object {
size={16}
/>
more
- </Link>
+ </ForwardRef(Link)>
</li>
</ul>
}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly: bitbucket 1`] = `
-<Link
+<ForwardRef(Link)
className="display-flex-center"
to={
Object {
width={16}
/>
my_account.add_project.bitbucket
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render correctly: manual 1`] = `
-<Link
+<ForwardRef(Link)
className="display-flex-center"
to={
Object {
className="spacer-right"
/>
my_account.add_project.manual
-</Link>
+</ForwardRef(Link)>
`;
import classNames from 'classnames';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import PrivacyBadgeContainer from '../../../../components/common/PrivacyBadgeContainer';
import Favorite from '../../../../components/controls/Favorite';
import Tooltip from '../../../../components/controls/Tooltip';
className="h2 project-card-name text-ellipsis"
title="Foo"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Foo
- </Link>
+ </ForwardRef(Link)>
</h3>
<ProjectCardQualityGate
status="OK"
className="h2 project-card-name text-ellipsis"
title="Foo"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Foo
- </Link>
+ </ForwardRef(Link)>
</h3>
<ProjectCardQualityGate
status="OK"
className="h2 project-card-name text-ellipsis"
title="Foo"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Foo
- </Link>
+ </ForwardRef(Link)>
</h3>
</div>
<div
>
projects.not_analyzed.TRK
</span>
- <Link
+ <ForwardRef(Link)
className="button spacer-left"
to={
Object {
}
>
projects.configure_analysis
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
<div
className="h2 project-card-name text-ellipsis"
title="Foo"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Foo
- </Link>
+ </ForwardRef(Link)>
</h3>
</div>
<div
className="h2 project-card-name text-ellipsis"
title="Foo"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Foo
- </Link>
+ </ForwardRef(Link)>
</h3>
<ProjectCardQualityGate
status="OK"
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { createProject } from '../../api/components';
+import Link from '../../components/common/Link';
import VisibilitySelector from '../../components/common/VisibilitySelector';
import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';
import Modal from '../../components/controls/Modal';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { Project } from '../../api/components';
+import Link from '../../components/common/Link';
import PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer';
import Checkbox from '../../components/controls/Checkbox';
import Tooltip from '../../components/controls/Tooltip';
id="projects_management.project_has_been_successfully_created"
values={
Object {
- "project": <Link
+ "project": <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
name
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
<td
className="nowrap hide-overflow project-row-text-cell"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
to={
Object {
Project
</span>
</Tooltip>
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap"
<td
className="nowrap hide-overflow project-row-text-cell"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
to={
Object {
Project
</span>
</Tooltip>
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap"
<td
className="nowrap hide-overflow project-row-text-cell"
>
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
to={
Object {
Project
</span>
</Tooltip>
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap"
import { isSameMinute } from 'date-fns';
import { sortBy } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
import { parseDate } from '../../../helpers/dates';
import { translate } from '../../../helpers/l10n';
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import Link from '../../../../components/common/Link';
import { ProfileChangelogEvent } from '../../types';
import Changelog from '../Changelog';
import ChangesList from '../ChangesList';
it('should render rule', () => {
const events = [createEvent()];
const changelog = shallow(<Changelog events={events} />);
- expect(changelog.find('Link').prop('to')).toHaveProperty('search', '?rule_key=squid1234');
+ expect(changelog.find(Link).prop('to')).toHaveProperty('search', '?rule_key=squid1234');
});
it('should render ChangesList', () => {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { CompareResponse, Profile } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
import ChevronLeftIcon from '../../../components/icons/ChevronLeftIcon';
import ChevronRightIcon from '../../../components/icons/ChevronRightIcon';
import SeverityIcon from '../../../components/icons/SeverityIcon';
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { Profile } from '../../../../api/quality-profiles';
+import Link from '../../../../components/common/Link';
import ComparisonEmpty from '../ComparisonEmpty';
import ComparisonResults from '../ComparisonResults';
*/
import * as React from 'react';
import { getQualityProfileExporterUrl } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
import { Alert } from '../../../components/ui/Alert';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/system';
className={index > 0 ? 'spacer-top' : undefined}
data-key={exporter.key}
key={exporter.key}>
- <a href={this.getExportUrl(exporter)} rel="noopener noreferrer" target="_blank">
+ <Link to={this.getExportUrl(exporter)} target="_blank">
{exporter.name}
- </a>
+ </Link>
</li>
))}
</ul>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link, NavLink } from 'react-router-dom';
+import { NavLink } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import Tooltip from '../../../components/controls/Tooltip';
import DateFromNow from '../../../components/intl/DateFromNow';
import { translate } from '../../../helpers/l10n';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { getProfileProjects } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import ListFooter from '../../../components/controls/ListFooter';
import Tooltip from '../../../components/controls/Tooltip';
*/
import { keyBy } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { getQualityProfile } from '../../../api/quality-profiles';
import { searchRules, takeFacet } from '../../../api/rules';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import Tooltip from '../../../components/controls/Tooltip';
import { translate } from '../../../helpers/l10n';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import HelpTooltip from '../../../components/controls/HelpTooltip';
import { translate } from '../../../helpers/l10n';
import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
import { translate } from '../../../helpers/l10n';
import { formatMeasure } from '../../../helpers/measures';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
import { formatMeasure } from '../../../helpers/measures';
import { getRulesUrl } from '../../../helpers/urls';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import HelpTooltip from '../../../components/controls/HelpTooltip';
import { translate } from '../../../helpers/l10n';
import { getRulesUrl } from '../../../helpers/urls';
data-key="exporter-key"
key="exporter-key"
>
- <a
- href="/api/qualityprofiles/export?exporterKey=exporter-key&language=js&qualityProfile=name"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
target="_blank"
+ to="/api/qualityprofiles/export?exporterKey=exporter-key&language=js&qualityProfile=name"
>
exporter-name
- </a>
+ </ForwardRef(Link)>
</li>
</ul>
</div>
quality_profiles.page
</NavLink>
/
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/profiles",
}
>
JavaScript
- </Link>
+ </ForwardRef(Link)>
</div>
<h1
className="page-title"
<DateFromNow />
</li>
<li>
- <Link
+ <ForwardRef(Link)
className="button"
to={
Object {
}
>
changelog
- </Link>
+ </ForwardRef(Link)>
</li>
<li>
<withRouter(ProfileActions)
quality_profiles.page
</NavLink>
/
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/profiles",
}
>
JavaScript
- </Link>
+ </ForwardRef(Link)>
</div>
<h1
className="page-title"
<DateFromNow />
</li>
<li>
- <Link
+ <ForwardRef(Link)
className="button"
to={
Object {
}
>
changelog
- </Link>
+ </ForwardRef(Link)>
</li>
<li>
<withRouter(ProfileActions)
data-key="org.sonarsource.xml:xml"
key="org.sonarsource.xml:xml"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
<span>
SonarXML
</span>
- </Link>
+ </ForwardRef(Link)>
</li>
</ul>
<ListFooter
data-key="org.sonarsource.xml:xml"
key="org.sonarsource.xml:xml"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
<span>
SonarXML
</span>
- </Link>
+ </ForwardRef(Link)>
</li>
</ul>
<ListFooter
data-key="org.sonarsource.xml:xml"
key="org.sonarsource.xml:xml"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
<span>
SonarXML
</span>
- </Link>
+ </ForwardRef(Link)>
</li>
</ul>
<ListFooter
`;
exports[`should show a button to activate more rules for admins 1`] = `
-<Link
+<ForwardRef(Link)
className="button js-activate-rules"
to={
Object {
}
>
quality_profiles.activate_more
-</Link>
+</ForwardRef(Link)>
`;
exports[`should show a deprecated rules warning message 1`] = `
overlay="quality_profiles.deprecated_rules_description"
/>
</span>
- <Link
+ <ForwardRef(Link)
className="pull-right"
to={
Object {
}
>
18
- </Link>
+ </ForwardRef(Link)>
</div>
`;
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
3
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
className="small"
to={
Object {
}
>
7
- </Link>
+ </ForwardRef(Link)>
</td>
</tr>
`;
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
0
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap text-right"
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
5
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap text-right"
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
<strong>
3
</strong>
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
className="small"
to={
Object {
<strong>
7
</strong>
- </Link>
+ </ForwardRef(Link)>
</td>
</tr>
`;
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
<strong>
0
</strong>
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap text-right"
<td
className="thin nowrap text-right"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
<strong>
5
</strong>
- </Link>
+ </ForwardRef(Link)>
</td>
<td
className="thin nowrap text-right"
overlay="quality_profiles.sonarway_missing_rules_description"
/>
</span>
- <Link
+ <ForwardRef(Link)
className="pull-right"
data-test="rules"
to={
}
>
158
- </Link>
+ </ForwardRef(Link)>
</div>
`;
*/
import { sortBy } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls';
import ProfileLink from '../components/ProfileLink';
*/
import { sortBy } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { searchRules } from '../../../api/rules';
+import Link from '../../../components/common/Link';
import { toShortNotSoISOString } from '../../../helpers/dates';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { formatMeasure } from '../../../helpers/measures';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { Actions } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
import { Button } from '../../../components/controls/buttons';
import { Location, Router, withRouter } from '../../../components/hoc/withRouter';
import { Alert } from '../../../components/ui/Alert';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import Tooltip from '../../../components/controls/Tooltip';
import DateFromNow from '../../../components/intl/DateFromNow';
import { translate } from '../../../helpers/l10n';
>
JavaScript
,
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
to={
Object {
}
>
quality_profile.x_rules.4
- </Link>
+ </ForwardRef(Link)>
<div
className="muted"
key="qp-2"
>
JavaScript
,
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
to={
Object {
}
>
quality_profile.x_rules.3
- </Link>
+ </ForwardRef(Link)>
<div
className="muted"
key="qp-2"
>
JavaScript
,
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
to={
Object {
}
>
quality_profile.x_rules.2
- </Link>
+ </ForwardRef(Link)>
</div>
</li>
<li
>
JavaScript
,
- <Link
+ <ForwardRef(Link)
className="link-no-underline"
to={
Object {
}
>
quality_profile.x_rules.2
- </Link>
+ </ForwardRef(Link)>
<div
className="muted"
key="qp-2"
quality_profiles.intro1
<br />
quality_profiles.intro2
- <Link
+ <ForwardRef(Link)
className="spacer-left"
target="_blank"
to={
}
>
learn_more
- </Link>
+ </ForwardRef(Link)>
</div>
</header>
`;
quality_profiles.intro1
<br />
quality_profiles.intro2
- <Link
+ <ForwardRef(Link)
className="spacer-left"
target="_blank"
to={
}
>
learn_more
- </Link>
+ </ForwardRef(Link)>
</div>
</header>
`;
quality_profiles.intro1
<br />
quality_profiles.intro2
- <Link
+ <ForwardRef(Link)
className="spacer-left"
target="_blank"
to={
}
>
learn_more
- </Link>
+ </ForwardRef(Link)>
</div>
</header>
`;
quality_profiles.intro1
<br />
quality_profiles.intro2
- <Link
+ <ForwardRef(Link)
className="spacer-left"
target="_blank"
to={
}
>
learn_more
- </Link>
+ </ForwardRef(Link)>
</div>
<CreateProfileForm
languages={
quality_profiles.intro1
<br />
quality_profiles.intro2
- <Link
+ <ForwardRef(Link)
className="spacer-left"
target="_blank"
to={
}
>
learn_more
- </Link>
+ </ForwardRef(Link)>
</div>
<RestoreProfileForm
onClose={[Function]}
<Tooltip
overlay="quality_profiles.deprecated_rules"
>
- <Link
+ <ForwardRef(Link)
className="badge badge-error"
to={
Object {
}
>
2
- </Link>
+ </ForwardRef(Link)>
</Tooltip>
</span>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
<td
className="quality-profiles-table-rules thin nowrap text-middle text-right"
>
<div>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
<td
<Tooltip
overlay="quality_profiles.deprecated_rules"
>
- <Link
+ <ForwardRef(Link)
className="badge badge-error"
to={
Object {
}
>
2
- </Link>
+ </ForwardRef(Link)>
</Tooltip>
</span>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
<td
<Tooltip
overlay="quality_profiles.deprecated_rules"
>
- <Link
+ <ForwardRef(Link)
className="badge badge-error"
to={
Object {
}
>
10
- </Link>
+ </ForwardRef(Link)>
</Tooltip>
</span>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/coding_rules",
}
>
10
- </Link>
+ </ForwardRef(Link)>
</div>
</td>
<td
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/system';
*/
import React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
import { getRuleUrl } from '../../../helpers/urls';
import { Hotspot, HotspotStatusOption } from '../../../types/security-hotspots';
>
hotspots.no_hotspots.description
</div>
- <Link
+ <ForwardRef(Link)
className="big-spacer-top"
target="_blank"
to={
}
>
hotspots.learn_more
- </Link>
+ </ForwardRef(Link)>
</div>
`;
>
hotspots.no_hotspots_for_file.description
</div>
- <Link
+ <ForwardRef(Link)
className="big-spacer-top"
target="_blank"
to={
}
>
hotspots.learn_more
- </Link>
+ </ForwardRef(Link)>
</div>
`;
>
That rule
</span>
- <Link
+ <ForwardRef(Link)
className="small"
target="_blank"
to={
}
>
squid:S2077
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
<div
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import Link from '../../../components/common/Link';
import { ButtonLink, SubmitButton } from '../../../components/controls/buttons';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
import { translate } from '../../../helpers/l10n';
<SubmitButton disabled={this.state.loading}>
{translate('sessions.log_in')}
</SubmitButton>
- <a className="spacer-left" href={`${getBaseUrl()}/`}>
+ <Link className="spacer-left" to={`${getBaseUrl()}/`}>
{translate('cancel')}
- </a>
+ </Link>
</div>
</div>
</form>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import Link from '../../../components/common/Link';
import { getCookie } from '../../../helpers/cookies';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/system';
)}
<div className="big-spacer-top">
- <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+ <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
</div>
</div>
</div>
>
sessions.log_in
</SubmitButton>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="/"
+ to="/"
>
cancel
- </a>
+ </ForwardRef(Link)>
</div>
</div>
</form>
>
sessions.log_in
</SubmitButton>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="/"
+ to="/"
>
cancel
- </a>
+ </ForwardRef(Link)>
</div>
</div>
</form>
>
sessions.log_in
</SubmitButton>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="/"
+ to="/"
>
cancel
- </a>
+ </ForwardRef(Link)>
</div>
</div>
</form>
<div
className="big-spacer-top"
>
- <a
- href="/"
+ <ForwardRef(Link)
+ to="/"
>
layout.home
- </a>
+ </ForwardRef(Link)>
</div>
</div>
</div>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
import { AdditionalCategoryComponentProps } from './AdditionalCategories';
import CategoryDefinitionsList from './CategoryDefinitionsList';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { getNewCodePeriod, setNewCodePeriod } from '../../../api/newCodePeriod';
+import Link from '../../../components/common/Link';
import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';
import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { DropdownOverlay } from '../../../components/controls/Dropdown';
import OutsideClickHandler from '../../../components/controls/OutsideClickHandler';
import SearchBox from '../../../components/controls/SearchBox';
className="spacer-bottom"
>
settings.analysis_scope.wildcards.introduction
- <Link
+ <ForwardRef(Link)
className="spacer-left"
to="/documentation/project-administration/narrowing-the-focus/"
>
learn_more
- </Link>
+ </ForwardRef(Link)>
</p>
<table
className="data spacer-bottom"
id="settings.new_code_period.description"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to="/documentation/project-administration/new-code-period/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
className="spacer-bottom spacer-top"
key="foo"
>
- <Link
+ <ForwardRef(Link)
onClick={[MockFunction]}
onMouseEnter={[Function]}
to={
>
settings.key_x.foo
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
<li
className="spacer-bottom spacer-top active"
key="bar"
>
- <Link
+ <ForwardRef(Link)
onClick={[MockFunction]}
onMouseEnter={[Function]}
to={
>
settings.key_x.bar
</div>
- </Link>
+ </ForwardRef(Link)>
</li>
</ul>
</DropdownOverlay>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { Button } from '../../../../components/controls/buttons';
import HelpTooltip from '../../../../components/controls/HelpTooltip';
import Tooltip from '../../../../components/controls/Tooltip';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { ButtonLink } from '../../../../components/controls/buttons';
import ValidationInput, {
ValidationInputErrorPlacement
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { Button } from '../../../../components/controls/buttons';
import { Alert } from '../../../../components/ui/Alert';
import DeferredSpinner from '../../../../components/ui/DeferredSpinner';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { translate } from '../../../../helpers/l10n';
import { AlmKeys, AzureBindingDefinition } from '../../../../types/alm-settings';
id="settings.almintegration.form.personal_access_token.azure.help"
values={{
pat: (
- <a
- href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
- rel="noopener noreferrer"
+ <Link
+ to="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
target="_blank">
{translate('settings.almintegration.form.personal_access_token.azure.help.url')}
- </a>
+ </Link>
),
permission: <strong>{'Code > Read & Write'}</strong>,
doc_link: (
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { Alert } from '../../../../components/ui/Alert';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { translate } from '../../../../helpers/l10n';
id="settings.almintegration.bitbucketcloud.info"
values={{
oauth: (
- <a
- href="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
- rel="noopener noreferrer"
+ <Link
+ to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
target="_blank">
{translate('settings.almintegration.bitbucketcloud.oauth')}
- </a>
+ </Link>
),
permission: <strong>Pull Requests: Read</strong>,
doc_link: (
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { translate } from '../../../../helpers/l10n';
import { AlmKeys, BitbucketServerBindingDefinition } from '../../../../types/alm-settings';
id="settings.almintegration.form.personal_access_token.bitbucket.help"
values={{
pat: (
- <a
- href="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
- rel="noopener noreferrer"
+ <Link
+ to="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
target="_blank">
{translate(
'settings.almintegration.form.personal_access_token.bitbucket.help.url'
)}
- </a>
+ </Link>
),
permission: <strong>Read</strong>,
doc_link: (
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { Alert } from '../../../../components/ui/Alert';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { translate } from '../../../../helpers/l10n';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { translate } from '../../../../helpers/l10n';
import { AlmKeys, GitlabBindingDefinition } from '../../../../types/alm-settings';
id="settings.almintegration.form.personal_access_token.gitlab.help"
values={{
pat: (
- <a
- href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
- rel="noopener noreferrer"
+ <Link
+ to="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
target="_blank">
{translate('settings.almintegration.form.personal_access_token.gitlab.help.url')}
- </a>
+ </Link>
),
permission: <strong>Reporter</strong>,
scope: <strong>api</strong>,
id="settings.almintegration.github.additional_permission"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/github-integration/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.almintegration.github.additional_permission"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/github-integration/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.almintegration.form.secret.can_encrypt"
values={
Object {
- "learn_more": <Link
+ "learn_more": <ForwardRef(Link)
target="_blank"
to={
Object {
}
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.almintegration.tabs.authentication-moved"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/settings",
}
>
property.category.authentication
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.almintegration.form.personal_access_token.azure.help"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/azuredevops-integration/"
>
learn_more
- </Link>,
- "pat": <a
- href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
- rel="noopener noreferrer"
+ </ForwardRef(Link)>,
+ "pat": <ForwardRef(Link)
target="_blank"
+ to="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
>
settings.almintegration.form.personal_access_token.azure.help.url
- </a>,
+ </ForwardRef(Link)>,
"permission": <strong>
Code > Read & Write
</strong>,
id="settings.almintegration.form.personal_access_token.azure.help"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/azuredevops-integration/"
>
learn_more
- </Link>,
- "pat": <a
- href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
- rel="noopener noreferrer"
+ </ForwardRef(Link)>,
+ "pat": <ForwardRef(Link)
target="_blank"
+ to="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
>
settings.almintegration.form.personal_access_token.azure.help.url
- </a>,
+ </ForwardRef(Link)>,
"permission": <strong>
Code > Read & Write
</strong>,
id="settings.almintegration.bitbucketcloud.info"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/bitbucket-cloud-integration/"
>
learn_more
- </Link>,
- "oauth": <a
- href="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
- rel="noopener noreferrer"
+ </ForwardRef(Link)>,
+ "oauth": <ForwardRef(Link)
target="_blank"
+ to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
>
settings.almintegration.bitbucketcloud.oauth
- </a>,
+ </ForwardRef(Link)>,
"permission": <strong>
Pull Requests: Read
</strong>,
id="settings.almintegration.bitbucketcloud.info"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/bitbucket-cloud-integration/"
>
learn_more
- </Link>,
- "oauth": <a
- href="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
- rel="noopener noreferrer"
+ </ForwardRef(Link)>,
+ "oauth": <ForwardRef(Link)
target="_blank"
+ to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
>
settings.almintegration.bitbucketcloud.oauth
- </a>,
+ </ForwardRef(Link)>,
"permission": <strong>
Pull Requests: Read
</strong>,
id="settings.almintegration.form.personal_access_token.bitbucket.help"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/bitbucket-integration/"
>
learn_more
- </Link>,
- "pat": <a
- href="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
- rel="noopener noreferrer"
+ </ForwardRef(Link)>,
+ "pat": <ForwardRef(Link)
target="_blank"
+ to="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
>
settings.almintegration.form.personal_access_token.bitbucket.help.url
- </a>,
+ </ForwardRef(Link)>,
"permission": <strong>
Read
</strong>,
id="settings.almintegration.github.info"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/github-integration/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.almintegration.github.info"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/github-integration/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.almintegration.form.personal_access_token.gitlab.help"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/gitlab-integration/"
>
learn_more
- </Link>,
- "pat": <a
- href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
- rel="noopener noreferrer"
+ </ForwardRef(Link)>,
+ "pat": <ForwardRef(Link)
target="_blank"
+ to="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
>
settings.almintegration.form.personal_access_token.gitlab.help.url
- </a>,
+ </ForwardRef(Link)>,
"permission": <strong>
Reporter
</strong>,
id="settings.almintegration.form.personal_access_token.gitlab.help"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/gitlab-integration/"
>
learn_more
- </Link>,
- "pat": <a
- href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
- rel="noopener noreferrer"
+ </ForwardRef(Link)>,
+ "pat": <ForwardRef(Link)
target="_blank"
+ to="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
>
settings.almintegration.form.personal_access_token.gitlab.help.url
- </a>,
+ </ForwardRef(Link)>,
"permission": <strong>
Reporter
</strong>,
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link, useSearchParams } from 'react-router-dom';
+import { useSearchParams } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
import ScreenPositionHelper from '../../../../components/common/ScreenPositionHelper';
import BoxedTabs from '../../../../components/controls/BoxedTabs';
import { Alert } from '../../../../components/ui/Alert';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import withAvailableFeatures, {
WithAvailableFeaturesProps
} from '../../../../app/components/available-features/withAvailableFeatures';
+import Link from '../../../../components/common/Link';
import Toggle from '../../../../components/controls/Toggle';
import { Alert } from '../../../../components/ui/Alert';
import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { components, OptionProps, SingleValueProps } from 'react-select';
+import Link from '../../../../components/common/Link';
import { Button, SubmitButton } from '../../../../components/controls/buttons';
import Select from '../../../../components/controls/Select';
import AlertSuccessIcon from '../../../../components/icons/AlertSuccessIcon';
id="settings.pr_decoration.binding.form.monorepo.help"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/azuredevops-integration/"
>
learn_more
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.pr_decoration.binding.check_configuration.failure.check_global_settings"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/settings",
}
>
settings.pr_decoration.binding.check_configuration.failure.check_global_settings.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="settings.pr_decoration.binding.no_bindings.admin"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
to={
Object {
"pathname": "/admin/settings",
}
>
settings.pr_decoration.binding.no_bindings.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { encryptValue } from '../../../api/settings';
+import Link from '../../../components/common/Link';
import { SubmitButton } from '../../../components/controls/buttons';
import { ClipboardButton } from '../../../components/controls/clipboard';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { SubmitButton } from '../../../components/controls/buttons';
import { ClipboardButton } from '../../../components/controls/clipboard';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
id="encryption.form_note"
values={
Object {
- "moreInformationLink": <Link
+ "moreInformationLink": <ForwardRef(Link)
target="_blank"
to="/documentation/instance-administration/security/"
>
more_information
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="encryption.secret_key_description"
values={
Object {
- "moreInformationLink": <Link
+ "moreInformationLink": <ForwardRef(Link)
target="_blank"
to="/documentation/instance-administration/security/"
>
more_information
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import LinkIcon from '../../../components/icons/LinkIcon';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { queryToSearch } from '../../../helpers/urls';
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { queryToSearch } from '../../../helpers/urls';
import { WebApi } from '../../../types/types';
import { actionsFilter, isDomainPathActive, Query, serializeQuery } from '../utils';
import { maxBy } from 'lodash';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
-import { Link, Params, useParams } from 'react-router-dom';
+import { Params, useParams } from 'react-router-dom';
import { fetchWebApi } from '../../../api/web-api';
import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
+import Link from '../../../components/common/Link';
import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
import Suggestions from '../../../components/embed-docs-modal/Suggestions';
import { Location, Router, withRouter } from '../../../components/hoc/withRouter';
<header
className="web-api-action-header boxed-group-header"
>
- <Link
+ <ForwardRef(Link)
className="spacer-right link-no-underline"
to={
Object {
}
>
<LinkIcon />
- </Link>
+ </ForwardRef(Link)>
<h3
className="web-api-action-title"
>
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="bar"
to={
>
bar
</h3>
- </Link>
- <Link
+ </ForwardRef(Link)>
+ <ForwardRef(Link)
className="list-group-item"
key="baz"
to={
>
baz
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
>
foo
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
>
foo
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
>
foo
</h3>
- </Link>
- <Link
+ </ForwardRef(Link)>
+ <ForwardRef(Link)
className="list-group-item"
key="bar"
to={
since="5.0"
/>
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
>
foo
</h3>
- </Link>
- <Link
+ </ForwardRef(Link)>
+ <ForwardRef(Link)
className="list-group-item"
key="bar"
to={
bar
<InternalBadge />
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
>
foo
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
<div
className="web-api-page-header"
>
- <Link
+ <ForwardRef(Link)
to="/web_api/"
>
<h1>
api_documentation.page
</h1>
- </Link>
+ </ForwardRef(Link)>
</div>
<Search
onSearch={[Function]}
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { translate } from '../../../helpers/l10n';
interface Props {
id="webhooks.description"
values={
Object {
- "url": <Link
+ "url": <ForwardRef(Link)
to="/documentation/project-administration/webhooks/"
>
webhooks.documentation_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { ButtonIcon } from '../../components/controls/buttons';
import { ClipboardIconButton } from '../../components/controls/clipboard';
import Dropdown from '../../components/controls/Dropdown';
import { BranchLike } from '../../types/branch-like';
import { ComponentQualifier } from '../../types/component';
import { IssueType, Measure, SourceViewerFile } from '../../types/types';
+import Link from '../common/Link';
import { WorkspaceContextShape } from '../workspace/context';
import MeasuresOverlay from './components/MeasuresOverlay';
</a>
</li>
<li>
- <Link
+ <ForwardRef(Link)
className="js-new-window"
rel="noopener noreferrer"
target="_blank"
}
>
component_viewer.new_window
- </Link>
+ </ForwardRef(Link)>
</li>
<li>
<a
</a>
</li>
<li>
- <Link
+ <ForwardRef(Link)
className="js-new-window"
rel="noopener noreferrer"
target="_blank"
}
>
component_viewer.new_window
- </Link>
+ </ForwardRef(Link)>
</li>
<li>
<a
<span
className="source-viewer-header-measure-value"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"hash": "",
}
>
0
- </Link>
+ </ForwardRef(Link)>
</span>
</div>
<div
<span
className="source-viewer-header-measure-value"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"hash": "",
}
>
2
- </Link>
+ </ForwardRef(Link)>
</span>
</div>
<div
<span
className="source-viewer-header-measure-value"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"hash": "",
}
>
1
- </Link>
+ </ForwardRef(Link)>
</span>
</div>
<div
<span
className="source-viewer-header-measure-value"
>
- <Link
+ <ForwardRef(Link)
to={
Object {
"hash": "",
}
>
2
- </Link>
+ </ForwardRef(Link)>
</span>
</div>
</div>
</a>
</li>
<li>
- <Link
+ <ForwardRef(Link)
className="js-new-window"
rel="noopener noreferrer"
target="_blank"
}
>
component_viewer.new_window
- </Link>
+ </ForwardRef(Link)>
</li>
<li>
<a
*/
import { groupBy, sortBy } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import QualifierIcon from '../../../components/icons/QualifierIcon';
import { Alert } from '../../../components/ui/Alert';
import { isPullRequest } from '../../../helpers/branch-like';
*/
import { groupBy, keyBy, sortBy } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { getFacets } from '../../../api/issues';
import { getMeasures } from '../../../api/measures';
import { getAllMetrics } from '../../../api/metrics';
+import Link from '../../../components/common/Link';
import { ResetButtonLink } from '../../../components/controls/buttons';
import Modal from '../../../components/controls/Modal';
import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
className="little-spacer-right"
qualifier="TRK"
/>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Project Name
- </Link>
+ </ForwardRef(Link)>
</div>
<div
className="display-flex-center little-spacer-top"
className="little-spacer-right"
qualifier="TRK"
/>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Project Name
- </Link>
+ </ForwardRef(Link)>
</div>
<div
className="display-flex-center little-spacer-top"
className="little-spacer-right"
qualifier="TRK"
/>
- <Link
+ <ForwardRef(Link)
to={
Object {
"pathname": "/dashboard",
}
>
Project Name
- </Link>
+ </ForwardRef(Link)>
</div>
<div
className="display-flex-center little-spacer-top"
import { zoom, ZoomBehavior, zoomIdentity } from 'd3-zoom';
import { sortBy, uniq } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
import { translate } from '../../helpers/l10n';
+import Link from '../common/Link';
import Tooltip from '../controls/Tooltip';
import './BubbleChart.css';
import classNames from 'classnames';
import { scaleLinear } from 'd3-scale';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { convertToTo, Location } from '../../helpers/urls';
+import Link from '../common/Link';
import Tooltip, { Placement } from '../controls/Tooltip';
import LinkIcon from '../icons/LinkIcon';
import { zoom } from 'd3-zoom';
import { shallow } from 'enzyme';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { AutoSizer, AutoSizerProps } from 'react-virtualized/dist/commonjs/AutoSizer';
+import Link from '../../../components/common/Link';
import { mockComponentMeasureEnhanced } from '../../../helpers/mocks/component';
import { mockHtmlElement } from '../../../helpers/mocks/dom';
import { click, mockEvent } from '../../../helpers/testUtils';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import HistoryIcon from '../../components/icons/HistoryIcon';
import { translate } from '../../helpers/l10n';
import { getActivityUrl, getMeasureHistoryUrl } from '../../helpers/urls';
import { GraphType } from '../../types/project-activity';
import { isCustomGraph } from '../activity-graph/utils';
import './ActivityLink.css';
+import Link from './Link';
export interface ActivityLinkProps {
branchLike?: BranchLike;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
-import { isWebUri } from 'valid-url';
import HelpTooltip from '../../components/controls/HelpTooltip';
-import DetachIcon from '../../components/icons/DetachIcon';
+import Link from './Link';
export interface DocumentationTooltipProps {
children?: React.ReactNode;
// they won't be "clickable"), we hide the whole links section.
// See https://sarahmhigley.com/writing/tooltips-in-wcag-21/
aria-hidden={true}>
- {inPlace ? (
- <Link to={href}>
- <span>{label}</span>
- </Link>
- ) : (
- <Link
- className="display-inline-flex-center"
- to={href}
- rel="noopener noreferrer"
- target="_blank">
- {isWebUri(href) && <DetachIcon size={14} className="spacer-right" />}
- <span>{label}</span>
- </Link>
- )}
+ <Link to={href} target={inPlace ? undefined : '_blank'}>
+ {label}
+ </Link>
</div>
))}
</>
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import * as React from 'react';
+import { Link as ReactRouterDomLink, LinkProps as ReactRouterDomLinkProps } from 'react-router-dom';
+import { isWebUri } from 'valid-url';
+import { translate } from '../../helpers/l10n';
+import DetachIcon from '../icons/DetachIcon';
+
+type OriginalLinkProps = ReactRouterDomLinkProps & React.RefAttributes<HTMLAnchorElement>;
+
+export interface LinkProps extends OriginalLinkProps {
+ size?: number;
+}
+
+const DEFAULT_ICON_SIZE = 14;
+
+function Link({ children, size, ...props }: LinkProps, ref: React.ForwardedRef<HTMLAnchorElement>) {
+ if (typeof props.to === 'string' && isWebUri(props.to)) {
+ // The new React Router DOM's <Link> component no longer supports external links.
+ // We have to use the <a> element instead.
+ const { to, ...anchorProps } = props;
+ return (
+ <a
+ ref={ref}
+ href={to}
+ rel={anchorProps.target === '_blank' ? 'noopener noreferrer' : undefined}
+ {...anchorProps}>
+ {anchorProps.target === '_blank' && (
+ <DetachIcon
+ ariaLabel={translate('opens_in_new_window')}
+ size={size || DEFAULT_ICON_SIZE}
+ className="little-spacer-right"
+ />
+ )}
+ {children}
+ </a>
+ );
+ }
+
+ return (
+ <ReactRouterDomLink
+ ref={ref}
+ rel={props.target === '_blank' ? 'noopener noreferrer' : undefined}
+ {...props}>
+ {children}
+ </ReactRouterDomLink>
+ );
+}
+
+export default React.forwardRef(Link);
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
import MeasuresIcon from '../../components/icons/MeasuresIcon';
import { translate } from '../../helpers/l10n';
import { getComponentDrilldownUrl } from '../../helpers/urls';
import { BranchLike } from '../../types/branch-like';
+import Link from './Link';
import './MeasuresLink.css';
export interface MeasuresLinkProps {
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import { screen } from '@testing-library/react';
+import * as React from 'react';
+import { renderComponent } from '../../../helpers/testReactTestingUtils';
+import Link, { LinkProps } from '../Link';
+
+it('should correctly render an internal link', () => {
+ renderLink();
+ expect(screen.getByRole('link').getAttribute('rel')).not.toBe('noopener noreferrer');
+ expect(screen.queryByLabelText('opens_in_new_window')).not.toBeInTheDocument();
+});
+
+it('should correctly render a link that opens in a new window, but is not considered external', () => {
+ renderLink({ target: '_blank', to: '/path' });
+ expect(screen.getByRole('link').getAttribute('rel')).toBe('noopener noreferrer');
+});
+
+it('should correctly render an external link', () => {
+ renderLink({ target: '_blank', to: 'http://example.com' });
+ expect(screen.getByRole('link').getAttribute('rel')).toBe('noopener noreferrer');
+ expect(screen.getByLabelText('opens_in_new_window')).toBeInTheDocument();
+});
+
+function renderLink(props: Partial<LinkProps> = {}) {
+ return renderComponent(
+ <Link to={{ pathname: 'to' }} {...props}>
+ click me
+ </Link>
+ );
+}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
-<Link
+<ForwardRef(Link)
className="activity-link"
to={
Object {
<span>
portfolio.activity_link
</span>
-</Link>
+</ForwardRef(Link)>
`;
exports[`renders correctly 2`] = `
-<Link
+<ForwardRef(Link)
className="activity-link"
to={
Object {
<span>
Foo
</span>
-</Link>
+</ForwardRef(Link)>
`;
exports[`renders correctly 3`] = `
-<Link
+<ForwardRef(Link)
className="activity-link"
to={
Object {
<span>
portfolio.activity_link
</span>
-</Link>
+</ForwardRef(Link)>
`;
exports[`renders correctly 4`] = `
-<Link
+<ForwardRef(Link)
className="activity-link"
to={
Object {
<span>
portfolio.activity_link
</span>
-</Link>
+</ForwardRef(Link)>
`;
aria-hidden={true}
className="little-spacer-bottom"
>
- <Link
- className="display-inline-flex-center"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
target="_blank"
to="http://link.tosome.place"
>
- <DetachIcon
- className="spacer-right"
- size={14}
- />
- <span>
- external link
- </span>
- </Link>
+ external link
+ </ForwardRef(Link)>
</div>
<div
aria-hidden={true}
className="little-spacer-bottom"
>
- <Link
- className="display-inline-flex-center"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
target="_blank"
to="/documentation/guide"
>
- <span>
- internal link
- </span>
- </Link>
+ internal link
+ </ForwardRef(Link)>
</div>
<div
aria-hidden={true}
className="little-spacer-bottom"
>
- <Link
+ <ForwardRef(Link)
to="/projects"
>
- <span>
- in place
- </span>
- </Link>
+ in place
+ </ForwardRef(Link)>
</div>
</React.Fragment>
</div>
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders 1`] = `
-<Link
+<ForwardRef(Link)
className="measures-link"
to={
Object {
<span>
portfolio.measures_link
</span>
-</Link>
+</ForwardRef(Link)>
`;
exports[`renders 2`] = `
-<Link
+<ForwardRef(Link)
className="measures-link"
to={
Object {
<span>
Foo
</span>
-</Link>
+</ForwardRef(Link)>
`;
exports[`renders 3`] = `
-<Link
+<ForwardRef(Link)
className="measures-link"
to={
Object {
<span>
portfolio.measures_link
</span>
-</Link>
+</ForwardRef(Link)>
`;
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link, To } from 'react-router-dom';
+import { To } from 'react-router-dom';
+import Link from '../common/Link';
import DropdownIcon from '../icons/DropdownIcon';
import SettingsIcon from '../icons/SettingsIcon';
import { PopupPlacement } from '../ui/popups';
exports[`ActionsDropdownItem should render correctly 2`] = `
<li>
- <Link
+ <ForwardRef(Link)
className="foo text-danger"
id="baz"
to="path/name"
<span>
Hello world
</span>
- </Link>
+ </ForwardRef(Link)>
</li>
`;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import withAppStateContext from '../../app/components/app-state/withAppStateContext';
-import DetachIcon from '../../components/icons/DetachIcon';
import { AppState } from '../../types/appstate';
+import Link from '../common/Link';
interface OwnProps {
appState: AppState;
);
}
- return (
- <>
- <a href={href} rel="noopener noreferrer" target="_blank" {...other}>
- {children}
- </a>
- <DetachIcon
- className="text-muted little-spacer-left little-spacer-right text-baseline"
- size={12}
- />
- </>
- );
+ return href ? (
+ <Link to={href} target="_blank" size={12} {...other}>
+ {children}
+ </Link>
+ ) : null;
}
}
*/
import { forEach } from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
-import DetachIcon from '../../components/icons/DetachIcon';
import { Dict } from '../../types/types';
+import Link from '../common/Link';
interface OwnProps {
customProps?: Dict<string>;
href = `/documentation/${href.substr(1)}`;
return (
- <Link rel="noopener noreferrer" target="_blank" to={href} {...other}>
+ <Link target="_blank" to={href} {...other}>
{children}
</Link>
);
}
- return (
- <>
- <a href={href} rel="noopener noreferrer" target="_blank" {...other}>
- {children}
- </a>
- <DetachIcon className="little-spacer-left little-spacer-right text-baseline" size={12} />
- </>
- );
+ return href ? (
+ <Link size={12} to={href} target="_blank" {...other}>
+ {children}
+ </Link>
+ ) : null;
}
`;
exports[`should render documentation link 1`] = `
-<Link
+<ForwardRef(Link)
to="/documentation/foo/bar"
>
link text
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render simple link 1`] = `
-<Fragment>
- <a
- href="http://sample.com"
- rel="noopener noreferrer"
- target="_blank"
- >
- link text
- </a>
- <DetachIcon
- className="text-muted little-spacer-left little-spacer-right text-baseline"
- size={12}
- />
-</Fragment>
+<ForwardRef(Link)
+ size={12}
+ target="_blank"
+ to="http://sample.com"
+>
+ link text
+</ForwardRef(Link)>
`;
exports[`should render sonarqube admin link on sonarqube for admin 1`] = `
`;
exports[`should render sonarqube admin link on sonarqube for admin 2`] = `
-<Link
+<ForwardRef(Link)
target="_blank"
to="/foo/bar"
>
link text
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render sonarqube link on sonarqube 1`] = `
`;
exports[`should render sonarqube link on sonarqube 2`] = `
-<Link
+<ForwardRef(Link)
target="_blank"
to="/foo/bar"
>
link text
-</Link>
+</ForwardRef(Link)>
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render internal link 1`] = `
-<Link
- rel="noopener noreferrer"
+<ForwardRef(Link)
target="_blank"
to="/documentation/foo/bar"
/>
`;
exports[`should render links with custom props 1`] = `
-<Link
- rel="noopener noreferrer"
+<ForwardRef(Link)
target="_blank"
to="/documentation/foo/baz"
/>
`;
exports[`should render simple link 1`] = `
-<Fragment>
- <a
- href="http://sample.com"
- rel="noopener noreferrer"
- target="_blank"
- />
- <DetachIcon
- className="little-spacer-left little-spacer-right text-baseline"
- size={12}
- />
-</Fragment>
+<ForwardRef(Link)
+ size={12}
+ target="_blank"
+ to="http://sample.com"
+/>
`;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { translate } from '../../helpers/l10n';
import { getBaseUrl } from '../../helpers/system';
import { SuggestionLink } from '../../types/types';
+import Link from '../common/Link';
import { DropdownOverlay } from '../controls/Dropdown';
import { SuggestionsContext } from './SuggestionsContext';
</ul>
<ul className="menu abs-width-240" role="group">
<li>
- <a href="https://community.sonarsource.com/" rel="noopener noreferrer" target="_blank">
+ <Link
+ className="display-flex-center"
+ to="https://community.sonarsource.com/"
+ target="_blank">
{translate('embed_docs.get_help')}
- </a>
+ </Link>
</li>
</ul>
<ul className="menu abs-width-240" role="group">
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { RuleStatus } from '../../../types/rules';
import DocumentationTooltip from '../../common/DocumentationTooltip';
+import Link from '../../common/Link';
import SonarLintIcon from '../../icons/SonarLintIcon';
import { WorkspaceContext } from '../../workspace/context';
defaultMessage={translate('issue.quick_fix_available_with_sonarlint')}
values={{
link: (
- <a
- href="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-quick-fix"
- rel="noopener noreferrer"
+ <Link
+ to="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-quick-fix"
target="_blank">
SonarLint
- </a>
+ </Link>
)
}}
/>
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import Tooltip from '../../../components/controls/Tooltip';
import LinkIcon from '../../../components/icons/LinkIcon';
import { getBranchLikeQuery } from '../../../helpers/branch-like';
<div
className="issue-meta"
>
- <Link
+ <ForwardRef(Link)
className="js-issue-permalink link-no-underline"
target="_blank"
title="permalink"
}
>
<LinkIcon />
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
</div>
<div
className="issue-meta"
>
- <Link
+ <ForwardRef(Link)
className="js-issue-permalink link-no-underline"
target="_blank"
title="permalink"
}
>
<LinkIcon />
- </Link>
+ </ForwardRef(Link)>
</div>
<div
className="issue-meta"
<div
className="issue-meta"
>
- <Link
+ <ForwardRef(Link)
className="js-issue-permalink link-no-underline"
target="_blank"
title="permalink"
}
>
<LinkIcon />
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
</div>
<div
className="issue-meta"
>
- <Link
+ <ForwardRef(Link)
target="_blank"
to={
Object {
7
</LocationIndex>
</Tooltip>
- </Link>
+ </ForwardRef(Link)>
</div>
<div
className="issue-meta"
>
- <Link
+ <ForwardRef(Link)
className="js-issue-permalink link-no-underline"
target="_blank"
title="permalink"
}
>
<LinkIcon />
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
</div>
import { FormattedMessage } from 'react-intl';
import { DropdownOverlay } from '../../../components/controls/Dropdown';
import { translate } from '../../../helpers/l10n';
+import Link from '../../common/Link';
import SelectList from '../../common/SelectList';
import SelectListItem from '../../common/SelectListItem';
id={`issue.transition.${transition}.description`}
values={{
community_plug_link: (
- <a href="https://community.sonarsource.com/" rel="noopener noreferrer" target="_blank">
+ <Link to="https://community.sonarsource.com/" target="_blank">
{translate('issue.transition.community_plug_link')}
- </a>
+ </Link>
)
}}
/>
*/
import * as React from 'react';
import { translate } from '../../helpers/l10n';
+import Link from '../common/Link';
import CheckIcon from '../icons/CheckIcon';
import ClearIcon from '../icons/ClearIcon';
-import DetachIcon from '../icons/DetachIcon';
export default function OtherContextOption() {
return (
</p>
<h2>{translate('coding_rules.context.others.title_feedback')}</h2>
<p>{translate('coding_rules.context.others.feedback_description_1')}</p>
- <a
- href="https://portal.productboard.com/sonarsource/3-sonarqube/submit-idea"
- rel="noopener noreferrer"
+ <Link
+ to="https://portal.productboard.com/sonarsource/3-sonarqube/submit-idea"
target="_blank">
{translate('coding_rules.context.others.feedback_description.link')}
- <DetachIcon className="spacer-left" />
- </a>
+ </Link>
<p>{translate('coding_rules.context.others.feedback_description_2')}</p>
</>
);
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router-dom';
import { getBranchLikeQuery } from '../../helpers/branch-like';
import { getComponentDrilldownUrl, getComponentIssuesUrl } from '../../helpers/urls';
import { BranchLike } from '../../types/branch-like';
import { MetricKey } from '../../types/metrics';
import { Dict } from '../../types/types';
+import Link from '../common/Link';
const ISSUE_MEASURES = [
MetricKey.violations,
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly 1`] = `
-<Link
+<ForwardRef(Link)
to={
Object {
"pathname": "/component_measures",
}
>
label
-</Link>
+</ForwardRef(Link)>
`;
exports[`should render issuesLink correctly 1`] = `
-<Link
+<ForwardRef(Link)
to={
Object {
"hash": "",
}
>
label
-</Link>
+</ForwardRef(Link)>
`;
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { translate } from '../../../helpers/l10n';
+import Link from '../../common/Link';
export default function ExtensionInstallationStepContent() {
return (
id="onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence"
values={{
link: (
- <a
- href="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
- rel="noopener noreferrer"
+ <Link
+ to="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
target="_blank">
{translate(
'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.link'
)}
- </a>
+ </Link>
),
button: (
<strong>
"button": <strong>
onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.button
</strong>,
- "link": <a
- href="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
>
onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { Alert } from '../../../../components/ui/Alert';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { translate } from '../../../../helpers/l10n';
import { AlmKeys } from '../../../../types/alm-settings';
+import Link from '../../../common/Link';
export default function AlertClassicEditor() {
return (
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import withAppStateContext from '../../../../app/components/app-state/withAppStateContext';
import { Alert } from '../../../../components/ui/Alert';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { translate } from '../../../../helpers/l10n';
import { AlmKeys } from '../../../../types/alm-settings';
import { AppState } from '../../../../types/appstate';
+import Link from '../../../common/Link';
import SentenceWithHighlights from '../../components/SentenceWithHighlights';
export interface PublishStepsProps {
id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.info"
values={
Object {
- "doc_link": <Link
+ "doc_link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/azuredevops-integration/"
>
onboarding.tutorial.with.azure_pipelines.BranchAnalysis.info.doc_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/azuredevops-integration/"
>
onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens';
import { Button, DeleteButton } from '../../../components/controls/buttons';
import { ClipboardIconButton } from '../../../components/controls/clipboard';
import { TokenExpiration, TokenType } from '../../../types/token';
import { Component } from '../../../types/types';
import { LoggedInUser } from '../../../types/users';
+import Link from '../../common/Link';
import Select from '../../controls/Select';
import { getUniqueTokenName } from '../utils';
import React from 'react';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/system';
+import Link from '../../common/Link';
import { OSs, TutorialModes } from '../types';
import './GithubCFamilyExampleRepositories.css';
height={20}
src={`${getBaseUrl()}/images/alm/github.svg`}
/>
- <a className="spacer-left big" rel="noopener noreferrer" target="_blank" href={link}>
+ <Link className="spacer-left big" target="_blank" to={link}>
sonarsource-cfamily-examples
- </a>
+ </Link>
</div>
<p className="spacer-top">
{translate('onboarding.tutorial.cfamily.examples_repositories_description')}
height={20}
src="/images/alm/github.svg"
/>
- <a
+ <ForwardRef(Link)
className="spacer-left big"
- href="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq"
- rel="noopener noreferrer"
target="_blank"
+ to="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq"
>
sonarsource-cfamily-examples
- </a>
+ </ForwardRef(Link)>
</div>
<p
className="spacer-top"
height={20}
src="/images/alm/github.svg"
/>
- <a
+ <ForwardRef(Link)
className="spacer-left big"
- href="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq+macos+azure"
- rel="noopener noreferrer"
target="_blank"
+ to="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq+macos+azure"
>
sonarsource-cfamily-examples
- </a>
+ </ForwardRef(Link)>
</div>
<p
className="spacer-top"
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { rawSizes } from '../../../app/theme';
import { Button } from '../../../components/controls/buttons';
import ChevronRightIcon from '../../../components/icons/ChevronRightIcon';
import { Alert } from '../../../components/ui/Alert';
import { translate } from '../../../helpers/l10n';
import { AlmKeys } from '../../../types/alm-settings';
+import Link from '../../common/Link';
import SentenceWithHighlights from '../components/SentenceWithHighlights';
import Step from '../components/Step';
ProjectAlmBindingResponse
} from '../../../types/alm-settings';
import CodeSnippet from '../../common/CodeSnippet';
+import Link from '../../common/Link';
import LabelActionPair from '../components/LabelActionPair';
import SentenceWithHighlights from '../components/SentenceWithHighlights';
import { buildBitbucketCloudLink } from '../utils';
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={{
link: linkUrl ? (
- <a href={linkUrl} rel="noopener noreferrer" target="_blank">
+ <Link to={linkUrl} target="_blank">
{translate('onboarding.tutorial.with.jenkins.webhook', alm, 'step1.link')}
- </a>
+ </Link>
) : (
<strong>
{translate('onboarding.tutorial.with.jenkins.webhook', alm, 'step1.link')}
import { translate } from '../../../helpers/l10n';
import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings';
import CodeSnippet from '../../common/CodeSnippet';
+import Link from '../../common/Link';
import LabelActionPair from '../components/LabelActionPair';
import SentenceWithHighlights from '../components/SentenceWithHighlights';
import { buildGithubLink } from '../utils';
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={{
link: linkUrl ? (
- <a href={linkUrl} rel="noopener noreferrer" target="_blank">
+ <Link to={linkUrl} target="_blank">
{translate('onboarding.tutorial.with.jenkins.webhook.github.step1.link')}
- </a>
+ </Link>
) : (
<strong>
{translate('onboarding.tutorial.with.jenkins.webhook.github.step1.link')}
id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/jenkins/"
>
onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/jenkins/"
>
onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/jenkins/"
>
onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={
Object {
- "link": <a
- href="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
>
onboarding.tutorial.with.jenkins.webhook.bitbucket.step1.link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={
Object {
- "link": <a
- href="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
>
onboarding.tutorial.with.jenkins.webhook.bitbucket.step1.link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={
Object {
- "link": <a
- href="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
>
onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step1.link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={
Object {
- "link": <a
- href="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
>
onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step1.link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={
Object {
- "link": <a
- href="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
>
onboarding.tutorial.with.jenkins.webhook.github.step1.link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
values={
Object {
- "link": <a
- href="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
>
onboarding.tutorial.with.jenkins.webhook.github.step1.link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { translate } from '../../../helpers/l10n';
import { Component } from '../../../types/types';
+import Link from '../../common/Link';
export interface DoneNextStepsProps {
component: Component;
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens';
import { translate } from '../../../helpers/l10n';
import {
import { TokenExpiration, TokenType, UserToken } from '../../../types/token';
import { LoggedInUser } from '../../../types/users';
import DocumentationTooltip from '../../common/DocumentationTooltip';
+import Link from '../../common/Link';
import { Button, DeleteButton, SubmitButton } from '../../controls/buttons';
import Radio from '../../controls/Radio';
import Select from '../../controls/Select';
id="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
values={
Object {
- "link_branches": <Link
+ "link_branches": <ForwardRef(Link)
rel="noopener noreferrer"
target="_blank"
to="/documentation/branches/overview/"
>
onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches
- </Link>,
- "link_pr_analysis": <Link
+ </ForwardRef(Link)>,
+ "link_pr_analysis": <ForwardRef(Link)
rel="noopener noreferrer"
target="_blank"
to="/documentation/analysis/pull-request/"
>
onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
values={
Object {
- "link_branches": <Link
+ "link_branches": <ForwardRef(Link)
rel="noopener noreferrer"
target="_blank"
to="/documentation/branches/overview/"
>
onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches
- </Link>,
- "link_pr_analysis": <Link
+ </ForwardRef(Link)>,
+ "link_pr_analysis": <ForwardRef(Link)
rel="noopener noreferrer"
target="_blank"
to="/documentation/analysis/pull-request/"
>
onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.token.text"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/account/security"
>
onboarding.token.text.user_account
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.token.text"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/account/security"
>
onboarding.token.text.user_account
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.token.text"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/account/security"
>
onboarding.token.text.user_account
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.token.text"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/account/security"
>
onboarding.token.text.user_account
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.token.text"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/account/security"
>
onboarding.token.text.user_account
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.token.text"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/account/security"
>
onboarding.token.text.user_account
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { translate } from '../../../../helpers/l10n';
import { Component } from '../../../../types/types';
import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
import DoneNextSteps from '../DoneNextSteps';
export interface DotNetExecuteProps {
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { translate } from '../../../../helpers/l10n';
+import Link from '../../../common/Link';
import { DotNetProps } from './DotNet';
import DotNetExecute from './DotNetExecute';
values={{
code: <code>%PATH%</code>,
link: (
- <a
- href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
- rel="noopener noreferrer"
+ <Link
+ to="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
target="_blank">
{translate('onboarding.analysis.msbuild.docs_link')}
- </a>
+ </Link>
)
}}
/>
import { FormattedMessage } from 'react-intl';
import { translate } from '../../../../helpers/l10n';
import CodeSnippet from '../../../common/CodeSnippet';
+import Link from '../../../common/Link';
import { ClipboardButton } from '../../../controls/clipboard';
import { OSs } from '../../types';
dir: <code>bin</code>,
env_var: <code>{os === OSs.Windows ? '%PATH%' : 'PATH'}</code>,
link: (
- <a
- href="https://redirect.sonarsource.com/doc/download-scanner.html"
- rel="noopener noreferrer"
+ <Link
+ to="https://redirect.sonarsource.com/doc/download-scanner.html"
target="_blank">
{translate('onboarding.analysis.sq_scanner.docs_link')}
- </a>
+ </Link>
)
}}
/>
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { translate } from '../../../../helpers/l10n';
import CodeSnippet from '../../../common/CodeSnippet';
+import Link from '../../../common/Link';
import { OSs } from '../../types';
export interface ExecBuildWrapperProps {
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { translate } from '../../../../helpers/l10n';
import { Component } from '../../../../types/types';
import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
import { OSs } from '../../types';
import { quote } from '../../utils';
import DoneNextSteps from '../DoneNextSteps';
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { translate } from '../../../../helpers/l10n';
import { Component } from '../../../../types/types';
import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
import DoneNextSteps from '../DoneNextSteps';
export interface JavaGradleProps {
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
import { translate } from '../../../../helpers/l10n';
import { Component } from '../../../../types/types';
import CodeSnippet from '../../../common/CodeSnippet';
import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
import DoneNextSteps from '../DoneNextSteps';
export interface JavaMavenProps {
id="onboarding.analysis.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
>
onboarding.analysis.msbuild.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
"code": <code>
%PATH%
</code>,
- "link": <a
- href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
>
onboarding.analysis.msbuild.docs_link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
"env_var": <code>
PATH
</code>,
- "link": <a
- href="https://redirect.sonarsource.com/doc/download-scanner.html"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://redirect.sonarsource.com/doc/download-scanner.html"
>
onboarding.analysis.sq_scanner.docs_link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
"env_var": <code>
PATH
</code>,
- "link": <a
- href="https://redirect.sonarsource.com/doc/download-scanner.html"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://redirect.sonarsource.com/doc/download-scanner.html"
>
onboarding.analysis.sq_scanner.docs_link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
"env_var": <code>
%PATH%
</code>,
- "link": <a
- href="https://redirect.sonarsource.com/doc/download-scanner.html"
- rel="noopener noreferrer"
+ "link": <ForwardRef(Link)
target="_blank"
+ to="https://redirect.sonarsource.com/doc/download-scanner.html"
>
onboarding.analysis.sq_scanner.docs_link
- </a>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.build_wrapper.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/languages/cfamily/"
>
onboarding.analysis.build_wrapper.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.build_wrapper.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/languages/cfamily/"
>
onboarding.analysis.build_wrapper.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.build_wrapper.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/languages/cfamily/"
>
onboarding.analysis.build_wrapper.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.sq_scanner.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner/"
>
onboarding.analysis.sq_scanner.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.sq_scanner.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner/"
>
onboarding.analysis.sq_scanner.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.sq_scanner.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner/"
>
onboarding.analysis.sq_scanner.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.sq_scanner.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner/"
>
onboarding.analysis.sq_scanner.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.sq_scanner.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner/"
>
onboarding.analysis.sq_scanner.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.java.gradle.latest_version"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner-for-gradle/"
>
here
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner-for-gradle/"
>
onboarding.analysis.java.gradle.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
id="onboarding.analysis.docs"
values={
Object {
- "link": <Link
+ "link": <ForwardRef(Link)
target="_blank"
to="/documentation/analysis/scan/sonarscanner-for-maven/"
>
onboarding.analysis.java.maven.docs_link
- </Link>,
+ </ForwardRef(Link)>,
}
}
/>
import { AppState } from '../../types/appstate';
import { EditionKey } from '../../types/editions';
import { SystemUpgrade } from '../../types/system';
+import Link from '../common/Link';
import { ResetButtonLink } from '../controls/buttons';
import Modal from '../controls/Modal';
import { Alert, AlertVariant } from '../ui/Alert';
</div>
<div className="modal-foot">
{upgrading && <i className="spinner spacer-right" />}
- <a
- className="pull-left"
- href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
- rel="noopener noreferrer"
+ <Link
+ className="pull-left link-no-underline display-flex-center"
+ to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
target="_blank">
{translate('system.see_sonarqube_downloads')}
- </a>
+ </Link>
<ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>
</div>
</Modal>
import { translate, translateWithParameters } from '../../helpers/l10n';
import { EditionKey } from '../../types/editions';
import { SystemUpgrade } from '../../types/system';
+import Link from '../common/Link';
import DateFormatter from '../intl/DateFormatter';
import SystemUpgradeIntermediate from './SystemUpgradeIntermediate';
<h3 className="h1 spacer-bottom">
<strong>{header}</strong>
{!isPatch && (
- <a
+ <Link
className="spacer-left medium"
- href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
- rel="noopener noreferrer"
+ to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
target="_blank">
{translate('system.see_whats_new')}
- </a>
+ </Link>
)}
</h3>
<p>
</DateFormatter>
)}
{lastUpgrade.changeLogUrl && (
- <a
- className="spacer-left"
- href={lastUpgrade.changeLogUrl}
- rel="noopener noreferrer"
- target="_blank">
+ <Link className="spacer-left" to={lastUpgrade.changeLogUrl} target="_blank">
{translate('system.release_notes')}
- </a>
+ </Link>
)}
</div>
<SystemUpgradeIntermediate className="spacer-top" upgrades={systemUpgrades.slice(1)} />
target="_blank">
{translateWithParameters('system.download_x', lastUpgrade.version)}
</a>
- <a
+ <Link
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
target="_blank">
{translate('system.how_to_upgrade')}
- </a>
+ </Link>
</div>
</div>
);
<div
className="modal-foot"
>
- <a
- className="pull-left"
- href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
+ className="pull-left link-no-underline display-flex-center"
target="_blank"
+ to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
>
system.see_sonarqube_downloads
- </a>
+ </ForwardRef(Link)>
<ResetButtonLink
onClick={[MockFunction]}
>
<div
className="modal-foot"
>
- <a
- className="pull-left"
- href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
+ className="pull-left link-no-underline display-flex-center"
target="_blank"
+ to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
>
system.see_sonarqube_downloads
- </a>
+ </ForwardRef(Link)>
<ResetButtonLink
onClick={[MockFunction]}
>
<div
className="modal-foot"
>
- <a
- className="pull-left"
- href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
+ className="pull-left link-no-underline display-flex-center"
target="_blank"
+ to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
>
system.see_sonarqube_downloads
- </a>
+ </ForwardRef(Link)>
<ResetButtonLink
onClick={[MockFunction]}
>
<div
className="modal-foot"
>
- <a
- className="pull-left"
- href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
+ className="pull-left link-no-underline display-flex-center"
target="_blank"
+ to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
>
system.see_sonarqube_downloads
- </a>
+ </ForwardRef(Link)>
<ResetButtonLink
onClick={[MockFunction]}
>
<div
className="modal-foot"
>
- <a
- className="pull-left"
- href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
- rel="noopener noreferrer"
+ <ForwardRef(Link)
+ className="pull-left link-no-underline display-flex-center"
target="_blank"
+ to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
>
system.see_sonarqube_downloads
- </a>
+ </ForwardRef(Link)>
<ResetButtonLink
onClick={[MockFunction]}
>
<strong>
system.latest_version
</strong>
- <a
+ <ForwardRef(Link)
className="spacer-left medium"
- href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
- rel="noopener noreferrer"
target="_blank"
+ to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
>
system.see_whats_new
- </a>
+ </ForwardRef(Link)>
</h3>
<p>
<FormattedMessage
>
<Component />
</DateFormatter>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="http://changelog.url/"
- rel="noopener noreferrer"
target="_blank"
+ to="http://changelog.url/"
>
system.release_notes
- </a>
+ </ForwardRef(Link)>
</div>
<SystemUpgradeIntermediate
className="spacer-top"
>
system.download_x.5.6.7
</a>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
system.how_to_upgrade
- </a>
+ </ForwardRef(Link)>
</div>
</div>
`;
<strong>
system.lts_version
</strong>
- <a
+ <ForwardRef(Link)
className="spacer-left medium"
- href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
- rel="noopener noreferrer"
target="_blank"
+ to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
>
system.see_whats_new
- </a>
+ </ForwardRef(Link)>
</h3>
<p>
<FormattedMessage
>
<Component />
</DateFormatter>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="http://changelog.url/"
- rel="noopener noreferrer"
target="_blank"
+ to="http://changelog.url/"
>
system.release_notes
- </a>
+ </ForwardRef(Link)>
</div>
<SystemUpgradeIntermediate
className="spacer-top"
>
system.download_x.5.6.7
</a>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
system.how_to_upgrade
- </a>
+ </ForwardRef(Link)>
</div>
</div>
`;
>
<Component />
</DateFormatter>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="http://changelog.url/"
- rel="noopener noreferrer"
target="_blank"
+ to="http://changelog.url/"
>
system.release_notes
- </a>
+ </ForwardRef(Link)>
</div>
<SystemUpgradeIntermediate
className="spacer-top"
>
system.download_x.5.6.7
</a>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
system.how_to_upgrade
- </a>
+ </ForwardRef(Link)>
</div>
</div>
`;
<strong>
system.latest_version
</strong>
- <a
+ <ForwardRef(Link)
className="spacer-left medium"
- href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
- rel="noopener noreferrer"
target="_blank"
+ to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
>
system.see_whats_new
- </a>
+ </ForwardRef(Link)>
</h3>
<p>
<FormattedMessage
>
<Component />
</DateFormatter>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="http://changelog.url/"
- rel="noopener noreferrer"
target="_blank"
+ to="http://changelog.url/"
>
system.release_notes
- </a>
+ </ForwardRef(Link)>
</div>
<SystemUpgradeIntermediate
className="spacer-top"
>
system.download_x.5.6.7
</a>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
system.how_to_upgrade
- </a>
+ </ForwardRef(Link)>
</div>
</div>
`;
<strong>
system.latest_version
</strong>
- <a
+ <ForwardRef(Link)
className="spacer-left medium"
- href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
- rel="noopener noreferrer"
target="_blank"
+ to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
>
system.see_whats_new
- </a>
+ </ForwardRef(Link)>
</h3>
<p>
<FormattedMessage
>
<Component />
</DateFormatter>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="http://changelog.url/"
- rel="noopener noreferrer"
target="_blank"
+ to="http://changelog.url/"
>
system.release_notes
- </a>
+ </ForwardRef(Link)>
</div>
<SystemUpgradeIntermediate
className="spacer-top"
>
system.download_x.5.6.7
</a>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
system.how_to_upgrade
- </a>
+ </ForwardRef(Link)>
</div>
</div>
`;
<strong>
system.latest_version
</strong>
- <a
+ <ForwardRef(Link)
className="spacer-left medium"
- href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
- rel="noopener noreferrer"
target="_blank"
+ to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
>
system.see_whats_new
- </a>
+ </ForwardRef(Link)>
</h3>
<p>
<FormattedMessage
>
<Component />
</DateFormatter>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="http://changelog.url/"
- rel="noopener noreferrer"
target="_blank"
+ to="http://changelog.url/"
>
system.release_notes
- </a>
+ </ForwardRef(Link)>
</div>
<SystemUpgradeIntermediate
className="spacer-top"
>
system.download_x.5.6.7
</a>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
system.how_to_upgrade
- </a>
+ </ForwardRef(Link)>
</div>
</div>
`;
<strong>
system.latest_version
</strong>
- <a
+ <ForwardRef(Link)
className="spacer-left medium"
- href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
- rel="noopener noreferrer"
target="_blank"
+ to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
>
system.see_whats_new
- </a>
+ </ForwardRef(Link)>
</h3>
<p>
<FormattedMessage
>
<Component />
</DateFormatter>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="http://changelog.url/"
- rel="noopener noreferrer"
target="_blank"
+ to="http://changelog.url/"
>
system.release_notes
- </a>
+ </ForwardRef(Link)>
</div>
<SystemUpgradeIntermediate
className="spacer-top"
>
system.download_x.5.6.7
</a>
- <a
+ <ForwardRef(Link)
className="spacer-left"
- href="https://redirect.sonarsource.com/doc/upgrading.html"
- rel="noopener noreferrer"
target="_blank"
+ to="https://redirect.sonarsource.com/doc/upgrading.html"
>
system.how_to_upgrade
- </a>
+ </ForwardRef(Link)>
</div>
</div>
`;
*/
import { SystemUpgrade } from '../../types/system';
-export function mockUpgrades(override: Partial<SystemUpgrade>): SystemUpgrade {
+export function mockSystemUpgrade(override: Partial<SystemUpgrade> = {}): SystemUpgrade {
return {
version: '5.6.7',
description: 'Version 5.6.7 description',
no_results_search.favorites=We couldn't find any results matching selected criteria in your favorites.
no_results_search.2=Try to change filters to get some results.
no_results_search.favorites.2=Would you like to search among {url} projects?
+opens_in_new_window=Opens in a new window
page_extension_failed=Page extension failed.
page_not_found=The page you were looking for does not exist.
please_contact_administrator=Please contact the instance administrator.