mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
New page and referrer url filters.
This commit is contained in:
parent
1d977875be
commit
cf8ed13d1f
11 changed files with 133 additions and 50 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import WebsiteChart from 'components/metrics/WebsiteChart';
|
||||
import MetricsTable from 'components/metrics/MetricsTable';
|
||||
import WorldMap from 'components/common/WorldMap';
|
||||
import Page from 'components/layout/Page';
|
||||
import WebsiteHeader from 'components/metrics/WebsiteHeader';
|
||||
|
|
@ -53,6 +52,17 @@ export default function WebsiteDetails({ websiteId, defaultDateRange = '7day' })
|
|||
},
|
||||
];
|
||||
|
||||
const tableProps = {
|
||||
websiteId,
|
||||
startDate,
|
||||
endDate,
|
||||
limit: 10,
|
||||
onExpand: handleExpand,
|
||||
websiteDomain: data?.domain,
|
||||
};
|
||||
|
||||
const DetailsComponent = expand?.component;
|
||||
|
||||
async function loadData() {
|
||||
setData(await get(`/api/website/${websiteId}`));
|
||||
}
|
||||
|
|
@ -73,10 +83,6 @@ export default function WebsiteDetails({ websiteId, defaultDateRange = '7day' })
|
|||
setExpand(menuOptions.find(e => e.value === value));
|
||||
}
|
||||
|
||||
function getMetricLabel(type) {
|
||||
return type === 'url' || type === 'referrer' ? 'Views' : 'Visitors';
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (websiteId) {
|
||||
loadData();
|
||||
|
|
@ -87,15 +93,6 @@ export default function WebsiteDetails({ websiteId, defaultDateRange = '7day' })
|
|||
return null;
|
||||
}
|
||||
|
||||
const tableProps = {
|
||||
websiteId,
|
||||
startDate,
|
||||
endDate,
|
||||
limit: 10,
|
||||
onExpand: handleExpand,
|
||||
websiteDomain: data?.domain,
|
||||
};
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<div className="row">
|
||||
|
|
@ -149,7 +146,7 @@ export default function WebsiteDetails({ websiteId, defaultDateRange = '7day' })
|
|||
selectedOption={expand.value}
|
||||
onMenuSelect={handleMenuSelect}
|
||||
>
|
||||
{expand.component({ ...tableProps, limit: false })}
|
||||
<DetailsComponent {...tableProps} limit={false} />
|
||||
</MenuLayout>
|
||||
)}
|
||||
</Page>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue