mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
chore: removing Druid from front- and back- end (#20338)
* first pass at removing native Druid nosql * removing having_druid * addressing comments, linting * fixed all tests * addressing comments * redirected to ui-core TimeGranularity type * query form metric linting * fixed broken chart type * implementing feedback
This commit is contained in:
@@ -57,7 +57,7 @@ const getMemoizedSectionsToRender = memoizeOne(
|
||||
// list of datasource-specific controls that should be removed
|
||||
const invalidControls =
|
||||
datasourceType === 'table'
|
||||
? ['granularity', 'druid_time_origin']
|
||||
? ['granularity']
|
||||
: ['granularity_sqla', 'time_grain_sqla'];
|
||||
|
||||
return [datasourceAndVizType]
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
AdhocMetricSQL,
|
||||
getChartControlPanelRegistry,
|
||||
QueryFormData,
|
||||
TimeGranularity,
|
||||
} from '@superset-ui/core';
|
||||
import TableChartPlugin from '@superset-ui/plugin-chart-table';
|
||||
import { BigNumberTotalChartPlugin } from '@superset-ui/plugin-chart-echarts';
|
||||
@@ -83,7 +84,7 @@ describe('should collect control values and create SFD', () => {
|
||||
const publicControlsFormData = {
|
||||
// time section
|
||||
granularity_sqla: 'time_column',
|
||||
time_grain_sqla: 'P1D',
|
||||
time_grain_sqla: TimeGranularity.DAY,
|
||||
time_range: '2000 : today',
|
||||
// filters
|
||||
adhoc_filters: [],
|
||||
@@ -115,6 +116,7 @@ describe('should collect control values and create SFD', () => {
|
||||
datasource: '100__table',
|
||||
viz_type: 'source_viz',
|
||||
};
|
||||
|
||||
const sourceMockStore = {
|
||||
form_data: sourceMockFormData,
|
||||
controls: Object.fromEntries(
|
||||
@@ -128,6 +130,7 @@ describe('should collect control values and create SFD', () => {
|
||||
columns: [],
|
||||
},
|
||||
};
|
||||
|
||||
beforeAll(() => {
|
||||
getChartControlPanelRegistry().registerValue('source_viz', {
|
||||
controlPanelSections: [
|
||||
@@ -272,7 +275,7 @@ describe('should transform form_data between table and bigNumberTotal', () => {
|
||||
datasource: '30__table',
|
||||
viz_type: 'table',
|
||||
granularity_sqla: 'ds',
|
||||
time_grain_sqla: 'P1D',
|
||||
time_grain_sqla: TimeGranularity.DAY,
|
||||
time_range: 'No filter',
|
||||
query_mode: 'aggregate',
|
||||
groupby: ['name', 'gender', adhocColumn],
|
||||
|
||||
@@ -145,7 +145,6 @@ export class StandardizedFormData {
|
||||
if (this.has(vizType)) {
|
||||
return this.get(vizType);
|
||||
}
|
||||
|
||||
return this.memorizedFormData.slice(-1)[0][1];
|
||||
}
|
||||
|
||||
@@ -205,6 +204,7 @@ export class StandardizedFormData {
|
||||
...getFormDataFromControls(targetControlsState),
|
||||
standardizedFormData: this.serialize(),
|
||||
};
|
||||
|
||||
let rv = {
|
||||
formData: targetFormData,
|
||||
controlsState: targetControlsState,
|
||||
|
||||
Reference in New Issue
Block a user