@patternfly/react-core 5.2.0-prerelease.6 → 5.2.0-prerelease.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/Chip/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/DragDrop/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/Text/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/Tile/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/ApplicationLauncher/package.json +1 -1
- package/dist/dynamic/deprecated/components/ContextSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Dropdown/package.json +1 -1
- package/dist/dynamic/deprecated/components/OptionsMenu/package.json +1 -1
- package/dist/dynamic/deprecated/components/PageHeader/package.json +1 -1
- package/dist/dynamic/deprecated/components/Select/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/favorites/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/next/components/package.json +1 -1
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +2 -2
- package/src/components/Alert/examples/Alert.md +142 -103
- package/src/components/Button/examples/Button.md +1 -1
- package/src/demos/CardDemos.md +16 -2933
- package/src/demos/{Card/Card.md → CardView/CardView.md} +1 -1
- package/src/demos/{Card → CardView}/examples/CardView.tsx +1 -1
- package/src/demos/PrimaryDetail.md +2 -2
- package/src/demos/examples/Card/CardAggregateStatus.tsx +249 -0
- package/src/demos/examples/Card/CardDetails.tsx +95 -0
- package/src/demos/examples/Card/CardEventsView.tsx +154 -0
- package/src/demos/examples/Card/CardHorizontalGrid.tsx +240 -0
- package/src/demos/examples/Card/CardHorizontalSplit.tsx +30 -0
- package/src/demos/examples/Card/CardLogView.tsx +118 -0
- package/src/demos/examples/Card/CardNested.tsx +532 -0
- package/src/demos/examples/Card/CardStatus.tsx +262 -0
- package/src/demos/examples/Card/CardStatusTabbed.tsx +113 -0
- package/src/demos/examples/Card/CardTrendDemo1.tsx +106 -0
- package/src/demos/examples/Card/CardTrendDemo2.tsx +76 -0
- package/src/demos/examples/Card/CardUtilizationDemo1.tsx +109 -0
- package/src/demos/examples/Card/CardUtilizationDemo2.tsx +103 -0
- package/src/demos/examples/Card/CardUtilizationDemo3.tsx +174 -0
- package/src/demos/examples/Card/CardUtilizationDemo4.tsx +50 -0
- package/src/demos/examples/Card/CardWithAccordion.tsx +514 -0
- /package/src/demos/{Card/examples/CardData.jsx → CardView/examples/CardViewData.jsx} +0 -0
package/src/demos/CardDemos.md
CHANGED
|
@@ -30,3015 +30,98 @@ import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/
|
|
|
30
30
|
|
|
31
31
|
The following demo shows how you may use a `<Grid>` within a card for scenarios that require multiple subsections.
|
|
32
32
|
|
|
33
|
-
```
|
|
34
|
-
import React from 'react';
|
|
35
|
-
import {
|
|
36
|
-
Card,
|
|
37
|
-
CardHeader,
|
|
38
|
-
CardTitle,
|
|
39
|
-
CardBody,
|
|
40
|
-
CardExpandableContent,
|
|
41
|
-
Level,
|
|
42
|
-
LabelGroup,
|
|
43
|
-
Label,
|
|
44
|
-
Grid,
|
|
45
|
-
Flex,
|
|
46
|
-
List,
|
|
47
|
-
ListItem,
|
|
48
|
-
Button,
|
|
49
|
-
Dropdown,
|
|
50
|
-
DropdownList,
|
|
51
|
-
DropdownItem,
|
|
52
|
-
MenuToggle
|
|
53
|
-
} from '@patternfly/react-core';
|
|
54
|
-
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
55
|
-
import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
|
|
56
|
-
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
|
57
|
-
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
58
|
-
|
|
59
|
-
class CardGridDemo extends React.Component {
|
|
60
|
-
constructor(props) {
|
|
61
|
-
super(props);
|
|
62
|
-
this.state = { isCardExpanded: false, isDropdownOpen: false };
|
|
63
|
-
|
|
64
|
-
this.onCardExpand = () => {
|
|
65
|
-
this.setState({
|
|
66
|
-
isCardExpanded: !this.state.isCardExpanded
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
this.onActionToggle = () => {
|
|
71
|
-
this.setState((prevState) => ({
|
|
72
|
-
isDropdownOpen: !prevState.isDropdownOpen
|
|
73
|
-
}));
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
this.onActionSelect = () => {
|
|
77
|
-
this.setState({
|
|
78
|
-
isDropdownOpen: false
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
}
|
|
33
|
+
```ts file="./examples/Card/CardHorizontalGrid.tsx"
|
|
82
34
|
|
|
83
|
-
render() {
|
|
84
|
-
const { isCardExpanded, isDropdownOpen } = this.state;
|
|
85
|
-
const dropdownItems = (
|
|
86
|
-
<>
|
|
87
|
-
<DropdownItem key="action1">Action 1</DropdownItem>
|
|
88
|
-
<DropdownItem key="action2">Action 2</DropdownItem>
|
|
89
|
-
<DropdownItem key="disabled action3" isDisabled>
|
|
90
|
-
Disabled Action 3
|
|
91
|
-
</DropdownItem>
|
|
92
|
-
<DropdownItem key="action4">Action 4</DropdownItem>
|
|
93
|
-
</>
|
|
94
|
-
);
|
|
95
|
-
const headerActions = (
|
|
96
|
-
<Dropdown
|
|
97
|
-
onSelect={this.onActionSelect}
|
|
98
|
-
isOpen={isDropdownOpen}
|
|
99
|
-
popperProps={{ position: 'right' }}
|
|
100
|
-
onOpenChange={(isOpen) => this.setState({ isDropdownOpen: isOpen })}
|
|
101
|
-
toggle={(toggleRef) => (
|
|
102
|
-
<MenuToggle
|
|
103
|
-
ref={toggleRef}
|
|
104
|
-
isExpanded={isDropdownOpen}
|
|
105
|
-
onClick={this.onActionToggle}
|
|
106
|
-
variant="plain"
|
|
107
|
-
aria-label="Horizontal card grid demo kebab toggle"
|
|
108
|
-
>
|
|
109
|
-
<EllipsisVIcon aria-hidden="true" />
|
|
110
|
-
</MenuToggle>
|
|
111
|
-
)}
|
|
112
|
-
>
|
|
113
|
-
<DropdownList>{dropdownItems}</DropdownList>
|
|
114
|
-
</Dropdown>
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
return (
|
|
118
|
-
<Card id="horizontal card" isExpanded={isCardExpanded}>
|
|
119
|
-
<CardHeader
|
|
120
|
-
actions={{ actions: headerActions }}
|
|
121
|
-
onExpand={this.onCardExpand}
|
|
122
|
-
toggleButtonProps={{
|
|
123
|
-
id: 'toggle-button',
|
|
124
|
-
'aria-label': 'Actions',
|
|
125
|
-
'aria-labelledby': 'titleId toggle-button',
|
|
126
|
-
'aria-expanded': isCardExpanded
|
|
127
|
-
}}
|
|
128
|
-
>
|
|
129
|
-
{isCardExpanded && <CardTitle id="titleId">Getting Started</CardTitle>}
|
|
130
|
-
{!isCardExpanded && (
|
|
131
|
-
<Level hasGutter>
|
|
132
|
-
<CardTitle id="titleId">Getting Started</CardTitle>
|
|
133
|
-
<LabelGroup isCompact>
|
|
134
|
-
<Label isCompact icon={<InfoCircleIcon />} color="blue">
|
|
135
|
-
Set up your cluster
|
|
136
|
-
</Label>
|
|
137
|
-
<Label isCompact icon={<InfoCircleIcon />} color="purple">
|
|
138
|
-
Guided tours
|
|
139
|
-
</Label>
|
|
140
|
-
<Label isCompact icon={<InfoCircleIcon />} color="green">
|
|
141
|
-
Quick starts
|
|
142
|
-
</Label>
|
|
143
|
-
<Label isCompact icon={<InfoCircleIcon />} color="orange">
|
|
144
|
-
Learning resources
|
|
145
|
-
</Label>
|
|
146
|
-
</LabelGroup>
|
|
147
|
-
</Level>
|
|
148
|
-
)}
|
|
149
|
-
</CardHeader>
|
|
150
|
-
<CardExpandableContent>
|
|
151
|
-
<CardBody>
|
|
152
|
-
<Grid md={6} lg={3} hasGutter>
|
|
153
|
-
<Flex
|
|
154
|
-
spaceItems={{ default: 'spaceItemsLg' }}
|
|
155
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
156
|
-
direction={{ default: 'column' }}
|
|
157
|
-
>
|
|
158
|
-
<Flex
|
|
159
|
-
spaceItems={{ default: 'spaceItemsSm' }}
|
|
160
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
161
|
-
direction={{ default: 'column' }}
|
|
162
|
-
grow={{ default: 'grow' }}
|
|
163
|
-
>
|
|
164
|
-
<Label icon={<InfoCircleIcon />} color="blue">
|
|
165
|
-
Set up your cluster
|
|
166
|
-
</Label>
|
|
167
|
-
<p>Continue setting up your cluster to access all you cain in the Console</p>
|
|
168
|
-
<List isPlain>
|
|
169
|
-
<ListItem>
|
|
170
|
-
<a href="#">Add identity provider</a>
|
|
171
|
-
</ListItem>
|
|
172
|
-
<ListItem>
|
|
173
|
-
<a href="#">Configure alert receivers</a>
|
|
174
|
-
</ListItem>
|
|
175
|
-
<ListItem>
|
|
176
|
-
<a href="#">Configure default ingress certificate</a>
|
|
177
|
-
</ListItem>
|
|
178
|
-
</List>
|
|
179
|
-
</Flex>
|
|
180
|
-
<Button href="#" component="a" variant="link" isInline icon={<ArrowRightIcon />} iconPosition="end">
|
|
181
|
-
View all set up cluster steps
|
|
182
|
-
</Button>
|
|
183
|
-
</Flex>
|
|
184
|
-
<Flex
|
|
185
|
-
spaceItems={{ default: 'spaceItemsLg' }}
|
|
186
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
187
|
-
direction={{ default: 'column' }}
|
|
188
|
-
>
|
|
189
|
-
<Flex
|
|
190
|
-
spaceItems={{ default: 'spaceItemsSm' }}
|
|
191
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
192
|
-
direction={{ default: 'column' }}
|
|
193
|
-
grow={{ default: 'grow' }}
|
|
194
|
-
>
|
|
195
|
-
<Label icon={<InfoCircleIcon />} color="purple">
|
|
196
|
-
Guided tours
|
|
197
|
-
</Label>
|
|
198
|
-
<p>Tour some of the key features around the console</p>
|
|
199
|
-
<List isPlain>
|
|
200
|
-
<ListItem>
|
|
201
|
-
<a href="#">Tour the console</a>
|
|
202
|
-
</ListItem>
|
|
203
|
-
<ListItem>
|
|
204
|
-
<a href="#">Getting started with Serverless</a>
|
|
205
|
-
</ListItem>
|
|
206
|
-
</List>
|
|
207
|
-
</Flex>
|
|
208
|
-
<Button href="#" component="a" variant="link" isInline icon={<ArrowRightIcon />} iconPosition="end">
|
|
209
|
-
View all guided tours
|
|
210
|
-
</Button>
|
|
211
|
-
</Flex>
|
|
212
|
-
<Flex
|
|
213
|
-
spaceItems={{ default: 'spaceItemsLg' }}
|
|
214
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
215
|
-
direction={{ default: 'column' }}
|
|
216
|
-
>
|
|
217
|
-
<Flex
|
|
218
|
-
spaceItems={{ default: 'spaceItemsSm' }}
|
|
219
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
220
|
-
direction={{ default: 'column' }}
|
|
221
|
-
grow={{ default: 'grow' }}
|
|
222
|
-
>
|
|
223
|
-
<Label icon={<InfoCircleIcon />} color="green">
|
|
224
|
-
Quick starts
|
|
225
|
-
</Label>
|
|
226
|
-
<p>Get started with features using our step-by-step documentation</p>
|
|
227
|
-
<List isPlain>
|
|
228
|
-
<ListItem>
|
|
229
|
-
<a href="#">Getting started with Serverless</a>
|
|
230
|
-
</ListItem>
|
|
231
|
-
<ListItem>
|
|
232
|
-
<a href="#">Explore virtualization</a>
|
|
233
|
-
</ListItem>
|
|
234
|
-
<ListItem>
|
|
235
|
-
<a href="#">Build pipelines</a>
|
|
236
|
-
</ListItem>
|
|
237
|
-
</List>
|
|
238
|
-
</Flex>
|
|
239
|
-
<Button href="#" component="a" variant="link" isInline icon={<ArrowRightIcon />} iconPosition="end">
|
|
240
|
-
View all quick starts
|
|
241
|
-
</Button>
|
|
242
|
-
</Flex>
|
|
243
|
-
<Flex
|
|
244
|
-
spaceItems={{ default: 'spaceItemsLg' }}
|
|
245
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
246
|
-
direction={{ default: 'column' }}
|
|
247
|
-
>
|
|
248
|
-
<Flex
|
|
249
|
-
spaceItems={{ default: 'spaceItemsSm' }}
|
|
250
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
|
251
|
-
direction={{ default: 'column' }}
|
|
252
|
-
grow={{ default: 'grow' }}
|
|
253
|
-
>
|
|
254
|
-
<Label icon={<InfoCircleIcon />} color="orange">
|
|
255
|
-
Learning resources
|
|
256
|
-
</Label>
|
|
257
|
-
<p>Learn about new features within the Console and get started with demo apps</p>
|
|
258
|
-
<List isPlain>
|
|
259
|
-
<ListItem>
|
|
260
|
-
<a href="#">See what's possible with the Explore page</a>
|
|
261
|
-
</ListItem>
|
|
262
|
-
<ListItem>
|
|
263
|
-
<a href="#">
|
|
264
|
-
OpenShift 4.5: Top Tasks
|
|
265
|
-
<ExternalLinkAltIcon />
|
|
266
|
-
</a>
|
|
267
|
-
</ListItem>
|
|
268
|
-
<ListItem>
|
|
269
|
-
<a href="#">Try a demo app</a>
|
|
270
|
-
</ListItem>
|
|
271
|
-
</List>
|
|
272
|
-
</Flex>
|
|
273
|
-
<Button href="#" component="a" variant="link" isInline icon={<ArrowRightIcon />} iconPosition="end">
|
|
274
|
-
View all learning resources
|
|
275
|
-
</Button>
|
|
276
|
-
</Flex>
|
|
277
|
-
</Grid>
|
|
278
|
-
</CardBody>
|
|
279
|
-
</CardExpandableContent>
|
|
280
|
-
</Card>
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
35
|
```
|
|
285
36
|
|
|
286
37
|
### Horizontal split
|
|
287
38
|
|
|
288
39
|
The following demo shows how you may utilize `<Grid>` to split a card into two halves, one with an image, and one with text content.
|
|
289
40
|
|
|
290
|
-
```
|
|
291
|
-
import React from 'react';
|
|
292
|
-
import { Card, CardTitle, CardBody, CardFooter, Grid, GridItem, Button } from '@patternfly/react-core';
|
|
41
|
+
```ts file="./examples/Card/CardHorizontalSplit.tsx"
|
|
293
42
|
|
|
294
|
-
CardHorizontalSplitDemo = () => {
|
|
295
|
-
return (
|
|
296
|
-
<Card id="card-demo-horizontal-split-example" isFlat>
|
|
297
|
-
<Grid md={6}>
|
|
298
|
-
<GridItem
|
|
299
|
-
style={{
|
|
300
|
-
minHeight: '200px',
|
|
301
|
-
backgroundPosition: 'center',
|
|
302
|
-
backgroundSize: 'cover',
|
|
303
|
-
backgroundImage: 'url(/assets/images/pfbg_992@2x.jpg)'
|
|
304
|
-
}}
|
|
305
|
-
/>
|
|
306
|
-
<GridItem>
|
|
307
|
-
<CardTitle>Headline</CardTitle>
|
|
308
|
-
<CardBody>
|
|
309
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse arcu purus, lobortis nec euismod eu,
|
|
310
|
-
tristique ut sapien. Nullam turpis lectus, aliquet sit amet volutpat eu, semper eget quam. Maecenas in
|
|
311
|
-
tempus diam. Aenean interdum velit sed massa aliquet, sit amet malesuada nulla hendrerit. Aenean non
|
|
312
|
-
faucibus odio. Etiam non metus turpis. Praesent sollicitudin elit neque, id ullamcorper nibh faucibus eget.
|
|
313
|
-
</CardBody>
|
|
314
|
-
<CardFooter>
|
|
315
|
-
<Button variant="tertiary">Call to action</Button>
|
|
316
|
-
</CardFooter>
|
|
317
|
-
</GridItem>
|
|
318
|
-
</Grid>
|
|
319
|
-
</Card>
|
|
320
|
-
);
|
|
321
|
-
};
|
|
322
43
|
```
|
|
323
44
|
|
|
324
45
|
### Details card
|
|
325
46
|
|
|
326
|
-
```
|
|
327
|
-
import React from 'react';
|
|
328
|
-
import {
|
|
329
|
-
Card,
|
|
330
|
-
CardTitle,
|
|
331
|
-
CardBody,
|
|
332
|
-
CardFooter,
|
|
333
|
-
Gallery,
|
|
334
|
-
Title,
|
|
335
|
-
DescriptionList,
|
|
336
|
-
DescriptionListGroup,
|
|
337
|
-
DescriptionListTerm,
|
|
338
|
-
DescriptionListDescription,
|
|
339
|
-
Divider
|
|
340
|
-
} from '@patternfly/react-core';
|
|
341
|
-
import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
|
|
47
|
+
```ts file="./examples/Card/CardDetails.tsx"
|
|
342
48
|
|
|
343
|
-
CardDetailsDemo = () => {
|
|
344
|
-
return (
|
|
345
|
-
<Gallery hasGutter style={{ [l_gallery_GridTemplateColumns_min.name]: '260px' }}>
|
|
346
|
-
<Card>
|
|
347
|
-
<CardTitle>
|
|
348
|
-
<Title headingLevel="h4" size="xl">
|
|
349
|
-
Details
|
|
350
|
-
</Title>
|
|
351
|
-
</CardTitle>
|
|
352
|
-
<CardBody>
|
|
353
|
-
<DescriptionList>
|
|
354
|
-
<DescriptionListGroup>
|
|
355
|
-
<DescriptionListTerm>Cluster API Address</DescriptionListTerm>
|
|
356
|
-
<DescriptionListDescription>
|
|
357
|
-
<a href="#">https://api1.devcluster.openshift.com</a>
|
|
358
|
-
</DescriptionListDescription>
|
|
359
|
-
</DescriptionListGroup>
|
|
360
|
-
<DescriptionListGroup>
|
|
361
|
-
<DescriptionListTerm>Cluster ID</DescriptionListTerm>
|
|
362
|
-
<DescriptionListDescription>63b97ac1-b850-41d9-8820-239becde9e86</DescriptionListDescription>
|
|
363
|
-
</DescriptionListGroup>
|
|
364
|
-
<DescriptionListGroup>
|
|
365
|
-
<DescriptionListTerm>Provide</DescriptionListTerm>
|
|
366
|
-
<DescriptionListDescription>AWS</DescriptionListDescription>
|
|
367
|
-
</DescriptionListGroup>
|
|
368
|
-
<DescriptionListGroup>
|
|
369
|
-
<DescriptionListTerm>OpenShift Version</DescriptionListTerm>
|
|
370
|
-
<DescriptionListDescription>4.5.0.ci-2020-06-16-015028</DescriptionListDescription>
|
|
371
|
-
</DescriptionListGroup>
|
|
372
|
-
<DescriptionListGroup>
|
|
373
|
-
<DescriptionListTerm>Update Channel</DescriptionListTerm>
|
|
374
|
-
<DescriptionListDescription>stable-4.5</DescriptionListDescription>
|
|
375
|
-
</DescriptionListGroup>
|
|
376
|
-
</DescriptionList>
|
|
377
|
-
</CardBody>
|
|
378
|
-
<Divider />
|
|
379
|
-
<CardFooter>
|
|
380
|
-
<a href="#">View Settings</a>
|
|
381
|
-
</CardFooter>
|
|
382
|
-
</Card>
|
|
383
|
-
<Card>
|
|
384
|
-
<CardTitle>
|
|
385
|
-
<Title headingLevel="h4" size="xl">
|
|
386
|
-
Details
|
|
387
|
-
</Title>
|
|
388
|
-
</CardTitle>
|
|
389
|
-
<CardBody>
|
|
390
|
-
<DescriptionList>
|
|
391
|
-
<DescriptionListGroup>
|
|
392
|
-
<DescriptionListTerm>Cluster API Address</DescriptionListTerm>
|
|
393
|
-
<DescriptionListDescription>
|
|
394
|
-
<a href="#">https://api2.devcluster.openshift.com</a>
|
|
395
|
-
</DescriptionListDescription>
|
|
396
|
-
</DescriptionListGroup>
|
|
397
|
-
<DescriptionListGroup>
|
|
398
|
-
<DescriptionListTerm>Cluster ID</DescriptionListTerm>
|
|
399
|
-
<DescriptionListDescription>08908908-b850-41d9-8820-239becde9e86</DescriptionListDescription>
|
|
400
|
-
</DescriptionListGroup>
|
|
401
|
-
<DescriptionListGroup>
|
|
402
|
-
<DescriptionListTerm>Provider</DescriptionListTerm>
|
|
403
|
-
<DescriptionListDescription>Azure</DescriptionListDescription>
|
|
404
|
-
</DescriptionListGroup>
|
|
405
|
-
<DescriptionListGroup>
|
|
406
|
-
<DescriptionListTerm>OpenShift Version</DescriptionListTerm>
|
|
407
|
-
<DescriptionListDescription>4.5.0.ci-2020-06-16-015026</DescriptionListDescription>
|
|
408
|
-
</DescriptionListGroup>
|
|
409
|
-
<DescriptionListGroup>
|
|
410
|
-
<DescriptionListTerm>Update Channel</DescriptionListTerm>
|
|
411
|
-
<DescriptionListDescription>stable-4.4</DescriptionListDescription>
|
|
412
|
-
</DescriptionListGroup>
|
|
413
|
-
</DescriptionList>
|
|
414
|
-
</CardBody>
|
|
415
|
-
<Divider />
|
|
416
|
-
<CardFooter>
|
|
417
|
-
<a href="#">View Settings</a>
|
|
418
|
-
</CardFooter>
|
|
419
|
-
</Card>
|
|
420
|
-
</Gallery>
|
|
421
|
-
);
|
|
422
|
-
};
|
|
423
49
|
```
|
|
424
50
|
|
|
425
51
|
### Aggregate status card
|
|
426
52
|
|
|
427
|
-
```ts
|
|
428
|
-
import * as React from 'react';
|
|
429
|
-
import {
|
|
430
|
-
Card,
|
|
431
|
-
CardBody,
|
|
432
|
-
CardTitle,
|
|
433
|
-
Divider,
|
|
434
|
-
Flex,
|
|
435
|
-
FlexItem,
|
|
436
|
-
Gallery,
|
|
437
|
-
Grid,
|
|
438
|
-
GridItem,
|
|
439
|
-
Stack
|
|
440
|
-
} from '@patternfly/react-core';
|
|
441
|
-
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
442
|
-
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
443
|
-
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon';
|
|
444
|
-
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
|
|
445
|
-
import global_success_color_100 from '@patternfly/react-tokens/dist/esm/global_success_color_100';
|
|
446
|
-
import global_warning_color_100 from '@patternfly/react-tokens/dist/esm/global_warning_color_100';
|
|
447
|
-
import global_danger_color_100 from '@patternfly/react-tokens/dist/esm/global_danger_color_100';
|
|
448
|
-
import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
|
|
53
|
+
```ts file="./examples/Card/CardAggregateStatus.tsx"
|
|
449
54
|
|
|
450
|
-
const cardData = {
|
|
451
|
-
iconOnly: [
|
|
452
|
-
{
|
|
453
|
-
title: '5 Clusters',
|
|
454
|
-
content: [
|
|
455
|
-
{
|
|
456
|
-
icon: <CheckCircleIcon color={global_success_color_100.var} />
|
|
457
|
-
}
|
|
458
|
-
],
|
|
459
|
-
layout: 'icon'
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
title: '15 Clusters',
|
|
463
|
-
content: [
|
|
464
|
-
{
|
|
465
|
-
icon: <ExclamationTriangleIcon color={global_warning_color_100.var} />
|
|
466
|
-
}
|
|
467
|
-
],
|
|
468
|
-
layout: 'icon'
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
title: '3 Clusters',
|
|
472
|
-
content: [
|
|
473
|
-
{
|
|
474
|
-
icon: <TimesCircleIcon color={global_danger_color_100.var} />
|
|
475
|
-
}
|
|
476
|
-
],
|
|
477
|
-
layout: 'icon'
|
|
478
|
-
}
|
|
479
|
-
],
|
|
480
|
-
iconWithCount: [
|
|
481
|
-
{
|
|
482
|
-
title: '10 Hosts',
|
|
483
|
-
content: [
|
|
484
|
-
{
|
|
485
|
-
icon: <ExclamationCircleIcon color={global_success_color_100.var} />,
|
|
486
|
-
count: 2
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
icon: <ExclamationTriangleIcon color={global_warning_color_100.var} />,
|
|
490
|
-
count: 1
|
|
491
|
-
}
|
|
492
|
-
],
|
|
493
|
-
layout: 'multiIcon'
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
title: '50 Hosts',
|
|
497
|
-
content: [
|
|
498
|
-
{
|
|
499
|
-
icon: <CheckCircleIcon color={global_success_color_100.var} />,
|
|
500
|
-
count: 5
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
icon: <TimesCircleIcon color={global_danger_color_100.var} />,
|
|
504
|
-
count: 12
|
|
505
|
-
}
|
|
506
|
-
],
|
|
507
|
-
layout: 'multiIcon'
|
|
508
|
-
},
|
|
509
|
-
{
|
|
510
|
-
title: '12 Hosts',
|
|
511
|
-
content: [
|
|
512
|
-
{
|
|
513
|
-
icon: <ExclamationTriangleIcon color={global_warning_color_100.var} />,
|
|
514
|
-
count: 3
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
icon: <TimesCircleIcon color={global_danger_color_100.var} />,
|
|
518
|
-
count: 7
|
|
519
|
-
}
|
|
520
|
-
],
|
|
521
|
-
layout: 'multiIcon'
|
|
522
|
-
}
|
|
523
|
-
],
|
|
524
|
-
withSubtitle: [
|
|
525
|
-
{
|
|
526
|
-
title: '13 Hosts',
|
|
527
|
-
content: [
|
|
528
|
-
{
|
|
529
|
-
icon: <TimesCircleIcon color={global_danger_color_100.var} />,
|
|
530
|
-
status: '2 errors',
|
|
531
|
-
subtitle: 'subtitle'
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
icon: <ExclamationTriangleIcon color={global_warning_color_100.var} />,
|
|
535
|
-
status: '1 warning',
|
|
536
|
-
subtitle: 'subtitle'
|
|
537
|
-
}
|
|
538
|
-
],
|
|
539
|
-
layout: 'withSubtitle'
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
title: '3 Hosts',
|
|
543
|
-
content: [
|
|
544
|
-
{
|
|
545
|
-
icon: <CheckCircleIcon color={global_success_color_100.var} />,
|
|
546
|
-
status: '2 successes',
|
|
547
|
-
subtitle: 'subtitle'
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
icon: <ExclamationTriangleIcon color={global_warning_color_100.var} />,
|
|
551
|
-
status: '3 warnings',
|
|
552
|
-
subtitle: 'subtitle'
|
|
553
|
-
}
|
|
554
|
-
],
|
|
555
|
-
layout: 'withSubtitle'
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
title: '50 Hosts',
|
|
559
|
-
content: [
|
|
560
|
-
{
|
|
561
|
-
icon: <ExclamationTriangleIcon color={global_warning_color_100.var} />,
|
|
562
|
-
status: '7 warnings',
|
|
563
|
-
subtitle: 'subtitle'
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
icon: <TimesCircleIcon color={global_danger_color_100.var} />,
|
|
567
|
-
status: '1 error',
|
|
568
|
-
subtitle: 'subtitle'
|
|
569
|
-
}
|
|
570
|
-
],
|
|
571
|
-
layout: 'withSubtitle'
|
|
572
|
-
}
|
|
573
|
-
]
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
577
|
-
const AggregateStatusCards: React.FunctionComponent = () => {
|
|
578
|
-
const renderContent = (content, layout) => {
|
|
579
|
-
if (layout === 'icon') {
|
|
580
|
-
return content[0].icon;
|
|
581
|
-
}
|
|
582
|
-
if (layout === 'multiIcon') {
|
|
583
|
-
return (
|
|
584
|
-
<Flex display={{ default: 'inlineFlex' }}>
|
|
585
|
-
{content.map(({ icon, count }, index: number) => (
|
|
586
|
-
<React.Fragment key={index}>
|
|
587
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
588
|
-
<FlexItem>{icon}</FlexItem>
|
|
589
|
-
<FlexItem>
|
|
590
|
-
<a href="#">{count}</a>
|
|
591
|
-
</FlexItem>
|
|
592
|
-
</Flex>
|
|
593
|
-
{content.length > 1 && index === 0 && (
|
|
594
|
-
<Divider
|
|
595
|
-
key={`${index}_d`}
|
|
596
|
-
orientation={{
|
|
597
|
-
default: 'vertical'
|
|
598
|
-
}}
|
|
599
|
-
/>
|
|
600
|
-
)}
|
|
601
|
-
</React.Fragment>
|
|
602
|
-
))}
|
|
603
|
-
</Flex>
|
|
604
|
-
);
|
|
605
|
-
}
|
|
606
|
-
if (layout === 'withSubtitle') {
|
|
607
|
-
return (
|
|
608
|
-
<Flex justifyContent={{ default: 'justifyContentSpaceAround' }}>
|
|
609
|
-
{content.map(({ icon, status, subtitle }, index) => (
|
|
610
|
-
<Flex key={index}>
|
|
611
|
-
<FlexItem>{icon}</FlexItem>
|
|
612
|
-
<Stack>
|
|
613
|
-
<a href="#">{status}</a>
|
|
614
|
-
<span>{subtitle}</span>
|
|
615
|
-
</Stack>
|
|
616
|
-
</Flex>
|
|
617
|
-
))}
|
|
618
|
-
</Flex>
|
|
619
|
-
);
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
return (
|
|
623
|
-
<Grid hasGutter>
|
|
624
|
-
{Object.keys(cardData).map((cardGroup, groupIndex) => {
|
|
625
|
-
let galleryWidth;
|
|
626
|
-
let cardAlign;
|
|
627
|
-
let titleAlign;
|
|
628
|
-
if (cardGroup === 'withSubtitle') {
|
|
629
|
-
galleryWidth = '260px';
|
|
630
|
-
cardAlign = '';
|
|
631
|
-
titleAlign = 'center';
|
|
632
|
-
} else {
|
|
633
|
-
cardAlign = 'center';
|
|
634
|
-
}
|
|
635
|
-
return (
|
|
636
|
-
<GridItem key={groupIndex}>
|
|
637
|
-
<Gallery hasGutter style={{ [l_gallery_GridTemplateColumns_min.name]: galleryWidth } as any}>
|
|
638
|
-
{cardData[cardGroup].map(({ title, content, layout }, cardIndex) => (
|
|
639
|
-
<Card style={{ textAlign: cardAlign }} key={`${groupIndex}${cardIndex}`} component="div">
|
|
640
|
-
<CardTitle style={{ textAlign: titleAlign }}>{title}</CardTitle>
|
|
641
|
-
<CardBody>{renderContent(content, layout)}</CardBody>
|
|
642
|
-
</Card>
|
|
643
|
-
))}
|
|
644
|
-
</Gallery>
|
|
645
|
-
</GridItem>
|
|
646
|
-
);
|
|
647
|
-
})}
|
|
648
|
-
</Grid>
|
|
649
|
-
);
|
|
650
|
-
};
|
|
651
55
|
```
|
|
652
56
|
|
|
653
57
|
### Status
|
|
654
58
|
|
|
655
|
-
```ts
|
|
656
|
-
import * as React from 'react';
|
|
657
|
-
import {
|
|
658
|
-
Alert,
|
|
659
|
-
Card,
|
|
660
|
-
CardBody,
|
|
661
|
-
CardHeader,
|
|
662
|
-
Divider,
|
|
663
|
-
Flex,
|
|
664
|
-
FlexItem,
|
|
665
|
-
Grid,
|
|
666
|
-
GridItem,
|
|
667
|
-
Label,
|
|
668
|
-
NotificationDrawer,
|
|
669
|
-
NotificationDrawerBody,
|
|
670
|
-
NotificationDrawerGroup,
|
|
671
|
-
NotificationDrawerList,
|
|
672
|
-
NotificationDrawerListItem,
|
|
673
|
-
NotificationDrawerListItemBody,
|
|
674
|
-
NotificationDrawerListItemHeader,
|
|
675
|
-
Popover,
|
|
676
|
-
Title
|
|
677
|
-
} from '@patternfly/react-core';
|
|
678
|
-
import { Table, Thead, Tbody, Tr, Th, Td, ExpandableRowContent } from '@patternfly/react-table';
|
|
679
|
-
import BellIcon from '@patternfly/react-icons/dist/js/icons/bell-icon';
|
|
680
|
-
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
681
|
-
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
682
|
-
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon';
|
|
683
|
-
import global_success_color_100 from '@patternfly/react-tokens/dist/esm/global_success_color_100';
|
|
684
|
-
import global_danger_color_100 from '@patternfly/react-tokens/dist/esm/global_danger_color_100';
|
|
685
|
-
import global_Color_200 from '@patternfly/react-tokens/dist/esm/global_Color_200';
|
|
686
|
-
|
|
687
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
688
|
-
const StatusPlain: React.FunctionComponent = () => {
|
|
689
|
-
const [drawerExpanded, setDrawerExpanded] = React.useState(false);
|
|
690
|
-
const handleDrawerToggleClick = () => {
|
|
691
|
-
setDrawerExpanded(!drawerExpanded);
|
|
692
|
-
};
|
|
59
|
+
```ts file="./examples/Card/CardStatus.tsx"
|
|
693
60
|
|
|
694
|
-
const [rowsExpanded, setRowsExpanded] = React.useState([false, false, false]);
|
|
695
|
-
const handleToggleExpand = (_: any, rowIndex: number) => {
|
|
696
|
-
const newRowsExpanded = [...rowsExpanded];
|
|
697
|
-
newRowsExpanded[rowIndex] = !rowsExpanded[rowIndex];
|
|
698
|
-
setRowsExpanded(newRowsExpanded);
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
const header = (
|
|
702
|
-
<CardHeader>
|
|
703
|
-
<Title headingLevel="h4" size="lg">
|
|
704
|
-
Status
|
|
705
|
-
</Title>
|
|
706
|
-
</CardHeader>
|
|
707
|
-
);
|
|
708
|
-
|
|
709
|
-
const columns = ['Components', 'Response Rate'];
|
|
710
|
-
|
|
711
|
-
const rows = [
|
|
712
|
-
{
|
|
713
|
-
content: ['API Servers', '20%'],
|
|
714
|
-
child: (
|
|
715
|
-
<Alert
|
|
716
|
-
title="This is a critical alert that can be associated with the control panel."
|
|
717
|
-
variant="danger"
|
|
718
|
-
isInline
|
|
719
|
-
></Alert>
|
|
720
|
-
)
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
content: ['Controller Managers', '100%'],
|
|
724
|
-
child: (
|
|
725
|
-
<Alert
|
|
726
|
-
title="This is a critical alert that can be associated with the control panel."
|
|
727
|
-
variant="danger"
|
|
728
|
-
isInline
|
|
729
|
-
></Alert>
|
|
730
|
-
)
|
|
731
|
-
},
|
|
732
|
-
{
|
|
733
|
-
content: ['etcd', '91%'],
|
|
734
|
-
child: (
|
|
735
|
-
<Alert
|
|
736
|
-
title="This is a critical alert that can be associated with the control panel."
|
|
737
|
-
variant="danger"
|
|
738
|
-
isInline
|
|
739
|
-
></Alert>
|
|
740
|
-
)
|
|
741
|
-
}
|
|
742
|
-
];
|
|
743
|
-
|
|
744
|
-
const popoverBodyContent = (
|
|
745
|
-
<>
|
|
746
|
-
<div>
|
|
747
|
-
Components of the Control Panel are responsible for maintaining and reconciling the state of the cluster.
|
|
748
|
-
</div>
|
|
749
|
-
<Table variant="compact">
|
|
750
|
-
<Thead>
|
|
751
|
-
<Tr>
|
|
752
|
-
<Th />
|
|
753
|
-
{columns.map((column, columnIndex) => (
|
|
754
|
-
<Th key={columnIndex} modifier="fitContent">
|
|
755
|
-
{column}
|
|
756
|
-
</Th>
|
|
757
|
-
))}
|
|
758
|
-
</Tr>
|
|
759
|
-
</Thead>
|
|
760
|
-
{rows.map((row, rowIndex) => {
|
|
761
|
-
const parentRow = (
|
|
762
|
-
<Tr key={rowIndex}>
|
|
763
|
-
<Td
|
|
764
|
-
key={`${rowIndex}_0`}
|
|
765
|
-
expand={row.child && { isExpanded: rowsExpanded[rowIndex], rowIndex, onToggle: handleToggleExpand }}
|
|
766
|
-
/>
|
|
767
|
-
{row.content.map((cell, cellIndex) => (
|
|
768
|
-
<Td key={`${rowIndex}_${cellIndex}`} dataLabel={columns[cellIndex]} modifier="fitContent">
|
|
769
|
-
{cell}
|
|
770
|
-
</Td>
|
|
771
|
-
))}
|
|
772
|
-
</Tr>
|
|
773
|
-
);
|
|
774
|
-
const childRow = row.child ? (
|
|
775
|
-
<Tr key={`${rowIndex}_child`} isExpanded={rowsExpanded[rowIndex]}>
|
|
776
|
-
<Td key={`${rowIndex}_1`} colSpan={3} dataLabel={`${rowIndex}_child`}>
|
|
777
|
-
<ExpandableRowContent>{row.child}</ExpandableRowContent>
|
|
778
|
-
</Td>
|
|
779
|
-
</Tr>
|
|
780
|
-
) : null;
|
|
781
|
-
return (
|
|
782
|
-
<Tbody key={rowIndex} isExpanded={rowsExpanded[rowIndex]}>
|
|
783
|
-
{parentRow}
|
|
784
|
-
{childRow}
|
|
785
|
-
</Tbody>
|
|
786
|
-
);
|
|
787
|
-
})}
|
|
788
|
-
</Table>
|
|
789
|
-
</>
|
|
790
|
-
);
|
|
791
|
-
|
|
792
|
-
const body = (
|
|
793
|
-
<CardBody>
|
|
794
|
-
<Grid hasGutter sm={6} lg={3}>
|
|
795
|
-
<GridItem>
|
|
796
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
797
|
-
<FlexItem>
|
|
798
|
-
<CheckCircleIcon color={global_success_color_100.var} />
|
|
799
|
-
</FlexItem>
|
|
800
|
-
<FlexItem>
|
|
801
|
-
<span>Cluster</span>
|
|
802
|
-
</FlexItem>
|
|
803
|
-
</Flex>
|
|
804
|
-
</GridItem>
|
|
805
|
-
<GridItem>
|
|
806
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
807
|
-
<FlexItem>
|
|
808
|
-
<ExclamationCircleIcon color={global_danger_color_100.var} />
|
|
809
|
-
</FlexItem>
|
|
810
|
-
<FlexItem>
|
|
811
|
-
<Popover headerContent="Control Panel Status" bodyContent={popoverBodyContent} minWidth="400px">
|
|
812
|
-
<a href="#" onClick={(e) => e.preventDefault()}>
|
|
813
|
-
Control Panel
|
|
814
|
-
</a>
|
|
815
|
-
</Popover>
|
|
816
|
-
</FlexItem>
|
|
817
|
-
</Flex>
|
|
818
|
-
</GridItem>
|
|
819
|
-
<GridItem>
|
|
820
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
821
|
-
<FlexItem>
|
|
822
|
-
<ExclamationCircleIcon color={global_danger_color_100.var} />
|
|
823
|
-
</FlexItem>
|
|
824
|
-
<Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsNone' }}>
|
|
825
|
-
<FlexItem>
|
|
826
|
-
<a href="#">Operators</a>
|
|
827
|
-
</FlexItem>
|
|
828
|
-
<FlexItem>
|
|
829
|
-
<span style={{ color: global_Color_200.var }}>1 degraded</span>
|
|
830
|
-
</FlexItem>
|
|
831
|
-
</Flex>
|
|
832
|
-
</Flex>
|
|
833
|
-
</GridItem>
|
|
834
|
-
<GridItem>
|
|
835
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
836
|
-
<FlexItem>
|
|
837
|
-
<CheckCircleIcon color={global_success_color_100.var} />
|
|
838
|
-
</FlexItem>
|
|
839
|
-
<Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsNone' }}>
|
|
840
|
-
<FlexItem>
|
|
841
|
-
<a href="#">Image Vulnerabilities</a>
|
|
842
|
-
</FlexItem>
|
|
843
|
-
<FlexItem>
|
|
844
|
-
<span style={{ color: global_Color_200.var }}>0 vulnerabilities</span>
|
|
845
|
-
</FlexItem>
|
|
846
|
-
</Flex>
|
|
847
|
-
</Flex>
|
|
848
|
-
</GridItem>
|
|
849
|
-
</Grid>
|
|
850
|
-
</CardBody>
|
|
851
|
-
);
|
|
852
|
-
|
|
853
|
-
const drawerTitle = (
|
|
854
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
855
|
-
<FlexItem spacer={{ default: 'spacerMd' }}>
|
|
856
|
-
<span>Notifications</span>
|
|
857
|
-
</FlexItem>
|
|
858
|
-
<Label color="red" icon={<ExclamationCircleIcon />}>
|
|
859
|
-
1
|
|
860
|
-
</Label>
|
|
861
|
-
<Label color="orange" icon={<ExclamationTriangleIcon />}>
|
|
862
|
-
3
|
|
863
|
-
</Label>
|
|
864
|
-
<Label color="green" icon={<CheckCircleIcon />}>
|
|
865
|
-
3
|
|
866
|
-
</Label>
|
|
867
|
-
<Label color="blue" icon={<ExclamationCircleIcon />}>
|
|
868
|
-
3
|
|
869
|
-
</Label>
|
|
870
|
-
<Label color="green" icon={<BellIcon />}>
|
|
871
|
-
3
|
|
872
|
-
</Label>
|
|
873
|
-
</Flex>
|
|
874
|
-
);
|
|
875
|
-
|
|
876
|
-
const drawer = (
|
|
877
|
-
<NotificationDrawer>
|
|
878
|
-
<NotificationDrawerBody>
|
|
879
|
-
<NotificationDrawerGroup
|
|
880
|
-
count={0}
|
|
881
|
-
onExpand={handleDrawerToggleClick}
|
|
882
|
-
isExpanded={drawerExpanded}
|
|
883
|
-
title={drawerTitle}
|
|
884
|
-
headingLevel="h4"
|
|
885
|
-
>
|
|
886
|
-
<NotificationDrawerList isHidden={!drawerExpanded}>
|
|
887
|
-
<NotificationDrawerListItem variant="danger">
|
|
888
|
-
<NotificationDrawerListItemHeader
|
|
889
|
-
variant="danger"
|
|
890
|
-
headingLevel="h5"
|
|
891
|
-
title="Critical alert regarding control plane"
|
|
892
|
-
/>
|
|
893
|
-
<NotificationDrawerListItemBody>
|
|
894
|
-
This is a long description to show how the title will wrap if it is long and wraps to multiple lines.
|
|
895
|
-
</NotificationDrawerListItemBody>
|
|
896
|
-
</NotificationDrawerListItem>
|
|
897
|
-
<NotificationDrawerListItem variant="warning">
|
|
898
|
-
<NotificationDrawerListItemHeader variant="warning" headingLevel="h5" title="Warning alert" />
|
|
899
|
-
<NotificationDrawerListItemBody>
|
|
900
|
-
This is a warning notification description.
|
|
901
|
-
</NotificationDrawerListItemBody>
|
|
902
|
-
</NotificationDrawerListItem>
|
|
903
|
-
</NotificationDrawerList>
|
|
904
|
-
</NotificationDrawerGroup>
|
|
905
|
-
</NotificationDrawerBody>
|
|
906
|
-
</NotificationDrawer>
|
|
907
|
-
);
|
|
908
|
-
|
|
909
|
-
return (
|
|
910
|
-
<Card>
|
|
911
|
-
{header}
|
|
912
|
-
{body}
|
|
913
|
-
<Divider />
|
|
914
|
-
{drawer}
|
|
915
|
-
</Card>
|
|
916
|
-
);
|
|
917
|
-
};
|
|
918
61
|
```
|
|
919
62
|
|
|
920
63
|
### Status Tabbed
|
|
921
64
|
|
|
922
|
-
```ts
|
|
923
|
-
import * as React from 'react';
|
|
924
|
-
import {
|
|
925
|
-
Card,
|
|
926
|
-
CardBody,
|
|
927
|
-
CardHeader,
|
|
928
|
-
DescriptionList,
|
|
929
|
-
DescriptionListDescription,
|
|
930
|
-
DescriptionListGroup,
|
|
931
|
-
DescriptionListTerm,
|
|
932
|
-
Flex,
|
|
933
|
-
FlexItem,
|
|
934
|
-
Grid,
|
|
935
|
-
GridItem,
|
|
936
|
-
Spinner,
|
|
937
|
-
Tab,
|
|
938
|
-
TabContent,
|
|
939
|
-
Tabs,
|
|
940
|
-
TabTitleText,
|
|
941
|
-
Title
|
|
942
|
-
} from '@patternfly/react-core';
|
|
943
|
-
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
|
|
944
|
-
import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
|
|
945
|
-
|
|
946
|
-
const descriptionListData = [
|
|
947
|
-
{
|
|
948
|
-
status: 'Running',
|
|
949
|
-
resourceName: 'Resource name that is long and can wrap',
|
|
950
|
-
detail: '121 Systems',
|
|
951
|
-
icon: <CheckCircleIcon />
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
status: 'Ready',
|
|
955
|
-
resourceName: 'Resource name that is long and can wrap',
|
|
956
|
-
detail: '123 Systems',
|
|
957
|
-
icon: <ExclamationCircleIcon />
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
status: 'Running',
|
|
961
|
-
resourceName: 'Resource name that is long and can wrap',
|
|
962
|
-
detail: '122 Systems',
|
|
963
|
-
icon: <CheckCircleIcon />
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
status: 'Ready',
|
|
967
|
-
resourceName: 'Resource name that is long and can wrap',
|
|
968
|
-
detail: '124 Systems',
|
|
969
|
-
icon: <ExclamationCircleIcon />
|
|
970
|
-
}
|
|
971
|
-
];
|
|
65
|
+
```ts file="./examples/Card/CardStatusTabbed.tsx"
|
|
972
66
|
|
|
973
|
-
const Status: React.FunctionComponent = () => {
|
|
974
|
-
const [activeTabKey, setActiveTabKey] = React.useState(0);
|
|
975
|
-
const handleTabClick = (event: React.MouseEvent, tabIndex: number) => {
|
|
976
|
-
setActiveTabKey(tabIndex);
|
|
977
|
-
};
|
|
978
|
-
|
|
979
|
-
const tabContent = (
|
|
980
|
-
<DescriptionList isHorizontal columnModifier={{ lg: '2Col' }}>
|
|
981
|
-
{descriptionListData.map(({ status, resourceName, detail, icon }, index) => (
|
|
982
|
-
<DescriptionListGroup key={index}>
|
|
983
|
-
<DescriptionListTerm>
|
|
984
|
-
<Flex>
|
|
985
|
-
<FlexItem>{icon}</FlexItem>
|
|
986
|
-
<FlexItem>
|
|
987
|
-
<Title headingLevel="h4" size="md">
|
|
988
|
-
{status}
|
|
989
|
-
</Title>
|
|
990
|
-
</FlexItem>
|
|
991
|
-
</Flex>
|
|
992
|
-
</DescriptionListTerm>
|
|
993
|
-
<DescriptionListDescription>
|
|
994
|
-
<a href="#">{resourceName}</a>
|
|
995
|
-
<div>{detail}</div>
|
|
996
|
-
</DescriptionListDescription>
|
|
997
|
-
</DescriptionListGroup>
|
|
998
|
-
))}
|
|
999
|
-
</DescriptionList>
|
|
1000
|
-
);
|
|
1001
|
-
|
|
1002
|
-
return (
|
|
1003
|
-
<>
|
|
1004
|
-
<Card>
|
|
1005
|
-
<CardHeader>
|
|
1006
|
-
<Title headingLevel="h4" size="lg">
|
|
1007
|
-
Status
|
|
1008
|
-
</Title>
|
|
1009
|
-
</CardHeader>
|
|
1010
|
-
<CardBody>
|
|
1011
|
-
<Tabs isFilled id="status-tabs" activeKey={activeTabKey} onSelect={handleTabClick}>
|
|
1012
|
-
{[1, 2, 3].map((tab, tabIndex) => (
|
|
1013
|
-
<Tab
|
|
1014
|
-
key={tabIndex}
|
|
1015
|
-
eventKey={tabIndex}
|
|
1016
|
-
title={<TabTitleText>{`Object ${tabIndex + 1}`}</TabTitleText>}
|
|
1017
|
-
tabContentId={`tabContent${tabIndex}`}
|
|
1018
|
-
/>
|
|
1019
|
-
))}
|
|
1020
|
-
</Tabs>
|
|
1021
|
-
</CardBody>
|
|
1022
|
-
<CardBody>
|
|
1023
|
-
{[1, 2, 3].map((tab, tabIndex) => (
|
|
1024
|
-
<TabContent
|
|
1025
|
-
key={tabIndex}
|
|
1026
|
-
eventKey={tabIndex}
|
|
1027
|
-
id={`tabContent${tabIndex}`}
|
|
1028
|
-
activeKey={activeTabKey}
|
|
1029
|
-
hidden={tabIndex !== activeTabKey}
|
|
1030
|
-
>
|
|
1031
|
-
{tabContent}
|
|
1032
|
-
</TabContent>
|
|
1033
|
-
))}
|
|
1034
|
-
</CardBody>
|
|
1035
|
-
</Card>
|
|
1036
|
-
</>
|
|
1037
|
-
);
|
|
1038
|
-
};
|
|
1039
67
|
```
|
|
1040
68
|
|
|
1041
69
|
### Utilization card 1
|
|
1042
70
|
|
|
1043
|
-
```ts
|
|
1044
|
-
import React from 'react';
|
|
1045
|
-
import {
|
|
1046
|
-
Card,
|
|
1047
|
-
CardTitle,
|
|
1048
|
-
CardBody,
|
|
1049
|
-
CardFooter,
|
|
1050
|
-
Title,
|
|
1051
|
-
Gallery,
|
|
1052
|
-
GalleryItem,
|
|
1053
|
-
Flex,
|
|
1054
|
-
FlexItem,
|
|
1055
|
-
Stack,
|
|
1056
|
-
StackItem,
|
|
1057
|
-
Divider
|
|
1058
|
-
} from '@patternfly/react-core';
|
|
1059
|
-
import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts';
|
|
71
|
+
```ts file="./examples/Card/CardUtilizationDemo1.tsx"
|
|
1060
72
|
|
|
1061
|
-
<Gallery hasGutter minWidths={{ default: '360px' }}>
|
|
1062
|
-
<GalleryItem>
|
|
1063
|
-
<Card id="utilization-card-1-card" component="div">
|
|
1064
|
-
<CardTitle>
|
|
1065
|
-
<Title headingLevel="h4" size="lg">
|
|
1066
|
-
Top Utilized Clusters
|
|
1067
|
-
</Title>
|
|
1068
|
-
</CardTitle>
|
|
1069
|
-
<CardBody>
|
|
1070
|
-
<Flex direction={{ default: 'column' }}>
|
|
1071
|
-
<FlexItem>
|
|
1072
|
-
<Stack>
|
|
1073
|
-
<b>Cluster-1204</b>
|
|
1074
|
-
<span>27.3 cores available</span>
|
|
1075
|
-
</Stack>
|
|
1076
|
-
</FlexItem>
|
|
1077
|
-
<FlexItem>
|
|
1078
|
-
<ChartGroup
|
|
1079
|
-
ariaDesc="Mock average cluster utilization"
|
|
1080
|
-
ariaTitle="Mock cluster sparkline chart"
|
|
1081
|
-
containerComponent={
|
|
1082
|
-
<ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />
|
|
1083
|
-
}
|
|
1084
|
-
height={100}
|
|
1085
|
-
maxDomain={{ y: 9 }}
|
|
1086
|
-
padding={0}
|
|
1087
|
-
width={400}
|
|
1088
|
-
>
|
|
1089
|
-
<ChartArea
|
|
1090
|
-
data={[
|
|
1091
|
-
{ name: 'Cluster', x: '2015', y: 7 },
|
|
1092
|
-
{ name: 'Cluster', x: '2016', y: 6 },
|
|
1093
|
-
{ name: 'Cluster', x: '2017', y: 8 },
|
|
1094
|
-
{ name: 'Cluster', x: '2018', y: 3 },
|
|
1095
|
-
{ name: 'Cluster', x: '2019', y: 4 },
|
|
1096
|
-
{ name: 'Cluster', x: '2020', y: 1 },
|
|
1097
|
-
{ name: 'Cluster', x: '2021', y: 0 }
|
|
1098
|
-
]}
|
|
1099
|
-
/>
|
|
1100
|
-
</ChartGroup>
|
|
1101
|
-
</FlexItem>
|
|
1102
|
-
<FlexItem>
|
|
1103
|
-
<a href="#">View details</a>
|
|
1104
|
-
</FlexItem>
|
|
1105
|
-
</Flex>
|
|
1106
|
-
</CardBody>
|
|
1107
|
-
<CardBody>
|
|
1108
|
-
<Flex direction={{ default: 'column' }}>
|
|
1109
|
-
<FlexItem>
|
|
1110
|
-
<Stack>
|
|
1111
|
-
<b>Abcdef-1204</b>
|
|
1112
|
-
<span>50.6 cores available</span>
|
|
1113
|
-
</Stack>
|
|
1114
|
-
</FlexItem>
|
|
1115
|
-
<FlexItem>
|
|
1116
|
-
<ChartGroup
|
|
1117
|
-
ariaDesc="Mock average cluster utilization"
|
|
1118
|
-
ariaTitle="Mock cluster sparkline chart"
|
|
1119
|
-
containerComponent={
|
|
1120
|
-
<ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />
|
|
1121
|
-
}
|
|
1122
|
-
height={100}
|
|
1123
|
-
maxDomain={{ y: 9 }}
|
|
1124
|
-
padding={0}
|
|
1125
|
-
width={400}
|
|
1126
|
-
>
|
|
1127
|
-
<ChartArea
|
|
1128
|
-
data={[
|
|
1129
|
-
{ name: 'Cluster', x: '2015', y: 7 },
|
|
1130
|
-
{ name: 'Cluster', x: '2016', y: 6 },
|
|
1131
|
-
{ name: 'Cluster', x: '2017', y: 8 },
|
|
1132
|
-
{ name: 'Cluster', x: '2018', y: 3 },
|
|
1133
|
-
{ name: 'Cluster', x: '2019', y: 4 },
|
|
1134
|
-
{ name: 'Cluster', x: '2020', y: 1 },
|
|
1135
|
-
{ name: 'Cluster', x: '2021', y: 0 }
|
|
1136
|
-
]}
|
|
1137
|
-
/>
|
|
1138
|
-
</ChartGroup>
|
|
1139
|
-
</FlexItem>
|
|
1140
|
-
<FlexItem>
|
|
1141
|
-
<a href="#">View details</a>
|
|
1142
|
-
</FlexItem>
|
|
1143
|
-
</Flex>
|
|
1144
|
-
</CardBody>
|
|
1145
|
-
<Divider />
|
|
1146
|
-
<CardFooter>
|
|
1147
|
-
<a href="#">View all clusters</a>
|
|
1148
|
-
</CardFooter>
|
|
1149
|
-
</Card>
|
|
1150
|
-
</GalleryItem>
|
|
1151
|
-
</Gallery>;
|
|
1152
73
|
```
|
|
1153
74
|
|
|
1154
75
|
### Utilization card 2
|
|
1155
76
|
|
|
1156
|
-
```ts
|
|
1157
|
-
import React from 'react';
|
|
1158
|
-
import {
|
|
1159
|
-
Card,
|
|
1160
|
-
CardTitle,
|
|
1161
|
-
CardBody,
|
|
1162
|
-
CardFooter,
|
|
1163
|
-
Title,
|
|
1164
|
-
Gallery,
|
|
1165
|
-
GalleryItem,
|
|
1166
|
-
Flex,
|
|
1167
|
-
FlexItem,
|
|
1168
|
-
Stack,
|
|
1169
|
-
StackItem,
|
|
1170
|
-
Divider
|
|
1171
|
-
} from '@patternfly/react-core';
|
|
1172
|
-
import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts';
|
|
77
|
+
```ts file="./examples/Card/CardUtilizationDemo2.tsx"
|
|
1173
78
|
|
|
1174
|
-
<Gallery hasGutter minWidths={{ default: '360px' }}>
|
|
1175
|
-
<GalleryItem>
|
|
1176
|
-
<Card id="utilization-card-2-card" component="div">
|
|
1177
|
-
<CardTitle>
|
|
1178
|
-
<Title headingLevel="h4" size="lg">
|
|
1179
|
-
Top Utilized Clusters
|
|
1180
|
-
</Title>
|
|
1181
|
-
</CardTitle>
|
|
1182
|
-
<CardBody>
|
|
1183
|
-
<Flex direction={{ default: 'column' }}>
|
|
1184
|
-
<FlexItem>
|
|
1185
|
-
<Stack>
|
|
1186
|
-
<a href="#">Cluster-1204</a>
|
|
1187
|
-
<span>27.3 cores available</span>
|
|
1188
|
-
</Stack>
|
|
1189
|
-
</FlexItem>
|
|
1190
|
-
<FlexItem>
|
|
1191
|
-
<ChartGroup
|
|
1192
|
-
ariaDesc="Mock average cluster utilization"
|
|
1193
|
-
ariaTitle="Mock cluster sparkline chart"
|
|
1194
|
-
containerComponent={
|
|
1195
|
-
<ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />
|
|
1196
|
-
}
|
|
1197
|
-
height={100}
|
|
1198
|
-
maxDomain={{ y: 9 }}
|
|
1199
|
-
padding={0}
|
|
1200
|
-
width={400}
|
|
1201
|
-
>
|
|
1202
|
-
<ChartArea
|
|
1203
|
-
data={[
|
|
1204
|
-
{ name: 'Cluster', x: '2015', y: 7 },
|
|
1205
|
-
{ name: 'Cluster', x: '2016', y: 6 },
|
|
1206
|
-
{ name: 'Cluster', x: '2017', y: 8 },
|
|
1207
|
-
{ name: 'Cluster', x: '2018', y: 3 },
|
|
1208
|
-
{ name: 'Cluster', x: '2019', y: 4 },
|
|
1209
|
-
{ name: 'Cluster', x: '2020', y: 1 },
|
|
1210
|
-
{ name: 'Cluster', x: '2021', y: 0 }
|
|
1211
|
-
]}
|
|
1212
|
-
/>
|
|
1213
|
-
</ChartGroup>
|
|
1214
|
-
</FlexItem>
|
|
1215
|
-
</Flex>
|
|
1216
|
-
</CardBody>
|
|
1217
|
-
<CardBody>
|
|
1218
|
-
<Flex direction={{ default: 'column' }}>
|
|
1219
|
-
<FlexItem>
|
|
1220
|
-
<Stack>
|
|
1221
|
-
<a href="#">Abcdef-1204</a>
|
|
1222
|
-
<span>50.6 cores available</span>
|
|
1223
|
-
</Stack>
|
|
1224
|
-
</FlexItem>
|
|
1225
|
-
<FlexItem>
|
|
1226
|
-
<ChartGroup
|
|
1227
|
-
ariaDesc="Mock average cluster utilization"
|
|
1228
|
-
ariaTitle="Mock cluster sparkline chart"
|
|
1229
|
-
containerComponent={
|
|
1230
|
-
<ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />
|
|
1231
|
-
}
|
|
1232
|
-
height={100}
|
|
1233
|
-
maxDomain={{ y: 9 }}
|
|
1234
|
-
padding={0}
|
|
1235
|
-
width={400}
|
|
1236
|
-
>
|
|
1237
|
-
<ChartArea
|
|
1238
|
-
data={[
|
|
1239
|
-
{ name: 'Cluster', x: '2015', y: 7 },
|
|
1240
|
-
{ name: 'Cluster', x: '2016', y: 6 },
|
|
1241
|
-
{ name: 'Cluster', x: '2017', y: 8 },
|
|
1242
|
-
{ name: 'Cluster', x: '2018', y: 3 },
|
|
1243
|
-
{ name: 'Cluster', x: '2019', y: 4 },
|
|
1244
|
-
{ name: 'Cluster', x: '2020', y: 1 },
|
|
1245
|
-
{ name: 'Cluster', x: '2021', y: 0 }
|
|
1246
|
-
]}
|
|
1247
|
-
/>
|
|
1248
|
-
</ChartGroup>
|
|
1249
|
-
</FlexItem>
|
|
1250
|
-
</Flex>
|
|
1251
|
-
</CardBody>
|
|
1252
|
-
<Divider />
|
|
1253
|
-
<CardFooter>
|
|
1254
|
-
<a href="#">View all clusters</a>
|
|
1255
|
-
</CardFooter>
|
|
1256
|
-
</Card>
|
|
1257
|
-
</GalleryItem>
|
|
1258
|
-
</Gallery>;
|
|
1259
79
|
```
|
|
1260
80
|
|
|
1261
81
|
### Utilization card 3
|
|
1262
82
|
|
|
1263
|
-
```ts
|
|
1264
|
-
import React from 'react';
|
|
1265
|
-
import {
|
|
1266
|
-
Card,
|
|
1267
|
-
CardTitle,
|
|
1268
|
-
CardHeader,
|
|
1269
|
-
CardBody,
|
|
1270
|
-
CardFooter,
|
|
1271
|
-
Title,
|
|
1272
|
-
Gallery,
|
|
1273
|
-
GalleryItem,
|
|
1274
|
-
Flex,
|
|
1275
|
-
FlexItem,
|
|
1276
|
-
Stack,
|
|
1277
|
-
StackItem,
|
|
1278
|
-
Divider,
|
|
1279
|
-
Select,
|
|
1280
|
-
SelectList,
|
|
1281
|
-
SelectOption,
|
|
1282
|
-
MenuToggle,
|
|
1283
|
-
MenuToggleElement
|
|
1284
|
-
} from '@patternfly/react-core';
|
|
1285
|
-
import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
|
|
1286
|
-
import { Chart, ChartStack, ChartBar, ChartTooltip } from '@patternfly/react-charts';
|
|
1287
|
-
import chart_color_gold_100 from '@patternfly/react-tokens/dist/esm/chart_color_gold_100';
|
|
1288
|
-
import chart_color_gold_300 from '@patternfly/react-tokens/dist/esm/chart_color_gold_300';
|
|
1289
|
-
import chart_color_orange_300 from '@patternfly/react-tokens/dist/esm/chart_color_orange_300';
|
|
1290
|
-
import chart_color_red_100 from '@patternfly/react-tokens/dist/esm/chart_color_red_100';
|
|
1291
|
-
import flex from '@patternfly/react-styles/css/utilities/Flex/flex';
|
|
1292
|
-
import text from '@patternfly/react-styles/css/utilities/Text/text';
|
|
83
|
+
```ts file="./examples/Card/CardUtilizationDemo3.tsx"
|
|
1293
84
|
|
|
1294
|
-
const UtilizationCard3: React.FunctionComponent = () => {
|
|
1295
|
-
const [isOpen, setIsOpen] = React.useState(false);
|
|
1296
|
-
|
|
1297
|
-
const selectItems = (
|
|
1298
|
-
<SelectList>
|
|
1299
|
-
<SelectOption key="option1" value="Last hour">
|
|
1300
|
-
Last hour
|
|
1301
|
-
</SelectOption>
|
|
1302
|
-
<SelectOption key="option2" value="Last 6 hours">
|
|
1303
|
-
Last 6 hours
|
|
1304
|
-
</SelectOption>
|
|
1305
|
-
<SelectOption key="option3" value="Last 24 hours">
|
|
1306
|
-
Last 24 hours
|
|
1307
|
-
</SelectOption>
|
|
1308
|
-
<SelectOption key="option4" value="Last 7 days">
|
|
1309
|
-
Last 7 days
|
|
1310
|
-
</SelectOption>
|
|
1311
|
-
</SelectList>
|
|
1312
|
-
);
|
|
1313
|
-
|
|
1314
|
-
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
1315
|
-
<MenuToggle ref={toggleRef} onClick={() => setIsOpen(!isOpen)} isExpanded={isOpen} variant="plainText">
|
|
1316
|
-
Filter
|
|
1317
|
-
</MenuToggle>
|
|
1318
|
-
);
|
|
1319
|
-
|
|
1320
|
-
const headerActions = (
|
|
1321
|
-
<Select onSelect={() => setIsOpen(!isOpen)} onOpenChange={setIsOpen} isOpen={isOpen} toggle={toggle}>
|
|
1322
|
-
{selectItems}
|
|
1323
|
-
</Select>
|
|
1324
|
-
);
|
|
1325
|
-
|
|
1326
|
-
return (
|
|
1327
|
-
<React.Fragment>
|
|
1328
|
-
<b>Note:</b> Custom CSS is used in this demo to align the card title and select toggle text to{' '}
|
|
1329
|
-
<code>baseline</code> alignment.
|
|
1330
|
-
<br />
|
|
1331
|
-
<br />
|
|
1332
|
-
<Gallery hasGutter minWidths={{ default: '360px' }}>
|
|
1333
|
-
<GalleryItem>
|
|
1334
|
-
<Card id="utilization-card-3-card" component="div">
|
|
1335
|
-
<CardHeader
|
|
1336
|
-
className={flex.alignItemsFlexStart}
|
|
1337
|
-
actions={{ actions: headerActions, hasNoOffset: true }}
|
|
1338
|
-
>
|
|
1339
|
-
<CardTitle>
|
|
1340
|
-
<Title headingLevel="h4" size="lg" style={{ paddingTop: '3px' }}>
|
|
1341
|
-
Recommendations
|
|
1342
|
-
</Title>
|
|
1343
|
-
</CardTitle>
|
|
1344
|
-
</CardHeader>
|
|
1345
|
-
<CardBody>
|
|
1346
|
-
<Flex direction={{ default: 'column' }}>
|
|
1347
|
-
<FlexItem>
|
|
1348
|
-
<span>System</span>
|
|
1349
|
-
</FlexItem>
|
|
1350
|
-
<Flex>
|
|
1351
|
-
<ExclamationCircleIcon className={text.dangerColor_100} aria-hidden />
|
|
1352
|
-
<a href="#">25 incidents detected</a>
|
|
1353
|
-
</Flex>
|
|
1354
|
-
<FlexItem>
|
|
1355
|
-
<Chart
|
|
1356
|
-
ariaDesc="Mock incidents chart"
|
|
1357
|
-
ariaTitle="Mock stack chart"
|
|
1358
|
-
domainPadding={{ x: [30, 25] }}
|
|
1359
|
-
legendData={[
|
|
1360
|
-
{ name: 'Low', symbol: { fill: chart_color_gold_100.value } },
|
|
1361
|
-
{ name: 'Important', symbol: { fill: chart_color_gold_300.value } },
|
|
1362
|
-
{ name: 'Moderate', symbol: { fill: chart_color_orange_300.value } },
|
|
1363
|
-
{ name: 'Critical', symbol: { fill: chart_color_red_100.value } }
|
|
1364
|
-
]}
|
|
1365
|
-
legendPosition="bottom-left"
|
|
1366
|
-
height={50}
|
|
1367
|
-
padding={{
|
|
1368
|
-
bottom: 40,
|
|
1369
|
-
left: 0,
|
|
1370
|
-
right: 0,
|
|
1371
|
-
top: 0
|
|
1372
|
-
}}
|
|
1373
|
-
width={350}
|
|
1374
|
-
showAxis={false}
|
|
1375
|
-
>
|
|
1376
|
-
<ChartStack
|
|
1377
|
-
horizontal
|
|
1378
|
-
colorScale={[
|
|
1379
|
-
chart_color_gold_100.value,
|
|
1380
|
-
chart_color_gold_300.value,
|
|
1381
|
-
chart_color_orange_300.value,
|
|
1382
|
-
chart_color_red_100.value
|
|
1383
|
-
]}
|
|
1384
|
-
>
|
|
1385
|
-
<ChartBar
|
|
1386
|
-
data={[
|
|
1387
|
-
{
|
|
1388
|
-
name: 'Low',
|
|
1389
|
-
x: 'Cluster A',
|
|
1390
|
-
y: 6,
|
|
1391
|
-
label: 'Low: 6'
|
|
1392
|
-
}
|
|
1393
|
-
]}
|
|
1394
|
-
labelComponent={<ChartTooltip constrainToVisibleArea />}
|
|
1395
|
-
/>
|
|
1396
|
-
<ChartBar
|
|
1397
|
-
data={[
|
|
1398
|
-
{
|
|
1399
|
-
name: 'Important',
|
|
1400
|
-
x: 'Cluster A',
|
|
1401
|
-
y: 2,
|
|
1402
|
-
label: 'Important: 2'
|
|
1403
|
-
}
|
|
1404
|
-
]}
|
|
1405
|
-
labelComponent={<ChartTooltip constrainToVisibleArea />}
|
|
1406
|
-
/>
|
|
1407
|
-
<ChartBar
|
|
1408
|
-
data={[
|
|
1409
|
-
{
|
|
1410
|
-
name: 'Moderate',
|
|
1411
|
-
x: 'Cluster A',
|
|
1412
|
-
y: 4,
|
|
1413
|
-
label: 'Moderate: 4'
|
|
1414
|
-
}
|
|
1415
|
-
]}
|
|
1416
|
-
labelComponent={<ChartTooltip constrainToVisibleArea />}
|
|
1417
|
-
/>
|
|
1418
|
-
<ChartBar
|
|
1419
|
-
data={[
|
|
1420
|
-
{
|
|
1421
|
-
name: 'Critical',
|
|
1422
|
-
x: 'Cluster A',
|
|
1423
|
-
y: 2,
|
|
1424
|
-
label: 'Critical: 2'
|
|
1425
|
-
}
|
|
1426
|
-
]}
|
|
1427
|
-
labelComponent={<ChartTooltip constrainToVisibleArea />}
|
|
1428
|
-
/>
|
|
1429
|
-
</ChartStack>
|
|
1430
|
-
</Chart>
|
|
1431
|
-
</FlexItem>
|
|
1432
|
-
</Flex>
|
|
1433
|
-
</CardBody>
|
|
1434
|
-
<CardFooter>
|
|
1435
|
-
<a href="#">See details</a>
|
|
1436
|
-
</CardFooter>
|
|
1437
|
-
</Card>
|
|
1438
|
-
</GalleryItem>
|
|
1439
|
-
</Gallery>
|
|
1440
|
-
</React.Fragment>
|
|
1441
|
-
);
|
|
1442
|
-
};
|
|
1443
85
|
```
|
|
1444
86
|
|
|
1445
87
|
### Utilization card 4
|
|
1446
88
|
|
|
1447
|
-
```ts
|
|
1448
|
-
import React from 'react';
|
|
1449
|
-
import { Card, CardTitle, CardBody, CardFooter, Title, Gallery, GalleryItem } from '@patternfly/react-core';
|
|
1450
|
-
import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts';
|
|
89
|
+
```ts file="./examples/Card/CardUtilizationDemo4.tsx"
|
|
1451
90
|
|
|
1452
|
-
<Gallery hasGutter minWidths={{ default: '360px' }}>
|
|
1453
|
-
<GalleryItem>
|
|
1454
|
-
<Card id="utilization-card-4-card" component="div">
|
|
1455
|
-
<CardTitle>
|
|
1456
|
-
<Title headingLevel="h4" size="lg">
|
|
1457
|
-
CPU Usage
|
|
1458
|
-
</Title>
|
|
1459
|
-
</CardTitle>
|
|
1460
|
-
<CardBody>
|
|
1461
|
-
<ChartDonutThreshold
|
|
1462
|
-
ariaDesc="Mock storage capacity"
|
|
1463
|
-
ariaTitle="Mock donut utilization chart"
|
|
1464
|
-
constrainToVisibleArea={true}
|
|
1465
|
-
data={[
|
|
1466
|
-
{ x: 'Warning at 60%', y: 60 },
|
|
1467
|
-
{ x: 'Danger at 90%', y: 90 }
|
|
1468
|
-
]}
|
|
1469
|
-
height={200}
|
|
1470
|
-
labels={({ datum }) => (datum.x ? datum.x : null)}
|
|
1471
|
-
padding={{
|
|
1472
|
-
bottom: 0,
|
|
1473
|
-
left: 10,
|
|
1474
|
-
right: 150,
|
|
1475
|
-
top: 0
|
|
1476
|
-
}}
|
|
1477
|
-
width={350}
|
|
1478
|
-
>
|
|
1479
|
-
<ChartDonutUtilization
|
|
1480
|
-
data={{ x: 'Storage capacity', y: 80 }}
|
|
1481
|
-
labels={({ datum }) => (datum.x ? `${datum.x}: ${datum.y}%` : null)}
|
|
1482
|
-
legendData={[{ name: `Capacity: 80%` }, { name: 'Warning at 60%' }, { name: 'Danger at 90%' }]}
|
|
1483
|
-
legendOrientation="vertical"
|
|
1484
|
-
title="80%"
|
|
1485
|
-
subTitle="of 100 GBps"
|
|
1486
|
-
thresholds={[{ value: 60 }, { value: 90 }]}
|
|
1487
|
-
/>
|
|
1488
|
-
</ChartDonutThreshold>{' '}
|
|
1489
|
-
</CardBody>
|
|
1490
|
-
<CardFooter>
|
|
1491
|
-
<a href="#">See details</a>
|
|
1492
|
-
</CardFooter>
|
|
1493
|
-
</Card>
|
|
1494
|
-
</GalleryItem>
|
|
1495
|
-
</Gallery>;
|
|
1496
91
|
```
|
|
1497
92
|
|
|
1498
93
|
### Nested cards
|
|
1499
94
|
|
|
1500
|
-
```
|
|
1501
|
-
import React from 'react';
|
|
1502
|
-
import {
|
|
1503
|
-
Card,
|
|
1504
|
-
CardHeader,
|
|
1505
|
-
CardTitle,
|
|
1506
|
-
CardBody,
|
|
1507
|
-
CardExpandableContent,
|
|
1508
|
-
Checkbox,
|
|
1509
|
-
Title,
|
|
1510
|
-
Divider,
|
|
1511
|
-
Grid,
|
|
1512
|
-
GridItem,
|
|
1513
|
-
Flex,
|
|
1514
|
-
FlexItem
|
|
1515
|
-
} from '@patternfly/react-core';
|
|
1516
|
-
import { ChartArea, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts';
|
|
1517
|
-
import sizing from '@patternfly/react-styles/css/utilities/Sizing/sizing';
|
|
1518
|
-
import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/accessibility';
|
|
1519
|
-
|
|
1520
|
-
CardNestedDemo = () => {
|
|
1521
|
-
const [isCardExpanded1, onCardExpand1] = React.useState(true);
|
|
1522
|
-
const [isCardExpanded2, onCardExpand2] = React.useState(false);
|
|
1523
|
-
const [isCardExpanded3, onCardExpand3] = React.useState(false);
|
|
1524
|
-
const [isToggleOnRight, onCheckClick] = React.useState(false);
|
|
95
|
+
```ts file="./examples/Card/CardNested.tsx"
|
|
1525
96
|
|
|
1526
|
-
return (
|
|
1527
|
-
<>
|
|
1528
|
-
<div style={{ marginBottom: '12px' }}>
|
|
1529
|
-
<Checkbox
|
|
1530
|
-
id="isToggleRightAligned"
|
|
1531
|
-
key="isToggleRightAligned"
|
|
1532
|
-
label="Align expand toggle on right"
|
|
1533
|
-
isChecked={isToggleOnRight}
|
|
1534
|
-
onChange={(_event, checked) => onCheckClick(!isToggleOnRight)}
|
|
1535
|
-
/>
|
|
1536
|
-
</div>
|
|
1537
|
-
<Card id="nested-cards-card">
|
|
1538
|
-
<CardHeader>
|
|
1539
|
-
<CardTitle id="nested-cards-toggle-title">
|
|
1540
|
-
<Title headingLevel="h4" size="lg">
|
|
1541
|
-
{' '}
|
|
1542
|
-
Hardware Monitor{' '}
|
|
1543
|
-
</Title>
|
|
1544
|
-
</CardTitle>
|
|
1545
|
-
</CardHeader>
|
|
1546
|
-
<Card id="nested-cards-toggle-group-1" isPlain isExpanded={isCardExpanded1}>
|
|
1547
|
-
<CardHeader
|
|
1548
|
-
onExpand={() => onCardExpand1(!isCardExpanded1)}
|
|
1549
|
-
isToggleRightAligned={isToggleOnRight}
|
|
1550
|
-
toggleButtonProps={{
|
|
1551
|
-
id: 'toggle-button-1',
|
|
1552
|
-
'aria-label': 'Details',
|
|
1553
|
-
'aria-labelledby': 'nested-cards-toggle-group-1-title toggle-button-1',
|
|
1554
|
-
'aria-expanded': isCardExpanded1
|
|
1555
|
-
}}
|
|
1556
|
-
>
|
|
1557
|
-
<CardTitle id="nested-cards-toggle-group-1-title">
|
|
1558
|
-
<span className="pf-v5-u-font-weight-light">CPU 1</span>
|
|
1559
|
-
</CardTitle>
|
|
1560
|
-
</CardHeader>
|
|
1561
|
-
<CardExpandableContent>
|
|
1562
|
-
<CardBody>
|
|
1563
|
-
<Grid hasGutter>
|
|
1564
|
-
<Grid hasGutter>
|
|
1565
|
-
<GridItem md={4}>
|
|
1566
|
-
<Flex
|
|
1567
|
-
className={sizing.h_100OnMd}
|
|
1568
|
-
direction={{ md: 'column' }}
|
|
1569
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
1570
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
1571
|
-
>
|
|
1572
|
-
<FlexItem>
|
|
1573
|
-
<b>Temperature</b>
|
|
1574
|
-
</FlexItem>
|
|
1575
|
-
<Divider
|
|
1576
|
-
className={accessibility.hiddenOnMd}
|
|
1577
|
-
orientation={{
|
|
1578
|
-
default: 'vertical'
|
|
1579
|
-
}}
|
|
1580
|
-
inset={{ default: 'insetSm' }}
|
|
1581
|
-
/>
|
|
1582
|
-
<FlexItem>
|
|
1583
|
-
<span>64C</span>
|
|
1584
|
-
</FlexItem>
|
|
1585
|
-
</Flex>
|
|
1586
|
-
</GridItem>
|
|
1587
|
-
<GridItem md={8}>
|
|
1588
|
-
<Grid hasGutter>
|
|
1589
|
-
<GridItem span={2}>
|
|
1590
|
-
<Flex
|
|
1591
|
-
direction={{ default: 'column' }}
|
|
1592
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
1593
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
1594
|
-
>
|
|
1595
|
-
<FlexItem>100C</FlexItem>
|
|
1596
|
-
<FlexItem>50C</FlexItem>
|
|
1597
|
-
<FlexItem>0C</FlexItem>
|
|
1598
|
-
</Flex>
|
|
1599
|
-
</GridItem>
|
|
1600
|
-
<GridItem span={10}>
|
|
1601
|
-
<ChartGroup
|
|
1602
|
-
ariaDesc="Mock CPU temperature"
|
|
1603
|
-
ariaTitle="Mock CPU temperature sparkline chart"
|
|
1604
|
-
containerComponent={
|
|
1605
|
-
<ChartVoronoiContainer
|
|
1606
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
1607
|
-
constrainToVisibleArea
|
|
1608
|
-
/>
|
|
1609
|
-
}
|
|
1610
|
-
height={60}
|
|
1611
|
-
maxDomain={{ y: 100 }}
|
|
1612
|
-
padding={0}
|
|
1613
|
-
width={400}
|
|
1614
|
-
>
|
|
1615
|
-
<ChartArea
|
|
1616
|
-
data={[
|
|
1617
|
-
{ name: 'Temp', x: '1', y: 25 },
|
|
1618
|
-
{ name: 'Temp', x: '2', y: 40 },
|
|
1619
|
-
{ name: 'Temp', x: '3', y: 20 },
|
|
1620
|
-
{ name: 'Temp', x: '4', y: 60 },
|
|
1621
|
-
{ name: 'Temp', x: '5', y: 20 },
|
|
1622
|
-
{ name: 'Temp', x: '6', y: 41 },
|
|
1623
|
-
{ name: 'Temp', x: '7', y: 45 },
|
|
1624
|
-
{ name: 'Temp', x: '8', y: 41 },
|
|
1625
|
-
{ name: 'Temp', x: '9', y: 62 }
|
|
1626
|
-
]}
|
|
1627
|
-
/>
|
|
1628
|
-
</ChartGroup>
|
|
1629
|
-
</GridItem>
|
|
1630
|
-
</Grid>
|
|
1631
|
-
</GridItem>
|
|
1632
|
-
</Grid>
|
|
1633
|
-
<Divider className={accessibility.hiddenOnMd} />
|
|
1634
|
-
<Grid hasGutter>
|
|
1635
|
-
<GridItem md={4}>
|
|
1636
|
-
<Flex
|
|
1637
|
-
className={sizing.h_100OnMd}
|
|
1638
|
-
direction={{ md: 'column' }}
|
|
1639
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
1640
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
1641
|
-
>
|
|
1642
|
-
<FlexItem>
|
|
1643
|
-
<b>Speed</b>
|
|
1644
|
-
</FlexItem>
|
|
1645
|
-
<Divider
|
|
1646
|
-
className={accessibility.hiddenOnMd}
|
|
1647
|
-
orientation={{
|
|
1648
|
-
default: 'vertical'
|
|
1649
|
-
}}
|
|
1650
|
-
inset={{ default: 'insetSm' }}
|
|
1651
|
-
/>
|
|
1652
|
-
<FlexItem>
|
|
1653
|
-
<span>2.3Ghz</span>
|
|
1654
|
-
</FlexItem>
|
|
1655
|
-
</Flex>
|
|
1656
|
-
</GridItem>
|
|
1657
|
-
<GridItem md={8}>
|
|
1658
|
-
<Grid hasGutter>
|
|
1659
|
-
<GridItem span={2}>
|
|
1660
|
-
<Flex
|
|
1661
|
-
direction={{ default: 'column' }}
|
|
1662
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
1663
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
1664
|
-
>
|
|
1665
|
-
<FlexItem>3.6Ghz</FlexItem>
|
|
1666
|
-
<FlexItem>1.5Ghz</FlexItem>
|
|
1667
|
-
<FlexItem>0GHZ</FlexItem>
|
|
1668
|
-
</Flex>
|
|
1669
|
-
</GridItem>
|
|
1670
|
-
<GridItem span={10}>
|
|
1671
|
-
<ChartGroup
|
|
1672
|
-
ariaDesc="Mock CPU speed"
|
|
1673
|
-
ariaTitle="Mock CPU speed sparkline chart"
|
|
1674
|
-
containerComponent={
|
|
1675
|
-
<ChartVoronoiContainer
|
|
1676
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
1677
|
-
constrainToVisibleArea
|
|
1678
|
-
/>
|
|
1679
|
-
}
|
|
1680
|
-
height={60}
|
|
1681
|
-
maxDomain={{ y: 3.6 }}
|
|
1682
|
-
padding={0}
|
|
1683
|
-
width={400}
|
|
1684
|
-
>
|
|
1685
|
-
<ChartArea
|
|
1686
|
-
data={[
|
|
1687
|
-
{ name: 'Temp', x: '1', y: 0.9 },
|
|
1688
|
-
{ name: 'Temp', x: '2', y: 1.44 },
|
|
1689
|
-
{ name: 'Temp', x: '3', y: 0.72 },
|
|
1690
|
-
{ name: 'Temp', x: '4', y: 2.16 },
|
|
1691
|
-
{ name: 'Temp', x: '5', y: 0.72 },
|
|
1692
|
-
{ name: 'Temp', x: '6', y: 1.48 },
|
|
1693
|
-
{ name: 'Temp', x: '7', y: 1.62 },
|
|
1694
|
-
{ name: 'Temp', x: '8', y: 1.48 },
|
|
1695
|
-
{ name: 'Temp', x: '9', y: 2.23 }
|
|
1696
|
-
]}
|
|
1697
|
-
/>
|
|
1698
|
-
</ChartGroup>
|
|
1699
|
-
</GridItem>
|
|
1700
|
-
</Grid>
|
|
1701
|
-
</GridItem>
|
|
1702
|
-
</Grid>
|
|
1703
|
-
</Grid>
|
|
1704
|
-
</CardBody>
|
|
1705
|
-
</CardExpandableContent>
|
|
1706
|
-
</Card>
|
|
1707
|
-
<Card id="nested-cards-toggle-group-2" isPlain isExpanded={isCardExpanded3}>
|
|
1708
|
-
<CardHeader
|
|
1709
|
-
onExpand={() => onCardExpand3(!isCardExpanded3)}
|
|
1710
|
-
isToggleRightAligned={isToggleOnRight}
|
|
1711
|
-
toggleButtonProps={{
|
|
1712
|
-
id: 'toggle-button-2',
|
|
1713
|
-
'aria-label': 'Details',
|
|
1714
|
-
'aria-labelledby': 'nested-cards-toggle-group-2-title toggle-button-2',
|
|
1715
|
-
'aria-expanded': isCardExpanded3
|
|
1716
|
-
}}
|
|
1717
|
-
>
|
|
1718
|
-
<CardTitle id="nested-cards-toggle-group-2-title">
|
|
1719
|
-
<span className="pf-v5-u-font-weight-light">CPU 2</span>
|
|
1720
|
-
</CardTitle>
|
|
1721
|
-
</CardHeader>
|
|
1722
|
-
<CardExpandableContent>
|
|
1723
|
-
<CardBody>
|
|
1724
|
-
<Grid hasGutter>
|
|
1725
|
-
<Grid hasGutter>
|
|
1726
|
-
<GridItem md={4}>
|
|
1727
|
-
<Flex
|
|
1728
|
-
className={sizing.h_100OnMd}
|
|
1729
|
-
direction={{ md: 'column' }}
|
|
1730
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
1731
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
1732
|
-
>
|
|
1733
|
-
<FlexItem>
|
|
1734
|
-
<b>Temperature</b>
|
|
1735
|
-
</FlexItem>
|
|
1736
|
-
<Divider
|
|
1737
|
-
className={accessibility.hiddenOnMd}
|
|
1738
|
-
orientation={{
|
|
1739
|
-
default: 'vertical'
|
|
1740
|
-
}}
|
|
1741
|
-
inset={{ default: 'insetSm' }}
|
|
1742
|
-
/>
|
|
1743
|
-
<FlexItem>
|
|
1744
|
-
<span>64C</span>
|
|
1745
|
-
</FlexItem>
|
|
1746
|
-
</Flex>
|
|
1747
|
-
</GridItem>
|
|
1748
|
-
<GridItem md={8}>
|
|
1749
|
-
<Grid hasGutter>
|
|
1750
|
-
<GridItem span={2}>
|
|
1751
|
-
<Flex
|
|
1752
|
-
direction={{ default: 'column' }}
|
|
1753
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
1754
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
1755
|
-
>
|
|
1756
|
-
<FlexItem>100C</FlexItem>
|
|
1757
|
-
<FlexItem>50C</FlexItem>
|
|
1758
|
-
<FlexItem>0C</FlexItem>
|
|
1759
|
-
</Flex>
|
|
1760
|
-
</GridItem>
|
|
1761
|
-
<GridItem span={10}>
|
|
1762
|
-
<ChartGroup
|
|
1763
|
-
ariaDesc="Mock CPU temperature"
|
|
1764
|
-
ariaTitle="Mock CPU temperature sparkline chart"
|
|
1765
|
-
containerComponent={
|
|
1766
|
-
<ChartVoronoiContainer
|
|
1767
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
1768
|
-
constrainToVisibleArea
|
|
1769
|
-
/>
|
|
1770
|
-
}
|
|
1771
|
-
height={60}
|
|
1772
|
-
maxDomain={{ y: 100 }}
|
|
1773
|
-
padding={0}
|
|
1774
|
-
width={400}
|
|
1775
|
-
>
|
|
1776
|
-
<ChartArea
|
|
1777
|
-
data={[
|
|
1778
|
-
{ name: 'Temp', x: '1', y: 25 },
|
|
1779
|
-
{ name: 'Temp', x: '2', y: 40 },
|
|
1780
|
-
{ name: 'Temp', x: '3', y: 20 },
|
|
1781
|
-
{ name: 'Temp', x: '4', y: 60 },
|
|
1782
|
-
{ name: 'Temp', x: '5', y: 20 },
|
|
1783
|
-
{ name: 'Temp', x: '6', y: 41 },
|
|
1784
|
-
{ name: 'Temp', x: '7', y: 45 },
|
|
1785
|
-
{ name: 'Temp', x: '8', y: 41 },
|
|
1786
|
-
{ name: 'Temp', x: '9', y: 62 }
|
|
1787
|
-
]}
|
|
1788
|
-
/>
|
|
1789
|
-
</ChartGroup>
|
|
1790
|
-
</GridItem>
|
|
1791
|
-
</Grid>
|
|
1792
|
-
</GridItem>
|
|
1793
|
-
</Grid>
|
|
1794
|
-
<Divider className={accessibility.hiddenOnMd} />
|
|
1795
|
-
<Grid hasGutter>
|
|
1796
|
-
<GridItem md={4}>
|
|
1797
|
-
<Flex
|
|
1798
|
-
className={sizing.h_100OnMd}
|
|
1799
|
-
direction={{ md: 'column' }}
|
|
1800
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
1801
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
1802
|
-
>
|
|
1803
|
-
<FlexItem>
|
|
1804
|
-
<b>Speed</b>
|
|
1805
|
-
</FlexItem>
|
|
1806
|
-
<Divider
|
|
1807
|
-
className={accessibility.hiddenOnMd}
|
|
1808
|
-
orientation={{
|
|
1809
|
-
default: 'vertical'
|
|
1810
|
-
}}
|
|
1811
|
-
inset={{ default: 'insetSm' }}
|
|
1812
|
-
/>
|
|
1813
|
-
<FlexItem>
|
|
1814
|
-
<span>2.3Ghz</span>
|
|
1815
|
-
</FlexItem>
|
|
1816
|
-
</Flex>
|
|
1817
|
-
</GridItem>
|
|
1818
|
-
<GridItem md={8}>
|
|
1819
|
-
<Grid hasGutter>
|
|
1820
|
-
<GridItem span={2}>
|
|
1821
|
-
<Flex
|
|
1822
|
-
direction={{ default: 'column' }}
|
|
1823
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
1824
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
1825
|
-
>
|
|
1826
|
-
<FlexItem>3.6Ghz</FlexItem>
|
|
1827
|
-
<FlexItem>1.5Ghz</FlexItem>
|
|
1828
|
-
<FlexItem>0GHZ</FlexItem>
|
|
1829
|
-
</Flex>
|
|
1830
|
-
</GridItem>
|
|
1831
|
-
<GridItem span={10}>
|
|
1832
|
-
<ChartGroup
|
|
1833
|
-
ariaDesc="Mock CPU speed"
|
|
1834
|
-
ariaTitle="Mock CPU speed sparkline chart"
|
|
1835
|
-
containerComponent={
|
|
1836
|
-
<ChartVoronoiContainer
|
|
1837
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
1838
|
-
constrainToVisibleArea
|
|
1839
|
-
/>
|
|
1840
|
-
}
|
|
1841
|
-
height={60}
|
|
1842
|
-
maxDomain={{ y: 3.6 }}
|
|
1843
|
-
padding={0}
|
|
1844
|
-
width={400}
|
|
1845
|
-
>
|
|
1846
|
-
<ChartArea
|
|
1847
|
-
data={[
|
|
1848
|
-
{ name: 'Temp', x: '1', y: 0.9 },
|
|
1849
|
-
{ name: 'Temp', x: '2', y: 1.44 },
|
|
1850
|
-
{ name: 'Temp', x: '3', y: 0.72 },
|
|
1851
|
-
{ name: 'Temp', x: '4', y: 2.16 },
|
|
1852
|
-
{ name: 'Temp', x: '5', y: 0.72 },
|
|
1853
|
-
{ name: 'Temp', x: '6', y: 1.48 },
|
|
1854
|
-
{ name: 'Temp', x: '7', y: 1.62 },
|
|
1855
|
-
{ name: 'Temp', x: '8', y: 1.48 },
|
|
1856
|
-
{ name: 'Temp', x: '9', y: 2.23 }
|
|
1857
|
-
]}
|
|
1858
|
-
/>
|
|
1859
|
-
</ChartGroup>
|
|
1860
|
-
</GridItem>
|
|
1861
|
-
</Grid>
|
|
1862
|
-
</GridItem>
|
|
1863
|
-
</Grid>
|
|
1864
|
-
</Grid>
|
|
1865
|
-
</CardBody>
|
|
1866
|
-
</CardExpandableContent>
|
|
1867
|
-
</Card>
|
|
1868
|
-
<Card id="nested-cards-toggle-group-3" isPlain isExpanded={isCardExpanded2}>
|
|
1869
|
-
<CardHeader
|
|
1870
|
-
onExpand={() => onCardExpand2(!isCardExpanded2)}
|
|
1871
|
-
isToggleRightAligned={isToggleOnRight}
|
|
1872
|
-
toggleButtonProps={{
|
|
1873
|
-
id: 'toggle-button-3',
|
|
1874
|
-
'aria-label': 'Details',
|
|
1875
|
-
'aria-labelledby': 'nested-cards-toggle-group-3-title toggle-button-3',
|
|
1876
|
-
'aria-expanded': isCardExpanded2
|
|
1877
|
-
}}
|
|
1878
|
-
>
|
|
1879
|
-
<CardTitle id="nested-cards-toggle-group-3-title">
|
|
1880
|
-
<span className="pf-v5-u-font-weight-light">CPU 3</span>
|
|
1881
|
-
</CardTitle>
|
|
1882
|
-
</CardHeader>
|
|
1883
|
-
<CardExpandableContent>
|
|
1884
|
-
<CardBody>
|
|
1885
|
-
<Grid hasGutter>
|
|
1886
|
-
<Grid hasGutter>
|
|
1887
|
-
<GridItem md={4}>
|
|
1888
|
-
<Flex
|
|
1889
|
-
className={sizing.h_100OnMd}
|
|
1890
|
-
direction={{ md: 'column' }}
|
|
1891
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
1892
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
1893
|
-
>
|
|
1894
|
-
<FlexItem>
|
|
1895
|
-
<b>Temperature</b>
|
|
1896
|
-
</FlexItem>
|
|
1897
|
-
<Divider
|
|
1898
|
-
className={accessibility.hiddenOnMd}
|
|
1899
|
-
orientation={{
|
|
1900
|
-
default: 'vertical'
|
|
1901
|
-
}}
|
|
1902
|
-
inset={{ default: 'insetSm' }}
|
|
1903
|
-
/>
|
|
1904
|
-
<FlexItem>
|
|
1905
|
-
<span>64C</span>
|
|
1906
|
-
</FlexItem>
|
|
1907
|
-
</Flex>
|
|
1908
|
-
</GridItem>
|
|
1909
|
-
<GridItem md={8}>
|
|
1910
|
-
<Grid hasGutter>
|
|
1911
|
-
<GridItem span={2}>
|
|
1912
|
-
<Flex
|
|
1913
|
-
direction={{ default: 'column' }}
|
|
1914
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
1915
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
1916
|
-
>
|
|
1917
|
-
<FlexItem>100C</FlexItem>
|
|
1918
|
-
<FlexItem>50C</FlexItem>
|
|
1919
|
-
<FlexItem>0C</FlexItem>
|
|
1920
|
-
</Flex>
|
|
1921
|
-
</GridItem>
|
|
1922
|
-
<GridItem span={10}>
|
|
1923
|
-
<ChartGroup
|
|
1924
|
-
ariaDesc="Mock CPU temperature"
|
|
1925
|
-
ariaTitle="Mock CPU temperature sparkline chart"
|
|
1926
|
-
containerComponent={
|
|
1927
|
-
<ChartVoronoiContainer
|
|
1928
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
1929
|
-
constrainToVisibleArea
|
|
1930
|
-
/>
|
|
1931
|
-
}
|
|
1932
|
-
height={60}
|
|
1933
|
-
maxDomain={{ y: 100 }}
|
|
1934
|
-
padding={0}
|
|
1935
|
-
width={400}
|
|
1936
|
-
>
|
|
1937
|
-
<ChartArea
|
|
1938
|
-
data={[
|
|
1939
|
-
{ name: 'Temp', x: '1', y: 25 },
|
|
1940
|
-
{ name: 'Temp', x: '2', y: 40 },
|
|
1941
|
-
{ name: 'Temp', x: '3', y: 20 },
|
|
1942
|
-
{ name: 'Temp', x: '4', y: 60 },
|
|
1943
|
-
{ name: 'Temp', x: '5', y: 20 },
|
|
1944
|
-
{ name: 'Temp', x: '6', y: 41 },
|
|
1945
|
-
{ name: 'Temp', x: '7', y: 45 },
|
|
1946
|
-
{ name: 'Temp', x: '8', y: 41 },
|
|
1947
|
-
{ name: 'Temp', x: '9', y: 62 }
|
|
1948
|
-
]}
|
|
1949
|
-
/>
|
|
1950
|
-
</ChartGroup>
|
|
1951
|
-
</GridItem>
|
|
1952
|
-
</Grid>
|
|
1953
|
-
</GridItem>
|
|
1954
|
-
</Grid>
|
|
1955
|
-
<Divider className={accessibility.hiddenOnMd} />
|
|
1956
|
-
<Grid hasGutter>
|
|
1957
|
-
<GridItem md={4}>
|
|
1958
|
-
<Flex
|
|
1959
|
-
className={sizing.h_100OnMd}
|
|
1960
|
-
direction={{ md: 'column' }}
|
|
1961
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
1962
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
1963
|
-
>
|
|
1964
|
-
<FlexItem>
|
|
1965
|
-
<b>Speed</b>
|
|
1966
|
-
</FlexItem>
|
|
1967
|
-
<Divider
|
|
1968
|
-
className={accessibility.hiddenOnMd}
|
|
1969
|
-
orientation={{
|
|
1970
|
-
default: 'vertical'
|
|
1971
|
-
}}
|
|
1972
|
-
inset={{ default: 'insetSm' }}
|
|
1973
|
-
/>
|
|
1974
|
-
<FlexItem>
|
|
1975
|
-
<span>2.3Ghz</span>
|
|
1976
|
-
</FlexItem>
|
|
1977
|
-
</Flex>
|
|
1978
|
-
</GridItem>
|
|
1979
|
-
<GridItem md={8}>
|
|
1980
|
-
<Grid hasGutter>
|
|
1981
|
-
<GridItem span={2}>
|
|
1982
|
-
<Flex
|
|
1983
|
-
direction={{ default: 'column' }}
|
|
1984
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
1985
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
1986
|
-
>
|
|
1987
|
-
<FlexItem>3.6Ghz</FlexItem>
|
|
1988
|
-
<FlexItem>1.5Ghz</FlexItem>
|
|
1989
|
-
<FlexItem>0GHZ</FlexItem>
|
|
1990
|
-
</Flex>
|
|
1991
|
-
</GridItem>
|
|
1992
|
-
<GridItem span={10}>
|
|
1993
|
-
<ChartGroup
|
|
1994
|
-
ariaDesc="Mock CPU speed"
|
|
1995
|
-
ariaTitle="Mock CPU speed sparkline chart"
|
|
1996
|
-
containerComponent={
|
|
1997
|
-
<ChartVoronoiContainer
|
|
1998
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
1999
|
-
constrainToVisibleArea
|
|
2000
|
-
/>
|
|
2001
|
-
}
|
|
2002
|
-
height={60}
|
|
2003
|
-
maxDomain={{ y: 3.6 }}
|
|
2004
|
-
padding={0}
|
|
2005
|
-
width={400}
|
|
2006
|
-
>
|
|
2007
|
-
<ChartArea
|
|
2008
|
-
data={[
|
|
2009
|
-
{ name: 'Temp', x: '1', y: 0.9 },
|
|
2010
|
-
{ name: 'Temp', x: '2', y: 1.44 },
|
|
2011
|
-
{ name: 'Temp', x: '3', y: 0.72 },
|
|
2012
|
-
{ name: 'Temp', x: '4', y: 2.16 },
|
|
2013
|
-
{ name: 'Temp', x: '5', y: 0.72 },
|
|
2014
|
-
{ name: 'Temp', x: '6', y: 1.48 },
|
|
2015
|
-
{ name: 'Temp', x: '7', y: 1.62 },
|
|
2016
|
-
{ name: 'Temp', x: '8', y: 1.48 },
|
|
2017
|
-
{ name: 'Temp', x: '9', y: 2.23 }
|
|
2018
|
-
]}
|
|
2019
|
-
/>
|
|
2020
|
-
</ChartGroup>
|
|
2021
|
-
</GridItem>
|
|
2022
|
-
</Grid>
|
|
2023
|
-
</GridItem>
|
|
2024
|
-
</Grid>
|
|
2025
|
-
</Grid>
|
|
2026
|
-
</CardBody>
|
|
2027
|
-
</CardExpandableContent>
|
|
2028
|
-
</Card>
|
|
2029
|
-
</Card>
|
|
2030
|
-
</>
|
|
2031
|
-
);
|
|
2032
|
-
};
|
|
2033
97
|
```
|
|
2034
98
|
|
|
2035
99
|
### With accordion
|
|
2036
100
|
|
|
2037
|
-
```ts
|
|
2038
|
-
import React from 'react';
|
|
2039
|
-
import {
|
|
2040
|
-
Card,
|
|
2041
|
-
CardTitle,
|
|
2042
|
-
CardBody,
|
|
2043
|
-
CardHeader,
|
|
2044
|
-
Title,
|
|
2045
|
-
Accordion,
|
|
2046
|
-
AccordionItem,
|
|
2047
|
-
AccordionToggle,
|
|
2048
|
-
AccordionContent,
|
|
2049
|
-
Divider,
|
|
2050
|
-
Grid,
|
|
2051
|
-
GridItem,
|
|
2052
|
-
Flex,
|
|
2053
|
-
FlexItem
|
|
2054
|
-
} from '@patternfly/react-core';
|
|
2055
|
-
import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts';
|
|
2056
|
-
import sizing from '@patternfly/react-styles/css/utilities/Sizing/sizing';
|
|
2057
|
-
import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/accessibility';
|
|
101
|
+
```ts file="./examples/Card/CardWithAccordion.tsx"
|
|
2058
102
|
|
|
2059
|
-
const AccordionCard: React.FunctionComponent = () => {
|
|
2060
|
-
const [openCPU, setOpenCPU] = React.useState('cpu1');
|
|
2061
|
-
|
|
2062
|
-
return (
|
|
2063
|
-
<Card>
|
|
2064
|
-
<CardHeader>
|
|
2065
|
-
<CardTitle>
|
|
2066
|
-
<Title headingLevel="h4" size="lg">
|
|
2067
|
-
Hardware Monitor
|
|
2068
|
-
</Title>
|
|
2069
|
-
</CardTitle>
|
|
2070
|
-
</CardHeader>
|
|
2071
|
-
<CardBody>
|
|
2072
|
-
<Accordion>
|
|
2073
|
-
<AccordionItem>
|
|
2074
|
-
<AccordionToggle
|
|
2075
|
-
id="cpu1-toggle"
|
|
2076
|
-
onClick={() => {
|
|
2077
|
-
if (openCPU === 'cpu1') {
|
|
2078
|
-
setOpenCPU(null);
|
|
2079
|
-
} else {
|
|
2080
|
-
setOpenCPU('cpu1');
|
|
2081
|
-
}
|
|
2082
|
-
}}
|
|
2083
|
-
isExpanded={openCPU === 'cpu1'}
|
|
2084
|
-
>
|
|
2085
|
-
CPU 1
|
|
2086
|
-
</AccordionToggle>
|
|
2087
|
-
<AccordionContent isHidden={openCPU !== 'cpu1'}>
|
|
2088
|
-
<Grid hasGutter>
|
|
2089
|
-
<Grid hasGutter>
|
|
2090
|
-
<GridItem md={4}>
|
|
2091
|
-
<Flex
|
|
2092
|
-
className={sizing.h_100OnMd}
|
|
2093
|
-
direction={{ md: 'column' }}
|
|
2094
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
2095
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
2096
|
-
>
|
|
2097
|
-
<FlexItem>
|
|
2098
|
-
<b>Temperature</b>
|
|
2099
|
-
</FlexItem>
|
|
2100
|
-
<Divider
|
|
2101
|
-
className={accessibility.hiddenOnMd}
|
|
2102
|
-
orientation={{
|
|
2103
|
-
default: 'vertical'
|
|
2104
|
-
}}
|
|
2105
|
-
inset={{ default: 'insetSm' }}
|
|
2106
|
-
/>
|
|
2107
|
-
<FlexItem>
|
|
2108
|
-
<span>64C</span>
|
|
2109
|
-
</FlexItem>
|
|
2110
|
-
</Flex>
|
|
2111
|
-
</GridItem>
|
|
2112
|
-
<GridItem md={8}>
|
|
2113
|
-
<Grid hasGutter>
|
|
2114
|
-
<GridItem span={2}>
|
|
2115
|
-
<Flex
|
|
2116
|
-
direction={{ default: 'column' }}
|
|
2117
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
2118
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
2119
|
-
>
|
|
2120
|
-
<FlexItem>100C</FlexItem>
|
|
2121
|
-
<FlexItem>50C</FlexItem>
|
|
2122
|
-
<FlexItem>0C</FlexItem>
|
|
2123
|
-
</Flex>
|
|
2124
|
-
</GridItem>
|
|
2125
|
-
<GridItem span={10}>
|
|
2126
|
-
<ChartGroup
|
|
2127
|
-
ariaDesc="Mock CPU temperature"
|
|
2128
|
-
ariaTitle="Mock CPU temperature sparkline chart"
|
|
2129
|
-
containerComponent={
|
|
2130
|
-
<ChartVoronoiContainer
|
|
2131
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
2132
|
-
constrainToVisibleArea
|
|
2133
|
-
/>
|
|
2134
|
-
}
|
|
2135
|
-
height={60}
|
|
2136
|
-
maxDomain={{ y: 100 }}
|
|
2137
|
-
padding={0}
|
|
2138
|
-
width={400}
|
|
2139
|
-
>
|
|
2140
|
-
<ChartArea
|
|
2141
|
-
data={[
|
|
2142
|
-
{ name: 'Temp', x: '1', y: 25 },
|
|
2143
|
-
{ name: 'Temp', x: '2', y: 40 },
|
|
2144
|
-
{ name: 'Temp', x: '3', y: 20 },
|
|
2145
|
-
{ name: 'Temp', x: '4', y: 60 },
|
|
2146
|
-
{ name: 'Temp', x: '5', y: 20 },
|
|
2147
|
-
{ name: 'Temp', x: '6', y: 41 },
|
|
2148
|
-
{ name: 'Temp', x: '7', y: 45 },
|
|
2149
|
-
{ name: 'Temp', x: '8', y: 41 },
|
|
2150
|
-
{ name: 'Temp', x: '9', y: 62 }
|
|
2151
|
-
]}
|
|
2152
|
-
/>
|
|
2153
|
-
</ChartGroup>
|
|
2154
|
-
</GridItem>
|
|
2155
|
-
</Grid>
|
|
2156
|
-
</GridItem>
|
|
2157
|
-
</Grid>
|
|
2158
|
-
<Divider className={accessibility.hiddenOnMd} />
|
|
2159
|
-
<Grid hasGutter>
|
|
2160
|
-
<GridItem md={4}>
|
|
2161
|
-
<Flex
|
|
2162
|
-
className={sizing.h_100OnMd}
|
|
2163
|
-
direction={{ md: 'column' }}
|
|
2164
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
2165
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
2166
|
-
>
|
|
2167
|
-
<FlexItem>
|
|
2168
|
-
<b>Speed</b>
|
|
2169
|
-
</FlexItem>
|
|
2170
|
-
<Divider
|
|
2171
|
-
className={accessibility.hiddenOnMd}
|
|
2172
|
-
orientation={{
|
|
2173
|
-
default: 'vertical'
|
|
2174
|
-
}}
|
|
2175
|
-
inset={{ default: 'insetSm' }}
|
|
2176
|
-
/>
|
|
2177
|
-
<FlexItem>
|
|
2178
|
-
<span>2.3Ghz</span>
|
|
2179
|
-
</FlexItem>
|
|
2180
|
-
</Flex>
|
|
2181
|
-
</GridItem>
|
|
2182
|
-
<GridItem md={8}>
|
|
2183
|
-
<Grid hasGutter>
|
|
2184
|
-
<GridItem span={2}>
|
|
2185
|
-
<Flex
|
|
2186
|
-
direction={{ default: 'column' }}
|
|
2187
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
2188
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
2189
|
-
>
|
|
2190
|
-
<FlexItem>3.6Ghz</FlexItem>
|
|
2191
|
-
<FlexItem>1.5Ghz</FlexItem>
|
|
2192
|
-
<FlexItem>0GHZ</FlexItem>
|
|
2193
|
-
</Flex>
|
|
2194
|
-
</GridItem>
|
|
2195
|
-
<GridItem span={10}>
|
|
2196
|
-
<ChartGroup
|
|
2197
|
-
ariaDesc="Mock CPU speed"
|
|
2198
|
-
ariaTitle="Mock CPU speed sparkline chart"
|
|
2199
|
-
containerComponent={
|
|
2200
|
-
<ChartVoronoiContainer
|
|
2201
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
2202
|
-
constrainToVisibleArea
|
|
2203
|
-
/>
|
|
2204
|
-
}
|
|
2205
|
-
height={60}
|
|
2206
|
-
maxDomain={{ y: 3.6 }}
|
|
2207
|
-
padding={0}
|
|
2208
|
-
width={400}
|
|
2209
|
-
>
|
|
2210
|
-
<ChartArea
|
|
2211
|
-
data={[
|
|
2212
|
-
{ name: 'Temp', x: '1', y: 0.9 },
|
|
2213
|
-
{ name: 'Temp', x: '2', y: 1.44 },
|
|
2214
|
-
{ name: 'Temp', x: '3', y: 0.72 },
|
|
2215
|
-
{ name: 'Temp', x: '4', y: 2.16 },
|
|
2216
|
-
{ name: 'Temp', x: '5', y: 0.72 },
|
|
2217
|
-
{ name: 'Temp', x: '6', y: 1.48 },
|
|
2218
|
-
{ name: 'Temp', x: '7', y: 1.62 },
|
|
2219
|
-
{ name: 'Temp', x: '8', y: 1.48 },
|
|
2220
|
-
{ name: 'Temp', x: '9', y: 2.23 }
|
|
2221
|
-
]}
|
|
2222
|
-
/>
|
|
2223
|
-
</ChartGroup>
|
|
2224
|
-
</GridItem>
|
|
2225
|
-
</Grid>
|
|
2226
|
-
</GridItem>
|
|
2227
|
-
</Grid>
|
|
2228
|
-
</Grid>
|
|
2229
|
-
</AccordionContent>
|
|
2230
|
-
</AccordionItem>
|
|
2231
|
-
<AccordionItem>
|
|
2232
|
-
<AccordionToggle
|
|
2233
|
-
id="cpu2-toggle"
|
|
2234
|
-
onClick={() => {
|
|
2235
|
-
if (openCPU === 'cpu2') {
|
|
2236
|
-
setOpenCPU(null);
|
|
2237
|
-
} else {
|
|
2238
|
-
setOpenCPU('cpu2');
|
|
2239
|
-
}
|
|
2240
|
-
}}
|
|
2241
|
-
isExpanded={openCPU === 'cpu2'}
|
|
2242
|
-
>
|
|
2243
|
-
CPU 2
|
|
2244
|
-
</AccordionToggle>
|
|
2245
|
-
<AccordionContent isHidden={openCPU !== 'cpu2'}>
|
|
2246
|
-
<Grid hasGutter>
|
|
2247
|
-
<Grid hasGutter>
|
|
2248
|
-
<GridItem md={4}>
|
|
2249
|
-
<Flex
|
|
2250
|
-
className={sizing.h_100OnMd}
|
|
2251
|
-
direction={{ md: 'column' }}
|
|
2252
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
2253
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
2254
|
-
>
|
|
2255
|
-
<FlexItem>
|
|
2256
|
-
<b>Temperature</b>
|
|
2257
|
-
</FlexItem>
|
|
2258
|
-
<Divider
|
|
2259
|
-
className={accessibility.hiddenOnMd}
|
|
2260
|
-
orientation={{
|
|
2261
|
-
default: 'vertical'
|
|
2262
|
-
}}
|
|
2263
|
-
inset={{ default: 'insetSm' }}
|
|
2264
|
-
/>
|
|
2265
|
-
<FlexItem>
|
|
2266
|
-
<span>64C</span>
|
|
2267
|
-
</FlexItem>
|
|
2268
|
-
</Flex>
|
|
2269
|
-
</GridItem>
|
|
2270
|
-
<GridItem md={8}>
|
|
2271
|
-
<Grid hasGutter>
|
|
2272
|
-
<GridItem span={2}>
|
|
2273
|
-
<Flex
|
|
2274
|
-
direction={{ default: 'column' }}
|
|
2275
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
2276
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
2277
|
-
>
|
|
2278
|
-
<FlexItem>100C</FlexItem>
|
|
2279
|
-
<FlexItem>50C</FlexItem>
|
|
2280
|
-
<FlexItem>0C</FlexItem>
|
|
2281
|
-
</Flex>
|
|
2282
|
-
</GridItem>
|
|
2283
|
-
<GridItem span={10}>
|
|
2284
|
-
<ChartGroup
|
|
2285
|
-
ariaDesc="Mock CPU temperature"
|
|
2286
|
-
ariaTitle="Mock CPU temperature sparkline chart"
|
|
2287
|
-
containerComponent={
|
|
2288
|
-
<ChartVoronoiContainer
|
|
2289
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
2290
|
-
constrainToVisibleArea
|
|
2291
|
-
/>
|
|
2292
|
-
}
|
|
2293
|
-
height={60}
|
|
2294
|
-
maxDomain={{ y: 100 }}
|
|
2295
|
-
padding={0}
|
|
2296
|
-
width={400}
|
|
2297
|
-
>
|
|
2298
|
-
<ChartArea
|
|
2299
|
-
data={[
|
|
2300
|
-
{ name: 'Temp', x: '1', y: 25 },
|
|
2301
|
-
{ name: 'Temp', x: '2', y: 40 },
|
|
2302
|
-
{ name: 'Temp', x: '3', y: 20 },
|
|
2303
|
-
{ name: 'Temp', x: '4', y: 60 },
|
|
2304
|
-
{ name: 'Temp', x: '5', y: 20 },
|
|
2305
|
-
{ name: 'Temp', x: '6', y: 41 },
|
|
2306
|
-
{ name: 'Temp', x: '7', y: 45 },
|
|
2307
|
-
{ name: 'Temp', x: '8', y: 41 },
|
|
2308
|
-
{ name: 'Temp', x: '9', y: 62 }
|
|
2309
|
-
]}
|
|
2310
|
-
/>
|
|
2311
|
-
</ChartGroup>
|
|
2312
|
-
</GridItem>
|
|
2313
|
-
</Grid>
|
|
2314
|
-
</GridItem>
|
|
2315
|
-
</Grid>
|
|
2316
|
-
<Divider className={accessibility.hiddenOnMd} />
|
|
2317
|
-
<Grid hasGutter>
|
|
2318
|
-
<GridItem md={4}>
|
|
2319
|
-
<Flex
|
|
2320
|
-
className={sizing.h_100OnMd}
|
|
2321
|
-
direction={{ md: 'column' }}
|
|
2322
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
2323
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
2324
|
-
>
|
|
2325
|
-
<FlexItem>
|
|
2326
|
-
<b>Speed</b>
|
|
2327
|
-
</FlexItem>
|
|
2328
|
-
<Divider
|
|
2329
|
-
className={accessibility.hiddenOnMd}
|
|
2330
|
-
orientation={{
|
|
2331
|
-
default: 'vertical'
|
|
2332
|
-
}}
|
|
2333
|
-
inset={{ default: 'insetSm' }}
|
|
2334
|
-
/>
|
|
2335
|
-
<FlexItem>
|
|
2336
|
-
<span>2.3Ghz</span>
|
|
2337
|
-
</FlexItem>
|
|
2338
|
-
</Flex>
|
|
2339
|
-
</GridItem>
|
|
2340
|
-
<GridItem md={8}>
|
|
2341
|
-
<Grid hasGutter>
|
|
2342
|
-
<GridItem span={2}>
|
|
2343
|
-
<Flex
|
|
2344
|
-
direction={{ default: 'column' }}
|
|
2345
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
2346
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
2347
|
-
>
|
|
2348
|
-
<FlexItem>3.6Ghz</FlexItem>
|
|
2349
|
-
<FlexItem>1.5Ghz</FlexItem>
|
|
2350
|
-
<FlexItem>0GHZ</FlexItem>
|
|
2351
|
-
</Flex>
|
|
2352
|
-
</GridItem>
|
|
2353
|
-
<GridItem span={10}>
|
|
2354
|
-
<ChartGroup
|
|
2355
|
-
ariaDesc="Mock CPU speed"
|
|
2356
|
-
ariaTitle="Mock CPU speed sparkline chart"
|
|
2357
|
-
containerComponent={
|
|
2358
|
-
<ChartVoronoiContainer
|
|
2359
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
2360
|
-
constrainToVisibleArea
|
|
2361
|
-
/>
|
|
2362
|
-
}
|
|
2363
|
-
height={60}
|
|
2364
|
-
maxDomain={{ y: 3.6 }}
|
|
2365
|
-
padding={0}
|
|
2366
|
-
width={400}
|
|
2367
|
-
>
|
|
2368
|
-
<ChartArea
|
|
2369
|
-
data={[
|
|
2370
|
-
{ name: 'Temp', x: '1', y: 0.9 },
|
|
2371
|
-
{ name: 'Temp', x: '2', y: 1.44 },
|
|
2372
|
-
{ name: 'Temp', x: '3', y: 0.72 },
|
|
2373
|
-
{ name: 'Temp', x: '4', y: 2.16 },
|
|
2374
|
-
{ name: 'Temp', x: '5', y: 0.72 },
|
|
2375
|
-
{ name: 'Temp', x: '6', y: 1.48 },
|
|
2376
|
-
{ name: 'Temp', x: '7', y: 1.62 },
|
|
2377
|
-
{ name: 'Temp', x: '8', y: 1.48 },
|
|
2378
|
-
{ name: 'Temp', x: '9', y: 2.23 }
|
|
2379
|
-
]}
|
|
2380
|
-
/>
|
|
2381
|
-
</ChartGroup>
|
|
2382
|
-
</GridItem>
|
|
2383
|
-
</Grid>
|
|
2384
|
-
</GridItem>
|
|
2385
|
-
</Grid>
|
|
2386
|
-
</Grid>
|
|
2387
|
-
</AccordionContent>
|
|
2388
|
-
</AccordionItem>
|
|
2389
|
-
<AccordionItem>
|
|
2390
|
-
<AccordionToggle
|
|
2391
|
-
id="cpu3-toggle"
|
|
2392
|
-
onClick={() => {
|
|
2393
|
-
if (openCPU === 'cpu3') {
|
|
2394
|
-
setOpenCPU(null);
|
|
2395
|
-
} else {
|
|
2396
|
-
setOpenCPU('cpu3');
|
|
2397
|
-
}
|
|
2398
|
-
}}
|
|
2399
|
-
isExpanded={openCPU === 'cpu3'}
|
|
2400
|
-
>
|
|
2401
|
-
CPU 3
|
|
2402
|
-
</AccordionToggle>
|
|
2403
|
-
<AccordionContent isHidden={openCPU !== 'cpu3'}>
|
|
2404
|
-
<Grid hasGutter>
|
|
2405
|
-
<Grid hasGutter>
|
|
2406
|
-
<GridItem md={4}>
|
|
2407
|
-
<Flex
|
|
2408
|
-
className={sizing.h_100OnMd}
|
|
2409
|
-
direction={{ md: 'column' }}
|
|
2410
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
2411
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
2412
|
-
>
|
|
2413
|
-
<FlexItem>
|
|
2414
|
-
<b>Temperature</b>
|
|
2415
|
-
</FlexItem>
|
|
2416
|
-
<Divider
|
|
2417
|
-
className={accessibility.hiddenOnMd}
|
|
2418
|
-
orientation={{
|
|
2419
|
-
default: 'vertical'
|
|
2420
|
-
}}
|
|
2421
|
-
inset={{ default: 'insetSm' }}
|
|
2422
|
-
/>
|
|
2423
|
-
<FlexItem>
|
|
2424
|
-
<span>64C</span>
|
|
2425
|
-
</FlexItem>
|
|
2426
|
-
</Flex>
|
|
2427
|
-
</GridItem>
|
|
2428
|
-
<GridItem md={8}>
|
|
2429
|
-
<Grid hasGutter>
|
|
2430
|
-
<GridItem span={2}>
|
|
2431
|
-
<Flex
|
|
2432
|
-
direction={{ default: 'column' }}
|
|
2433
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
2434
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
2435
|
-
>
|
|
2436
|
-
<FlexItem>100C</FlexItem>
|
|
2437
|
-
<FlexItem>50C</FlexItem>
|
|
2438
|
-
<FlexItem>0C</FlexItem>
|
|
2439
|
-
</Flex>
|
|
2440
|
-
</GridItem>
|
|
2441
|
-
<GridItem span={10}>
|
|
2442
|
-
<ChartGroup
|
|
2443
|
-
ariaDesc="Mock CPU temperature"
|
|
2444
|
-
ariaTitle="Mock CPU temperature sparkline chart"
|
|
2445
|
-
containerComponent={
|
|
2446
|
-
<ChartVoronoiContainer
|
|
2447
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
2448
|
-
constrainToVisibleArea
|
|
2449
|
-
/>
|
|
2450
|
-
}
|
|
2451
|
-
height={60}
|
|
2452
|
-
maxDomain={{ y: 100 }}
|
|
2453
|
-
padding={0}
|
|
2454
|
-
width={400}
|
|
2455
|
-
>
|
|
2456
|
-
<ChartArea
|
|
2457
|
-
data={[
|
|
2458
|
-
{ name: 'Temp', x: '1', y: 25 },
|
|
2459
|
-
{ name: 'Temp', x: '2', y: 40 },
|
|
2460
|
-
{ name: 'Temp', x: '3', y: 20 },
|
|
2461
|
-
{ name: 'Temp', x: '4', y: 60 },
|
|
2462
|
-
{ name: 'Temp', x: '5', y: 20 },
|
|
2463
|
-
{ name: 'Temp', x: '6', y: 41 },
|
|
2464
|
-
{ name: 'Temp', x: '7', y: 45 },
|
|
2465
|
-
{ name: 'Temp', x: '8', y: 41 },
|
|
2466
|
-
{ name: 'Temp', x: '9', y: 62 }
|
|
2467
|
-
]}
|
|
2468
|
-
/>
|
|
2469
|
-
</ChartGroup>
|
|
2470
|
-
</GridItem>
|
|
2471
|
-
</Grid>
|
|
2472
|
-
</GridItem>
|
|
2473
|
-
</Grid>
|
|
2474
|
-
<Divider className={accessibility.hiddenOnMd} />
|
|
2475
|
-
<Grid hasGutter>
|
|
2476
|
-
<GridItem md={4}>
|
|
2477
|
-
<Flex
|
|
2478
|
-
className={sizing.h_100OnMd}
|
|
2479
|
-
direction={{ md: 'column' }}
|
|
2480
|
-
spaceItems={{ md: 'spaceItemsNone' }}
|
|
2481
|
-
justifyContent={{ md: 'justifyContentCenter' }}
|
|
2482
|
-
>
|
|
2483
|
-
<FlexItem>
|
|
2484
|
-
<b>Speed</b>
|
|
2485
|
-
</FlexItem>
|
|
2486
|
-
<Divider
|
|
2487
|
-
className={accessibility.hiddenOnMd}
|
|
2488
|
-
orientation={{
|
|
2489
|
-
default: 'vertical'
|
|
2490
|
-
}}
|
|
2491
|
-
inset={{ default: 'insetSm' }}
|
|
2492
|
-
/>
|
|
2493
|
-
<FlexItem>
|
|
2494
|
-
<span>2.3Ghz</span>
|
|
2495
|
-
</FlexItem>
|
|
2496
|
-
</Flex>
|
|
2497
|
-
</GridItem>
|
|
2498
|
-
<GridItem md={8}>
|
|
2499
|
-
<Grid hasGutter>
|
|
2500
|
-
<GridItem span={2}>
|
|
2501
|
-
<Flex
|
|
2502
|
-
direction={{ default: 'column' }}
|
|
2503
|
-
spaceItems={{ default: 'spaceItemsNone' }}
|
|
2504
|
-
alignItems={{ md: 'alignItemsFlexEnd' }}
|
|
2505
|
-
>
|
|
2506
|
-
<FlexItem>3.6Ghz</FlexItem>
|
|
2507
|
-
<FlexItem>1.5Ghz</FlexItem>
|
|
2508
|
-
<FlexItem>0GHZ</FlexItem>
|
|
2509
|
-
</Flex>
|
|
2510
|
-
</GridItem>
|
|
2511
|
-
<GridItem span={10}>
|
|
2512
|
-
<ChartGroup
|
|
2513
|
-
ariaDesc="Mock CPU speed"
|
|
2514
|
-
ariaTitle="Mock CPU speed sparkline chart"
|
|
2515
|
-
containerComponent={
|
|
2516
|
-
<ChartVoronoiContainer
|
|
2517
|
-
labels={({ datum }) => `${datum.name}: ${datum.y}`}
|
|
2518
|
-
constrainToVisibleArea
|
|
2519
|
-
/>
|
|
2520
|
-
}
|
|
2521
|
-
height={60}
|
|
2522
|
-
maxDomain={{ y: 3.6 }}
|
|
2523
|
-
padding={0}
|
|
2524
|
-
width={400}
|
|
2525
|
-
>
|
|
2526
|
-
<ChartArea
|
|
2527
|
-
data={[
|
|
2528
|
-
{ name: 'Temp', x: '1', y: 0.9 },
|
|
2529
|
-
{ name: 'Temp', x: '2', y: 1.44 },
|
|
2530
|
-
{ name: 'Temp', x: '3', y: 0.72 },
|
|
2531
|
-
{ name: 'Temp', x: '4', y: 2.16 },
|
|
2532
|
-
{ name: 'Temp', x: '5', y: 0.72 },
|
|
2533
|
-
{ name: 'Temp', x: '6', y: 1.48 },
|
|
2534
|
-
{ name: 'Temp', x: '7', y: 1.62 },
|
|
2535
|
-
{ name: 'Temp', x: '8', y: 1.48 },
|
|
2536
|
-
{ name: 'Temp', x: '9', y: 2.23 }
|
|
2537
|
-
]}
|
|
2538
|
-
/>
|
|
2539
|
-
</ChartGroup>
|
|
2540
|
-
</GridItem>
|
|
2541
|
-
</Grid>
|
|
2542
|
-
</GridItem>
|
|
2543
|
-
</Grid>
|
|
2544
|
-
</Grid>
|
|
2545
|
-
</AccordionContent>
|
|
2546
|
-
</AccordionItem>
|
|
2547
|
-
</Accordion>
|
|
2548
|
-
</CardBody>
|
|
2549
|
-
</Card>
|
|
2550
|
-
);
|
|
2551
|
-
};
|
|
2552
103
|
```
|
|
2553
104
|
|
|
2554
105
|
### Trend card 1
|
|
2555
106
|
|
|
2556
|
-
```ts
|
|
2557
|
-
import React from 'react';
|
|
2558
|
-
import {
|
|
2559
|
-
Card,
|
|
2560
|
-
CardTitle,
|
|
2561
|
-
CardBody,
|
|
2562
|
-
CardHeader,
|
|
2563
|
-
Title,
|
|
2564
|
-
Gallery,
|
|
2565
|
-
GalleryItem,
|
|
2566
|
-
Flex,
|
|
2567
|
-
FlexItem,
|
|
2568
|
-
Divider,
|
|
2569
|
-
Select,
|
|
2570
|
-
SelectList,
|
|
2571
|
-
SelectOption,
|
|
2572
|
-
MenuToggle,
|
|
2573
|
-
MenuToggleElement
|
|
2574
|
-
} from '@patternfly/react-core';
|
|
2575
|
-
import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts';
|
|
2576
|
-
import text from '@patternfly/react-styles/css/utilities/Text/text';
|
|
2577
|
-
|
|
2578
|
-
const TrendCard1: React.FunctionComponent = () => {
|
|
2579
|
-
const [isOpen, setIsOpen] = React.useState(false);
|
|
2580
|
-
|
|
2581
|
-
const selectItems = (
|
|
2582
|
-
<SelectList>
|
|
2583
|
-
<SelectOption key="option1" value="Last hour">
|
|
2584
|
-
Last hour
|
|
2585
|
-
</SelectOption>
|
|
2586
|
-
<SelectOption key="option2" value="Last 6 hours">
|
|
2587
|
-
Last 6 hours
|
|
2588
|
-
</SelectOption>
|
|
2589
|
-
<SelectOption key="option3" value="Last 24 hours">
|
|
2590
|
-
Last 24 hours
|
|
2591
|
-
</SelectOption>
|
|
2592
|
-
<SelectOption key="option4" value="Last 7 days">
|
|
2593
|
-
Last 7 days
|
|
2594
|
-
</SelectOption>
|
|
2595
|
-
</SelectList>
|
|
2596
|
-
);
|
|
107
|
+
```ts file="./examples/Card/CardTrendDemo1.tsx"
|
|
2597
108
|
|
|
2598
|
-
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
2599
|
-
<MenuToggle ref={toggleRef} onClick={() => setIsOpen(!isOpen)} isExpanded={isOpen} variant="plainText">
|
|
2600
|
-
Filter
|
|
2601
|
-
</MenuToggle>
|
|
2602
|
-
);
|
|
2603
|
-
|
|
2604
|
-
const headerActions = (
|
|
2605
|
-
<Select onSelect={() => setIsOpen(!isOpen)} onOpenChange={setIsOpen} isOpen={isOpen} toggle={toggle}>
|
|
2606
|
-
{selectItems}
|
|
2607
|
-
</Select>
|
|
2608
|
-
);
|
|
2609
|
-
|
|
2610
|
-
return (
|
|
2611
|
-
<React.Fragment>
|
|
2612
|
-
<b>Note:</b> Custom CSS is used in this demo to align the card title and select toggle text to{' '}
|
|
2613
|
-
<code>baseline</code> alignment.
|
|
2614
|
-
<br />
|
|
2615
|
-
<br />
|
|
2616
|
-
<Gallery hasGutter minWidths={{ default: '360px' }}>
|
|
2617
|
-
<GalleryItem>
|
|
2618
|
-
<Card id="trend-card-1-card" component="div">
|
|
2619
|
-
<CardHeader actions={{ actions: headerActions, hasNoOffset: true }}>
|
|
2620
|
-
<Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsNone' }}>
|
|
2621
|
-
<FlexItem>
|
|
2622
|
-
<CardTitle>
|
|
2623
|
-
<Title headingLevel="h4" size="lg">
|
|
2624
|
-
1,050,765 IOPS
|
|
2625
|
-
</Title>
|
|
2626
|
-
</CardTitle>
|
|
2627
|
-
</FlexItem>
|
|
2628
|
-
<FlexItem>
|
|
2629
|
-
<span className={text.color_200}>Workload</span>
|
|
2630
|
-
</FlexItem>
|
|
2631
|
-
</Flex>
|
|
2632
|
-
</CardHeader>
|
|
2633
|
-
<CardBody>
|
|
2634
|
-
<ChartGroup
|
|
2635
|
-
ariaDesc="Mock average cluster utilization"
|
|
2636
|
-
ariaTitle="Mock cluster sparkline chart"
|
|
2637
|
-
containerComponent={
|
|
2638
|
-
<ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />
|
|
2639
|
-
}
|
|
2640
|
-
height={100}
|
|
2641
|
-
maxDomain={{ y: 9 }}
|
|
2642
|
-
padding={0}
|
|
2643
|
-
width={400}
|
|
2644
|
-
>
|
|
2645
|
-
<ChartArea
|
|
2646
|
-
data={[
|
|
2647
|
-
{ name: 'Cluster', x: '2015', y: 7 },
|
|
2648
|
-
{ name: 'Cluster', x: '2016', y: 6 },
|
|
2649
|
-
{ name: 'Cluster', x: '2017', y: 8 },
|
|
2650
|
-
{ name: 'Cluster', x: '2018', y: 3 },
|
|
2651
|
-
{ name: 'Cluster', x: '2019', y: 4 },
|
|
2652
|
-
{ name: 'Cluster', x: '2020', y: 1 },
|
|
2653
|
-
{ name: 'Cluster', x: '2021', y: 0 }
|
|
2654
|
-
]}
|
|
2655
|
-
/>
|
|
2656
|
-
</ChartGroup>
|
|
2657
|
-
</CardBody>
|
|
2658
|
-
</Card>
|
|
2659
|
-
</GalleryItem>
|
|
2660
|
-
</Gallery>
|
|
2661
|
-
</React.Fragment>
|
|
2662
|
-
);
|
|
2663
|
-
};
|
|
2664
109
|
```
|
|
2665
110
|
|
|
2666
111
|
### Trend card 2
|
|
2667
112
|
|
|
2668
|
-
```ts
|
|
2669
|
-
import React from 'react';
|
|
2670
|
-
import {
|
|
2671
|
-
Card,
|
|
2672
|
-
CardTitle,
|
|
2673
|
-
CardFooter,
|
|
2674
|
-
CardHeader,
|
|
2675
|
-
Title,
|
|
2676
|
-
Gallery,
|
|
2677
|
-
GalleryItem,
|
|
2678
|
-
Flex,
|
|
2679
|
-
FlexItem
|
|
2680
|
-
} from '@patternfly/react-core';
|
|
2681
|
-
import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts';
|
|
2682
|
-
import text from '@patternfly/react-styles/css/utilities/Text/text';
|
|
113
|
+
```ts file="./examples/Card/CardTrendDemo2.tsx"
|
|
2683
114
|
|
|
2684
|
-
<Gallery hasGutter minWidths={{ default: '360px' }}>
|
|
2685
|
-
<GalleryItem>
|
|
2686
|
-
<Card id="trend-card-2-card" component="div">
|
|
2687
|
-
<CardHeader>
|
|
2688
|
-
<Flex alignItems={{ default: 'alignItemsCenter' }}>
|
|
2689
|
-
<FlexItem flex={{ default: 'flexNone' }}>
|
|
2690
|
-
<Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsNone' }}>
|
|
2691
|
-
<FlexItem>
|
|
2692
|
-
<CardTitle>
|
|
2693
|
-
<Title headingLevel="h4" size="2xl">
|
|
2694
|
-
842 TB
|
|
2695
|
-
</Title>
|
|
2696
|
-
</CardTitle>
|
|
2697
|
-
</FlexItem>
|
|
2698
|
-
<FlexItem>
|
|
2699
|
-
<span className={text.color_200}>Storage capacity</span>
|
|
2700
|
-
</FlexItem>
|
|
2701
|
-
</Flex>
|
|
2702
|
-
</FlexItem>
|
|
2703
|
-
<FlexItem flex={{ default: 'flex_1' }}>
|
|
2704
|
-
<ChartGroup
|
|
2705
|
-
ariaDesc="Mock average cluster utilization"
|
|
2706
|
-
ariaTitle="Mock cluster sparkline chart"
|
|
2707
|
-
containerComponent={
|
|
2708
|
-
<ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />
|
|
2709
|
-
}
|
|
2710
|
-
height={100}
|
|
2711
|
-
maxDomain={{ y: 9 }}
|
|
2712
|
-
padding={0}
|
|
2713
|
-
width={400}
|
|
2714
|
-
>
|
|
2715
|
-
<ChartArea
|
|
2716
|
-
data={[
|
|
2717
|
-
{ name: 'Cluster', x: '2015', y: 7 },
|
|
2718
|
-
{ name: 'Cluster', x: '2016', y: 6 },
|
|
2719
|
-
{ name: 'Cluster', x: '2017', y: 8 },
|
|
2720
|
-
{ name: 'Cluster', x: '2018', y: 3 },
|
|
2721
|
-
{ name: 'Cluster', x: '2019', y: 4 },
|
|
2722
|
-
{ name: 'Cluster', x: '2020', y: 1 },
|
|
2723
|
-
{ name: 'Cluster', x: '2021', y: 0 }
|
|
2724
|
-
]}
|
|
2725
|
-
/>
|
|
2726
|
-
</ChartGroup>
|
|
2727
|
-
</FlexItem>
|
|
2728
|
-
</Flex>
|
|
2729
|
-
</CardHeader>
|
|
2730
|
-
<CardFooter>
|
|
2731
|
-
<Flex>
|
|
2732
|
-
<FlexItem>
|
|
2733
|
-
<a href="#">Action 1</a>
|
|
2734
|
-
</FlexItem>
|
|
2735
|
-
<FlexItem>
|
|
2736
|
-
<a href="#">Action 2</a>
|
|
2737
|
-
</FlexItem>
|
|
2738
|
-
</Flex>
|
|
2739
|
-
</CardFooter>
|
|
2740
|
-
</Card>
|
|
2741
|
-
</GalleryItem>
|
|
2742
|
-
</Gallery>;
|
|
2743
115
|
```
|
|
2744
116
|
|
|
2745
117
|
### Log view
|
|
2746
118
|
|
|
2747
|
-
```
|
|
2748
|
-
import React from 'react';
|
|
2749
|
-
import {
|
|
2750
|
-
Card,
|
|
2751
|
-
CardHeader,
|
|
2752
|
-
CardTitle,
|
|
2753
|
-
CardBody,
|
|
2754
|
-
CardFooter,
|
|
2755
|
-
Gallery,
|
|
2756
|
-
Title,
|
|
2757
|
-
DescriptionList,
|
|
2758
|
-
DescriptionListGroup,
|
|
2759
|
-
DescriptionListTerm,
|
|
2760
|
-
DescriptionListDescription,
|
|
2761
|
-
Select,
|
|
2762
|
-
SelectList,
|
|
2763
|
-
SelectOption,
|
|
2764
|
-
Divider,
|
|
2765
|
-
MenuToggle
|
|
2766
|
-
} from '@patternfly/react-core';
|
|
2767
|
-
import text from '@patternfly/react-styles/css/utilities/Text/text';
|
|
2768
|
-
import flex from '@patternfly/react-styles/css/utilities/Flex/flex';
|
|
2769
|
-
import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
|
|
2770
|
-
|
|
2771
|
-
CardLogViewDemo = () => {
|
|
2772
|
-
const [isOpen, setIsOpen] = React.useState(false);
|
|
2773
|
-
|
|
2774
|
-
const onActionSelect = (event) => {
|
|
2775
|
-
setIsOpen(!isOpen);
|
|
2776
|
-
};
|
|
2777
|
-
|
|
2778
|
-
const onActionToggle = (_event, isOpen) => {
|
|
2779
|
-
setIsOpen(isOpen);
|
|
2780
|
-
};
|
|
2781
|
-
|
|
2782
|
-
const selectItems = (
|
|
2783
|
-
<SelectList>
|
|
2784
|
-
<SelectOption key="option1" value="Last hour">
|
|
2785
|
-
Last hour
|
|
2786
|
-
</SelectOption>
|
|
2787
|
-
<SelectOption key="option2" value="Last 6 hours">
|
|
2788
|
-
Last 6 hours
|
|
2789
|
-
</SelectOption>
|
|
2790
|
-
<SelectOption key="option3" value="Last 24 hours">
|
|
2791
|
-
Last 24 hours
|
|
2792
|
-
</SelectOption>
|
|
2793
|
-
<SelectOption key="option4" value="Last 7 days">
|
|
2794
|
-
Last 7 days
|
|
2795
|
-
</SelectOption>
|
|
2796
|
-
</SelectList>
|
|
2797
|
-
);
|
|
2798
|
-
|
|
2799
|
-
const toggle = (toggleRef) => (
|
|
2800
|
-
<MenuToggle ref={toggleRef} onClick={() => setIsOpen(!isOpen)} isExpanded={isOpen} variant="plainText">
|
|
2801
|
-
Filter
|
|
2802
|
-
</MenuToggle>
|
|
2803
|
-
);
|
|
2804
|
-
|
|
2805
|
-
const headerActions = (
|
|
2806
|
-
<Select onSelect={() => setIsOpen(!isOpen)} onOpenChange={setIsOpen} isOpen={isOpen} toggle={toggle}>
|
|
2807
|
-
{selectItems}
|
|
2808
|
-
</Select>
|
|
2809
|
-
);
|
|
119
|
+
```ts file="./examples/Card/CardLogView.tsx"
|
|
2810
120
|
|
|
2811
|
-
return (
|
|
2812
|
-
<React.Fragment>
|
|
2813
|
-
<b>Note:</b> Custom CSS is used in this demo to align the card title and select toggle text to{' '}
|
|
2814
|
-
<code>baseline</code> alignment.
|
|
2815
|
-
<br />
|
|
2816
|
-
<br />
|
|
2817
|
-
<Gallery hasGutter style={{ [l_gallery_GridTemplateColumns_min.name]: '360px' }}>
|
|
2818
|
-
<Card id="card-log-view-example">
|
|
2819
|
-
<CardHeader
|
|
2820
|
-
className={flex.alignItemsFlexStart}
|
|
2821
|
-
actions={{ actions: headerActions, hasNoOffset: true }}
|
|
2822
|
-
>
|
|
2823
|
-
<CardTitle>
|
|
2824
|
-
<Title headingLevel="h4" size="xl" style={{ paddingTop: '3px' }}>
|
|
2825
|
-
Activity
|
|
2826
|
-
</Title>
|
|
2827
|
-
</CardTitle>
|
|
2828
|
-
</CardHeader>
|
|
2829
|
-
<CardBody>
|
|
2830
|
-
<DescriptionList>
|
|
2831
|
-
<DescriptionListGroup>
|
|
2832
|
-
<DescriptionListTerm>Readiness probe failed</DescriptionListTerm>
|
|
2833
|
-
<DescriptionListDescription>
|
|
2834
|
-
Readiness probe failed: Get https://10.131.0.7:5000/healthz: dial tcp 10.131.0.7:5000: connect:
|
|
2835
|
-
connection refused
|
|
2836
|
-
</DescriptionListDescription>
|
|
2837
|
-
<DescriptionListDescription>
|
|
2838
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 11:02 am</time>
|
|
2839
|
-
</DescriptionListDescription>
|
|
2840
|
-
</DescriptionListGroup>
|
|
2841
|
-
<DescriptionListGroup>
|
|
2842
|
-
<DescriptionListTerm>Successful assignment</DescriptionListTerm>
|
|
2843
|
-
<DescriptionListDescription>
|
|
2844
|
-
Successfully assigned default/example to ip-10-0-130-149.ec2.internal
|
|
2845
|
-
</DescriptionListDescription>
|
|
2846
|
-
<DescriptionListDescription>
|
|
2847
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 11:13 am</time>
|
|
2848
|
-
</DescriptionListDescription>
|
|
2849
|
-
</DescriptionListGroup>
|
|
2850
|
-
<DescriptionListGroup>
|
|
2851
|
-
<DescriptionListTerm>Pulling image</DescriptionListTerm>
|
|
2852
|
-
<DescriptionListDescription>Pulling image "openshift/hello-openshift"</DescriptionListDescription>
|
|
2853
|
-
<DescriptionListDescription>
|
|
2854
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 10:59 am</time>
|
|
2855
|
-
</DescriptionListDescription>
|
|
2856
|
-
</DescriptionListGroup>
|
|
2857
|
-
<DescriptionListGroup>
|
|
2858
|
-
<DescriptionListTerm>Created container</DescriptionListTerm>
|
|
2859
|
-
<DescriptionListDescription>Created container hello-openshift</DescriptionListDescription>
|
|
2860
|
-
<DescriptionListDescription>
|
|
2861
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 10:45 am</time>
|
|
2862
|
-
</DescriptionListDescription>
|
|
2863
|
-
</DescriptionListGroup>
|
|
2864
|
-
</DescriptionList>
|
|
2865
|
-
</CardBody>
|
|
2866
|
-
<Divider />
|
|
2867
|
-
<CardFooter>
|
|
2868
|
-
<a href="#">View all activity</a>
|
|
2869
|
-
</CardFooter>
|
|
2870
|
-
</Card>
|
|
2871
|
-
</Gallery>
|
|
2872
|
-
</React.Fragment>
|
|
2873
|
-
);
|
|
2874
|
-
};
|
|
2875
121
|
```
|
|
2876
122
|
|
|
2877
123
|
### Events view
|
|
2878
124
|
|
|
2879
|
-
```
|
|
2880
|
-
import React from 'react';
|
|
2881
|
-
import {
|
|
2882
|
-
Card,
|
|
2883
|
-
CardHeader,
|
|
2884
|
-
CardTitle,
|
|
2885
|
-
CardBody,
|
|
2886
|
-
CardFooter,
|
|
2887
|
-
Gallery,
|
|
2888
|
-
Flex,
|
|
2889
|
-
FlexItem,
|
|
2890
|
-
Title,
|
|
2891
|
-
DescriptionList,
|
|
2892
|
-
DescriptionListGroup,
|
|
2893
|
-
DescriptionListTerm,
|
|
2894
|
-
DescriptionListDescription,
|
|
2895
|
-
Spinner,
|
|
2896
|
-
Select,
|
|
2897
|
-
SelectList,
|
|
2898
|
-
SelectOption,
|
|
2899
|
-
Divider,
|
|
2900
|
-
MenuToggle
|
|
2901
|
-
} from '@patternfly/react-core';
|
|
2902
|
-
import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
|
|
2903
|
-
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
|
|
2904
|
-
import flex from '@patternfly/react-styles/css/utilities/Flex/flex';
|
|
2905
|
-
import text from '@patternfly/react-styles/css/utilities/Text/text';
|
|
2906
|
-
import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
|
|
2907
|
-
|
|
2908
|
-
CardEventViewDemo = () => {
|
|
2909
|
-
const [isOpen, setIsOpen] = React.useState(false);
|
|
2910
|
-
|
|
2911
|
-
const onActionSelect = (event) => {
|
|
2912
|
-
setIsOpen(!isOpen);
|
|
2913
|
-
};
|
|
2914
|
-
|
|
2915
|
-
const onActionToggle = (_event, isOpen) => {
|
|
2916
|
-
setIsOpen(isOpen);
|
|
2917
|
-
};
|
|
2918
|
-
|
|
2919
|
-
const selectItems = (
|
|
2920
|
-
<SelectList>
|
|
2921
|
-
<SelectOption value="Success" key="option1">
|
|
2922
|
-
Success
|
|
2923
|
-
</SelectOption>
|
|
2924
|
-
<SelectOption value="Error" key="option2">
|
|
2925
|
-
Error
|
|
2926
|
-
</SelectOption>
|
|
2927
|
-
<SelectOption value="Warning" key="option3">
|
|
2928
|
-
Error
|
|
2929
|
-
</SelectOption>
|
|
2930
|
-
</SelectList>
|
|
2931
|
-
);
|
|
2932
|
-
|
|
2933
|
-
const toggle = (toggleRef) => (
|
|
2934
|
-
<MenuToggle ref={toggleRef} onClick={() => setIsOpen(!isOpen)} isExpanded={isOpen} variant="plainText">
|
|
2935
|
-
Status
|
|
2936
|
-
</MenuToggle>
|
|
2937
|
-
);
|
|
125
|
+
```ts file="./examples/Card/CardEventsView.tsx"
|
|
2938
126
|
|
|
2939
|
-
const headerActions = (
|
|
2940
|
-
<Select onSelect={() => setIsOpen(!isOpen)} onOpenChange={setIsOpen} isOpen={isOpen} toggle={toggle}>
|
|
2941
|
-
{selectItems}
|
|
2942
|
-
</Select>
|
|
2943
|
-
);
|
|
2944
|
-
return (
|
|
2945
|
-
<React.Fragment>
|
|
2946
|
-
<b>Note:</b> Custom CSS is used in this demo to align the card title and select toggle text to{' '}
|
|
2947
|
-
<code>baseline</code> alignment.
|
|
2948
|
-
<br />
|
|
2949
|
-
<br />
|
|
2950
|
-
<Gallery hasGutter style={{ [l_gallery_GridTemplateColumns_min.name]: '360px' }}>
|
|
2951
|
-
<Card id="card-events-view-example">
|
|
2952
|
-
<CardHeader
|
|
2953
|
-
className={flex.alignItemsFlexStart}
|
|
2954
|
-
actions={{ actions: headerActions, hasNoOffset: true }}
|
|
2955
|
-
>
|
|
2956
|
-
<CardTitle>
|
|
2957
|
-
<Title headingLevel="h4" size="xl" style={{ paddingTop: '3px' }}>
|
|
2958
|
-
Events
|
|
2959
|
-
</Title>
|
|
2960
|
-
</CardTitle>
|
|
2961
|
-
</CardHeader>
|
|
2962
|
-
<CardBody>
|
|
2963
|
-
<DescriptionList>
|
|
2964
|
-
<DescriptionListGroup>
|
|
2965
|
-
<DescriptionListTerm>
|
|
2966
|
-
<Flex flexWrap={{ default: 'nowrap' }}>
|
|
2967
|
-
<FlexItem>
|
|
2968
|
-
<ExclamationCircleIcon className={text.dangerColor_100} aria-hidden="true" />
|
|
2969
|
-
</FlexItem>
|
|
2970
|
-
<FlexItem>
|
|
2971
|
-
<span>Readiness probe failed</span>
|
|
2972
|
-
</FlexItem>
|
|
2973
|
-
</Flex>
|
|
2974
|
-
</DescriptionListTerm>
|
|
2975
|
-
<DescriptionListDescription>
|
|
2976
|
-
Readiness probe failed: Get https://10.131.0.7:5000/healthz: dial tcp 10.131.0.7:5000: connect:
|
|
2977
|
-
connection refused
|
|
2978
|
-
</DescriptionListDescription>
|
|
2979
|
-
<DescriptionListDescription>
|
|
2980
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 11:02 am</time>
|
|
2981
|
-
</DescriptionListDescription>
|
|
2982
|
-
</DescriptionListGroup>
|
|
2983
|
-
<DescriptionListGroup>
|
|
2984
|
-
<DescriptionListTerm>
|
|
2985
|
-
<Flex flexWrap={{ default: 'nowrap' }}>
|
|
2986
|
-
<FlexItem>
|
|
2987
|
-
<CheckCircleIcon className={text.successColor_100} aria-hidden="true" />
|
|
2988
|
-
</FlexItem>
|
|
2989
|
-
<FlexItem>
|
|
2990
|
-
<span>Successful assignment</span>
|
|
2991
|
-
</FlexItem>
|
|
2992
|
-
</Flex>
|
|
2993
|
-
</DescriptionListTerm>
|
|
2994
|
-
<DescriptionListDescription>
|
|
2995
|
-
Successfully assigned default/example to ip-10-0-130-149.ec2.internal
|
|
2996
|
-
</DescriptionListDescription>
|
|
2997
|
-
<DescriptionListDescription>
|
|
2998
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 11:13 am</time>
|
|
2999
|
-
</DescriptionListDescription>
|
|
3000
|
-
</DescriptionListGroup>
|
|
3001
|
-
<DescriptionListGroup>
|
|
3002
|
-
<DescriptionListTerm>
|
|
3003
|
-
<Flex flexWrap={{ default: 'nowrap' }}>
|
|
3004
|
-
<FlexItem>
|
|
3005
|
-
<Spinner size="md" aria-label="loading spinner" />
|
|
3006
|
-
</FlexItem>
|
|
3007
|
-
<FlexItem>
|
|
3008
|
-
<span>Pulling image</span>
|
|
3009
|
-
</FlexItem>
|
|
3010
|
-
</Flex>
|
|
3011
|
-
</DescriptionListTerm>
|
|
3012
|
-
<DescriptionListDescription>Pulling image "openshift/hello-openshift"</DescriptionListDescription>
|
|
3013
|
-
<DescriptionListDescription>
|
|
3014
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 10:59 am</time>
|
|
3015
|
-
</DescriptionListDescription>
|
|
3016
|
-
</DescriptionListGroup>
|
|
3017
|
-
<DescriptionListGroup>
|
|
3018
|
-
<DescriptionListTerm>
|
|
3019
|
-
<Flex flexWrap={{ default: 'nowrap' }}>
|
|
3020
|
-
<FlexItem>
|
|
3021
|
-
<CheckCircleIcon className={text.successColor_100} aria-hidden="true" />
|
|
3022
|
-
</FlexItem>
|
|
3023
|
-
<FlexItem>
|
|
3024
|
-
<span>Created container</span>
|
|
3025
|
-
</FlexItem>
|
|
3026
|
-
</Flex>
|
|
3027
|
-
</DescriptionListTerm>
|
|
3028
|
-
<DescriptionListDescription>Created container hello-openshift</DescriptionListDescription>
|
|
3029
|
-
<DescriptionListDescription>
|
|
3030
|
-
<time className={`${text.color_200} ${text.fontSizeSm}`}>Jun 17, 10:45 am</time>
|
|
3031
|
-
</DescriptionListDescription>
|
|
3032
|
-
</DescriptionListGroup>
|
|
3033
|
-
</DescriptionList>
|
|
3034
|
-
</CardBody>
|
|
3035
|
-
<Divider />
|
|
3036
|
-
<CardFooter>
|
|
3037
|
-
<a href="#">View all events</a>
|
|
3038
|
-
</CardFooter>
|
|
3039
|
-
</Card>
|
|
3040
|
-
</Gallery>
|
|
3041
|
-
</React.Fragment>
|
|
3042
|
-
);
|
|
3043
|
-
};
|
|
3044
127
|
```
|