diff --git a/.betterer.results b/.betterer.results
index ff015aeab35..2ccb99f1535 100644
--- a/.betterer.results
+++ b/.betterer.results
@@ -1714,16 +1714,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "3"],
[0, 0, 0, "Styles should be written using objects.", "4"]
],
- "public/app/features/admin/UserListAdminPage.tsx:5381": [
- [0, 0, 0, "Styles should be written using objects.", "0"],
- [0, 0, 0, "Styles should be written using objects.", "1"],
- [0, 0, 0, "Styles should be written using objects.", "2"],
- [0, 0, 0, "Styles should be written using objects.", "3"],
- [0, 0, 0, "Styles should be written using objects.", "4"],
- [0, 0, 0, "Styles should be written using objects.", "5"],
- [0, 0, 0, "Styles should be written using objects.", "6"],
- [0, 0, 0, "Styles should be written using objects.", "7"]
- ],
"public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@@ -1770,6 +1760,11 @@ exports[`better eslint`] = {
"public/app/features/admin/UserSessions.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
+ "public/app/features/admin/Users/OrgUnits.tsx:5381": [
+ [0, 0, 0, "Styles should be written using objects.", "0"],
+ [0, 0, 0, "Styles should be written using objects.", "1"],
+ [0, 0, 0, "Styles should be written using objects.", "2"]
+ ],
"public/app/features/admin/ldap/LdapPage.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
diff --git a/public/app/features/admin/AdminEditOrgPage.tsx b/public/app/features/admin/AdminEditOrgPage.tsx
index 0c071fac6b3..7c4400acc66 100644
--- a/public/app/features/admin/AdminEditOrgPage.tsx
+++ b/public/app/features/admin/AdminEditOrgPage.tsx
@@ -3,14 +3,14 @@ import { useAsyncFn } from 'react-use';
import { NavModelItem, UrlQueryValue } from '@grafana/data';
import { getBackendSrv } from '@grafana/runtime';
-import { Form, Field, Input, Button, Legend, Alert, VerticalGroup, HorizontalGroup, Pagination } from '@grafana/ui';
+import { Form, Field, Input, Button, Legend, Alert } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
import { contextSrv } from 'app/core/core';
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
import { accessControlQueryParam } from 'app/core/utils/accessControl';
import { OrgUser, AccessControlAction, OrgRole } from 'app/types';
-import { UsersTable } from '../users/UsersTable';
+import { OrgUsersTable } from './Users/OrgUsersTable';
const perPage = 30;
@@ -120,17 +120,15 @@ const AdminEditOrgPage = ({ match }: Props) => {
{!canReadUsers && renderMissingPermissionMessage()}
{canReadUsers && !!users.length && (
-
-
-
-
-
-
+
)}
>
diff --git a/public/app/features/admin/UserListAdminPage.tsx b/public/app/features/admin/UserListAdminPage.tsx
index 74ae31c0c59..f1fecda0671 100644
--- a/public/app/features/admin/UserListAdminPage.tsx
+++ b/public/app/features/admin/UserListAdminPage.tsx
@@ -1,27 +1,17 @@
-import { css, cx } from '@emotion/css';
-import React, { ComponentType, useEffect, useMemo, memo } from 'react';
+import { css } from '@emotion/css';
+import React, { ComponentType, useEffect } from 'react';
import { connect, ConnectedProps } from 'react-redux';
import { GrafanaTheme2 } from '@grafana/data';
import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src';
-import {
- Icon,
- IconName,
- LinkButton,
- Pagination,
- RadioButtonGroup,
- Tooltip,
- useStyles2,
- FilterInput,
- InlineField,
-} from '@grafana/ui';
+import { LinkButton, RadioButtonGroup, useStyles2, FilterInput } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
-import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
import { contextSrv } from 'app/core/core';
import PageLoader from '../../core/components/PageLoader/PageLoader';
-import { AccessControlAction, StoreState, Unit, UserDTO, UserFilter } from '../../types';
+import { AccessControlAction, StoreState, UserFilter } from '../../types';
+import { UsersTable } from './Users/UsersTable';
import { changeFilter, changePage, changeQuery, fetchUsers } from './state/actions';
export interface FilterProps {
@@ -65,12 +55,12 @@ const UserListAdminPageUnConnected = ({
changeQuery,
users,
showPaging,
- totalPages,
- page,
- changePage,
changeFilter,
filters,
isLoading,
+ totalPages,
+ page,
+ changePage,
}: Props) => {
const styles = useStyles2(getStyles);
@@ -78,20 +68,16 @@ const UserListAdminPageUnConnected = ({
fetchUsers();
}, [fetchUsers]);
- const showLicensedRole = useMemo(() => users.some((user) => user.licensedRole), [users]);
-
return (
-
- <>
-
-
-
+
+
+ (
))}
- >
- {contextSrv.hasPermission(AccessControlAction.UsersCreate) && (
-
- New user
-
- )}
+ {contextSrv.hasPermission(AccessControlAction.UsersCreate) && (
+
+ New user
+
+ )}
+
{isLoading ? (
) : (
- <>
-
-
-
-
-
-
Login
-
Email
-
Name
-
Belongs to
- {showLicensedRole && (
-
- Licensed role{' '}
-
- Licensed role is based on a user's Org role (i.e. Viewer, Editor, Admin) and their
- dashboard/folder permissions.{' '}
-
- Learn more
-
- >
- }
- >
-
-
-