diff --git a/public/app/features/admin/AdminSettingsTable.tsx b/public/app/features/admin/AdminSettingsTable.tsx index f5a016d0c11..e12cf5ceb99 100644 --- a/public/app/features/admin/AdminSettingsTable.tsx +++ b/public/app/features/admin/AdminSettingsTable.tsx @@ -1,7 +1,7 @@ import { Fragment } from 'react'; import Skeleton from 'react-loading-skeleton'; -import { Text } from '@grafana/ui'; +import { ScrollContainer, Text } from '@grafana/ui'; import { SkeletonComponent, attachSkeleton } from '@grafana/ui/src/unstable'; import { Settings } from './AdminSettings'; @@ -12,28 +12,30 @@ interface Props { const AdminSettingsTableComponent = ({ settings }: Props) => { return ( - - - {Object.entries(settings).map(([sectionName, sectionSettings], i) => ( - - - - - {Object.entries(sectionSettings).map(([settingName, settingValue], j) => ( - - - + +
- - {sectionName} - - -
{settingName}{settingValue}
+ + {Object.entries(settings).map(([sectionName, sectionSettings], i) => ( + + + + - ))} - - ))} - -
+ + {sectionName} + +
+ {Object.entries(sectionSettings).map(([settingName, settingValue], j) => ( + + {settingName} + {settingValue} + + ))} + + ))} + + + ); }; @@ -42,34 +44,36 @@ const randomValues = new Array(50).fill(null).map(() => Math.random()); const AdminSettingsTableSkeleton: SkeletonComponent = ({ rootProps }) => { return ( - - - {randomValues.map((randomValue, index) => { - const isSection = index === 0 || randomValue > 0.9; + +
+ + {randomValues.map((randomValue, index) => { + const isSection = index === 0 || randomValue > 0.9; - return ( - - {isSection && ( + return ( + + {isSection && ( + + + + )} - + - - )} - - - - - - ); - })} - -
+ + +
- + + + +
- - - -
+ + ); + })} + + + ); }; diff --git a/public/app/features/admin/LicenseChrome.tsx b/public/app/features/admin/LicenseChrome.tsx index 6179b97b792..129c8ef71b9 100644 --- a/public/app/features/admin/LicenseChrome.tsx +++ b/public/app/features/admin/LicenseChrome.tsx @@ -12,7 +12,7 @@ const getStyles = (theme: GrafanaTheme2) => { return { container: css({ - padding: '36px 79px', + padding: theme.spacing(4), background: theme.components.panel.background, }), footer: css({ @@ -22,7 +22,7 @@ const getStyles = (theme: GrafanaTheme2) => { }), header: css({ height: '137px', - padding: '40px 0 0 79px', + padding: theme.spacing(4, 0, 0, 4), position: 'relative', background: `url('${backgroundUrl}') right`, }), @@ -52,7 +52,7 @@ export function LicenseChrome({ header, editionNotice, subheader, children }: Pr background: '#0A1C36', position: 'absolute', top: '19px', - left: '71%', + right: '5%', }} > { No stats found.

) : ( -
+ { } /> -
+ { } /> -
+
{ ) } /> -
+ )} ); @@ -133,27 +139,6 @@ const getStyles = (theme: GrafanaTheme2) => { title: css({ marginBottom: theme.spacing(4), }), - row: css({ - display: 'flex', - justifyContent: 'space-between', - width: '100%', - - '& > div:not(:last-of-type)': { - marginRight: theme.spacing(2), - }, - - '& > div': { - width: '33.3%', - }, - }), - doubleRow: css({ - display: 'flex', - flexDirection: 'column', - - '& > div:first-of-type': { - marginBottom: theme.spacing(2), - }, - }), notFound: css({ fontSize: theme.typography.h6.fontSize, textAlign: 'center', diff --git a/public/app/features/admin/ServerStatsCard.tsx b/public/app/features/admin/ServerStatsCard.tsx index ff78a5fba76..c9ae7e3b2f4 100644 --- a/public/app/features/admin/ServerStatsCard.tsx +++ b/public/app/features/admin/ServerStatsCard.tsx @@ -50,6 +50,7 @@ const getStyles = (theme: GrafanaTheme2) => { display: 'flex', flexDirection: 'column', gap: theme.spacing(2), + margin: 0, padding: theme.spacing(2), }), indent: css({ diff --git a/public/app/features/manage-dashboards/components/SnapshotListTable.tsx b/public/app/features/manage-dashboards/components/SnapshotListTable.tsx index c8c36dd5e86..10554a440f0 100644 --- a/public/app/features/manage-dashboards/components/SnapshotListTable.tsx +++ b/public/app/features/manage-dashboards/components/SnapshotListTable.tsx @@ -2,7 +2,7 @@ import { useState, useCallback } from 'react'; import useAsync from 'react-use/lib/useAsync'; import { config } from '@grafana/runtime'; -import { ConfirmModal, EmptyState, TextLink } from '@grafana/ui'; +import { ConfirmModal, EmptyState, ScrollContainer, TextLink } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; import { getDashboardSnapshotSrv, Snapshot } from 'app/features/dashboard/services/SnapshotSrv'; @@ -62,7 +62,7 @@ export const SnapshotListTable = () => { } return ( -
+ @@ -112,6 +112,6 @@ export const SnapshotListTable = () => { setRemoveSnapshot(undefined); }} /> - + ); }; diff --git a/public/app/features/profile/UserOrganizations.tsx b/public/app/features/profile/UserOrganizations.tsx index 8e0455e618e..c378e49b680 100644 --- a/public/app/features/profile/UserOrganizations.tsx +++ b/public/app/features/profile/UserOrganizations.tsx @@ -1,7 +1,7 @@ import { PureComponent } from 'react'; import { selectors } from '@grafana/e2e-selectors'; -import { Button, LoadingPlaceholder } from '@grafana/ui'; +import { Button, LoadingPlaceholder, ScrollContainer } from '@grafana/ui'; import { Trans } from 'app/core/internationalization'; import { UserDTO, UserOrg } from 'app/types'; @@ -30,46 +30,48 @@ export class UserOrganizations extends PureComponent { Organizations -
- - - - - - - - {orgs.map((org: UserOrg, index) => { - return ( - - - - - - ); - })} - -
- Name - - Role - -
{org.name}{org.role} - {org.orgId === user?.orgId ? ( - - ) : ( - - )} -
+ + + + + + + + + + {orgs.map((org: UserOrg, index) => { + return ( + + + + + + ); + })} + +
+ Name + + Role + +
{org.name}{org.role} + {org.orgId === user?.orgId ? ( + + ) : ( + + )} +
+
); } diff --git a/public/app/features/profile/UserSessions.tsx b/public/app/features/profile/UserSessions.tsx index f6cc0538c64..64138ebe1d6 100644 --- a/public/app/features/profile/UserSessions.tsx +++ b/public/app/features/profile/UserSessions.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/css'; import { PureComponent } from 'react'; import { selectors } from '@grafana/e2e-selectors'; -import { Button, Icon, LoadingPlaceholder } from '@grafana/ui'; +import { Button, Icon, LoadingPlaceholder, ScrollContainer } from '@grafana/ui'; import { TagBadge } from 'app/core/components/TagFilter/TagBadge'; import { t, Trans } from 'app/core/internationalization'; import { formatDate } from 'app/core/internationalization/dates'; @@ -28,55 +28,57 @@ class UserSessions extends PureComponent { {sessions.length > 0 && ( <>

Sessions

- - - - - - - - - - - - - - {sessions.map((session: UserSession, index) => ( - - {session.isActive ? : } - - - - - + +
- Last seen - - Logged on - - IP address - - Browser & OS - - Identity Provider -
Now{session.seenAt}{formatDate(session.createdAt, { dateStyle: 'long' })}{session.clientIp} - {session.browser} on {session.os} {session.osVersion} - - {session.authModule && } - - -
+ + + + + + + + - ))} - -
+ Last seen + + Logged on + + IP address + + Browser & OS + + Identity Provider +
+ + + + {sessions.map((session: UserSession, index) => ( + + {session.isActive ? Now : {session.seenAt}} + {formatDate(session.createdAt, { dateStyle: 'long' })} + {session.clientIp} + + {session.browser} on {session.os} {session.osVersion} + + + {session.authModule && } + + + + + + ))} + + + )} diff --git a/public/app/features/serviceaccounts/ServiceAccountsListPage.tsx b/public/app/features/serviceaccounts/ServiceAccountsListPage.tsx index 3c4bab9d3ac..5b8ede18148 100644 --- a/public/app/features/serviceaccounts/ServiceAccountsListPage.tsx +++ b/public/app/features/serviceaccounts/ServiceAccountsListPage.tsx @@ -1,9 +1,20 @@ +import { css } from '@emotion/css'; import pluralize from 'pluralize'; import { useEffect, useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; -import { OrgRole } from '@grafana/data'; -import { ConfirmModal, FilterInput, LinkButton, RadioButtonGroup, InlineField, EmptyState, Box } from '@grafana/ui'; +import { GrafanaTheme2, OrgRole } from '@grafana/data'; +import { + ConfirmModal, + FilterInput, + LinkButton, + RadioButtonGroup, + InlineField, + EmptyState, + Box, + Stack, + useStyles2, +} from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; import config from 'app/core/config'; import { contextSrv } from 'app/core/core'; @@ -78,6 +89,7 @@ export const ServiceAccountsListPageUnconnected = ({ const [isDisableModalOpen, setIsDisableModalOpen] = useState(false); const [newToken, setNewToken] = useState(''); const [currentServiceAccount, setCurrentServiceAccount] = useState(null); + const styles = useStyles2(getStyles); useEffect(() => { fetchServiceAccounts({ withLoadingIndicator: true }); @@ -192,13 +204,13 @@ export const ServiceAccountsListPageUnconnected = ({ } > -
+ @@ -208,7 +220,7 @@ export const ServiceAccountsListPageUnconnected = ({ value={serviceAccountStateFilter} /> -
+ {!isLoading && !noServiceAccountsCreated && serviceAccounts.length === 0 && ( ({ + filterInput: css({ + maxWidth: theme.spacing(50), + }), +}); + const ServiceAccountsListPage = connector(ServiceAccountsListPageUnconnected); export default ServiceAccountsListPage;