Commit Graph

83 Commits

Author SHA1 Message Date
Maxime Beauchemin
3e7b5df287 [explore] fix empty chart when changing viz type (#2698)
* [explore] fix empty chart when changing viz type

* Lint
2017-04-30 10:58:45 -07:00
Denny Biasiolli
dee36491c5 Fix js warnings (#2693)
* react: using prop-types package to fix deprecated React.PropTypes property warning

https://facebook.github.io/react/warnings/dont-call-proptypes.html

* removing babel devDependency because has been deprecated in favor of babel-cli

this fixes a warning during `npm install`:
```
npm WARN deprecated babel@6.23.0:
In 6.x, the babel package has been deprecated in favor of babel-cli.
Check https://opencollective.com/babel to support the Babel maintainers
```

* js: setting ExploreActionButtons.queryEndpoint PropType as required

because it's required in the child component DisplayQueryButton

* js(tests): using object in expandedSlices prop type of SliceCell tests

* js(tests): adding required props to SqlEditor mockedProps

* js(tests): adding required prop editorHeight to TabbedSqlEditors mockedProps

* js: removing unused moments dependency
2017-04-28 17:56:29 -07:00
Alanna Scott
0bdc3010d8 [vis] fix pivot table scrolling when using more than 1 groupy col (#2674)
* fix scrolling when more than 1 groupby

* generalize function arguments

* fix pivot table scrolling in js

* add padding rules back

* linting
2017-04-25 16:14:59 -07:00
Maxime Beauchemin
e055e6d2c2 Fixing PropTypes warning messages (#2670)
* Fixing PropTypes warning message

React recently started warning on the upcoming deprecation of
React.PropTypes, the new approach is to use the `prop-types`
npm package instead.

* Fixing the tests
2017-04-24 17:39:57 -07:00
Maxime Beauchemin
29780821e8 [druid] fixing the having clause in the explore view (#2648)
* [druid] fixing the having clause in the explore view

* Backend

* Lint

* Fixing tests
2017-04-24 16:31:16 -07:00
Maxime Beauchemin
cdfc4a35b2 Optimizing the standalone view (#2663)
The standalone view doesn't need to fetch the datasources asynchronously
to fill in the dataources dropdown, it also doesn't need to render any
of the controls.
2017-04-23 22:13:23 -07:00
Maxime Beauchemin
cb3384b3b2 Improving Presto error message in explore/dashboard (#2633)
* Improving Presto error message in explore/dashboard

* lint
2017-04-18 12:30:17 -07:00
Maxime Beauchemin
787daf6005 A nice CacheLabel React component (#2628)
Introducing a nice component as a label that show when data was
loaded from cache, when the cache was taken (in humanize duration as in
`a few minutes ago`) in a tooltip, and it can act as a button that
can trigger a force-refresh.

While working on it, it became clear that it was going to be hard to
use this component in the Dashboard view since it's not pure React.
I'm planning on refactoring the dashboard view with proper React/Redux
and introducing the CachedLabel component at that point.

While digging around in the Dashboard view I realized that there was a
bunch on unused code around managing timers that was used in explorev1
and decided to rip it out.
2017-04-17 09:06:56 -07:00
Maxime Beauchemin
c43a9fd554 [hotfix] fixing the build 2017-04-13 15:58:04 -07:00
Maxime Beauchemin
db02b33e09 [explore] fix query text modal while loading (#2596)
* [explore] fix and clean

Currently it's not possible to view queries while they are running, the
spinner appears endlessly. I decided to rearrange things a bit while
debugging so I could see clearly through it.

* Adding NotImplemented methods to base classes

* Fixing

* Piling up
2017-04-13 15:46:57 -07:00
Maxime Beauchemin
366ecefbaa Bumping the JS libs to fix the build (#2616)
* bumping the js libs

* New linting rules

* More linting

* More

* Done linting

* npm >=4.5.0

* Bumping node

* Tweaking the build

* Fixing the damn build

* Fixing the apps
2017-04-13 15:04:09 -07:00
Maxime Beauchemin
116dca3e6f validationErrors is undedfined 2017-04-13 01:08:37 +00:00
Maxime Beauchemin
75a358c616 [explore] force control validation before runQuery (#2544)
* [explore] force control validation before runQuery

* Addressing comments
2017-04-10 21:45:44 -07:00
Alanna Scott
1fb21b8b45 [revert] reverting big num changes (#2567)
* Revert "[big num] make sure scatterplot dots align properly (#2559)"

This reverts commit f24ddfd467.

* Revert "Revert "measure x axis labels too and use the longest to determine margins" (#2550)"

This reverts commit fe68bc31c3.

* Revert "[bug num vis] fix sizing for single digits (#2548)"

This reverts commit 3d2c791ff1.

* revert all big num changes.

* fix linting

* make document global, fix linting
2017-04-06 13:15:42 -07:00
Maxime Beauchemin
9c99be510b [hotfix] iframe viz is broken 2017-04-06 09:11:54 -07:00
Alanna Scott
c1d9918abe [vis] bug num improvements (#2523)
* fix js error, make should render viz more readable, add tooltips, style axis and add min/max to xaxis

* put getTextWidth in utils

* add document to eslint globals config
2017-04-04 20:05:36 -07:00
Maxime Beauchemin
d3b50cb92e [explore] remove grey background in standalone mode (#2503)
* [explore] remove grey background in standalone mode

* Going with background-transparent
2017-03-28 17:11:50 -07:00
Maxime Beauchemin
e14b74fdbf [explore] fixing bugs in controls (#2496) 2017-03-28 08:45:19 -07:00
Maxime Beauchemin
8042ac876e [explore] improved filters (#2330)
* Support more filter operators

* more filter operators [>, <, >=, <=, ==, !=, LIKE]
* Fix need to escape/double `%` in LIKE clauses
* spinner while loading values when changing column
* datasource config elements to allow to applying predicates when
  fetching filter values
* refactor

* Removing doubling parens

* rebasing

* Merging migrations
2017-03-20 21:10:59 -07:00
vera-liu
696678c981 Replace query once query response returned (#2415)
* Replace query once query response returned

* Fix bug with refresh druid datasources
2017-03-15 17:56:37 -07:00
vera-liu
c02a7fe763 Add more tests to Save Modal specs (#2313) 2017-03-14 11:31:33 -07:00
Bogdan
705d09d3d0 Remove duplicate (#2351) 2017-03-06 16:54:13 -08:00
Maxime Beauchemin
ad4a950b56 Fixes filters emitted from table viz (#2335) 2017-03-06 15:14:08 -08:00
Maxime Beauchemin
af3415b040 [filter_box] option to delay filtering with apply button (#2338)
* [filter_box] delayed filtering with apply button

* Remove lingering console.log statement
2017-03-06 13:31:00 -08:00
vera-liu
efff1ac4a1 Temp hack to make druid filters work in dashboard (#2300) 2017-02-28 16:54:42 -08:00
vera-liu
fc64a75fbd v0.17.0 (#2298) 2017-02-28 14:34:09 -08:00
vera-liu
4d349c7885 [hotfix] Fix filter for sqlalchemy and druid (#2293)
* [table viz] allow showing time granularity in table (#2284)

The time granularity currently does not show up in table viz. Now
defining a granularity will add an extra ISO-formatted time column in
the table. The column will be added for both grouped by and not grouped
by.

* Changes based on comments
2017-02-28 09:22:51 -08:00
vera-liu
675b819e0a Revert "[hotfix] Fix druid filters" (#2292) 2017-02-27 20:46:12 -08:00
vera-liu
09f1083c50 [table viz] allow showing time granularity in table (#2284) (#2291)
The time granularity currently does not show up in table viz. Now
defining a granularity will add an extra ISO-formatted time column in
the table. The column will be added for both grouped by and not grouped
by.
2017-02-27 20:33:21 -08:00
vera-liu
227c66c2c5 [hotfix] add regex for druid filters (#2288) 2017-02-27 11:12:47 -08:00
vera-liu
87582962d9 [Hotfix] access slice_id when slice exists (#2268) 2017-02-24 18:10:41 -08:00
vera-liu
4d900c9ee1 Do not add slice_name when slice doesn't exist (#2265) 2017-02-24 17:20:35 -08:00
vera-liu
34f68073a2 Default action to overwrite for users with overwrite permissions (#2257) 2017-02-24 13:34:39 -08:00
Maxime Beauchemin
1e47d6fb41 Renaming field to control (#2210) 2017-02-22 08:36:47 -08:00
Maxime Beauchemin
d5ba88b407 Fixing the CACHING (#2203)
Caching wasn't working after deprecate_v1, this addresses it. Also surfacing
whether the data is served from cache in explore view and a way to force
run the query bypassing the cache.
2017-02-22 08:31:31 -08:00
Maxime Beauchemin
ec84aa7577 Fixing typo 2017-02-21 08:44:55 -08:00
Maxime Beauchemin
8b4d72cf32 Reverting react-select to rc2 2017-02-21 08:43:39 -08:00
Maxime Beauchemin
0cc8eff1c3 [WiP] Deprecate Explore v1 (#2064)
* Simplifying the viz interface (#2005)

* Working on dashes

* Making this a collaborative branch

* Fixing some bugs

* Fixing bugs

* More improvements

* Add datasource back in bootstrap data

* Decent state

* Linting

* Moving forward

* Some more linting

* Fix the timer

* Triggering events through state

* Lingint

* Put filters in an array instead of flt strings (#2090)

* Put filters in an array instead of flt strings

* Remove query_filter(), put opChoices into Filter

* Update version_info.json

* Fix migrations

* More renderTrigger=true

* Fixing bugs

* Working on standalone

* getting standalone to work

* Fixed forcedHeight for standalone =view

* Linting

* Get save slice working in v2 (#2106)

* Filter bugfix

* Fixing empty series limit bug

* Fixed dashboard view

* Fixing short urls

* Only allow owners to overwrite slice (#2142)

* Raise exception when date range is wrong

* Only allow owner to overwrite a slice

* Fix tests for deprecate v1 (#2140)

* Fixed tests for control panels container and filters

* Fixed python tests for explorev2

* Fix linting errors

* Add in stop button during slice querying/rendering (#2121)

* Add in stop button during slice querying/rendering

* Abort ajax request on stop

* Adding missing legacy module

* Removing select2.sortable.js because of license

* Allow query to display while slice is loading (#2100)

* Allow query to display while slice is loading

* Put latestQueryFormData in store

* Reorganized query function, got rid of tu[le return values

* Merging migrations

* Wrapping up shortner migration

* Fixing tests

* Add folder creation to syncBackend

* Fixing edit URL in explore view

* Fix look of Stop button

* Adding syntax highlighting to query modal

* Fix cast_form_data and flase checkbox on dash

* Bugfix

* Going deeper

* Fix filtering

* Deleing invalid filters when changing datasource

* Minor adjustments

* Fixing calendar heatmap examples

* Moving edit datasource button to header's right side

* Fixing mapbox example

* Show stack trace when clicking alert

* Adding npm sync-backend command to build instruction

* Bumping up JS dependencies

* rm dep on select2

* Fix py3 urlparse

* rm superset-select2.js

* Improving migration scripts

* Bugfixes on staging

* Fixing Markup viz
2017-02-16 17:28:35 -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
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
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