constants: Move URLs to constants

Fixes #1923

This moves all URLs from code to constants.
This commit is contained in:
regexowl 2024-04-26 12:30:42 +02:00 committed by Lucas Garfield
parent bb91840eef
commit e9d28498e1
26 changed files with 146 additions and 68 deletions

View file

@ -13,6 +13,7 @@ import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import StepTemplate from './stepTemplate';
import { FILE_SYSTEM_CUSTOMIZATION_URL } from '../../../constants';
import FileSystemConfigButtons from '../formComponents/FileSystemConfigButtons';
export const reinitFileSystemConfiguratioStep = (change) => {
@ -116,7 +117,7 @@ const fileSystemConfigurationStep = {
variant="link"
icon={<ExternalLinkAltIcon />}
iconPosition="right"
href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/creating_customized_images_by_using_insights_image_builder/customizing-file-systems-during-the-image-creation"
href={FILE_SYSTEM_CUSTOMIZATION_URL}
className="pf-u-pl-0"
>
Customizing file systems during the image creation

View file

@ -8,6 +8,7 @@ import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import nextStepMapper from './imageOutputStepMapper';
import StepTemplate from './stepTemplate';
import { AZURE_AUTH_URL } from '../../../constants';
import CustomButtons from '../formComponents/CustomButtons';
const SourcesButton = () => {
@ -69,7 +70,7 @@ const msAzureStep = {
icon={<ExternalLinkAltIcon />}
iconPosition="right"
isInline
href="https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow"
href={AZURE_AUTH_URL}
>
Learn more about OAuth 2.0
</Button>

View file

@ -15,6 +15,11 @@ import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'
import StepTemplate from './stepTemplate';
import {
ACTIVATION_KEYS_PROD_URL,
ACTIVATION_KEYS_STAGE_URL,
RHC_URL,
} from '../../../constants';
import { useGetEnvironment } from '../../../Utilities/useGetEnvironment';
import CustomButtons from '../formComponents/CustomButtons';
@ -28,11 +33,7 @@ const ManageKeysButton = () => {
icon={<ExternalLinkAltIcon />}
iconPosition="right"
isInline
href={
isProd()
? 'https://console.redhat.com/insights/connector/activation-keys'
: 'https://console.stage.redhat.com/insights/connector/activation-keys'
}
href={isProd() ? ACTIVATION_KEYS_PROD_URL : ACTIVATION_KEYS_STAGE_URL}
>
Activation keys page
</Button>
@ -176,7 +177,7 @@ const registrationStep = {
icon={<ExternalLinkAltIcon />}
iconPosition="right"
isInline
href="https://access.redhat.com/articles/rhc"
href={RHC_URL}
>
Registering with remote host configuration
</Button>