mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
small typo fix in type (#1242)
Noticed this when resolving a conflict, should be `Chart` not `Chat` :P Fixes HDX-2553
This commit is contained in:
parent
5efa2ffa0d
commit
0cf179fa68
5 changed files with 16 additions and 12 deletions
5
.changeset/wicked-stingrays-tie.md
Normal file
5
.changeset/wicked-stingrays-tie.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
Fixes typo in type definition
|
||||
|
|
@ -2,8 +2,7 @@ import { useMemo, useState } from 'react';
|
|||
import { ClickHouseQueryError } from '@hyperdx/common-utils/dist/clickhouse';
|
||||
import {
|
||||
ChartConfigWithDateRange,
|
||||
ChartConfigWithOptDateRange,
|
||||
ChatConfigWithOptTimestamp,
|
||||
ChartConfigWithOptTimestamp,
|
||||
} from '@hyperdx/common-utils/dist/types';
|
||||
import { Box, Code, Text } from '@mantine/core';
|
||||
import { SortingState } from '@tanstack/react-table';
|
||||
|
|
@ -21,7 +20,7 @@ export default function DBTableChart({
|
|||
enabled = true,
|
||||
queryKeyPrefix,
|
||||
}: {
|
||||
config: ChatConfigWithOptTimestamp;
|
||||
config: ChartConfigWithOptTimestamp;
|
||||
getRowSearchLink?: (row: any) => string;
|
||||
queryKeyPrefix?: string;
|
||||
enabled?: boolean;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
ColumnMetaType,
|
||||
} from '@hyperdx/common-utils/dist/clickhouse';
|
||||
import { renderChartConfig } from '@hyperdx/common-utils/dist/renderChartConfig';
|
||||
import { ChatConfigWithOptTimestamp } from '@hyperdx/common-utils/dist/types';
|
||||
import { ChartConfigWithOptTimestamp } from '@hyperdx/common-utils/dist/types';
|
||||
import {
|
||||
isFirstOrderByAscending,
|
||||
isTimestampExpressionInFirstOrderBy,
|
||||
|
|
@ -26,12 +26,12 @@ import { omit } from '@/utils';
|
|||
|
||||
type TQueryKey = readonly [
|
||||
string,
|
||||
ChatConfigWithOptTimestamp,
|
||||
ChartConfigWithOptTimestamp,
|
||||
number | undefined,
|
||||
];
|
||||
function queryKeyFn(
|
||||
prefix: string,
|
||||
config: ChatConfigWithOptTimestamp,
|
||||
config: ChartConfigWithOptTimestamp,
|
||||
queryTimeout?: number,
|
||||
): TQueryKey {
|
||||
return [prefix, config, queryTimeout];
|
||||
|
|
@ -130,7 +130,7 @@ function generateTimeWindowsAscending(startDate: Date, endDate: Date) {
|
|||
|
||||
// Get time window from page param
|
||||
function getTimeWindowFromPageParam(
|
||||
config: ChatConfigWithOptTimestamp,
|
||||
config: ChartConfigWithOptTimestamp,
|
||||
pageParam: TPageParam,
|
||||
): TimeWindow {
|
||||
const [startDate, endDate] = config.dateRange;
|
||||
|
|
@ -148,7 +148,7 @@ function getTimeWindowFromPageParam(
|
|||
function getNextPageParam(
|
||||
lastPage: TQueryFnData | null,
|
||||
allPages: TQueryFnData[],
|
||||
config: ChatConfigWithOptTimestamp,
|
||||
config: ChartConfigWithOptTimestamp,
|
||||
): TPageParam | undefined {
|
||||
if (lastPage == null) {
|
||||
return undefined;
|
||||
|
|
@ -428,7 +428,7 @@ function flattenData(data: TData | undefined): TQueryFnData | null {
|
|||
}
|
||||
|
||||
export default function useOffsetPaginatedQuery(
|
||||
config: ChatConfigWithOptTimestamp,
|
||||
config: ChartConfigWithOptTimestamp,
|
||||
{
|
||||
isLive,
|
||||
enabled = true,
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ export type DateRange = {
|
|||
|
||||
export type ChartConfigWithDateRange = ChartConfig & DateRange;
|
||||
|
||||
export type ChatConfigWithOptTimestamp = Omit<
|
||||
export type ChartConfigWithOptTimestamp = Omit<
|
||||
ChartConfigWithDateRange,
|
||||
'timestampValueExpression'
|
||||
> & {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { z } from 'zod';
|
|||
|
||||
import {
|
||||
ChartConfigWithDateRange,
|
||||
ChatConfigWithOptTimestamp,
|
||||
ChartConfigWithOptTimestamp,
|
||||
DashboardFilter,
|
||||
DashboardFilterSchema,
|
||||
DashboardSchema,
|
||||
|
|
@ -547,7 +547,7 @@ export const removeTrailingDirection = (s: string) => {
|
|||
};
|
||||
|
||||
export const isTimestampExpressionInFirstOrderBy = (
|
||||
config: ChatConfigWithOptTimestamp,
|
||||
config: ChartConfigWithOptTimestamp,
|
||||
) => {
|
||||
const firstOrderingItem = getFirstOrderingItem(config.orderBy);
|
||||
if (!firstOrderingItem || config.timestampValueExpression == null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue