Skip to content

Commit

Permalink
Use a single variable for all access.redhat.com docs URLs (#4391) (#4410
Browse files Browse the repository at this point in the history
)

EEs were the only one linking further down into the docs, but that link 404s now

No-Issue

(cherry picked from commit b7ecd4f)
  • Loading branch information
himdel committed Oct 16, 2023
1 parent a6707ef commit e94913e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 6 additions & 0 deletions config/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ const defaultConfigs = [
{ name: 'APPLICATION_NAME', default: 'Galaxy NG', scope: 'global' },
{ name: 'UI_EXTERNAL_LOGIN_URI', default: '/login', scope: 'global' },
{ name: 'UI_COMMIT_HASH', default: gitCommit, scope: 'global' },
{
name: 'UI_DOCS_URL',
default:
'https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.4',
scope: 'global',
},

// Webpack scope means the variable will only be available to webpack at
// build time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ export const PublishToControllerModal = (props: IProps) => {

const { image, isOpen, onClose } = props;

const docsLink =
'https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.4';

const docsLink = UI_DOCS_URL;
const noData =
controllers?.length === 0 &&
!filterIsSet(controllerParams, ['host__icontains']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,7 @@ class ExecutionEnvironmentList extends React.Component<RouteProps, IState> {
const pushImagesButton = (
<Button
variant='link'
onClick={() =>
window.open(
'https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.4/html-single/managing_containers_in_private_automation_hub/index',
'_blank',
)
}
onClick={() => window.open(UI_DOCS_URL, '_blank')}
data-cy='push-images-button'
>
<Trans>Push container images</Trans> <ExternalLinkAltIcon />
Expand Down
1 change: 1 addition & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ declare var APPLICATION_NAME;
declare var PULP_API_BASE_PATH;
declare var UI_BASE_PATH;
declare var UI_COMMIT_HASH;
declare var UI_DOCS_URL;
declare var UI_EXTERNAL_LOGIN_URI;
2 changes: 1 addition & 1 deletion src/loaders/standalone/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function standaloneMenu() {
!user.is_anonymous,
}),
menuItem(t`Documentation`, {
url: 'https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.4',
url: UI_DOCS_URL,
external: true,
condition: ({ settings, user }) =>
settings.GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_ACCESS ||
Expand Down

0 comments on commit e94913e

Please sign in to comment.