Skip to content

Commit e0a2b99

Browse files
committed
add acl search
1 parent cb52c06 commit e0a2b99

File tree

1 file changed

+10
-1
lines changed
  • frontend/src/components/ACLPage/List

1 file changed

+10
-1
lines changed

frontend/src/components/ACLPage/List/List.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ import PlusIcon from 'components/common/Icons/PlusIcon';
2222
import ActionButton from 'components/common/ActionComponent/ActionButton/ActionButton';
2323

2424
import * 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

2629
const 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 ?? []}

0 commit comments

Comments
 (0)