Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/assets/ansible-brand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
236 changes: 89 additions & 147 deletions frontend/assets/awx-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/assets/galaxy-logo-ansibull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion frontend/awx/main/AwxMasthead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ import { useAwxWebSocketSubscription } from '../common/useAwxWebSocket';
import { getDocsBaseUrl } from '../common/util/getDocsBaseUrl';
import { WorkflowApproval } from '../interfaces/WorkflowApproval';
import { AwxRoute } from './AwxRoutes';
import { useAwxProductVersionInfo } from './useAwxProductVersionInfo';

export function AwxMasthead() {
const { t } = useTranslation();
const versionInfo = useAwxProductVersionInfo();
const openAnsibleAboutModal = useAnsibleAboutModal();
const config = useAwxConfig();
const pageNavigate = usePageNavigate();
Expand Down Expand Up @@ -58,7 +60,13 @@ export function AwxMasthead() {
</DropdownItem>
<DropdownItem
id="about"
onClick={() => openAnsibleAboutModal({ brandImageSrc: '/assets/awx-logo.svg' })}
onClick={() =>
openAnsibleAboutModal({
brandImageSrc: '/assets/awx-logo.svg',
versionInfo,
userInfo: activeAwxUser?.username,
})
}
data-cy="masthead-about"
>
{t('About')}
Expand Down
18 changes: 18 additions & 0 deletions frontend/awx/main/useAwxProductVersionInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { useEffect, useState } from 'react';
import { awxAPI } from '../common/api/awx-utils';

type ProductVersionInfo = Record<string, string | Record<string, string>>;

export function useAwxProductVersionInfo() {
const [, setError] = useState<Error>();
const [productVersionInfo, setProductVersionInfo] = useState<ProductVersionInfo>();
useEffect(() => {
fetch(awxAPI`/ping/`)
.then((response) => response.json())
.then((data) => setProductVersionInfo(data as ProductVersionInfo))
.catch((err) => {
setError(err as Error);
});
}, []);
return productVersionInfo;
}
Loading