File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
frontend/src/components/ACLPage/List Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,16 @@ import PlusIcon from 'components/common/Icons/PlusIcon';
2222import ActionButton from 'components/common/ActionComponent/ActionButton/ActionButton' ;
2323
2424import * as S from './List.styled' ;
25+ import { ControlPanelWrapper } from "../../common/ControlPanel/ControlPanel.styled" ;
26+ import Search from "../../common/Search/Search" ;
27+ import { useSearchParams } from "react-router-dom" ;
2528
2629const ACList : React . FC = ( ) => {
2730 const { clusterName } = useAppParams < { clusterName : ClusterName } > ( ) ;
28- const { data : aclList } = useAcls ( clusterName ) ;
31+ const [ searchParams ] = useSearchParams ( ) ;
32+ const aclList = useAcls ( clusterName ) . data ?. filter (
33+ ( acl ) => acl . principal . match ( searchParams . get ( 'q' ) || '' )
34+ ) ;
2935 const { deleteResource } = useDeleteAcl ( clusterName ) ;
3036 const modal = useConfirm ( true ) ;
3137 const theme = useTheme ( ) ;
@@ -162,6 +168,9 @@ const ACList: React.FC = () => {
162168 < PlusIcon /> Create ACL
163169 </ ActionButton >
164170 </ PageHeading >
171+ < ControlPanelWrapper hasInput >
172+ < Search placeholder = "Search by Principal Name" />
173+ </ ControlPanelWrapper >
165174 < Table
166175 columns = { columns }
167176 data = { aclList ?? [ ] }
You can’t perform that action at this time.
0 commit comments