mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Admin: Add missing wrapper to OrgUsersTable (#76185)
This commit is contained in:
parent
5e37a27d1f
commit
57b99728ad
@ -72,6 +72,7 @@ export const OrgUsersTable = ({
|
|||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [userToRemove, setUserToRemove] = useState<OrgUser | null>(null);
|
const [userToRemove, setUserToRemove] = useState<OrgUser | null>(null);
|
||||||
const [roleOptions, setRoleOptions] = useState<Role[]>([]);
|
const [roleOptions, setRoleOptions] = useState<Role[]>([]);
|
||||||
|
const styles = useStyles2(getStyles);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchOptions() {
|
async function fetchOptions() {
|
||||||
@ -187,10 +188,17 @@ export const OrgUsersTable = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<VerticalGroup spacing="md" data-testid={selectors.container}>
|
<VerticalGroup spacing="md" data-testid={selectors.container}>
|
||||||
<InteractiveTable columns={columns} data={users} getRowId={(user) => String(user.userId)} fetchData={fetchData} />
|
<div className={styles.wrapper}>
|
||||||
<HorizontalGroup justify="flex-end">
|
<InteractiveTable
|
||||||
<Pagination onNavigate={changePage} currentPage={page} numberOfPages={totalPages} hideWhenSinglePage={true} />
|
columns={columns}
|
||||||
</HorizontalGroup>
|
data={users}
|
||||||
|
getRowId={(user) => String(user.userId)}
|
||||||
|
fetchData={fetchData}
|
||||||
|
/>
|
||||||
|
<HorizontalGroup justify="flex-end">
|
||||||
|
<Pagination onNavigate={changePage} currentPage={page} numberOfPages={totalPages} hideWhenSinglePage={true} />
|
||||||
|
</HorizontalGroup>
|
||||||
|
</div>
|
||||||
{Boolean(userToRemove) && (
|
{Boolean(userToRemove) && (
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
body={`Are you sure you want to delete user ${userToRemove?.login}?`}
|
body={`Are you sure you want to delete user ${userToRemove?.login}?`}
|
||||||
|
Loading…
Reference in New Issue
Block a user