Commit Graph

60 Commits

Author SHA1 Message Date
Alanna Scott
e169c67760 [vis] fix axis labels display (#2066)
* re-render chart after adjusting for long axis labels

* measure all of the labels and take the max height

* add missing isTimeSeries var

* fix linting

* use jQuery to get text ticks

* rotate 45 rather than 90
2017-01-31 11:15:59 -08:00
vera-liu
a8c29c4ffe Change validator of timeshift to allow for strings (#2051) 2017-01-26 09:55:47 -08:00
Maxime Beauchemin
e46ba2b4a4 Simplifying the viz interface (#2005) 2017-01-24 14:03:17 -08:00
vera-liu
1c338ba742 [WIP] [explorev2] Refactor filter into FieldSet (#1981)
* [explorev2] Refactor filter into FieldSet

* Fixed tests

* Added tests

* Modifications based on comments
2017-01-24 13:32:40 -08:00
Alanna Scott
9cbd667eb7 [explore-v2] Fix edit datasource link for druid datasources (#1982)
* only add imgSrc key if choices contain an imgSrc

* handle table and druid edit links for datasource drop down

* fix linting
2017-01-23 10:08:00 -08:00
Maxime Beauchemin
0807a8d016 [hotfix] load selectors in render 2017-01-19 15:27:01 -08:00
Maxime Beauchemin
a96024d0e7 [explorev2] Fields can validate input and handle errors (#1980)
As a result here, TextField does its own validation and now casts
the values it sends to Int or Float if set to do so.
2017-01-13 16:25:37 -08:00
Maxime Beauchemin
ff4020ea73 [explorev2] using label in 'Visualization Type' Select instead of key (#1927)
* [explorev2] using label in 'Visualization Type' Select

* moved url related logic upstream in the caller
* moved option creation logic from render method to the constructor as
  it only needs to be executed once

* Refactoring out getOptions
2017-01-12 12:32:42 -08:00
Maxime Beauchemin
470a6e9d76 [explorev2] adding support for client side validators on controls (#1920)
* Adding support for client side validators on controls

* Applying validators to more fields

* Addressing comments
2017-01-12 09:21:17 -08:00
Alanna Scott
fc74fbeeaa [explore-v2] make control panel sections and fields more dense (#1954)
* make control panel sections and fields more dense

* remove Panel

* use <Panel> with className prop
2017-01-11 21:57:36 -08:00
vera-liu
49b6b38741 Pass query instead of slice to Action buttons to prevent lagging query (#1948)
* Pass query instead of slice to Action buttons to prevent lagging query

* Delete beforeOpen and put DisplayQueryButton in pure component
2017-01-11 12:29:06 -08:00
vera-liu
94d20168da Change fields for dual_line to match with new SelectField structure (#1932) 2017-01-11 10:07:30 -08:00
Alanna Scott
5d94d7067e [explore-v2] add edit link below datasource select (#1919)
* add edit link below datasource select

* add default prop
2017-01-10 21:13:25 -08:00
Maxime Beauchemin
222671675c [exploreV2] mapStateToProps for fields (#1882)
* Controls support for mapStateToProps

* Binding methods in the constructor

* Adressing comments

* Fixing tests
2017-01-06 12:38:44 -08:00
vera-liu
c3edc6e24b [WIP] Add dual-axis line chart to viz (#1782)
* Add dual-axis line chart to viz
 - Add a new viz using two y axis for multi-chart in nvd3
 - Option to set metric and axis format for two y axis

* Resolve conflicts

* Fixed x axis and resized thumbnail

* Added example to __init__.py

* Change get_df to match with format
2017-01-06 10:30:27 -08:00
Maxime Beauchemin
c14c7edc5e [explore] show the broken query when failing (#1871)
* Return query when failing

* Linting

* sjson -> simplejson
2017-01-05 10:00:39 -08:00
Maxime Beauchemin
7aab8b0ae3 Simplifying the Fields (Controls) interface (#1868)
* Simplifying the Field interface / logic

* Moving ControlLabelWithTooltip where it belongs

* Progress

* Rename FieldClass->FieldType
2017-01-04 15:46:52 -08:00
vera-liu
9bc7ad9cd5 Do not use persistState for explorev2 (#1894)
* Do not use persistState for explorev2

* Change enhancerWithPersistState to enhancer and function name to initEnhancer
2017-01-03 20:23:43 -08:00
Maxime Beauchemin
a1e3fc1c23 [explorev2] giving more room for long textboxes (#1881) 2017-01-03 18:06:49 -08:00
Maxime Beauchemin
8924bb79e7 [explorev2] moving the "Time" section up to 2nd section (#1885)
This keeps the same section ordering as in v1.
2017-01-03 14:18:55 -08:00
vera-liu
6732f01cb7 Enable freeform-select with fetched column values for filter values (#1697)
* Enable freeform-select with fetched column values for filter values
 - db migration to add filter_select_enabled
 - add freeform-multi option for Selectfield
 - modify formatFilter() function on query to accomodate filter-select

* Fix js tests

* Fix codeclimate issue

* Changes based on comments

* Add test for filter endpoint

* Extract out renderFilterFormField function from render

* Fix landscape issues
2016-12-16 14:23:48 -08:00
Maxime Beauchemin
007ee88d33 [explorev2] improving the scrolling/scrollbars placement (#1840) 2016-12-16 08:06:40 -08:00
vera-liu
7a5bb94754 Stop ChartContainer from rendering twice on chartStatus change (#1828)
* Stop ChartContainer from rendering twice on chartStatus change

* Make spinner overlay and dim chart while laoding

* Added timeout to make render more stable on resize

* Put viz in state and call resize at browser size change

* add render after height change since resize depends on render called on the same object

* Change name of renderVis to renderVisOnChange

* Only call resize at height change, persist viz in state

* Call resize wihout render at window size change
2016-12-15 14:06:54 -08:00
Maxime Beauchemin
b6cba13293 [explorev2] enabling redux dev tools (#1842) 2016-12-15 08:54:02 -08:00
Maxime Beauchemin
d929bbfe30 [explorev2] making QueryAndSaveBtns disabled while running queries (#1841)
As I altered QueryAndSaveBtns to add the `disabled` prop
I also moved it to using react-boostrap
2016-12-15 08:53:33 -08:00
Maxime Beauchemin
bf67d64708 [explorev2] making Datasource an Viz controls not clearable (#1845)
* [explorev2] making Datasource an Viz controls not clearable

* Making choices default to empty list
2016-12-15 08:53:15 -08:00
Maxime Beauchemin
733ab8014b [explorev2] using a loader to load the explorev2 specific css (#1843) 2016-12-14 18:31:50 -08:00
Maxime Beauchemin
84a3b55912 [explorev2] remove unused file SqlClause.jsx (#1839) 2016-12-14 15:17:45 -08:00
vera-liu
9f7486f402 remove extra call to get_viz in explorev2 (#1812)
* Not working errors

* Remove update_explore endpoint, only update explore endpoints in reducer on query

* Change scroll to auto and make container reponse to height:

* Remove update_explore endpoint

* Remove can_update_explore perm
2016-12-12 10:58:07 -08:00
Daniel Darabos
2993ff1d75 Add NVD3's bullet chart (#1775)
* Add NVD3's bullet chart.

* Add empty lines before nested function definitions.

* Add thumbnail for bullet chart.

* Add bullet chart to gallery.rst.

* Add "requiresTime: false", fix indentation.

* Avoid scaling bullet chart vertically.

* Use a default if no range is specified.

* Fix coloring of bullet chart.
2016-12-12 08:58:13 -08:00
vera-liu
8ef730b5fe Added timer to explore v2 and share it with sqllab (#1802)
* Added timer to explore v2 and share it with sqllab

* Fixed js tests

* Add timer to initial load

* Make timer smaller

* nits
2016-12-09 13:39:53 -08:00
vera-liu
a95cd71456 Add viz thumbnails to viz_type select (#1794)
* Add viz thumbnails to viz_type select

* Replace alt with value
2016-12-07 15:59:17 -08:00
Maxime Beauchemin
c1558578d7 [explorev2] Breaking down large files, fixing JS warnings (#1773)
* Breaking down large files, fixing JS warnings

* fix unit tests
2016-12-06 14:39:30 -08:00
vera-liu
43f2a379a1 Make cell-click filter in table viz optional (#1762)
* Make cell-click filter in table viz optional
 - Added table_filter checkbox in table viz
 - If set to false, clicking on a cell in table will not apply filter to
   dashboard

* Fix codeclimate issue

* Change default to false
2016-12-05 17:17:31 -08:00
vera-liu
76aa9f7e10 [explorev2] fix textfield and druid bug (#1732)
* Fixed bug with textfield being empty

* Only return time grains for sqla table
2016-12-05 09:51:59 -08:00
Maxime Beauchemin
95580a004f [explorev2] cosmetic, smaller size for input text (#1746) 2016-12-02 10:44:16 -08:00
vera-liu
2d0ebeae1b [explorev2] Make chart container more responsive (#1724)
* Make chart container more responsive
 **Leave chart empty when theres error
 **Make all boolean fields auto-query chart when changed

* Replace forEach with some

* Added fields to autoQueryFields
2016-12-01 11:59:44 -08:00
vera-liu
03b21dcf0a [explorev2] Bug fixes in Save Modal (#1707)
* Bug fixes in Save Modal
Issues solved:
 - Save button doesn't pass in gotodash
 - slice_name was passed in from store as original slice_name instead of
   new one in 'saveas' action
 - datasource_type wasn't passed in to defaultViz and defaultForm
   function

* Change css filename to exploreV2

* Moved out utils
2016-11-29 15:03:15 -08:00
vera-liu
7919428a1e Vliu explorev2 bugs (#1701)
* Fixed table_name does not exist in druid

* Make Chart container scrollable for large chart

* Fixed bug of action buttons not clickable in heatmap

* Solve codeclimate issue

* Limit overflow to x
2016-11-29 10:31:11 -08:00
Alanna Scott
56b917a5c2 [explore-v2] fix errors on table view (#1675)
* render table name if in table view

* only render fave star and edit button if slice, not table

* fix error when table view

* use [table-name] - untitled format

* remove extra fave star
2016-11-28 21:04:43 -08:00
Alanna Scott
18c43aaea2 make chart title larger, fix explore actions btn spacing (#1680) 2016-11-28 20:12:44 -08:00
vera-liu
39ce4aa049 Added filter in ControlPanelsContainer for explore V2 (#1647)
* Added filter in ControlPanelsContainer

* Move function for getting url params object to utils

* Fixed python test

* Move Filter to separate component

* Added specs and made changes based on comments

* Moved specs to right folder
2016-11-23 09:51:19 -08:00
vera-liu
b370ef0229 Rerender chart without clicking query button for fields (#1658)
* For some fields we would like to re-render chart once field is
  * changed, saving user the time to click query button
  * Such fields are stored in an array in store, could add more fields in
  * the future
2016-11-22 17:08:52 -08:00
vera-liu
6b80f5bb35 Get sections to render when switching datasource (#1660)
* Get sections to render when switching datasource
 - Move sectionsToRender in store and use is for defaultFormData
 - Change some SelectField to FreeFormSelect according to forms.py

* Solved the css not found problem in staging

* Fixed js tests
2016-11-22 14:55:32 -08:00
vera-liu
bdae570a69 Temperary fix of a slice bug (#1648) 2016-11-22 14:54:49 -08:00
vera-liu
face5245a9 Make explore container resize with browser window (#1608) 2016-11-22 14:36:41 -08:00
Alanna Scott
9b181280d4 include jQuery and bootstrap (#1642) 2016-11-18 16:22:46 -08:00
vera-liu
38e94b9e43 Save modal component for explore v2 (#1612)
* Added specs for SaveModal

* Move datasource_id and datasource_name to form_data

* Add comments

* Deleted redundant fetchDashboard

* Replcae has_key for python3

* More react and less jquery

* Added alert for save slice

* Small changes based on comments

* Use react bootstrap
2016-11-18 14:56:02 -08:00
vera-liu
f64a205603 Use Alert for visualization error (#1639) 2016-11-18 13:38:14 -08:00
vera-liu
a8480f5492 Added Alert for ControlPanel and ChartContainer (#1626)
* Added Alert for ControlPanel and ChartContainer

Done:
 - Add alert for Control Panel when fetch_datasource_metadata failes
 - Add alert for Chart Container when update_explore query fails

* Changed color to warning-yellow

* Solve linter issue

* Fixed indent and delete error_redirect
2016-11-18 11:17:06 -08:00