Skip to content

Commit

Permalink
Normalize interlink URL usage (opensearch-project#698)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey Myssak <[email protected]>
Signed-off-by: Sergey Myssak <[email protected]>
  • Loading branch information
SergeyMyssak and andreymyssak committed Apr 18, 2023
1 parent 1812bb6 commit 9e54be0
Show file tree
Hide file tree
Showing 37 changed files with 119 additions and 75 deletions.
4 changes: 3 additions & 1 deletion src-docs/src/views/badge/badge_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ const badgeHealthSnippet = [
import BadgeHref from './badge_href';
const badgeHrefSource = require('!!raw-loader!./badge_href');
const badgeHrefHtml = renderToHtml(BadgeHref);
const badgeHrefSnippet = ['<OuiBadge href="#" />'];
const badgeHrefSnippet = [
'<OuiBadge href="https://oui.opensearch.org/latest/" />',
];

import BadgeTruncate from './badge_truncate';
const badgeTruncateSource = require('!!raw-loader!./badge_truncate');
Expand Down
4 changes: 2 additions & 2 deletions src-docs/src/views/badge/beta_badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export default () => (
<OuiBetaBadge
label="Visualize"
iconType="visVisualBuilder"
href="https://playground.opensearch.org/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))"
href="https://oui.opensearch.org/latest/"
target="_blank"
/>
&emsp;
<OuiBetaBadge
label="Experimental"
href="https://opensearch.org/docs/latest/"
href="https://oui.opensearch.org/latest/"
target="_blank"
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src-docs/src/views/button/button_as_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default () => (

<OuiFlexItem grow={false}>
<OuiButtonIcon
href="https://opensearch.org/"
href="https://oui.opensearch.org/latest/"
iconType="link"
aria-label="This is a link"
/>
Expand All @@ -45,20 +45,20 @@ export default () => (

<OuiFlexGroup gutterSize="s" alignItems="center">
<OuiFlexItem grow={false}>
<OuiButton href="https://opensearch.org/" isDisabled>
<OuiButton href="https://oui.opensearch.org/latest/" isDisabled>
Disabled link
</OuiButton>
</OuiFlexItem>

<OuiFlexItem grow={false}>
<OuiButtonEmpty href="https://opensearch.org/" isDisabled>
<OuiButtonEmpty href="https://oui.opensearch.org/latest/" isDisabled>
Disabled empty link
</OuiButtonEmpty>
</OuiFlexItem>

<OuiFlexItem grow={false}>
<OuiButtonIcon
href="https://opensearch.org/"
href="https://oui.opensearch.org/latest/"
iconType="link"
aria-label="This is a link"
isDisabled
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/call_out/danger.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export default () => (
<OuiCallOut title="There was an error" color="danger" iconType="alert">
<p>
Now you have to fix it, but maybe{' '}
<OuiLink href="#">this link can help</OuiLink>.
<OuiLink href="https://oui.opensearch.org/latest/">
this link can help
</OuiLink>
.
</p>
</OuiCallOut>
);
2 changes: 1 addition & 1 deletion src-docs/src/views/call_out/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default () => (
</p>
<p>
When possible, its recommended to include links to product{' '}
<OuiLink href="https://opensearch.org/docs/latest/">
<OuiLink href="https://oui.opensearch.org/latest/">
documentation
</OuiLink>
.
Expand Down
6 changes: 2 additions & 4 deletions src-docs/src/views/call_out/warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ export default () => (
<p>
This feature is experimental, and should not be run in production. For
more information on this feature, visit{' '}
<OuiLink href="https://opensearch.org/docs/latest/">
documentation
</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">documentation</OuiLink>
.
</p>
<OuiButton href="#" color="warning">
<OuiButton href="https://oui.opensearch.org/latest/" color="warning">
Link button
</OuiButton>
</OuiCallOut>
Expand Down
9 changes: 6 additions & 3 deletions src-docs/src/views/card/card_footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export default () => (
<OuiSpacer size="xs" />
<OuiText size="s">
<p>
Choice <OuiLink href="https://opensearch.org">Two</OuiLink>
Choice{' '}
<OuiLink href="https://oui.opensearch.org/latest/">Two</OuiLink>
</p>
</OuiText>
</div>
Expand All @@ -55,7 +56,8 @@ export default () => (
<OuiSpacer size="xs" />
<OuiText size="s">
<p>
Choice <OuiLink href="https://opensearch.org">Two</OuiLink>
Choice{' '}
<OuiLink href="https://oui.opensearch.org/latest/">Two</OuiLink>
</p>
</OuiText>
</div>
Expand All @@ -73,7 +75,8 @@ export default () => (
<OuiSpacer size="xs" />
<OuiText size="s">
<p>
Choice <OuiLink href="https://opensearch.org">Two</OuiLink>
Choice{' '}
<OuiLink href="https://oui.opensearch.org/latest/">Two</OuiLink>
</p>
</OuiText>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/card/card_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default () => (
<OuiFlexItem>
<OuiCard
textAlign="left"
href="https://oui.opensearch.org/"
href="https://oui.opensearch.org/latest/"
image="https://source.unsplash.com/400x200/?City"
icon={<OuiIcon size="xxl" type="logoBeats" />}
title={'Title'}
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/card/card_layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default () => (
title={'No icon example'}
description="Example of a card's description. Stick to one or two sentences."
onClick={() => {}}
href="#"
href="https://oui.opensearch.org/latest/"
/>
</OuiFlexItem>
</OuiFlexGroup>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/datagrid/additional_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ for (let i = 1; i < 20; i++) {
),
email: faker.helpers.fake('{{internet.email}}'),
city: (
<OuiLink href="http://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.city}}')}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/datagrid/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for (let i = 1; i < 20; i++) {
),
email: faker.helpers.fake('{{internet.email}}'),
city: (
<OuiLink href="http://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.city}}')}
</OuiLink>
),
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ for (let i = 1; i < 100; i++) {
},
email: {
formatted: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
raw: email,
},
location: (
<Fragment>
{`${faker.helpers.fake('{{address.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ for (let i = 1; i < 100; i++) {
'{{name.lastName}}, {{name.firstName}} {{name.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{address.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory_enhancements.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ for (let i = 1; i < 100; i++) {
'{{name.lastName}}, {{name.firstName}} {{name.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{address.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory_pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ for (let i = 1; i < 100; i++) {
'{{name.lastName}}, {{name.firstName}} {{name.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{address.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory_sorting.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ for (let i = 1; i < 100; i++) {
'{{name.lastName}}, {{name.firstName}} {{name.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{address.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/virtualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ function RenderCellValue({ rowIndex, columnId }) {
const suffix = faker.helpers.fake('{{name.suffix}}');
data[rowIndex] = {
name: `${name} ${suffix}`,
email: <OuiLink href="">{email}</OuiLink>,
email: (
<OuiLink href="https://oui.opensearch.org/latest/">{email}</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{address.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/virtualization_constrained.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ function RenderCellValue({ rowIndex, columnId }) {
const suffix = faker.helpers.fake('{{name.suffix}}');
data[rowIndex] = {
name: `${name} ${suffix}`,
email: <OuiLink href="">{email}</OuiLink>,
email: (
<OuiLink href="https://oui.opensearch.org/latest/">{email}</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{address.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{address.country}}')}
</OuiLink>
</Fragment>
Expand Down
3 changes: 2 additions & 1 deletion src-docs/src/views/flyout/flyout_banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export default () => {
<OuiCallOut iconType="help">
<p>
Here&rsquo;s some stuff that you need to know. This banner helps
highlight important information. <OuiLink href="#">View docs</OuiLink>
highlight important information.{' '}
<OuiLink href="https://oui.opensearch.org/latest/">View docs</OuiLink>
</p>
</OuiCallOut>
);
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default () => {
const renderLogo = () => (
<OuiHeaderLogo
iconType="logoOpenSearch"
href="#"
href="https://oui.opensearch.org/latest/"
onClick={(e) => e.preventDefault()}
aria-label="Go to home page"
/>
Expand Down
12 changes: 10 additions & 2 deletions src-docs/src/views/header/header_alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ const HeaderUpdates = () => {
{
title: 'Control access to features',
text: 'Show or hide applications and features per space in Kibana.',
action: <OuiLink href="">Learn about feature controls</OuiLink>,
action: (
<OuiLink href="https://oui.opensearch.org/latest/">
Learn about feature controls
</OuiLink>
),
date: '1 May 2019',
badge: <OuiBadge>7.1</OuiBadge>,
},
Expand All @@ -71,7 +75,11 @@ const HeaderUpdates = () => {
title: 'Enter dark mode',
text:
'Kibana now supports the easy-on-the-eyes theme across the entire UI.',
action: <OuiLink href="">Go to Advanced Settings</OuiLink>,
action: (
<OuiLink href="https://oui.opensearch.org/latest/">
Go to Advanced Settings
</OuiLink>
),
date: '10 April 2019',
badge: <OuiBadge color="hollow">7.0</OuiBadge>,
},
Expand Down
4 changes: 3 additions & 1 deletion src-docs/src/views/header/header_elastic_pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ export default ({ theme }) => {
sections={[
{
items: [
<OuiHeaderLogo iconType="logoOpenSearch" href="">
<OuiHeaderLogo
iconType="logoOpenSearch"
href="https://oui.opensearch.org/latest/">
OpenSearch
</OuiHeaderLogo>,
deploymentMenu,
Expand Down
6 changes: 3 additions & 3 deletions src-docs/src/views/header/header_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ const headerLinksSnippet = `<OuiHeader>
<OuiHeaderSectionItem border="right">
<OuiHeaderLogo
iconType="iconName"
href=""
href="https://oui.opensearch.org/latest/"
/>
</OuiHeaderSectionItem>
<OuiHeaderLinks>
<OuiHeaderLink href="" isActive>
<OuiHeaderLink href="https://oui.opensearch.org/latest/" isActive>
<!-- First link -->
</OuiHeaderLink>
<OuiHeaderLink href="">
<OuiHeaderLink href="https://oui.opensearch.org/latest/">
<!-- Second link -->
</OuiHeaderLink>
</OuiHeaderLinks>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/header/header_sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default () => {
const renderLogo = (
<OuiHeaderLogo
iconType="logoOpenSearch"
href="#"
href="https://oui.opensearch.org/latest/"
onClick={(e) => e.preventDefault()}
aria-label="Navigate to home page"
/>
Expand Down
Loading

0 comments on commit 9e54be0

Please sign in to comment.