mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
refactor: preparation for time section migration (#21766)
This commit is contained in:
@@ -22,8 +22,7 @@ import {
|
||||
AdhocColumn,
|
||||
buildQueryContext,
|
||||
ensureIsArray,
|
||||
FeatureFlag,
|
||||
isFeatureEnabled,
|
||||
hasGenericChartAxes,
|
||||
isPhysicalColumn,
|
||||
QueryFormColumn,
|
||||
QueryFormOrderBy,
|
||||
@@ -42,7 +41,7 @@ export default function buildQuery(formData: PivotTableQueryFormData) {
|
||||
if (
|
||||
isPhysicalColumn(col) &&
|
||||
formData.time_grain_sqla &&
|
||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES) &&
|
||||
hasGenericChartAxes &&
|
||||
formData?.datetime_columns_lookup?.[col]
|
||||
) {
|
||||
return {
|
||||
@@ -66,7 +65,7 @@ export default function buildQuery(formData: PivotTableQueryFormData) {
|
||||
}
|
||||
return [
|
||||
{
|
||||
...(isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)
|
||||
...(hasGenericChartAxes
|
||||
? omit(baseQueryObject, ['extras.time_grain_sqla'])
|
||||
: baseQueryObject),
|
||||
orderby: orderBy,
|
||||
|
||||
@@ -19,9 +19,8 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
ensureIsArray,
|
||||
FeatureFlag,
|
||||
hasGenericChartAxes,
|
||||
isAdhocColumn,
|
||||
isFeatureEnabled,
|
||||
isPhysicalColumn,
|
||||
QueryFormMetric,
|
||||
smartDateFormatter,
|
||||
@@ -68,7 +67,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
],
|
||||
[
|
||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)
|
||||
hasGenericChartAxes
|
||||
? {
|
||||
name: 'time_grain_sqla',
|
||||
config: {
|
||||
@@ -98,9 +97,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
}
|
||||
: null,
|
||||
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)
|
||||
? 'datetime_columns_lookup'
|
||||
: null,
|
||||
hasGenericChartAxes ? 'datetime_columns_lookup' : null,
|
||||
],
|
||||
[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user