Skip to content

add acl search #916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion frontend/src/components/ACLPage/List/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@
import PlusIcon from 'components/common/Icons/PlusIcon';
import ActionButton from 'components/common/ActionComponent/ActionButton/ActionButton';

import * as S from './List.styled';

Check failure on line 24 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

There should be at least one empty line between import groups
import {ControlPanelWrapper} from "../../common/ControlPanel/ControlPanel.styled";

Check failure on line 25 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

`../../common/ControlPanel/ControlPanel.styled` import should occur before import of `./List.styled`

Check warning on line 25 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

Replace `ControlPanelWrapper}·from·"../../common/ControlPanel/ControlPanel.styled"` with `·ControlPanelWrapper·}·from·'../../common/ControlPanel/ControlPanel.styled'`

Check failure on line 25 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `List.tsx` to same directory as `../../common/ControlPanel/ControlPanel.styled` or consider making `../../common/ControlPanel/ControlPanel.styled` a package
import Search from "../../common/Search/Search";

Check failure on line 26 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

There should be at least one empty line between import groups

Check failure on line 26 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

`../../common/Search/Search` import should occur before import of `./List.styled`

Check warning on line 26 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

Replace `"../../common/Search/Search"` with `'../../common/Search/Search'`

Check failure on line 26 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `List.tsx` to same directory as `../../common/Search/Search` or consider making `../../common/Search/Search` a package
import {useSearchParams} from "react-router-dom";

Check failure on line 27 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

`react-router-dom` import should occur before import of `./List.styled`

Check warning on line 27 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

Replace `useSearchParams}·from·"react-router-dom"` with `·useSearchParams·}·from·'react-router-dom'`

const ACList: React.FC = () => {
const { clusterName } = useAppParams<{ clusterName: ClusterName }>();
const { data: aclList } = useAcls(clusterName);
const [searchParams] = useSearchParams();
const aclList = useAcls(clusterName).data?.filter(

Check warning on line 32 in frontend/src/components/ACLPage/List/List.tsx

View workflow job for this annotation

GitHub Actions / build-and-test / tests

Replace `⏎····(acl)·=>` with `(acl)·=>⏎···`
(acl) => acl.principal.match(searchParams.get('q') || '')
);
const { deleteResource } = useDeleteAcl(clusterName);
const modal = useConfirm(true);
const theme = useTheme();
Expand Down Expand Up @@ -162,6 +168,9 @@
<PlusIcon /> Create ACL
</ActionButton>
</PageHeading>
<ControlPanelWrapper hasInput>
<Search placeholder="Search by Principal Name" />
</ControlPanelWrapper>
<Table
columns={columns}
data={aclList ?? []}
Expand Down
Loading