Skip to content

Commit

Permalink
CNV-52669: documentation file
Browse files Browse the repository at this point in the history
  • Loading branch information
upalatucci committed Dec 9, 2024
1 parent c0b910f commit 1677411
Show file tree
Hide file tree
Showing 55 changed files with 179 additions and 169 deletions.
2 changes: 1 addition & 1 deletion locales/en/plugin__kubevirt-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
"Map of string keys and values that can be used to organize and categorize (scope and select) objects": "Map of string keys and values that can be used to organize and categorize (scope and select) objects",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services.": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services.",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. ": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. ",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: <2>http://kubernetes.io/docs/user-guide/labels</2>": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: <2>http://kubernetes.io/docs/user-guide/labels</2>",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info:": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info:",
"masquerade": "masquerade",
"Masquerade": "Masquerade",
"Match label": "Match label",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { FC } from 'react';

import ExternalLink from '@kubevirt-utils/components/ExternalLink/ExternalLink';
import FormGroupHelperText from '@kubevirt-utils/components/FormGroupHelperText/FormGroupHelperText';
import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { FormGroup, NumberInput, Text, TextInput, Title } from '@patternfly/react-core';

Expand Down Expand Up @@ -51,10 +52,7 @@ const SchedulingSettings: FC<SchedulingSettingsProps> = ({
</Title>
<Text>
{t('Use cron formatting to set when and how often to look for new imports.')}{' '}
<ExternalLink
href={'https://www.redhat.com/sysadmin/automate-linux-tasks-cron'}
text={t('Learn more')}
/>
<ExternalLink href={documentationURL.CRON_INFO} text={t('Learn more')} />
</Text>
</div>
<FormGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import React, { FC } from 'react';

import ExternalLink from '@kubevirt-utils/components/ExternalLink/ExternalLink';
import { INSTANCE_TYPES_USER_GUIDE_LINK } from '@kubevirt-utils/constants/url-constants';
import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';

const PreferencePopoverContent: FC = () => {
const { t } = useKubevirtTranslation();
return (
<>
{t('The preferred VirtualMachine attribute values required to run a given workload.')}{' '}
<ExternalLink
href={`${INSTANCE_TYPES_USER_GUIDE_LINK}#virtualmachinepreference`}
text={t('Read more')}
/>
<ExternalLink href={documentationURL.INSTANCE_TYPES_USER_GUIDE} text={t('Read more')} />
</>
);
};
Expand Down
2 changes: 0 additions & 2 deletions src/utils/components/CloneVMModal/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ProgressStepVariant } from '@patternfly/react-core';

export const TEMPLATE_VM_NAME_LABEL = 'vm.kubevirt.io/name';
export const DOC_URL_ENABLING_USER_CLONE_PERMISSIONS =
'https://docs.openshift.com/container-platform/latest/virt/virtual_machines/cloning_vms/virt-enabling-user-permissions-to-clone-datavolumes.html';

export enum CLONING_STATUSES {
CREATING_TARGET_VM = 'CreatingTargetVM',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from 'react';

import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { Button, Stack, StackItem } from '@patternfly/react-core';
import { ExternalLinkSquareAltIcon } from '@patternfly/react-icons';

const CLOUD_INIT_DOC_LINK = 'https://cloudinit.readthedocs.io/en/latest/index.html';

const CloudInitInfoHelper = () => {
const { t } = useKubevirtTranslation();
return (
Expand All @@ -25,7 +24,7 @@ const CloudInitInfoHelper = () => {
size="sm"
variant="link"
>
<a href={CLOUD_INIT_DOC_LINK} rel="noopener noreferrer" target="_blank">
<a href={documentationURL.CLOUDINIT_INFO} rel="noopener noreferrer" target="_blank">
{t('Learn more')}
</a>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const MoreInformationDefault: React.FC<MoreInformationDefaultProps> = ({ textMor
<div>
{t('Download the MSI from ')}
<a
href="https://virt-manager.org/download/"
href="https://virt-manager.org/download.html"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { FC, useState } from 'react';
import { V1VirtualMachine, V1VirtualMachineInstance } from '@kubevirt-ui/kubevirt-api/kubevirt';
import ExternalLink from '@kubevirt-utils/components/ExternalLink/ExternalLink';
import TabModal from '@kubevirt-utils/components/TabModal/TabModal';
import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import {
Alert,
Expand All @@ -13,7 +14,6 @@ import {
StackItem,
} from '@patternfly/react-core';

import { NODE_PORTS_LINK } from '../utils/constants';
import { createRDPService } from '../utils/utils';

type RDPServiceModalProps = {
Expand Down Expand Up @@ -52,7 +52,7 @@ const RDPServiceModal: FC<RDPServiceModalProps> = ({ isOpen, onClose, vm, vmi })
<div>
{t('RDP Service is using a node port. Node port requires additional port resources.')}
<div>
<ExternalLink href={NODE_PORTS_LINK} text={t('Learn more')} />
<ExternalLink href={documentationURL.NODEPORTS} text={t('Learn more')} />
</div>
</div>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export const DEFAULT_VV_MIMETYPE = 'application/x-virt-viewer';
export const DEFAULT_RDP_FILENAME = 'console.rdp';
export const DEFAULT_RDP_MIMETYPE = 'application/rdp';
export const VMI_LABEL_AS_RDP_SERVICE_SELECTOR = 'vm.kubevirt.io/name';
export const NODE_PORTS_LINK =
'https://access.redhat.com/documentation/en-us/openshift_container_platform/4.10/html/networking/configuring-ingress-cluster-traffic#nw-using-nodeport_configuring-ingress-cluster-traffic-nodeport';

export const POD = 'POD';
export const MULTUS = 'MULTUS';
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState } from 'react';
import { Trans } from 'react-i18next';

import { ProjectRequestModel } from '@kubevirt-ui/kubevirt-api/console';
import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { isEmpty } from '@kubevirt-utils/utils/utils';
import { k8sCreate, K8sResourceCommon } from '@openshift-console/dynamic-plugin-sdk';
Expand Down Expand Up @@ -54,7 +55,7 @@ const CreateProjectModal: React.FC<CreateProjectModalProps> = ({
{t('An OpenShift project is an alternative representation of a Kubernetes namespace.')}
</Text>
<br />
<ExternalLink href="https://docs.okd.io/latest/applications/projects/working-with-projects.html">
<ExternalLink href={documentationURL.PROJECTS}>
{t('Learn more about working with projects')}
</ExternalLink>
<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Trans } from 'react-i18next';
import { Link } from 'react-router-dom-v5-compat';

import HelpTextIcon from '@kubevirt-utils/components/HelpTextIcon/HelpTextIcon';
import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { Checkbox, Flex, FlexItem, FormGroup, PopoverPosition } from '@patternfly/react-core';

Expand Down Expand Up @@ -44,8 +45,7 @@ const EnablePreallocationCheckbox: FC<EnablePreallocationCheckboxProps> = ({ isD
Refer to the
<Link
to={{
pathname:
'https://docs.openshift.com/container-platform/4.15/virt/storage/virt-using-preallocation-for-datavolumes.html',
pathname: documentationURL.DATAVOLUME_PREALLOCATIONS,
}}
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export const DYNAMIC_CREDENTIALS_SUPPORT = 'kubevirt.io/dynamic-credentials-support';

export const DYNAMIC_SSH_KEY_INJECTION_LINK =
'https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/virt-accessing-vm-ssh.html';
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { FC } from 'react';
import { Trans } from 'react-i18next';
import { Link } from 'react-router-dom-v5-compat';

import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';

const EndTourContent: FC = () => {
Expand All @@ -12,14 +13,11 @@ const EndTourContent: FC = () => {
Thank you for taking the tour.
<br />
Stay up-to-date with Openshift Virtualization on our{' '}
<Link target="_blank" to="https://www.redhat.com/en/blog/channel/red-hat-openshift">
<Link target="_blank" to={documentationURL.REDHAT_BLOG}>
Blog
</Link>{' '}
or continue to learn more in our{' '}
<Link
target="_blank"
to="https://docs.redhat.com/en/documentation/openshift_container_platform/4.16/html/virtualization/about#virt-what-you-can-do-with-virt_about-virt"
>
<Link target="_blank" to={documentationURL.VIRTUALIZATION_WHAT_YOU_CAN_DO}>
documentation
</Link>
.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { FC } from 'react';
import { Trans } from 'react-i18next';

import ExternalLink from '@kubevirt-utils/components/ExternalLink/ExternalLink';
import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { Button, ButtonVariant, Popover } from '@patternfly/react-core';
import { HelpIcon } from '@patternfly/react-icons';
Expand All @@ -25,10 +26,7 @@ const NetworkSelectHelperPopover: FC = () => {
VirtualMachine for high performance.
</div>
</Trans>
<ExternalLink
href="https://docs.openshift.com/container-platform/4.15/virt/vm_networking/virt-networking-overview.html#secondary-network-config"
text={t('Learn more')}
/>
<ExternalLink href={documentationURL.VIRT_SECONDARY_NETWORK} text={t('Learn more')} />
</>
}
headerContent={t('Network binding types')}
Expand Down
11 changes: 3 additions & 8 deletions src/utils/components/SSHAccess/components/ConsoleOverVirtctl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Link } from 'react-router-dom-v5-compat';

import { V1VirtualMachine } from '@kubevirt-ui/kubevirt-api/kubevirt';
import { getConsoleVirtctlCommand } from '@kubevirt-utils/components/SSHAccess/utils';
import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import {
DescriptionListDescription,
Expand Down Expand Up @@ -41,14 +42,8 @@ const ConsoleOverVirtctl: FC<ConsoleOverVirtctlProps> = ({ vm }) => {
<br />
<div>
For more details, see{' '}
<Link
to={
'https://docs.openshift.com/container-platform/4.15/virt/getting_started/virt-using-the-cli-tools.html'
}
>
Installing virtctl
</Link>{' '}
in Getting started with OpenShift Virtualization.
<Link to={documentationURL.VIRT_CTL}>Installing virtctl</Link> in Getting started
with OpenShift Virtualization.
</div>
</Trans>
<br />
Expand Down
3 changes: 0 additions & 3 deletions src/utils/components/SSHAccess/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ export const SSH_PORT = 22;

export const VMI_LABEL_AS_SSH_SERVICE_SELECTOR = 'kubevirt.io/domain';

export const NODE_PORTS_LINK =
'https://access.redhat.com/documentation/en-us/openshift_container_platform/4.14/html/networking/configuring-ingress-cluster-traffic#nw-using-nodeport_configuring-ingress-cluster-traffic-nodeport';

export enum SERVICE_TYPES {
LOAD_BALANCER = 'LoadBalancer',
NODE_PORT = 'NodePort',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import * as React from 'react';

import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';

const SnapshotSupportLink: React.FC = () => {
const { t } = useKubevirtTranslation();
return (
<a
href={
'https://access.redhat.com/documentation/en-us/openshift_container_platform/4.10/html/storage/using-container-storage-interface-csi#persistent-storage-csi-snapshots'
}
rel="noreferrer"
target="_blank"
>
<a href={documentationURL.SNAPSHOT} rel="noreferrer" target="_blank">
{t('Learn more about snapshots')}
</a>
);
Expand Down
5 changes: 2 additions & 3 deletions src/utils/components/SysprepModal/SysprepInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React, { FC } from 'react';

import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { Button, Stack, StackItem, Text, TextVariants } from '@patternfly/react-core';
import { ExternalLinkSquareAltIcon } from '@patternfly/react-icons';

import { SYSPREP_DOC_URL } from './consts';

const SysprepInfo: FC = () => {
const { t } = useKubevirtTranslation();

Expand All @@ -30,7 +29,7 @@ const SysprepInfo: FC = () => {
size="sm"
variant="link"
>
<a href={SYSPREP_DOC_URL} rel="noopener noreferrer" target="_blank">
<a href={documentationURL.SYSPREP} rel="noopener noreferrer" target="_blank">
{t('Learn more')}
</a>
</Button>
Expand Down
2 changes: 0 additions & 2 deletions src/utils/components/SysprepModal/consts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export const SYSPREP = 'sysprep';
export const SYSPREP_DOC_URL =
'https://docs.openshift.com/container-platform/4.10/virt/virtual_machines/virt-automating-windows-sysprep.html';
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { FC } from 'react';
import { Trans } from 'react-i18next';

import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { Button, Popover, Text, TextVariants } from '@patternfly/react-core';
import { ExternalLinkSquareAltIcon, OutlinedQuestionCircleIcon } from '@patternfly/react-icons';

import { SYSPREP_DOC_URL } from '../consts';

const SysprepUnattendHelperPopup: FC = () => {
const { t } = useKubevirtTranslation();
return (
Expand All @@ -27,7 +26,7 @@ const SysprepUnattendHelperPopup: FC = () => {
size="sm"
variant="link"
>
<a href={SYSPREP_DOC_URL} rel="noopener noreferrer" target="_blank">
<a href={documentationURL.SYSPREP} rel="noopener noreferrer" target="_blank">
{t('Learn more')}
</a>
</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { FC } from 'react';
import { Trans } from 'react-i18next';

import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { Button, Popover, Text, TextVariants } from '@patternfly/react-core';
import { ExternalLinkSquareAltIcon, OutlinedQuestionCircleIcon } from '@patternfly/react-icons';

import { SYSPREP_DOC_URL } from '../consts';

const SysprepUnattendHelperPopup: FC = () => {
const { t } = useKubevirtTranslation();
return (
Expand All @@ -26,7 +25,7 @@ const SysprepUnattendHelperPopup: FC = () => {
size="sm"
variant="link"
>
<a href={SYSPREP_DOC_URL} rel="noopener noreferrer" target="_blank">
<a href={documentationURL.SYSPREP} rel="noopener noreferrer" target="_blank">
{t('Learn more')}
</a>
</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';

import { documentationURL } from '@kubevirt-utils/constants/documentation';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
import { Text, TextVariants } from '@patternfly/react-core';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
Expand All @@ -18,11 +19,7 @@ const TolerationModalDescriptionText: React.FC = () => {
'Add tolerations to allow a VirtualMachine to schedule onto Nodes with matching taints.',
)}
</Text>
<Text
component={TextVariants.a}
href="https://docs.openshift.com/container-platform/4.10/virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.html#virt-about-node-placement-vms_virt-specifying-nodes-for-vms"
target="_blank"
>
<Text component={TextVariants.a} href={documentationURL.TAINTS_TOLERATION} target="_blank">
{t('Taints and Tolerations documentation')} <ExternalLinkAltIcon />
</Text>
</>
Expand Down
Loading

0 comments on commit 1677411

Please sign in to comment.