Skip to content

Commit c6dbcd2

Browse files
Update documentation links (stolostron#3995)
* Update documentation links Signed-off-by: Kevin Cormier <kcormier@redhat.com> * Update snapshot Signed-off-by: Kevin Cormier <kcormier@redhat.com> --------- Signed-off-by: Kevin Cormier <kcormier@redhat.com>
1 parent 7c4be24 commit c6dbcd2

File tree

7 files changed

+25
-21
lines changed

7 files changed

+25
-21
lines changed

frontend/src/lib/doc-util.tsx

+14-11
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ import { TextContent } from '@patternfly/react-core'
66
import { useTranslation } from './acm-i18next'
77

88
export const DOC_VERSION = '2.13'
9+
export const OCP_DOC_VERSION = '4.18'
910

1011
export const DOC_HOME = `https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/${DOC_VERSION}`
1112
export const DOC_BASE_PATH = `${DOC_HOME}/html-single`
12-
export const OCP_DOC_BASE_PATH = 'https://docs.redhat.com/en/documentation/openshift_container_platform'
13+
export const OCP_DOC = 'https://docs.redhat.com/en/documentation/openshift_container_platform'
14+
const OCP_DOC_HOME = `https://docs.redhat.com/en/documentation/openshift_container_platform/${OCP_DOC_VERSION}`
15+
const OCP_DOC_BASE_PATH = `${OCP_DOC_HOME}/html-single`
1316

1417
export const DOC_LINKS = {
1518
CLUSTERS: `${DOC_BASE_PATH}/clusters/index#cluster-intro`,
@@ -19,7 +22,6 @@ export const DOC_LINKS = {
1922
CREATE_CONNECTION_GCP: `${DOC_BASE_PATH}/clusters/index#creating-a-credential-for-google-cloud-platform`,
2023
CREATE_CONNECTION_VMWARE: `${DOC_BASE_PATH}/clusters/index#creating-a-credential-for-vmware-vsphere`,
2124
CREATE_CONNECTION_OPENSTACK: `${DOC_BASE_PATH}/clusters/index#creating-a-credential-for-openstack`,
22-
CREATE_CONNECTION_VIRTUALIZATION: `${DOC_BASE_PATH}/clusters/index#creating-a-credential-for-virtualization`,
2325
CREATE_CONNECTION_ANSIBLE: `${DOC_BASE_PATH}/clusters/index#creating-a-credential-for-ansible`,
2426
CREATE_CONNECTION_REDHATCLOUD: `${DOC_BASE_PATH}/clusters/index#creating-a-credential-for-openshift-cluster-manager`,
2527
CREATE_CONNECTION_PROXY: `${DOC_BASE_PATH}/clusters/index#cluster-intro`,
@@ -30,10 +32,8 @@ export const DOC_LINKS = {
3032
CREATE_CONNECTION_PROXY_OPENSTACK: `${DOC_BASE_PATH}/clusters/index#proxy-openstack`,
3133
CREATE_CONNECTION_PROXY_VIRTUALIZATION: `${DOC_BASE_PATH}/clusters/index#proxy-virtualization`,
3234
CREATE_CLUSTER: `${DOC_BASE_PATH}/clusters/index#create-intro`,
33-
CREATE_CLUSTER_HOSTED_AWS: `${DOC_BASE_PATH}/clusters/index#hosted-deploy-cluster-aws`,
3435
CREATE_CLUSTER_ON_PREMISE: `${DOC_BASE_PATH}/clusters/index#creating-a-cluster-on-premises`,
3536
CREATE_CLUSTER_PREREQ: `${DOC_BASE_PATH}/clusters/index#create-a-cluster-prereq`,
36-
CREATE_CLUSTER_STS_ARN: `${DOC_BASE_PATH}/clusters/cluster_mce_overview#create-role-sts-aws`,
3737
IMPORT_CLUSTER: `${DOC_BASE_PATH}/clusters/index#import-intro`,
3838
CLUSTER_SETS: `${DOC_BASE_PATH}/clusters/index#managedclustersets-intro`,
3939
GLOBAL_CLUSTER_SET: `${DOC_BASE_PATH}/clusters/index#managedclustersets_global`,
@@ -51,16 +51,19 @@ export const DOC_LINKS = {
5151
MANAGE_APPLICATIONS: `${DOC_BASE_PATH}/applications/index#managing-applications`,
5252
ANSIBLE_JOBS: `${DOC_BASE_PATH}/clusters/index#ansible-config-cluster`,
5353
POLICIES_OVERVIEW: `${DOC_BASE_PATH}/governance/index#policy-overview`,
54-
HYPERSHIFT_INTRO: `${DOC_BASE_PATH}/clusters/index#hosted-control-planes-intro`,
55-
HYPERSHIFT_DEPLOY_AWS: `${DOC_BASE_PATH}/clusters/index#hosted-control-planes-manage-aws`,
56-
HYPERSHIFT_MANAGE_KUBEVIRT: `${DOC_BASE_PATH}/clusters/index#hosted-control-planes-manage-kubevirt`,
57-
HOSTED_ENABLE_FEATURE_AWS: `${DOC_BASE_PATH}/clusters/index#enable-or-disable-hosted-control-planes`,
58-
HYPERSHIFT_OIDC: `${DOC_BASE_PATH}/clusters/index#hosted-create-aws-secret`,
59-
GITOPS_CONFIG: `${DOC_BASE_PATH}/applications/index#gitops-overview`,
54+
GITOPS_CONFIG: `${DOC_BASE_PATH}/gitops/gitops-overview`,
6055
DEPRECATIONS_AND_REMOVALS: `${DOC_BASE_PATH}/release_notes/release-notes#deprecations-removals`,
6156
ENABLE_OBSERVABILITY: `${DOC_BASE_PATH}/observability/observing-environments-intro#enabling-observability-service`,
6257
ACCESSING_CONSOLE: `${DOC_BASE_PATH}/web_console/web-console#accessing-your-console`,
63-
ROSA_DISCOVERY_AUTOIMPORT_POLICY_EXAMPLE: `${DOC_BASE_PATH}/clusters/cluster_mce_overview#import-discover-rosa`,
58+
ROSA_DISCOVERY_AUTOIMPORT_POLICY_EXAMPLE: `${DOC_BASE_PATH}/multicluster_engine_operator_with_red_hat_advanced_cluster_management/mce-acm-integration#import-discover-rosa`,
59+
// OCP doc links
60+
HYPERSHIFT_INTRO: `${OCP_DOC_BASE_PATH}/hosted_control_planes/hosted-control-planes-overview#hosted-control-planes-overview_hcp-overview`,
61+
HYPERSHIFT_DEPLOY_AWS: `${OCP_DOC_BASE_PATH}/hosted_control_planes/hosted-control-planes-overview#deploying-hosted-control-planes-on-aws`,
62+
HYPERSHIFT_STS_ARN: `${OCP_DOC_BASE_PATH}/hosted_control_planes/hosted-control-planes-overview#hcp-aws-create-role-sts-creds_hcp-deploy-aws`,
63+
HYPERSHIFT_MANAGE_KUBEVIRT: `${OCP_DOC_BASE_PATH}/hosted_control_planes/hosted-control-planes-overview#deploying-hosted-control-planes-on-openshift-virtualization`,
64+
HOSTED_ENABLE_FEATURE_AWS: `${OCP_DOC_BASE_PATH}/hosted_control_planes/hosted-control-planes-overview#hcp-enable-manual_hcp-enable-disable`,
65+
HYPERSHIFT_OIDC: `${OCP_DOC_BASE_PATH}/hosted_control_planes/hosted-control-planes-overview#hcp-aws-prereqs_hcp-deploy-aws`,
66+
// AI doc links
6467
NUTANIX_POST_INSTALL: `https://docs.redhat.com/en/documentation/assisted_installer_for_openshift_container_platform/2024/html/installing_openshift_container_platform_with_the_assisted_installer/assembly_installing-on-nutanix#nutanix-post-installation-configuration_installing-on-nutanix`,
6568
}
6669

frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAWSCLI.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ hcp create cluster aws \\
7171
content: (
7272
<Fragment>
7373
<Text component={TextVariants.p}>{t('This creates a STS credential JSON file.')}</Text>
74-
<Text component={TextVariants.a} href={DOC_LINKS.CREATE_CLUSTER_STS_ARN} target="_blank">
74+
<Text component={TextVariants.a} href={DOC_LINKS.HYPERSHIFT_STS_ARN} target="_blank">
7575
{t('Follow documentation for more information.')}
7676
</Text>
7777
</Fragment>
@@ -82,7 +82,7 @@ hcp create cluster aws \\
8282
content: (
8383
<Fragment>
8484
<Text component={TextVariants.p}>{t('This creates a AWS IAM role.')}</Text>
85-
<Text component={TextVariants.a} href={DOC_LINKS.CREATE_CLUSTER_STS_ARN} target="_blank">
85+
<Text component={TextVariants.a} href={DOC_LINKS.HYPERSHIFT_STS_ARN} target="_blank">
8686
{t('Follow documentation for more information.')}
8787
</Text>
8888
</Fragment>
@@ -120,7 +120,7 @@ hcp create cluster aws \\
120120
<CodeBlock actions={Actions(helperCommand, 'helper-command')}>
121121
<CodeBlockCode id="helper-command">{helperCommand}</CodeBlockCode>
122122
</CodeBlock>
123-
<ViewDocumentationLink doclink={DOC_LINKS.CREATE_CLUSTER_HOSTED_AWS} />
123+
<ViewDocumentationLink doclink={DOC_LINKS.HYPERSHIFT_DEPLOY_AWS} />
124124
</Fragment>
125125
),
126126
},

frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/common/DocPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const DocPage: React.FC<DocPageProps> = ({ listItems, breadcrumbs, onCancel, onB
3030
<>
3131
{t('page.header.create-cluster.tooltip')}
3232
<a
33-
href={DOC_LINKS.CREATE_CLUSTER_HOSTED_AWS}
33+
href={DOC_LINKS.HYPERSHIFT_DEPLOY_AWS}
3434
target="_blank"
3535
rel="noreferrer"
3636
style={{ display: 'block', marginTop: '4px' }}

frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/common/__snapshots__/GetHostedCard.test.tsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`GetHostedCard Return card data - Hypershift enabled 1`] = `
44
Object {
55
"alertContent": <a
6-
href="https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html-single/clusters/index#enable-or-disable-hosted-control-planes"
6+
href="https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html-single/hosted_control_planes/hosted-control-planes-overview#hcp-enable-manual_hcp-enable-disable"
77
rel="noopener noreferrer"
88
target="_blank"
99
>

frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ReleaseNotesLink.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { ExternalLinkAltIcon } from '@patternfly/react-icons'
44
import { useTranslation } from '../../../../../lib/acm-i18next'
5-
import { OCP_DOC_BASE_PATH } from '../../../../../lib/doc-util'
5+
import { OCP_DOC } from '../../../../../lib/doc-util'
66

77
// must be x.y.z version prop
88
export const ReleaseNotesLink = (props: { version?: string }) => {
@@ -15,7 +15,7 @@ export const ReleaseNotesLink = (props: { version?: string }) => {
1515

1616
return (
1717
<a
18-
href={`${OCP_DOC_BASE_PATH}/${x}.${y}/html/release_notes/ocp-${x}-${y}-release-notes.html#ocp-${x}-${y}-${z}`}
18+
href={`${OCP_DOC}/${x}.${y}/html/release_notes/ocp-${x}-${y}-release-notes.html#ocp-${x}-${y}-${z}`}
1919
target="_blank"
2020
rel="noreferrer"
2121
style={{ display: 'block', marginTop: '6px' }}

frontend/src/routes/Infrastructure/InfraEnvironments/InfraEnvironmentsPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { BulkActionModal, BulkActionModalProps } from '../../../components/BulkA
4040
import { RbacDropdown } from '../../../components/Rbac'
4141
import { useTranslation } from '../../../lib/acm-i18next'
4242
import { deleteResources } from '../../../lib/delete-resources'
43-
import { DOC_LINKS, OCP_DOC_BASE_PATH, ViewDocumentationLink } from '../../../lib/doc-util'
43+
import { DOC_LINKS, OCP_DOC, ViewDocumentationLink } from '../../../lib/doc-util'
4444
import { canUser, rbacDelete } from '../../../lib/rbac-util'
4545
import { NavigationPath } from '../../../NavigationPath'
4646
import { getDateTimeCell } from '../helpers/table-row-helpers'
@@ -424,7 +424,7 @@ const InfraEnvsTable: React.FC<InfraEnvsTableProps> = ({ infraEnvs, agents, agen
424424
const isCIMWorking = isStorage && isCIMConfigured({ agentServiceConfig })
425425

426426
const ocpVersion = getMajorMinorVersion(getCurrentClusterVersion(clusterVersion)) || 'latest'
427-
const docStorageUrl = `${OCP_DOC_BASE_PATH}/${ocpVersion}/post_installation_configuration/storage-configuration.html`
427+
const docStorageUrl = `${OCP_DOC}/${ocpVersion}/post_installation_configuration/storage-configuration.html`
428428

429429
const getDateTimeCellValue = (infraEnv: InfraEnvK8sResource) => {
430430
const dateTimeCell = getDateTimeCell(

frontend/src/routes/Infrastructure/VirtualMachines/VirtualMachinesPage.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { searchClient } from '../../Search/search-sdk/search-client'
4141
import { useSearchResultItemsQuery } from '../../Search/search-sdk/search-sdk'
4242
import { useSearchDefinitions } from '../../Search/searchDefinitions'
4343
import { ISearchResult, useGetRowActions } from '../../Search/SearchResults/utils'
44+
import { OCP_DOC } from '../../../lib/doc-util'
4445

4546
function VirtualMachineTable() {
4647
const { t } = useTranslation()
@@ -161,7 +162,7 @@ function VirtualMachineTable() {
161162
<AcmButton
162163
variant={'link'}
163164
component={TextVariants.a}
164-
href={`https://docs.openshift.com/container-platform/${ocpVersion}/virt/about_virt/about-virt.html`}
165+
href={`${OCP_DOC}/${ocpVersion}/html-single/virtualization/about#about-virt`}
165166
target="_blank"
166167
>
167168
{t('Learn more about OpenShift Virtualization')}

0 commit comments

Comments
 (0)