mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
chore: Remove SQL charts toggle (#1867)
This commit is contained in:
parent
f39d8c7291
commit
4641ab0eea
4 changed files with 9 additions and 8 deletions
|
|
@ -7,5 +7,4 @@ OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
|
|||
OTEL_SERVICE_NAME="hdx-oss-dev-app"
|
||||
PORT=${HYPERDX_APP_PORT}
|
||||
NODE_OPTIONS="--max-http-header-size=131072"
|
||||
NEXT_PUBLIC_HYPERDX_BASE_PATH=
|
||||
NEXT_PUBLIC_IS_SQL_CHARTS_ENABLED=true
|
||||
NEXT_PUBLIC_HYPERDX_BASE_PATH=
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import { useEffect } from 'react';
|
||||
import { atom, useAtom } from 'jotai';
|
||||
import { Control, UseFormSetValue, useWatch } from 'react-hook-form';
|
||||
import { QUERY_PARAMS_BY_DISPLAY_TYPE } from '@hyperdx/common-utils/dist/rawSqlParams';
|
||||
import { DisplayType } from '@hyperdx/common-utils/dist/types';
|
||||
|
|
@ -15,7 +16,7 @@ import {
|
|||
Text,
|
||||
Tooltip,
|
||||
} from '@mantine/core';
|
||||
import { useClipboard, useDisclosure } from '@mantine/hooks';
|
||||
import { useClipboard } from '@mantine/hooks';
|
||||
import {
|
||||
IconCheck,
|
||||
IconChevronDown,
|
||||
|
|
@ -63,8 +64,11 @@ function ParamSnippet({
|
|||
);
|
||||
}
|
||||
|
||||
const helpOpenedAtom = atom(true);
|
||||
|
||||
function AvailableParameters({ displayType }: { displayType: DisplayType }) {
|
||||
const [helpOpened, { toggle: toggleHelp }] = useDisclosure(false);
|
||||
const [helpOpened, setHelpOpened] = useAtom(helpOpenedAtom);
|
||||
const toggleHelp = () => setHelpOpened(v => !v);
|
||||
const availableParams = QUERY_PARAMS_BY_DISPLAY_TYPE[displayType];
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ import SearchWhereInput, {
|
|||
} from '@/components/SearchInput/SearchWhereInput';
|
||||
import { SQLInlineEditorControlled } from '@/components/SearchInput/SQLInlineEditor';
|
||||
import { TimePicker } from '@/components/TimePicker';
|
||||
import { IS_LOCAL_MODE, IS_SQL_CHARTS_ENABLED } from '@/config';
|
||||
import { IS_LOCAL_MODE } from '@/config';
|
||||
import { GranularityPickerControlled } from '@/GranularityPicker';
|
||||
import { useFetchMetricMetadata } from '@/hooks/useFetchMetricMetadata';
|
||||
import {
|
||||
|
|
@ -1099,7 +1099,7 @@ export default function EditTimeChartForm({
|
|||
placeholder="My Chart Name"
|
||||
data-testid="chart-name-input"
|
||||
/>
|
||||
{IS_SQL_CHARTS_ENABLED && displayType === DisplayType.Table && (
|
||||
{displayType === DisplayType.Table && (
|
||||
<Controller
|
||||
control={control}
|
||||
name="configType"
|
||||
|
|
|
|||
|
|
@ -37,5 +37,3 @@ export const IS_K8S_DASHBOARD_ENABLED = true;
|
|||
export const IS_METRICS_ENABLED = true;
|
||||
export const IS_MTVIEWS_ENABLED = false;
|
||||
export const IS_SESSIONS_ENABLED = true;
|
||||
export const IS_SQL_CHARTS_ENABLED =
|
||||
process.env.NEXT_PUBLIC_IS_SQL_CHARTS_ENABLED === 'true';
|
||||
|
|
|
|||
Loading…
Reference in a new issue