mirror of
https://github.com/apache/superset.git
synced 2026-06-06 16:19:18 +00:00
* Added d3format() function to mock slice in explorev2 Problem: table viz was not working in explorev2 due to d3format() not defined in mock slice. * Change column_formats to camel case
54 lines
1021 B
JavaScript
54 lines
1021 B
JavaScript
// TODO: add datasource_type here after druid support is added
|
|
export const defaultFormData = {
|
|
sliceId: null,
|
|
vizType: null,
|
|
timeColumn: null,
|
|
timeGrain: null,
|
|
groupByColumns: [],
|
|
metrics: [],
|
|
since: null,
|
|
until: null,
|
|
having: null,
|
|
where: null,
|
|
columns: [],
|
|
orderings: [],
|
|
timeStampFormat: 'smart_date',
|
|
rowLimit: 50000,
|
|
searchBox: false,
|
|
whereClause: '',
|
|
havingClause: '',
|
|
filters: [],
|
|
};
|
|
|
|
export const initialState = {
|
|
datasources: null,
|
|
datasourceId: null,
|
|
datasourceType: null,
|
|
timeColumnOpts: [],
|
|
timeGrainOpts: [],
|
|
timeGrain: null,
|
|
groupByColumnOpts: [],
|
|
metricsOpts: [],
|
|
columnOpts: [],
|
|
orderingOpts: [],
|
|
searchBox: false,
|
|
whereClause: '',
|
|
havingClause: '',
|
|
filters: [],
|
|
filterColumnOpts: [],
|
|
viz: {
|
|
columnFormats: {},
|
|
formData: defaultFormData,
|
|
},
|
|
};
|
|
|
|
export const defaultOpts = {
|
|
timeColumnOpts: [],
|
|
timeGrainOpts: [],
|
|
groupByColumnOpts: [],
|
|
metricsOpts: [],
|
|
filterColumnOpts: [],
|
|
columnOpts: [],
|
|
orderingOpts: [],
|
|
};
|