1- import { Fragment , FunctionComponent } from 'react' ;
1+ import { Fragment , FunctionComponent , useState } from 'react' ;
22import {
33 Button ,
44 Content ,
@@ -15,148 +15,107 @@ import {
1515 Divider ,
1616 Grid ,
1717 GridItem ,
18- Icon ,
19- Label ,
2018 PageSection ,
2119 Title
2220} from '../..' ;
2321import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon' ;
24- import PowerOffIcon from '@patternfly/react-icons/dist/esm/icons/power-off-icon' ;
25- import PortIcon from '@patternfly/react-icons/dist/esm/icons/port-icon' ;
26- import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon' ;
27- import AutomationIcon from '@patternfly/react-icons/dist/esm/icons/automation-icon' ;
22+ import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon' ;
2823import MultiContentCard from '@patternfly/react-component-groups/dist/dynamic/MultiContentCard' ;
29- import AnimationsOverviewCardStatus from './AnimationsOverviewCardStatus' ;
30- import AnimationsOverviewEventsCard from './AnimationsOverviewEventsCard' ;
24+ import AnimationsOverviewClusterInventory from './AnimationsOverviewClusterInventory' ;
25+ import AnimationsOverviewNetworkActivity from './AnimationsOverviewNetworkActivity' ;
26+ import AnimationsOverviewStorage from './AnimationsOverviewStorage' ;
27+ import AnimationsOverviewMemoryUtilization from './AnimationsOverviewMemoryUtilization' ;
28+ import openshiftLogo from './assets/Summit-collage-depoying-openshift-product-icon-RH.png' ;
29+
30+ interface AnimationsOverviewProps {
31+ recentActivityCard ?: React . ReactNode ;
32+ }
33+
34+ export const AnimationsOverview : FunctionComponent < AnimationsOverviewProps > = ( { recentActivityCard } ) => {
35+ const [ displayMultiContentCard , setDisplayMultiContentCard ] = useState ( true ) ;
36+
37+ const handleCloseMultiContentCard = ( ) => {
38+ setDisplayMultiContentCard ( false ) ;
39+ } ;
3140
32- export const AnimationsOverview : FunctionComponent = ( ) => {
3341 const cards = [
3442 // Card 1: Performance
3543 < Card isFullHeight isPlain key = "card-1" >
3644 < CardHeader >
37- < Content >
38- < Label variant = "outline" color = "blue" icon = { < PortIcon /> } >
39- Performance
40- </ Label >
41- </ Content >
45+ < Content component = { ContentVariants . h3 } > Animations</ Content >
4246 </ CardHeader >
4347 < CardBody >
4448 < Content component = { ContentVariants . p } className = "pf-v6-u-mb-sm" >
45- Upgrade your kernel version to remediate ntpd time sync issues, kernel panics, network instabilities and
46- issues with system performance
47- </ Content >
48- < Content className = "pf-v6-u-mb-md" >
49- < a href = "#" > 378 systems</ a >
50- </ Content >
51- < Content className = "pf-v6-u-mb-md" >
52- < Label status = "danger" variant = "outline" >
53- Incident
54- </ Label >
55- </ Content >
56- < Content className = "pf-v6-u-mb-md" >
57- < Icon size = "md" isInline >
58- < PowerOffIcon />
59- </ Icon >
60- < span >
61- { ' ' }
62- System reboot < b > is not</ b > required
63- </ span >
49+ Animations are a new way to interact with your data. They are a way to visualize your data in a way that is
50+ easy to understand and use.
6451 </ Content >
6552 </ CardBody >
6653 < CardFooter >
6754 < Button variant = "link" icon = { < ArrowRightIcon /> } iconPosition = "end" isInline >
68- View pathway
55+ They're everywhere
6956 </ Button >
7057 </ CardFooter >
7158 </ Card > ,
7259 // Card 2: Stability
7360 < Card isFullHeight isPlain key = "card-2" >
7461 < CardHeader >
75- < Content >
76- < Label variant = "outline" color = "blue" icon = { < CubeIcon /> } >
77- Stability
78- </ Label >
79- </ Content >
62+ < Content component = { ContentVariants . h3 } > Network security</ Content >
8063 </ CardHeader >
8164 < CardBody >
8265 < Content component = { ContentVariants . p } className = "pf-v6-u-mb-sm" >
83- Adjust your networking configuration to get ahead of network performance degradations and packet losses.
84- </ Content >
85- < Content className = "pf-v6-u-mb-md" >
86- < a href = "#" > 211 systems</ a >
87- </ Content >
88- < Content className = "pf-v6-u-mb-md" >
89- < Label status = "danger" variant = "outline" >
90- Incident
91- </ Label >
92- </ Content >
93- < Content className = "pf-v6-u-mb-md" >
94- < Icon size = "md" isInline >
95- < PowerOffIcon />
96- </ Icon >
97- < span >
98- { ' ' }
99- System reboot < b > is</ b > required
100- </ span >
66+ Network security is a critical part of any organization's security posture.
10167 </ Content >
10268 </ CardBody >
10369 < CardFooter >
10470 < Button variant = "link" icon = { < ArrowRightIcon /> } iconPosition = "end" isInline >
105- View pathway
71+ Security updates
10672 </ Button >
10773 </ CardFooter >
10874 </ Card > ,
10975 // Card 3: Availability
11076 < Card isFullHeight isPlain key = "card-3" >
11177 < CardHeader >
112- < Content >
113- < Label variant = "outline" color = "blue" icon = { < AutomationIcon /> } >
114- Availability
115- </ Label >
116- </ Content >
78+ < Content component = { ContentVariants . h3 } > Cluster alerting</ Content >
11779 </ CardHeader >
11880 < CardBody >
11981 < Content component = { ContentVariants . p } className = "pf-v6-u-mb-sm" >
120- Fine tune your Oracle DB configuration to improve database performance and avoid process failure
121- </ Content >
122- < Content className = "pf-v6-u-mb-md" >
123- < a href = "#" > 166 systems</ a >
124- </ Content >
125- < Content className = "pf-v6-u-mb-md" >
126- < Label status = "danger" variant = "outline" >
127- Incident
128- </ Label >
129- </ Content >
130- < Content className = "pf-v6-u-mb-md" >
131- < Icon size = "md" isInline >
132- < PowerOffIcon />
133- </ Icon >
134- < span >
135- { ' ' }
136- System reboot < b > is not</ b > required
137- </ span >
82+ Cluster alerting is a critical part of any organization's security posture.
13883 </ Content >
13984 </ CardBody >
14085 < CardFooter >
14186 < Button variant = "link" icon = { < ArrowRightIcon /> } iconPosition = "end" isInline >
142- View pathway
87+ View logs
14388 </ Button >
14489 </ CardFooter >
90+ </ Card > ,
91+ // Card 4: Image
92+ < Card isFullHeight isPlain key = "card-4" >
93+ < CardBody >
94+ < img src = { openshiftLogo } alt = "OpenShift Logo" />
95+ </ CardBody >
14596 </ Card >
14697 ] ;
14798
14899 return (
149100 < Fragment >
150- < PageSection id = "overview" >
151- < MultiContentCard isExpandable = { true } cards = { cards } toggleText = "Improve recommended pathways" />
152- </ PageSection >
101+ { displayMultiContentCard && (
102+ < PageSection id = "overview" >
103+ < MultiContentCard
104+ isExpandable = { true }
105+ withDividers
106+ cards = { cards }
107+ toggleText = "What's new in OpenShift?"
108+ actions = { < Button icon = { < TimesIcon /> } variant = "plain" onClick = { handleCloseMultiContentCard } /> }
109+ />
110+ </ PageSection >
111+ ) }
153112 < PageSection aria-label = "Detail status events" >
154- < Grid hasGutter xl2 = { 4 } >
155- < GridItem >
156- < Card >
113+ < Grid hasGutter >
114+ < GridItem span = { 3 } rowSpan = { 4 } >
115+ < Card isFullHeight >
157116 < CardTitle >
158117 < Title headingLevel = "h4" size = "xl" >
159- Details
118+ Cluster Details
160119 </ Title >
161120 </ CardTitle >
162121 < CardBody >
@@ -191,12 +150,23 @@ export const AnimationsOverview: FunctionComponent = () => {
191150 </ CardFooter >
192151 </ Card >
193152 </ GridItem >
194- < GridItem >
195- < AnimationsOverviewCardStatus />
153+ < GridItem span = { 3 } rowSpan = { 2 } >
154+ < AnimationsOverviewClusterInventory />
155+ </ GridItem >
156+ < GridItem span = { 2 } rowSpan = { 2 } >
157+ < AnimationsOverviewStorage />
158+ </ GridItem >
159+ < GridItem span = { 4 } rowSpan = { 2 } >
160+ < AnimationsOverviewMemoryUtilization />
196161 </ GridItem >
197- < GridItem >
198- < AnimationsOverviewEventsCard />
162+ < GridItem span = { 4 } rowSpan = { 2 } >
163+ < AnimationsOverviewNetworkActivity />
199164 </ GridItem >
165+ { recentActivityCard && (
166+ < GridItem span = { 5 } rowSpan = { 2 } >
167+ { recentActivityCard }
168+ </ GridItem >
169+ ) }
200170 </ Grid >
201171 </ PageSection >
202172 </ Fragment >
0 commit comments