mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Insights report filtering.
This commit is contained in:
parent
45888fabe6
commit
9436efabc0
12 changed files with 134 additions and 62 deletions
|
|
@ -6,9 +6,10 @@ import ReportHeader from '../ReportHeader';
|
|||
import ReportMenu from '../ReportMenu';
|
||||
import ReportBody from '../ReportBody';
|
||||
import Funnel from 'assets/funnel.svg';
|
||||
import { REPORT_TYPES } from 'lib/constants';
|
||||
|
||||
const defaultParameters = {
|
||||
type: 'funnel',
|
||||
type: REPORT_TYPES.funnel,
|
||||
parameters: { window: 60, urls: [] },
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ export function InsightsParameters() {
|
|||
<div className={styles.parameter}>
|
||||
{id === 'fields' && (
|
||||
<>
|
||||
<div>{label}</div>
|
||||
<div>{fieldOptions.find(f => f.name === name)?.label}</div>
|
||||
</>
|
||||
)}
|
||||
{id === 'filters' && (
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import ReportBody from '../ReportBody';
|
|||
import InsightsParameters from './InsightsParameters';
|
||||
import InsightsTable from './InsightsTable';
|
||||
import Lightbulb from 'assets/lightbulb.svg';
|
||||
import { REPORT_TYPES } from 'lib/constants';
|
||||
|
||||
const defaultParameters = {
|
||||
type: 'insights',
|
||||
parameters: { fields: [], filters: [], groups: [] },
|
||||
type: REPORT_TYPES.insights,
|
||||
parameters: { fields: [], filters: [] },
|
||||
};
|
||||
|
||||
export default function InsightsReport({ reportId }) {
|
||||
|
|
|
|||
|
|
@ -31,10 +31,15 @@ export function InsightsTable() {
|
|||
</GridColumn>
|
||||
);
|
||||
})}
|
||||
<GridColumn name="visitors" label={formatMessage(labels.visitors)} width="100px">
|
||||
<GridColumn
|
||||
name="visitors"
|
||||
label={formatMessage(labels.visitors)}
|
||||
width="100px"
|
||||
alignment="end"
|
||||
>
|
||||
{row => row.visitors.toLocaleString()}
|
||||
</GridColumn>
|
||||
<GridColumn name="views" label={formatMessage(labels.views)} width="100px">
|
||||
<GridColumn name="views" label={formatMessage(labels.views)} width="100px" alignment="end">
|
||||
{row => row.views.toLocaleString()}
|
||||
</GridColumn>
|
||||
</GridTable>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue