finish CH query and clean up objects
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user