Skip to content

Commit e8fc4a9

Browse files
Liang yung huangLiang yung huang
authored andcommitted
lint v8
1 parent e049d2e commit e8fc4a9

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

packages/app/src/TimelineChart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ type Row = {
334334
label: React.ReactNode;
335335
events: TimelineEventT[];
336336
style?: any;
337+
type?: string;
337338
className?: string;
338339
};
339340

packages/app/src/components/DBTracePanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export default function DBTracePanel({
206206
</Text>
207207
<RowDataPanel
208208
source={
209-
traceRowWhere?.type === SourceKind.Log
209+
traceRowWhere?.type === SourceKind.Log && parentSourceData
210210
? parentSourceData
211211
: traceSourceData
212212
}

packages/app/src/components/DBTraceWaterfallChart.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { useCallback, useMemo, useState } from 'react';
22
import TimestampNano from 'timestamp-nano';
3-
import { SourceKind, TSource } from '@hyperdx/common-utils/dist/types';
3+
import {
4+
ChartConfigWithDateRange,
5+
SourceKind,
6+
TSource,
7+
} from '@hyperdx/common-utils/dist/types';
48
import { Text } from '@mantine/core';
59

610
import useOffsetPaginatedQuery from '@/hooks/useOffsetPaginatedQuery';
@@ -57,7 +61,6 @@ function getTableBody(tableModel: TSource) {
5761
}
5862

5963
function getFetchConfig(source: TSource, traceId: string) {
60-
if (!source) return { config: null, alias: {}, type: null };
6164
const alias = {
6265
Body: getTableBody(source),
6366
Timestamp: getDisplayedTimestampValueExpression(source),
@@ -169,19 +172,21 @@ function useFetchingData({
169172
valueExpression: string;
170173
alias: string;
171174
}[];
172-
from: string;
175+
from: {
176+
databaseName: string;
177+
tableName: string;
178+
};
173179
timestampValueExpression: string;
174180
where: string;
175181
limit: {
176182
limit: number;
177183
};
178184
connection: string;
179-
} | null;
185+
};
180186
dateRangeStartInclusive: boolean;
181187
dateRange: [Date, Date];
182188
}) {
183-
const query = useMemo(() => {
184-
if (!config) return null;
189+
const query: ChartConfigWithDateRange = useMemo(() => {
185190
return {
186191
...config,
187192
dateRange,
@@ -550,7 +555,7 @@ export function DBTraceWaterfallChartContainer({
550555
// onTimeClick(ts + startedAt);
551556
}}
552557
onEventClick={event => {
553-
onClick?.({ id: event.id, type: event.type });
558+
onClick?.({ id: event.id, type: event.type ?? '' });
554559
}}
555560
cursors={[]}
556561
rows={timelineRows}

packages/common-utils/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export const SelectListSchema = z.array(DerivedColumnSchema).or(z.string());
7373
export const SortSpecificationSchema = z.intersection(
7474
RootValueExpressionSchema,
7575
z.object({
76+
valueExpression: z.string().optional(),
7677
ordering: z.enum(['ASC', 'DESC']),
7778
}),
7879
);

0 commit comments

Comments
 (0)