Skip to content

Commit

Permalink
lint v8
Browse files Browse the repository at this point in the history
  • Loading branch information
Liang yung huang authored and Liang yung huang committed Feb 11, 2025
1 parent e049d2e commit e8fc4a9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/app/src/TimelineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ type Row = {
label: React.ReactNode;
events: TimelineEventT[];
style?: any;
type?: string;
className?: string;
};

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/DBTracePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export default function DBTracePanel({
</Text>
<RowDataPanel
source={
traceRowWhere?.type === SourceKind.Log
traceRowWhere?.type === SourceKind.Log && parentSourceData
? parentSourceData
: traceSourceData
}
Expand Down
19 changes: 12 additions & 7 deletions packages/app/src/components/DBTraceWaterfallChart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { useCallback, useMemo, useState } from 'react';
import TimestampNano from 'timestamp-nano';
import { SourceKind, TSource } from '@hyperdx/common-utils/dist/types';
import {
ChartConfigWithDateRange,
SourceKind,
TSource,
} from '@hyperdx/common-utils/dist/types';
import { Text } from '@mantine/core';

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

function getFetchConfig(source: TSource, traceId: string) {
if (!source) return { config: null, alias: {}, type: null };
const alias = {
Body: getTableBody(source),
Timestamp: getDisplayedTimestampValueExpression(source),
Expand Down Expand Up @@ -169,19 +172,21 @@ function useFetchingData({
valueExpression: string;
alias: string;
}[];
from: string;
from: {
databaseName: string;
tableName: string;
};
timestampValueExpression: string;
where: string;
limit: {
limit: number;
};
connection: string;
} | null;
};
dateRangeStartInclusive: boolean;
dateRange: [Date, Date];
}) {
const query = useMemo(() => {
if (!config) return null;
const query: ChartConfigWithDateRange = useMemo(() => {
return {
...config,
dateRange,
Expand Down Expand Up @@ -550,7 +555,7 @@ export function DBTraceWaterfallChartContainer({
// onTimeClick(ts + startedAt);
}}
onEventClick={event => {
onClick?.({ id: event.id, type: event.type });
onClick?.({ id: event.id, type: event.type ?? '' });
}}
cursors={[]}
rows={timelineRows}
Expand Down
1 change: 1 addition & 0 deletions packages/common-utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const SelectListSchema = z.array(DerivedColumnSchema).or(z.string());
export const SortSpecificationSchema = z.intersection(
RootValueExpressionSchema,
z.object({
valueExpression: z.string().optional(),
ordering: z.enum(['ASC', 'DESC']),
}),
);
Expand Down

0 comments on commit e8fc4a9

Please sign in to comment.