mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Fixed activity log timestamp.
This commit is contained in:
parent
8d31f43f0f
commit
c520a329d2
@ -129,6 +129,7 @@
|
|||||||
"@types/node": "^20.9.0",
|
"@types/node": "^20.9.0",
|
||||||
"@types/react": "^18.2.41",
|
"@types/react": "^18.2.41",
|
||||||
"@types/react-dom": "^18.2.17",
|
"@types/react-dom": "^18.2.17",
|
||||||
|
"@types/react-window": "^1.8.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
||||||
"@typescript-eslint/parser": "^6.7.3",
|
"@typescript-eslint/parser": "^6.7.3",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
@ -95,7 +95,7 @@ export function Realtime({ websiteId }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WebsiteHeader websiteId={websiteId} />
|
<WebsiteHeader websiteId={websiteId} />
|
||||||
<RealtimeHeader data={currentData} />
|
<RealtimeHeader data={realtimeData} />
|
||||||
<RealtimeChart className={styles.chart} data={realtimeData} unit="minute" />
|
<RealtimeChart className={styles.chart} data={realtimeData} unit="minute" />
|
||||||
<Grid>
|
<Grid>
|
||||||
<GridRow columns="one-two">
|
<GridRow columns="one-two">
|
||||||
|
@ -8,11 +8,11 @@ import useLocale from 'components/hooks/useLocale';
|
|||||||
import useCountryNames from 'components/hooks/useCountryNames';
|
import useCountryNames from 'components/hooks/useCountryNames';
|
||||||
import { BROWSERS } from 'lib/constants';
|
import { BROWSERS } from 'lib/constants';
|
||||||
import { stringToColor } from 'lib/format';
|
import { stringToColor } from 'lib/format';
|
||||||
import { formatDate } from 'lib/date';
|
|
||||||
import { safeDecodeURI } from 'next-basics';
|
import { safeDecodeURI } from 'next-basics';
|
||||||
import Icons from 'components/icons';
|
import Icons from 'components/icons';
|
||||||
import styles from './RealtimeLog.module.css';
|
import styles from './RealtimeLog.module.css';
|
||||||
import useMessages from 'components/hooks/useMessages';
|
import useMessages from 'components/hooks/useMessages';
|
||||||
|
import { format } from 'date-fns';
|
||||||
|
|
||||||
const TYPE_ALL = 'all';
|
const TYPE_ALL = 'all';
|
||||||
const TYPE_PAGEVIEW = 'pageview';
|
const TYPE_PAGEVIEW = 'pageview';
|
||||||
@ -50,7 +50,7 @@ export function RealtimeLog({ data, websiteDomain }) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const getTime = ({ createdAt }) => formatDate(new Date(createdAt), 'pp', locale);
|
const getTime = ({ timestamp }) => format(timestamp, 'h:mm:ss');
|
||||||
|
|
||||||
const getColor = ({ id, sessionId }) => stringToColor(sessionId || id);
|
const getColor = ({ id, sessionId }) => stringToColor(sessionId || id);
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ export function RealtimeLog({ data, websiteDomain }) {
|
|||||||
<div className={styles.body}>
|
<div className={styles.body}>
|
||||||
{logs?.length === 0 && <Empty />}
|
{logs?.length === 0 && <Empty />}
|
||||||
{logs?.length > 0 && (
|
{logs?.length > 0 && (
|
||||||
<FixedSizeList height={500} itemCount={logs.length} itemSize={50}>
|
<FixedSizeList width="100%" height={500} itemCount={logs.length} itemSize={50}>
|
||||||
{Row}
|
{Row}
|
||||||
</FixedSizeList>
|
</FixedSizeList>
|
||||||
)}
|
)}
|
||||||
|
@ -2431,6 +2431,13 @@
|
|||||||
hoist-non-react-statics "^3.3.0"
|
hoist-non-react-statics "^3.3.0"
|
||||||
redux "^4.0.0"
|
redux "^4.0.0"
|
||||||
|
|
||||||
|
"@types/react-window@^1.8.8":
|
||||||
|
version "1.8.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.8.tgz#c20645414d142364fbe735818e1c1e0a145696e3"
|
||||||
|
integrity sha512-8Ls660bHR1AUA2kuRvVG9D/4XpRC6wjAaPT9dil7Ckc76eP9TKWZwwmgfq8Q1LANX3QNDnoU4Zp48A3w+zK69Q==
|
||||||
|
dependencies:
|
||||||
|
"@types/react" "*"
|
||||||
|
|
||||||
"@types/react@*", "@types/react@16 || 17 || 18":
|
"@types/react@*", "@types/react@16 || 17 || 18":
|
||||||
version "18.2.30"
|
version "18.2.30"
|
||||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.30.tgz#b84f786864fc46f18545364a54d5e1316308e59b"
|
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.30.tgz#b84f786864fc46f18545364a54d5e1316308e59b"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user