This repository was archived by the owner on Apr 30, 2023. It is now read-only.
File tree 2 files changed +44
-2
lines changed
2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import {
3
+ Button ,
4
+ AboutModal ,
5
+ TextContent ,
6
+ TextList ,
7
+ TextListItem ,
8
+ ButtonVariant ,
9
+ } from '@patternfly/react-core' ;
10
+ import { GIT_SHA , VERSION } from '../config/standalone' ;
11
+ import redHatLogo from '../images/Logo-Red_Hat-OpenShift_Container_Platform-B-Reverse-RGB.png' ;
12
+
13
+ export const AboutModalButton : React . FC = ( ) => {
14
+ const [ isModalOpen , setIsModalOpen ] = React . useState ( false ) ;
15
+ const closeModal = ( ) => setIsModalOpen ( false ) ;
16
+ const handleClick = ( ) => setIsModalOpen ( true ) ;
17
+ return (
18
+ < >
19
+ < Button variant = { ButtonVariant . plain } onClick = { handleClick } >
20
+ About
21
+ </ Button >
22
+ < AboutModal
23
+ isOpen = { isModalOpen }
24
+ onClose = { closeModal }
25
+ productName = "OpenShift Container Platform Assisted Installer"
26
+ brandImageSrc = { redHatLogo }
27
+ brandImageAlt = "Assisted Installer Logo"
28
+ >
29
+ < TextContent >
30
+ < TextList component = "dl" >
31
+ < TextListItem component = "dt" > Assisted Installer UI version</ TextListItem >
32
+ < TextListItem component = "dd" >
33
+ { VERSION } { GIT_SHA ? `(${ GIT_SHA } )` : '' }
34
+ </ TextListItem >
35
+ </ TextList >
36
+ </ TextContent >
37
+ </ AboutModal >
38
+ </ >
39
+ ) ;
40
+ } ;
41
+
42
+ export default AboutModalButton ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import metal3FacetLogo from '../../images/metal3_facet-whitetext.png';
4
4
import redhatLogo from '../../images/Logo-Red_Hat-OpenShift_Container_Platform-B-Reverse-RGB.png' ;
5
5
import { getProductBrandingCode , FEEDBACK_FORM_LINK } from '../../config/constants' ;
6
6
import { ExternalLinkAltIcon } from '@patternfly/react-icons' ;
7
- import { VERSION } from '../../config/standalone ' ;
7
+ import AboutModalButton from '../AboutModal ' ;
8
8
9
9
const getBrandingDetails = ( ) => {
10
10
switch ( getProductBrandingCode ( ) ) {
@@ -38,7 +38,7 @@ const Header: React.FC = () => {
38
38
>
39
39
Provide feedback < ExternalLinkAltIcon />
40
40
</ Button >
41
- { VERSION }
41
+ < AboutModalButton />
42
42
</ PageHeaderTools >
43
43
}
44
44
// toolbar={PageToolbar}
You can’t perform that action at this time.
0 commit comments