⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.72
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
grafana
/
public
/
app
/
features
/
profile
/
View File Name :
UserSessions.tsx
import { css } from '@emotion/css'; import { t } from 'i18next'; import React, { PureComponent } from 'react'; import { selectors } from '@grafana/e2e-selectors'; import { Button, Icon, LoadingPlaceholder } from '@grafana/ui'; import { i18nDate, Trans } from 'app/core/internationalization'; import { UserSession } from 'app/types'; interface Props { sessions: UserSession[]; isLoading: boolean; revokeUserSession: (tokenId: number) => void; } class UserSessions extends PureComponent
{ render() { const { isLoading, sessions, revokeUserSession } = this.props; const styles = getStyles(); if (isLoading) { return
Loading sessions...} />; } return (
{sessions.length > 0 && ( <>
Sessions
Last seen
Logged on
IP address
Browser & OS
{sessions.map((session: UserSession, index) => (
{session.isActive ?
Now
:
{session.seenAt}
}
{i18nDate(session.createdAt, { dateStyle: 'long' })}
{session.clientIp}
{session.browser} on {session.os} {session.osVersion}
revokeUserSession(session.id)} aria-label={t('user-session.revoke', 'Revoke user session')} >
))}
> )}
); } } const getStyles = () => ({ wrapper: css({ maxWidth: '100%', }), }); export default UserSessions;