import { css, cx } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { Trans, t } from '@grafana/i18n'; import { Button, InfoBox, Portal, useStyles2, useTheme2 } from '@grafana/ui'; import { getModalStyles } from '@grafana/ui/internal'; interface Props { maxConcurrentSessions?: number; } export const TokenRevokedModal = (props: Props) => { const styles = useStyles2(getStyles); const theme = useTheme2(); const modalStyles = getModalStyles(theme); const showMaxConcurrentSessions = Boolean(props.maxConcurrentSessions); const redirectToLogin = () => { window.location.reload(); }; return (

Your session token was automatically revoked because you have reached{' '} the maximum number of {'{{numSessions}}'} concurrent sessions for your account.

To resume your session, sign in again. Contact your administrator or visit the license page to review your quota if you are repeatedly signed out automatically.

); }; const getStyles = (theme: GrafanaTheme2) => ({ infobox: css({ marginBottom: 0, }), text: css({ margin: theme.spacing(1, 0, 2), }), backdrop: css({ backgroundColor: theme.colors.background.canvas, opacity: 0.8, }), });