mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Refactored realtime components.
This commit is contained in:
parent
8912daa2fa
commit
a039f405b6
8 changed files with 51 additions and 51 deletions
|
|
@ -16,7 +16,7 @@ import useCountryNames from 'hooks/useCountryNames';
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
const REALTIME_RANGE = 30;
|
||||
const REALTIME_INTERVAL = 5000;
|
||||
const REALTIME_INTERVAL = 55000;
|
||||
|
||||
function mergeData(state, data, time) {
|
||||
const ids = state.map(({ __id }) => __id);
|
||||
|
|
@ -151,17 +151,18 @@ export default function RealtimeDashboard() {
|
|||
</div>
|
||||
<GridLayout>
|
||||
<GridRow>
|
||||
<GridColumn xs={12} lg={8}>
|
||||
<RealtimeLog data={realtimeData} websites={websites} />
|
||||
</GridColumn>
|
||||
<GridColumn xs={12} lg={4}>
|
||||
<DataTable
|
||||
title={<FormattedMessage id="metrics.referrers" defaultMessage="Referrers" />}
|
||||
metric={<FormattedMessage id="metrics.views" defaultMessage="Views" />}
|
||||
data={referrers}
|
||||
height={400}
|
||||
animate={false}
|
||||
/>
|
||||
</GridColumn>
|
||||
<GridColumn xs={12} lg={8}>
|
||||
<RealtimeLog data={realtimeData} websites={websites} />
|
||||
</GridColumn>
|
||||
</GridRow>
|
||||
<GridRow>
|
||||
<GridColumn xs={12} lg={4}>
|
||||
|
|
@ -170,6 +171,7 @@ export default function RealtimeDashboard() {
|
|||
metric={<FormattedMessage id="metrics.visitors" defaultMessage="Visitors" />}
|
||||
data={countries}
|
||||
renderLabel={renderCountryName}
|
||||
height={500}
|
||||
animate={false}
|
||||
/>
|
||||
</GridColumn>
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ export default function WebsiteDetails({ websiteId, token }) {
|
|||
contentClassName={styles.content}
|
||||
menu={menuOptions}
|
||||
>
|
||||
<DetailsComponent {...tableProps} limit={false} showFilters={true} />
|
||||
<DetailsComponent {...tableProps} height={500} limit={false} showFilters={true} />
|
||||
</MenuLayout>
|
||||
)}
|
||||
</Page>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue