mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
finish CH query and clean up objects
This commit is contained in:
parent
15575d7783
commit
bf507037c7
4 changed files with 109 additions and 152 deletions
|
|
@ -29,7 +29,6 @@ export function RetentionParameters() {
|
|||
return (
|
||||
<Form ref={ref} values={parameters} onSubmit={handleSubmit} preventSubmit={true}>
|
||||
<BaseParameters />
|
||||
<FormRow label={formatMessage(labels.window)} />
|
||||
<FormButtons>
|
||||
<SubmitButton variant="primary" disabled={queryDisabled} loading={isRunning}>
|
||||
{formatMessage(labels.runQuery)}
|
||||
|
|
|
|||
|
|
@ -6,22 +6,23 @@ import { ReportContext } from '../Report';
|
|||
export function RetentionTable() {
|
||||
const { report } = useContext(ReportContext);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { fields = [] } = report?.parameters || {};
|
||||
|
||||
// return (
|
||||
// <GridTable data={report?.data || []}>
|
||||
// {fields.map(({ name }) => {
|
||||
// return <GridColumn key={name} name={name} label={name} />;
|
||||
// })}
|
||||
// <GridColumn name="total" label={formatMessage(labels.total)} />
|
||||
// </GridTable>
|
||||
// );
|
||||
return (
|
||||
<GridTable data={report?.data || []}>
|
||||
<GridColumn name="cohortDate">{row => row.cohortDate}</GridColumn>
|
||||
<GridColumn name="dateNumber">{row => row.date_number}</GridColumn>
|
||||
<GridColumn name="date" label={'Date'}>
|
||||
{row => row.date}
|
||||
</GridColumn>
|
||||
<GridColumn name="day" label={'Day'}>
|
||||
{row => row.day}
|
||||
</GridColumn>
|
||||
<GridColumn name="visitors" label={formatMessage(labels.visitors)}>
|
||||
{row => row.date_number}
|
||||
{row => row.visitors}
|
||||
</GridColumn>
|
||||
<GridColumn name="returnVisitors" label={'Return Visitors'}>
|
||||
{row => row.returnVisitors}
|
||||
</GridColumn>
|
||||
<GridColumn name="percentage" label={'Percentage'}>
|
||||
{row => row.percentage}
|
||||
</GridColumn>
|
||||
</GridTable>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue