-
-
-
-
- {table === 'logs' ? (
-
- {table === 'logs' && aggFn != 'count' && aggFn != 'count_distinct' ? (
-
-
-
- ) : null}
- {table === 'logs' && aggFn != 'count' && aggFn == 'count_distinct' ? (
-
-
-
- ) : null}
- {table === 'metrics' ? (
-
-
-
- ) : null}
-
- {table === 'logs' ? (
- <>
-
-
- Where
-
-
- setWhere(v)}
- onSearch={() => {}}
- />
-
-
-
- >
- ) : (
- <>
-
-
- Where
-
-
- setWhere(v)}
- metricName={field}
- />
-
-
-
- >
- )}
- {
- // TODO: support metrics
- sortOrder != null && setSortOrder != null && table === 'logs' && (
-
-
- Sort Order
-
-
- v.value === sortOrder)}
- onChange={opt => setSortOrder(opt?.value ?? 'desc')}
- classNamePrefix="ds-react-select"
- />
-
-
- )
- }
- {setNumberFormat && (
-
-
-
- Chart Settings
- >
- }
- c="dark.2"
- mb={8}
- />
-
- Number Format
-
-
-
- )}
-
- );
-}
-
export function TableSelect({
table,
setTableAndAggFn,
@@ -978,6 +737,7 @@ export function ChartSeriesFormCompact({
const metricAggFns = getMetricAggFns(
legacyMetricNameToNameAndDataType(field)?.dataType,
);
+ const isAggFnCountDistinct = aggFn === 'count_distinct';
return (
@@ -1012,7 +772,7 @@ export function ChartSeriesFormCompact({
/>
)}
- {table === 'logs' && aggFn != 'count' && aggFn != 'count_distinct' ? (
+ {table === 'logs' && !isCountAggFn(aggFn) && !isAggFnCountDistinct ? (