Commit Graph

84 Commits

Author SHA1 Message Date
Maxime Beauchemin
48821b5101 [sqllab] fix UI shows 'The query returned no results' momentarily (#3214)
this is visible when running async queries between the fetching and
success state as the rows are getting cached in the component
2017-08-01 10:26:13 -07:00
Maxime Beauchemin
b888802e05 [sqllab] improve Hive support (#3187)
* [sqllab] improve Hive support

* Fix "Transport not open" bug
* Getting progress bar to show
* Bump pyhive to 0.4.0
* Getting [Track Job] button to show

* Fix testzz
2017-07-27 14:00:19 -07:00
Maxime Beauchemin
cf1d0f38ad [bugfix] visualize flow error: 'Metric x is not valid' (#3181)
The metric name in the frontend doesn't match the one generated on the
backend. It turns out the explore view will default to the first
metric so specifying one isn't needed.
2017-07-26 09:22:25 -07:00
Maxime Beauchemin
06fcaa3095 Stabilizing Celery / SQL Lab (#2981)
* upgrade celery to 4.0.2
* using Redis for unit tests (sqla broker not supported in Celery 4)
* Setting Celery's soft_time_limit based on `SQLLAB_ASYNC_TIME_LIMIT_SEC` config
* Better error handling in async tasks
* Better statsd logging in async tasks
* show [pending/running] query status in Results tab
* systematically using sqla NullPool on worker (async) to limit number
  of database connections
2017-06-20 13:55:03 -07:00
Grace Guo
591e512327 add test coverage for SqlEditorLeftBar (#2984) 2017-06-19 11:39:32 -07:00
Grace Guo
1dcf2c4326 fix local state 'columns' (#2896)
* fix local state 'columns'
* fix method name per code review
2017-06-15 15:30:13 -07:00
Grace Guo
fb6ef26a24 add test coverage for ResultSet component (#2972)
* add test coverage for ResultSet component
2017-06-15 13:51:09 -07:00
Alanna Scott
677c427b16 delete DataPreviewModal, it doesn't get used anywhere (#2882) 2017-06-01 14:30:15 -07:00
Grace Guo
db052b17ea Add visualize advise for long query (#2879)
in SqlLab view, if query takes over 45 seconds, we will show advise to store a summarized data set before user clicks on Visualize button.
This advise will not block Visualize button.

fixes https://github.com/airbnb/superset/issues/2733
2017-05-31 15:50:26 -07:00
Grace Guo
1e7773eb16 Improve visualize modal test coverage (#2811)
add unit tests for VisualizeModal component
2017-05-30 18:16:22 -07:00
Alanna Scott
0c9f9b695b [clarity/consistency] rename /explorev2/ -> /explore/ (#2802)
* rename /explorev2/ -> /explore/

* add redirect for existing explorev2 urls

* fix long line

* remove extra line

* fix missed ref in spec
2017-05-24 17:12:28 -07:00
Grace Guo
d0a04cde49 apply redux for VisualizeModal (#2795)
* redux visualize modal

* redux visualize modal

- apply redux
- add unit test for connect container component
- fix lint error

* redux visualize modal

- apply redux
- add unit test for connect container component
- fix lint error
2017-05-24 11:58:54 -07:00
Maxime Beauchemin
841e18a08c [sql lab] make database ordering alphabetical in left panel (#2769) 2017-05-17 21:31:16 -07:00
Maxime Beauchemin
dbc7fef7f5 [sql lab] fix user timestamp is off (#2774) 2017-05-17 15:34:19 -07:00
Maxime Beauchemin
ecc00bdd26 [explore] a bit less margin in left panel (#2758)
* [explore] a bit less margin in left panel

* fix tests

* forcing react-select 1.0.0-rc.3
2017-05-16 00:02:37 -07:00
Maxime Beauchemin
f55df3b18b [sql lab] fix responsivity of grid (#2742)
* [sql lab] fix responsivity of grid

* Lint
2017-05-11 08:24:08 -07:00
Maxime Beauchemin
a471afe206 [sql lab] improvements to the left panel (#2709)
* [sql lab] improvements to the left panel

* better error handling with error notifications
* table is added instantly with a loading image

* Fixing tests

* Fixed tests
2017-05-09 13:36:10 -07:00
graceguo-supercat
fffb7b500a [sql lab]Add autoSelect (#2713)
In sql editor database dropdown list, we want to auto-select the first available option.
2017-05-05 11:00:06 -07:00
Alanna Scott
2d5beb1f91 improve csrf expiration error handling (#2695)
* add message

* re run query on result set mount if there is session time out error
2017-05-01 08:59:44 -07:00
Maxime Beauchemin
ac3aba7c7d [sql lab] visualization flow: fixing the groupby parameter (#2681) 2017-04-30 11:04:29 -07:00
graceguo-supercat
c589616883 [sql lab] Update event handler name (#2680)
Update SqlEditor database change event handler name to be more specific.
2017-04-28 11:42:48 -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
Alanna Scott
dc364daffd [query-search] fix scrolling on query search and pagination styling (#2646)
* fix scrolling for query search, getHeight was returning NAN

* add styling for query search pagination

* remove console.log

* make pagination buttons match bootstrap theme small buttons
2017-04-19 21:02:53 -07:00
Alanna Scott
899caf9449 [sql-lab] fix scrolling in left hand panel for table meta data (#2641)
* fix scrolling in left hand panel for table meta data

* add height prop

* this prop is not used
2017-04-18 23:24:04 -07:00
Alanna Scott
db6cd21504 [sqllab] table refactor (#2587)
* make react-virtualized table work
use dynamic sizing for cell width
enable filtering
require height prop for result set component

* fix tests and linting

* move some state to props

* move getTextWidth to visUtils

* make striped rows optional

* fix striped proptype

* update name to FilterableTable

* add basic test and fix linting

* accept array of columns keys rather than an array of objects that needs to be mapped

* move container div inside the component

* rename styles

* fit table component to width if it's smaller than parent container

* move stylesheet to javascript folder otherwise it throws an error on npm run prod

* move css to index.jsx

* fix result set spec

* fix linting and test

* fix result set props

* keep list immutable
2017-04-18 14:29:38 -07:00
Maxime Beauchemin
6c68a21e4f [sql lab] fix alt-enter runs out-of-date SQL (#2603) 2017-04-13 15:47:20 -07:00
Maxime Beauchemin
2df6baa7a7 [sql lab] sorting database names in dropdowns (#2611) 2017-04-13 15:23:22 -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
ddeabdd048 Fixing CSRF issues (#2569)
* 0.17.4

* Fixing CSRF issues

Since turning CSRF across the site with Flask-WTF, a few POST request
have been failing. This PR addresses these issues.
2017-04-07 10:57:31 -07:00
Maxime Beauchemin
10773f96a7 URL Params macro (#2537) 2017-04-05 10:45:32 -07:00
Maxime Beauchemin
122891c29b [sql lab] allow users to save their queries (#2528)
* Allow users to save their queries

Fixing tests .

* Adding placeholder for Query Description

* initJQueryCSRF -> initJQueryAjaxCSRF
2017-04-04 20:15:19 -07:00
Alanna Scott
d93b1fc686 [sql-lab] make query history scrollable (#2499)
* make query history scrollable

* not around results
2017-04-04 15:46:11 -07:00
Maxime Beauchemin
6566377740 [sql lab] fix table dropdown with large schema make UI unresponsive (#2547)
Indexing was done on render, moving to doing it only when the data
changes.
2017-04-04 12:19:44 -07:00
Alanna Scott
dcc6f2a18f serve roboto font locally (#2519)
* serve roboto locally

* add trailing comma

* fix long line for linter
2017-04-03 13:05:13 -07:00
Maxime Beauchemin
513a090cdc [sql lab] address lingering spinner in schema select (#2512) 2017-03-31 08:27:48 -07:00
Maxime Beauchemin
66cc546a30 [hotfix] fixing the (one js lint err in the) build 2017-03-31 07:52:26 -07:00
Maxime Beauchemin
6f68ddb505 Adding to polling states 2017-03-29 19:13:37 +00:00
Maxime Beauchemin
5c441f4ddb [hotfix] queries trigger polling (#2517) 2017-03-29 11:58:08 -07:00
Alanna Scott
dd7b4b8310 Revert "[sql-lab] revert react-virtualized-select (#2489)" (#2491)
This reverts commit 7eafbabe65.
2017-03-27 14:52:10 -07:00
Alanna Scott
93551a65b8 only fetch tables if we have a schema, otherwise reset options. (#2490) 2017-03-27 14:38:12 -07:00
Alanna Scott
7eafbabe65 [sql-lab] revert react-virtualized-select (#2489)
* revert react-virtualized-select

* add space between selects

* Label is not needed
2017-03-27 13:50:10 -07:00
Alanna Scott
43dd948476 [sql-lab] performance updates - make ui more responsive (#2469)
* remove network status feature

* only fetch queries if there are started or running queries

* don't use local storage

* remove last network status from actions

* don't remove support for local storage

* address pr comments and linting

* use .some rather than .forEach
2017-03-27 12:46:36 -07:00
Maxime Beauchemin
75e7f2d22c [hotfix] bumping QUERY_UPDATE_FREQ from 1000 to 2000ms 2017-03-27 11:09:31 -07:00
Alanna Scott
22522fc05f [sql-lab] improve table select performance (#2457)
* use fast filter for tables select

* react-virtualized needs this package, throws error otherwise...

* continue to use async select and this.getTableNamesBySubStr when a schema is not selected

* import styles in same place as react-select css import
2017-03-23 14:25:13 -07:00
Alanna Scott
652e572b56 [sql-lab] make results table scroll in static container (#2426)
* only scroll result set horizontally

* only scroll results table, keep rest of ui static

* use hard coded values

* fix linting
2017-03-21 18:30:53 -07:00
Bogdan
6160a3fdff Implement stop query functionality. (#2387)
* Implement stop query functionality.

* Address comments
2017-03-13 13:54:38 -07:00
Maxime Beauchemin
492df94b2a [sqllab] reserved words should be upper case (#2316) 2017-03-03 14:55:58 -08:00
Bogdan
cad392eb76 Fetch schemas separately. (#2227) 2017-02-23 14:02:40 -08:00
vera-liu
aff524d843 **Allow user to put dbname in url (#2209)
**Parse dbid from url to integer
2017-02-22 14:48:14 -08:00
vera-liu
527a8af060 Return original state for query if query was stopped (#2164) 2017-02-14 10:28:25 -08:00