Added controls for Table Viz (#1253)

* Added controls for Table Viz

* Change control panel container to stateless

* Changed specs

* Resolved conflicts
This commit is contained in:
vera-liu
2016-10-05 14:53:51 -07:00
committed by GitHub
parent 659bf6d7e8
commit 66b498de25
11 changed files with 294 additions and 85 deletions

View File

@@ -1,3 +1,12 @@
import React from 'react';
import TimeFilter from './components/TimeFilter';
import ChartControl from './components/ChartControl';
import GroupBy from './components/GroupBy';
import SqlClause from './components/SqlClause';
import Filters from './components/Filters';
import NotGroupBy from './components/NotGroupBy';
import Options from './components/Options';
export const VIZ_TYPES = [
{ value: 'dist_bar', label: 'Distribution - Bar Chart', requiresTime: false },
{ value: 'pie', label: 'Pie Chart', requiresTime: false },
@@ -33,3 +42,35 @@ export const sinceOptions = ['1 hour ago', '12 hours ago', '1 day ago',
'7 days ago', '28 days ago', '90 days ago', '1 year ago'];
export const untilOptions = ['now', '1 day ago', '7 days ago',
'28 days ago', '90 days ago', '1 year ago'];
export const timestampOptions = [
['smart_date', 'Adaptative formating'],
['%m/%d/%Y', '"%m/%d/%Y" | 01/14/2019'],
['%Y-%m-%d', '"%Y-%m-%d" | 2019-01-14'],
['%Y-%m-%d %H:%M:%S',
'"%Y-%m-%d %H:%M:%S" | 2019-01-14 01:32:10'],
['%H:%M:%S', '"%H:%M:%S" | 01:32:10'],
];
export const rowLimitOptions = [10, 50, 100, 250, 500, 1000, 5000, 10000, 50000];
export const DefaultControls = (
<div>
<ChartControl />
<TimeFilter />
<GroupBy />
<SqlClause />
<Filters />
</div>
);
export const TableVizControls = (
<div>
<NotGroupBy />
<Options />
</div>
);
export const VIZ_CONTROL_MAPPING = {
table: TableVizControls,
};