Skip to content

Commit 4641ab0

Browse files
authored
chore: Remove SQL charts toggle (#1867)
1 parent f39d8c7 commit 4641ab0

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎packages/app/.env.development‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
77
OTEL_SERVICE_NAME="hdx-oss-dev-app"
88
PORT=${HYPERDX_APP_PORT}
99
NODE_OPTIONS="--max-http-header-size=131072"
10-
NEXT_PUBLIC_HYPERDX_BASE_PATH=
11-
NEXT_PUBLIC_IS_SQL_CHARTS_ENABLED=true
10+
NEXT_PUBLIC_HYPERDX_BASE_PATH=

‎packages/app/src/components/ChartEditor/RawSqlChartEditor.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useEffect } from 'react';
2+
import { atom, useAtom } from 'jotai';
23
import { Control, UseFormSetValue, useWatch } from 'react-hook-form';
34
import { QUERY_PARAMS_BY_DISPLAY_TYPE } from '@hyperdx/common-utils/dist/rawSqlParams';
45
import { DisplayType } from '@hyperdx/common-utils/dist/types';
@@ -15,7 +16,7 @@ import {
1516
Text,
1617
Tooltip,
1718
} from '@mantine/core';
18-
import { useClipboard, useDisclosure } from '@mantine/hooks';
19+
import { useClipboard } from '@mantine/hooks';
1920
import {
2021
IconCheck,
2122
IconChevronDown,
@@ -63,8 +64,11 @@ function ParamSnippet({
6364
);
6465
}
6566

67+
const helpOpenedAtom = atom(true);
68+
6669
function AvailableParameters({ displayType }: { displayType: DisplayType }) {
67-
const [helpOpened, { toggle: toggleHelp }] = useDisclosure(false);
70+
const [helpOpened, setHelpOpened] = useAtom(helpOpenedAtom);
71+
const toggleHelp = () => setHelpOpened(v => !v);
6872
const availableParams = QUERY_PARAMS_BY_DISPLAY_TYPE[displayType];
6973

7074
return (

‎packages/app/src/components/DBEditTimeChartForm.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ import SearchWhereInput, {
8888
} from '@/components/SearchInput/SearchWhereInput';
8989
import { SQLInlineEditorControlled } from '@/components/SearchInput/SQLInlineEditor';
9090
import { TimePicker } from '@/components/TimePicker';
91-
import { IS_LOCAL_MODE, IS_SQL_CHARTS_ENABLED } from '@/config';
91+
import { IS_LOCAL_MODE } from '@/config';
9292
import { GranularityPickerControlled } from '@/GranularityPicker';
9393
import { useFetchMetricMetadata } from '@/hooks/useFetchMetricMetadata';
9494
import {
@@ -1099,7 +1099,7 @@ export default function EditTimeChartForm({
10991099
placeholder="My Chart Name"
11001100
data-testid="chart-name-input"
11011101
/>
1102-
{IS_SQL_CHARTS_ENABLED && displayType === DisplayType.Table && (
1102+
{displayType === DisplayType.Table && (
11031103
<Controller
11041104
control={control}
11051105
name="configType"

‎packages/app/src/config.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,3 @@ export const IS_K8S_DASHBOARD_ENABLED = true;
3737
export const IS_METRICS_ENABLED = true;
3838
export const IS_MTVIEWS_ENABLED = false;
3939
export const IS_SESSIONS_ENABLED = true;
40-
export const IS_SQL_CHARTS_ENABLED =
41-
process.env.NEXT_PUBLIC_IS_SQL_CHARTS_ENABLED === 'true';

0 commit comments

Comments
 (0)