Skip to content

Commit c4435f0

Browse files
committedAug 26, 2023
approvals: use ToolbarContent, add missing niceNames
1 parent 2aff0d7 commit c4435f0

File tree

1 file changed

+50
-45
lines changed

1 file changed

+50
-45
lines changed
 

‎src/containers/certification-dashboard/certification-dashboard.tsx

+50-45
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
Label,
77
LabelGroup,
88
Toolbar,
9+
ToolbarContent,
910
ToolbarGroup,
1011
ToolbarItem,
1112
} from '@patternfly/react-core';
@@ -213,51 +214,53 @@ class CertificationDashboard extends React.Component<RouteProps, IState> {
213214
<section className='body' data-cy='body'>
214215
<div className='toolbar hub-toolbar'>
215216
<Toolbar>
216-
<ToolbarGroup>
217-
<ToolbarItem>
218-
<CompoundFilter
219-
inputText={this.state.inputText}
220-
onChange={(text) => {
221-
this.setState({ inputText: text });
222-
}}
223-
updateParams={(p) =>
224-
this.updateParams(p, () =>
225-
this.queryCollections(true),
226-
)
227-
}
228-
params={params}
229-
filterConfig={[
230-
{
231-
id: 'namespace',
232-
title: t`Namespace`,
233-
},
234-
{
235-
id: 'name',
236-
title: t`Collection Name`,
237-
},
238-
{
239-
id: 'repository_label',
240-
title: t`Status`,
241-
inputType: 'select',
242-
options: [
243-
{
244-
id: `pipeline=${Constants.NOTCERTIFIED}`,
245-
title: t`Rejected`,
246-
},
247-
{
248-
id: `pipeline=${Constants.NEEDSREVIEW}`,
249-
title: t`Needs Review`,
250-
},
251-
{
252-
id: `pipeline=${Constants.APPROVED}`,
253-
title: t`Approved`,
254-
},
255-
],
256-
},
257-
]}
258-
/>
259-
</ToolbarItem>
260-
</ToolbarGroup>
217+
<ToolbarContent>
218+
<ToolbarGroup>
219+
<ToolbarItem>
220+
<CompoundFilter
221+
inputText={this.state.inputText}
222+
onChange={(text) => {
223+
this.setState({ inputText: text });
224+
}}
225+
updateParams={(p) =>
226+
this.updateParams(p, () =>
227+
this.queryCollections(true),
228+
)
229+
}
230+
params={params}
231+
filterConfig={[
232+
{
233+
id: 'namespace',
234+
title: t`Namespace`,
235+
},
236+
{
237+
id: 'name',
238+
title: t`Collection name`,
239+
},
240+
{
241+
id: 'repository_label',
242+
title: t`Status`,
243+
inputType: 'select',
244+
options: [
245+
{
246+
id: `pipeline=${Constants.NOTCERTIFIED}`,
247+
title: t`Rejected`,
248+
},
249+
{
250+
id: `pipeline=${Constants.NEEDSREVIEW}`,
251+
title: t`Needs Review`,
252+
},
253+
{
254+
id: `pipeline=${Constants.APPROVED}`,
255+
title: t`Approved`,
256+
},
257+
],
258+
},
259+
]}
260+
/>
261+
</ToolbarItem>
262+
</ToolbarGroup>
263+
</ToolbarContent>
261264
</Toolbar>
262265

263266
<Pagination
@@ -285,6 +288,8 @@ class CertificationDashboard extends React.Component<RouteProps, IState> {
285288
},
286289
}}
287290
niceNames={{
291+
name: t`Collection name`,
292+
namespace: t`Namespace`,
288293
repository_label: t`Status`,
289294
}}
290295
/>

0 commit comments

Comments
 (0)