fix: typecheck
This commit is contained in:
@@ -127,6 +127,8 @@ export async function executeAggregateChart(
|
||||
endDate: normalized.endDate,
|
||||
breakdowns: normalized.breakdowns,
|
||||
limit: normalized.limit,
|
||||
metric: normalized.metric,
|
||||
previous: normalized.previous,
|
||||
timezone,
|
||||
};
|
||||
|
||||
@@ -251,6 +253,8 @@ export async function executeAggregateChart(
|
||||
endDate: previousPeriod.endDate,
|
||||
breakdowns: normalized.breakdowns,
|
||||
limit: normalized.limit,
|
||||
metric: normalized.metric,
|
||||
previous: normalized.previous,
|
||||
timezone,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { uniq } from 'ramda';
|
||||
import sqlstring from 'sqlstring';
|
||||
|
||||
import { DateTime, stripLeadingAndTrailingSlashes } from '@openpanel/common';
|
||||
@@ -355,23 +354,10 @@ export function getAggregateChartSql({
|
||||
endDate,
|
||||
projectId,
|
||||
limit,
|
||||
timezone,
|
||||
}: Omit<IGetChartDataInput, 'interval' | 'chartType'> & {
|
||||
timezone: string;
|
||||
}) {
|
||||
const {
|
||||
sb,
|
||||
join,
|
||||
getWhere,
|
||||
getFrom,
|
||||
getJoins,
|
||||
getSelect,
|
||||
getOrderBy,
|
||||
getGroupBy,
|
||||
getWith,
|
||||
with: addCte,
|
||||
getSql,
|
||||
} = createSqlBuilder();
|
||||
const { sb, join, getJoins, with: addCte, getSql } = createSqlBuilder();
|
||||
|
||||
sb.where = getEventFiltersWhereClause(event.filters);
|
||||
sb.where.projectId = `project_id = ${sqlstring.escape(projectId)}`;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { TABLE_NAMES, ch } from '../clickhouse/client';
|
||||
import { clix } from '../clickhouse/query-builder';
|
||||
|
||||
export interface IGetTopPagesInput {
|
||||
export interface IGetPagesInput {
|
||||
projectId: string;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
@@ -28,7 +28,7 @@ export class PagesService {
|
||||
endDate,
|
||||
timezone,
|
||||
search,
|
||||
}: IGetTopPagesInput): Promise<ITopPage[]> {
|
||||
}: IGetPagesInput): Promise<ITopPage[]> {
|
||||
// CTE: Get titles from the last 30 days for faster retrieval
|
||||
const titlesCte = clix(this.client, timezone)
|
||||
.select([
|
||||
|
||||
Reference in New Issue
Block a user