Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

Commit 0b1eca8

Browse files
authored
Merge pull request #235 from jtomasek/about-modal-update
Fix service labels and use DetailList in AboutModal
2 parents 7e16789 + 2bde918 commit 0b1eca8

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

Diff for: src/components/AboutModal.tsx

+16-15
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ import {
33
Button,
44
AboutModal as PFAboutModal,
55
TextContent,
6-
TextList,
7-
TextListItem,
86
ButtonVariant,
97
} from '@patternfly/react-core';
108
import { GIT_SHA, VERSION, SERVICE_LABELS } from '../config/standalone';
119
import redHatLogo from '../images/Logo-Red_Hat-OpenShift_Container_Platform-B-Reverse-RGB.png';
12-
import { Api } from 'facet-lib';
10+
import { Api, DetailList, DetailItem } from 'facet-lib';
1311

1412
const { getVersions, handleApiError } = Api;
1513

@@ -58,18 +56,21 @@ const AboutModal: React.FC<AboutModalProps> = ({ isOpen, onClose }) => {
5856
brandImageAlt="Assisted Installer Logo"
5957
>
6058
<TextContent>
61-
<TextList component="dl">
62-
<TextListItem component="dt">Assisted Installer UI version</TextListItem>
63-
<TextListItem component="dd">
64-
{VERSION} {GIT_SHA ? `(${GIT_SHA})` : ''}
65-
</TextListItem>
66-
{Object.keys(versions).map((version) => (
67-
<>
68-
<TextListItem component="dt">{SERVICE_LABELS[version] || version}</TextListItem>
69-
<TextListItem component="dd">{versions[version]}</TextListItem>
70-
</>
71-
))}
72-
</TextList>
59+
<DetailList>
60+
<>
61+
<DetailItem
62+
title="Assisted Installer UI version"
63+
value={`${VERSION} ${GIT_SHA ? `(${GIT_SHA})` : ''}`}
64+
/>
65+
{Object.keys(versions).map((version) => (
66+
<DetailItem
67+
key={version}
68+
title={SERVICE_LABELS[version] || version}
69+
value={versions[version]}
70+
/>
71+
))}
72+
</>
73+
</DetailList>
7374
</TextContent>
7475
</PFAboutModal>
7576
);

Diff for: src/config/standalone.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ export const VERSION = process.env.REACT_APP_VERSION;
22
export const GIT_SHA = process.env.REACT_APP_GIT_SHA;
33

44
export const SERVICE_LABELS: { [key in string]: string } = {
5-
'assisted-installer': 'Assisted Installer',
6-
'assisted-installer-service': 'Assisted Installer Service',
7-
'discovery-agent': 'Discovery Agent',
8-
'ignition-manifests-and-kubeconfig-generate': 'Ignition Manifests and Kubeconfig Generate',
9-
'image-builder': 'Image Builder',
5+
assistedInstaller: 'Assisted Installer',
6+
assistedInstallerService: 'Assisted Installer Service',
7+
discoveryAgent: 'Discovery Agent',
8+
ignitionManifestsAndKubeconfigGenerate: 'Ignition Manifests and Kubeconfig Generate',
9+
imageBuilder: 'Image Builder',
1010
};

0 commit comments

Comments
 (0)