Commit Graph

2791 Commits

Author SHA1 Message Date
Jeff Niu fdd42ef4b6 [New Viz] Nightingale Rose Chart (#3676)
* Nightingale Rose Chart

* Review comments
2018-02-03 20:18:24 -08:00
Maxime Beauchemin a616bf4082
[cli] permission cleanup on 'superset init' (#4241)
* [cli] permission cleanup on 'superset init'

FAB sometimes creates NULL/None permissions in the database,
presumably a race condition when multiple gunicorn workers start at the
same time, and those create issues raising "AttributeError: 'NoneType'
object has no attribute 'name'"

* Linting
2018-02-03 20:12:45 -08:00
fabianmenges a9e1e685ba [BugFix]: Creating a PostgresBaseEngineSpec so changes to the Postgre… (#4224)
* [BugFix]: Creating a PostgresBaseEngineSpec so changes to the PostgresEngineSpec don't affect every subclass

* Empty engine for abstract Engine
2018-02-03 20:03:02 -08:00
Maxime Beauchemin d41418eaa0
Bump pyrdruid to 0.4.0 (#4325) 2018-02-03 19:48:38 -08:00
Maxime Beauchemin 1f8fccc0f9 [explore] fix missing CacheLabel (#4326)
Also adding a basic unit test.
2018-02-02 10:28:38 -08:00
Raffaele Spangaro 75a2b4f610 Update installation.rst for Ubuntu 16.04 LTS (#4321)
Ubuntu 16.04 by default install python2.7 alongside with python 3.5 and set python2.7 as default. If you have created a virtualenv with python3.5 compilation fails due to wrong python-dev library installed. 

If you install ``python3.5-dev`` the build for the wheel package of  ``cryptography`` run fine.
2018-01-31 18:03:16 -08:00
Grace Guo 133f98ad58 [Bug] Resize should trigger chart re-render (#4322) 2018-01-31 18:02:16 -08:00
Grace Guo 1a7ef4758b
[Explore] Fix Stop Query Button behavior (#4301) 2018-01-31 09:34:08 -08:00
Beto Dealmeida c77bab8160 Refactoring deckgl (#4293)
* Refactoring dekgl

* Refactor layers

* Standardize function name

* Fix exports

* Fix require

* Fix lint
2018-01-30 23:03:35 -08:00
Grace Guo 724c3f48a4
add frontend logging utility function (#4226)
add loading log for dash and exploreview
breakdown whole page load action to multiple charts loading events and render events
2018-01-30 10:27:13 -08:00
Hugh A. Miles II 073d56cb33 Added Path, Polygon, and Arcs to deckGL example dashboard (#4242)
* Added Path, Polygon, and Arcs to deckGL example dashboard

* reorder task

* formatting...

* fix flights reference

* cleanup on aisle 9
2018-01-29 11:51:36 -08:00
Maxime Beauchemin e4a95f9428
Use the query_obj as the basis for the cache key (#4260)
* Use the query_obj as the basis for the cache key

When we recently moved from hashing form_data to define the cache_key
towards using the rendered query instead,
it made is such that non deterministic form
control values like relative times specified in "from" and "until" time
bound resulted in making those miss cache 100% of the time.

Here we move away from using the rendered query and using the query_obj
instead.

* Deprecating using form_data in templates
2018-01-28 09:46:13 -08:00
Riccardo Magliocchetti 1b06140bde Bump sqlalchemy to 1.2.2 (#4299)
* Bump sqlalchemy to 1.2.2

Fix #4196

* Bump sqlalchemy-utils to 0.32.21
2018-01-28 09:32:41 -08:00
Maxime Beauchemin f8dcbf70c5 Reverts apache/incubator-superset#4244 (#4303) 2018-01-26 18:09:09 -08:00
michellethomas b9299d61ac Fixing json decode error on druiddatasourcemodelview/api/read (#4291) 2018-01-25 17:12:34 -08:00
Hugh A. Miles II 2384ad4eb5 [geo] Add JS controls to remaining layers (#4272)
* Update viz.py

* added JS controls

* add JS to grid layout

* add JS to hexagon layer

* added JS controls to screengrid

* update to js_data_mutator controls

* remove .map()
2018-01-25 14:07:34 -08:00
Maxime Beauchemin 2b66eadee2
Set point size control's default for deck_scatter viz (#4261) 2018-01-24 16:49:37 -08:00
Maxime Beauchemin 94d9337e0b
deck_multi to pass down filters to layers (#4270)
Filters applied to deck_multi will be passed down to layers as.

If the column isn't set as "filterable", the filter is ignored.

Also note that Dashboard configuration in regards to
"filter_immune_slices" and such will be disregarded in this context as
it isn't the dashboard controller passing down the filter and that
context is not easily accessible here.
2018-01-24 16:26:31 -08:00
Maxime Beauchemin a0621e10a8
Handle 'pd.Timestamp' when jsonifying (#4275) 2018-01-24 16:09:22 -08:00
Maxime Beauchemin b72d5b03dc
Prevent FilterBox extra query (#4276)
closes https://github.com/apache/incubator-superset/issues/4249
2018-01-24 16:09:03 -08:00
Maxime Beauchemin 914480ad3c
Fix SUPERSET_WEBSERVER_TIMEOUT in VisualizeModal (#4277)
* Fix SUPERSET_WEBSERVER_TIMEOUT in VisualizeModal

* Fix test

* lint
2018-01-24 16:08:48 -08:00
Maxime Beauchemin ff2f85f39b
[geo] JS function to receive the whole data array instead of individual object (#4262)
Moving from having the user define an interceptor function that operates
on one object at a time.

By passing the entire array, it's possible to do multiple pass where
needed. A common pattern might be to figure out the max value in order
to define a scaler function. That's only possible if dealing with the
whole array.
2018-01-24 13:16:14 -08:00
Maxime Beauchemin 9cf16a4ff2
Fix click on now in DateFilterControl (#4265)
When clicking on `now` or the infinity sign, the popover closes but the
value doesn't show in the label as expected.
2018-01-24 13:15:44 -08:00
Maxime Beauchemin b90c410c01
[explore] fix empty query message in 'View Query' (#4273) 2018-01-24 13:14:38 -08:00
Xiao Hanyu 77d1e5d046 Always use fluid container for navbar. (#4279)
As in https://github.com/apache/incubator-superset/pull/4147 removes the
final non fluid container navbar, I think there's no need to keep this
line of code. Just use navbar with fluid container, always.
2018-01-24 08:55:57 -08:00
Marcus Levine 4bc5fe5495 [BUGFIX]: Check datatype of results before converting to DataFrame (#4108)
* conditional check on datatype of results before converting to df

fix type checking

fix conditional checks

remove trailing whitespace and fix df_data fallback def

actually remove trailing whitespace

generalized type check to check all columns for dict

refactor dict col check

* move df conversion to helper and add unit test

add missing newlines

another missing newline

fix quotes

more quote fixes
2018-01-23 20:58:06 -08:00
timifasubaa 2c72a7ae4f Use json for imports and exports, not pickle (#4243)
* make superset imports and exports use json, not pickle

* fix tests
2018-01-23 20:55:27 -08:00
Maxime Beauchemin 4b11f45f72
Using a NullPool for external connections by default (#4251)
Currently, even though `get_sqla_engine` calls get memoized, engines are
still short lived since they are attached to an models.Database ORM
object. All engines created through this method have the scope of a web
request.

Knowing that the SQLAlchemy objects are short lived means that
a related connection pool would also be short lived and mostly useless.
I think it's pretty rare that connections get reused within the context
of a view or Celery worker task.

We've noticed on Redshift that Superset was leaving many connections
opened (hundreds). This is probably due to a combination of the current
process not garbage collecting connections properly, and perhaps the
absence of connection timeout on the redshift side of things. This
could also be related to the fact that we experience web requests timeouts
(enforced by gunicorn) and that process-killing may not allow SQLAlchemy
to clean up connections as they occur (which this PR may not help
fixing...)

For all these reasons, it seems like the right thing to do to use
NullPool for external connection (but not for our connection to the metadata
db!).

Opening the PR for conversation. Putting this query into our staging
today to run some tests.
2018-01-23 15:13:50 -08:00
Maxime Beauchemin 04ae004f43
Set 'Range Filter' default to false (#4264)
It got set to true mistakenly.
2018-01-23 11:23:41 -08:00
Andres Botero 29ef8c4af8 Fix heatmap tooltip disappears under the slice's header (#4268) 2018-01-23 10:16:14 -08:00
Maxime Beauchemin 718230cdf2
Bump flower==0.9.2 (#4263) 2018-01-23 10:15:10 -08:00
John Bodley 8175e19f72 [cache] Fixing json.dumps for timestamp (#4240) 2018-01-19 12:10:39 -08:00
Grace Guo 7b76356182
[Sql Lab] Fix query results display at the bottom of screen (#4246) 2018-01-19 10:19:54 -08:00
Grace Guo 1c56319be4
[Sql Lab] Fix Autorefresh component pulling not stopped. (#4244) 2018-01-19 08:57:23 -08:00
Maxime Beauchemin 36caca3244
Fix 'argument to reversed() must be a sequence' (#4237)
When passing empty/null location data out of certain rows in the spatial
control, Superset raises an error when trying to reverse the tuple.
2018-01-18 15:22:22 -08:00
Hugh A. Miles II 5079b2aa95 Added DeckGL.Polygon Layer w/ JS controls (#4227)
* Working polygon layer for deckGL

* add js controls

* add thumbnail

* better description

* refactor to leverage line_column controls

* templates: open code and documentation on a new tab (#4217)

As they are external resources.

* Fix tutorial doesn't match the current interface #4138 (#4215)

* [bugfix] markup and iframe viz raise 'Empty query' (#4225)

closes https://github.com/apache/incubator-superset/issues/4222

Related to: https://github.com/apache/incubator-superset/pull/4016

* [bugfix] time_pivot entry got missing in merge conflict (#4221)

PR here https://github.com/apache/incubator-superset/pull/3518 missed a
line of code while merging conflicts with time_pivot viz

* Improve deck.gl GeoJSON visualization (#4220)

* Improve geoJSON

* Addressing comments

* lint

* refactor to leverage line_column controls

* refactor to use DeckPathViz

* oops
2018-01-18 13:28:46 -08:00
Hugh A. Miles II cab8e7d22d remove setting spatial in DeckPathViz class (#4235) 2018-01-18 12:03:46 -08:00
michellethomas 85d137b20a Don't cache if there's no cache key (#4229) 2018-01-18 08:28:26 -08:00
Peter Lubell-Doughtie a942f81dfd add Ona as a user (#4234) 2018-01-18 08:27:56 -08:00
Maxime Beauchemin 01043c9bf4
Improve deck.gl GeoJSON visualization (#4220)
* Improve geoJSON

* Addressing comments

* lint
2018-01-17 14:01:32 -08:00
Maxime Beauchemin a9610e2886
[bugfix] time_pivot entry got missing in merge conflict (#4221)
PR here https://github.com/apache/incubator-superset/pull/3518 missed a
line of code while merging conflicts with time_pivot viz
2018-01-17 13:54:45 -08:00
Maxime Beauchemin 5897d85f7a
[bugfix] markup and iframe viz raise 'Empty query' (#4225)
closes https://github.com/apache/incubator-superset/issues/4222

Related to: https://github.com/apache/incubator-superset/pull/4016
2018-01-17 13:54:10 -08:00
Yongjie Zhao 0367dce38b Fix tutorial doesn't match the current interface #4138 (#4215) 2018-01-16 21:18:00 -08:00
Riccardo Magliocchetti 1ca1395382 templates: open code and documentation on a new tab (#4217)
As they are external resources.
2018-01-16 21:17:27 -08:00
michellethomas 2607e4be4d Adding limit to time_table viz to get druid query to work (#4207) 2018-01-16 10:27:35 -08:00
Maxime Beauchemin 04680e5ff1
[line chart] fix time shift color (#4202) 2018-01-12 15:10:17 -08:00
John Bodley a7a6678d5c [cache] Using the query as the basis of the cache key (#4016) 2018-01-12 12:05:12 -08:00
Maxime Beauchemin 8069d6221d
[druid] fix 2 phases queries that specify 'Sort By' on 'Series limit' (#4203) 2018-01-12 11:29:24 -08:00
Maxime Beauchemin 269f55c29a
[bugfix] dealing with DBAPIs that return unserilizable types (#4200)
Funky datatypes in some databases like BLOBs will have the DBAPI return
python types that can't be serialized to JSON out of the box.

Currently, when this happens SQL Lab fails in a bad way with a gigantic
HTML error message.

This allows specifying a pessimistic JSON serializer handler that will
simply show "Unserializable [type]"
2018-01-12 11:11:31 -08:00
Hugh A. Miles II bca27b436b [Geo] Added DeckGL Arc Layer and Refactor on BaseDeckGL class (#4134)
* Added DeckGL.arc layer

* added color controls

* added stroke_width control

* added process spatial key methods

* change exception to ValueError

* put location into tuple

* reference global spatial keys array

* linting

* refactor on process_spatial_data_obj

* rm whitespace

* refactor arc.get_data

* Revert "refactor arc.get_data"

This reverts commit 8d01b2a22e.

* add spatial controls array

* refactor on spatial keys again :)

* return altered df

* Working refactor with deckGL Arcs

* working arcs refactor :)

* refactored all other deckGL viz types
2018-01-12 11:06:11 -08:00