Commit Graph

2846 Commits

Author SHA1 Message Date
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
Benedict Jin aecaa85905 Hanization (#4126)
* Hanization

* Hanization step two

* 1. Update mo & json file; 2. Remove necessary msgid & msgstr; 3. Fix error python-format; 4. Other improvements

* Hanization step three

* Hanization step four (49%)

* Translate chart options

* Translate Search

* Translate view results Data preview new table name 10 seconds 30 seconds 1 minute 5 minutes

* Hanization & update mo/json files

* Update filter translation

* Hanization step 5th (60%)

* Hanization step 6th (70%)

* Hanization step 7th (80%)

* Hanization step 8th (83%)
2018-01-12 08:11:37 -08:00
bolkedebruin 7e36488f03 Superset was using undefined metrics for specifying limits (#4114)
in case a form did not specify a metric (e.g. mapbox). If it is
not available it now defaults to the first dimension instead.

This fixes issue #3604
2018-01-11 21:45:34 -08:00
Maxime Beauchemin 87c3e831a8
Using user-defined Javascript to customize geospatial visualization (#4173)
* Using JS to customize spatial viz and tooltips

* Add missing deck_multi.png

* Improve GeoJSON layer with JS support and extra controls

* Addressing comments
2018-01-11 15:42:44 -08:00
Maxime Beauchemin ee63ebc8ec
[datasource editor] click checkbox creates metrics instantly (#4183)
* [datasource editor] click checkbox creates metrics instantly

* Fix tests
2018-01-11 15:42:19 -08:00
Maxime Beauchemin 5916291901
[explore] fix json highlighting for Druid queries (#4201) 2018-01-11 15:41:28 -08:00
Maxime Beauchemin 4b0f252170
Sort out dependencies in travis/tox (#4186)
* Make travis a bit more lean

* Bump npm to 5.6.0
2018-01-10 21:46:10 -08:00
Beto Dealmeida 9176a4072b Enable SQL syntax highlighting in View Query (#4184)
* Enable SQL syntax highlighting in View Query

* Enable SQL syntax highlighting in View Query
2018-01-10 20:49:28 -08:00
John Bodley 0cb7c5e4a6 [annotations] Fixing migration for annotation layers (#4187) 2018-01-10 08:50:05 -08:00
Yongjie Zhao e182f7f962 fix since or until is empty value #4170 (#4176) 2018-01-09 16:54:18 -08:00
fabianmenges 23c98294bd Moving the custom_password_store out of Database class (#4182) 2018-01-09 13:14:20 -08:00
John Bodley 22bdd9e324 [security] Adding all derived FAB UserModelView views to admin only (#4180) 2018-01-09 13:05:37 -08:00
Maxime Beauchemin b159e51787
Don't use fully qualified column names in metric definitions (#4101)
When generating an auto SUM() metric on a column, Superset currently
will go `SUM(table_name.column_name)`. This is an issue when moving to
point to another table. It's common to work on some temporary table or
work table and eventually need to point Superset to an alternate table.
2018-01-08 22:03:37 -08:00
John Bodley d57012067b [FAB] configuring updating of permissions (#4172) 2018-01-08 14:39:18 -08:00
timifasubaa 9364fb5b79 Allow alpha role import csv (#4164)
* allow alphas upload csv

* nits
2018-01-08 13:36:30 -08:00
Maxime Beauchemin c49fb0aa9b
Make Welcome page into a simple React app (#4147)
* Make Welcome page into a simple React app

This removes a dependency on datatables, we should be able to get rid
of it as we re-write the Table and PivotTable viz

* tests/lint

* Bump node version to latest
2018-01-07 22:13:06 -08:00
Grace Guo b9af019567
Fix chart rendering error in time series table (#4156) 2018-01-06 16:49:59 -08:00
Grace Guo e7f8143c3b
[Bug] Closing change datasource modal throws JS error (#4157) 2018-01-05 14:21:52 -08:00
Alexander Tronchin-James c9e47f0bb3 Check for non-None database before using. (#4162)
Some valid sqlalchemy uri's return a URL object with database=None, which causes the following error:
```
2018-01-05 17:59:47,560:ERROR:root:argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/opt/incubator-superset/superset/sql_lab.py", line 186, in execute_sql
    user_name=user_name,
  File "/opt/incubator-superset/superset/utils.py", line 124, in __call__
    return self.func(*args, **kwargs)
  File "/opt/incubator-superset/superset/models/core.py", line 644, in get_sqla_engine
    url = self.db_engine_spec.adjust_database_uri(url, schema)
  File "/opt/incubator-superset/superset/db_engine_specs.py", line 505, in adjust_database_uri
    if '/' in database:
TypeError: argument of type 'NoneType' is not iterable
```
This patch corrects that problem.
2018-01-05 13:54:17 -08:00
Beto Dealmeida 686023c8dd Druid support via SQLAlchemy (#4163)
* Use druiddb

* Remove auto formatting

* Show prequeries

* Fix subtle bug with lists

* Move arguments to query object

* Fix druid run_query
2018-01-05 13:52:58 -08:00
Benedict Jin d997a450cf Fix invaild gitter url (#4125) 2018-01-04 14:45:58 -08:00
zhao yongjie 9e053923d4 Adding Apache Kylin datasource for documentation (#4148) 2018-01-03 20:24:15 -08:00
Leonardo Rochael Almeida ef06a9d497 Create DATA_DIR after importing config (#4143)
Delay creating DATA_DIR until config is fully imported.

This allows superset_config.py to override DATA_DIR before superset
attempts to create it in a potentially unwriteable location.
2018-01-03 09:54:59 -08:00
Maxime Beauchemin 37205099db
Fix USA's state geojson for 'Country Map' visualization (#4121)
* Fix USA's state geojson for 'Country Map' visualization

Turns out the ISO codes were missing from the geojson file, this adds it
and uses human-readable indents.

* using proper ISO codes

* Linting

New linting rules started applying, I'm guessing a new version of
pylint?
2018-01-02 20:21:33 -08:00
timifasubaa e498f2fcb6 fix variable name (#4139) 2018-01-02 14:32:24 -08:00
Jeff Niu f7c55270db Remedy for dual axis annotation (#4130) 2018-01-02 14:31:16 -08:00
Maxime Beauchemin 0a6208296e
[explore] add datasource metadata (#4104) 2018-01-02 08:41:27 -08:00
Hugh A. Miles II bf4d3a0dff better thumbnail for deck_geojson (#4135) 2017-12-28 13:38:07 -08:00
Hugh A. Miles II b227612f6e Added guard statement for spatial controls (#4124) 2017-12-26 12:27:27 -08:00
Maxime Beauchemin 45686a1af6
Multi layers DECK.GL visualization (#4096)
* Multi layers DECK.GL viz

* Fix tests

* rebasing

* Fix error handling in chartActions

* Addressing comments
2017-12-26 10:47:29 -08:00
Benedict Jin 82ed4878c4 Fix rst grammar problems (#4116) 2017-12-25 23:39:28 -08:00
James Pesculis 6e1ec8347d Update UserInfo.jsx and set additional properties for react-gravatar (#4118) 2017-12-25 23:29:27 -08:00
Hugh A. Miles II f905726c24 [geo] Added DeckGL GeoJson layer (#4097)
* added deckgl geojson layer

* linting

* fixed comments

* addressed comments

* added override with controls.color_picker > 0

* set var properly

* set colors if property doesnt exist at all

* refacator on property mapping
2017-12-22 14:40:08 -08:00
Maxime Beauchemin 69195f8d2d
Introduce Javascript controls (#4076)
* Introduce Javascript controls

This allows power-users to perform intricate transformations on data and
objects using javascript code.

The operations allowed are "sanboxed" or limited using node's vm
`runInNewContext`
https://nodejs.org/api/vm.html#vm_vm_runinnewcontext_code_sandbox_options

For now I'm only enabling in the line chart visualization, but the plan
would be to go towards offering more power to people who can write some
JS moving forward.

* Not applied
2017-12-20 21:24:35 -08:00
Nicolas Bonnotte b4909f2d03 [Bugfix] Issues with merge_extra_filters (#4042) (#4091) 2017-12-20 16:22:43 -08:00
Maxime Beauchemin 44e753d94d
[sql lab] deeper support for templating (#3996)
* [sql lab] deeper support for templating

* Fixing py tests

* Fix typo
2017-12-19 15:55:58 -08:00
Maxime Beauchemin e4903e6dc6
[geo] add support for deck.gl's path layer (#4067)
* [geo] add support for deck.gl's path layer

Works with json and polyline data.

* Lint
2017-12-19 12:38:03 -08:00
Maxime Beauchemin d4e8d57fc4
Using TextAreaControl for WHERE and HAVING clause section (#4090) 2017-12-19 12:11:35 -08:00
kuriancheeramelil 281ae45495 Fix for SQL editor throwing can't deserialize google.cloud.bigquery._helpers.Row with BigQuery (#4071)
* fix for SQL editor throwing cant deserialize google.cloud.bigquery._helpers.Row with BigQuery

* linted code

* disable pylint import error of bigquery row

* fixed spacing issue before inline-comment
2017-12-18 21:22:34 -08:00
fabianmenges ff4f9b4527 Bugfix: Druid having filters are broken (#4089) 2017-12-18 17:06:12 -08:00
fabianmenges 86f9087ea2 Event annotation should have min width (#4083) 2017-12-18 15:37:05 -08:00
Maxime Beauchemin 7cd9b85831 [bugfix] iframe and markup are broken (#4082)
fixes https://github.com/apache/incubator-superset/issues/4080
2017-12-18 14:42:18 -08:00
fabianmenges 71e1eea9f4 DB migration of annotation_layers on slice objects and slimming down annotation object. (#4072) 2017-12-18 13:11:06 -08:00
Jeff Niu 1e79e9cd2a [Bugfix] Issues with table filtering (#4073)
* Fixing some issues with table filtering

* Added some comments
2017-12-17 15:43:34 -08:00
Jeff Niu af7cdeba4d [Feature] enhanced memoized on get_sqla_engine and other functions (#3530)
* added watch to memoized

* added unit tests for memoized

* code style changes
2017-12-17 10:35:00 -08:00
fabianmenges 500e6256c0 Full Annotation Framework (#3518)
* Adding full Annotation Framework

* Viz types

* Re organizing native annotations

* liniting

* Bug fix

* Handle no data

* Cleanup

* Refactor slice form_data to data
2017-12-16 16:10:45 -08:00