Commit Graph

2968 Commits

Author SHA1 Message Date
Xiao Hanyu 5305bdb267 Typo fix: dashbaord -> dashboard. (#4383) 2018-02-10 14:52:17 -08:00
Maxime Beauchemin ae7a9dc63d
Fix markup broken since cache related changes (#4396) 2018-02-09 15:55:45 -08:00
Rodolphe Quiédeville f9106f80fd Add PeopleDoc in organizations list who use superset (#4178) 2018-02-09 15:11:29 -08:00
David Dworken 4ff17ffc8d Fix 4 security vulnerabilities (#4390)
* Switched yaml.load to yaml.safe_load to prevent code execution via crafted yaml files

Python's yaml.laod can lead to code execution via crafted yaml files such as:

```
code_exec: !!python/object/apply:subprocess.check_output ['ls']
```

* Fixed XSS via bleach

It was possible to get an XSS via the markdown library via simply setting a description containing arbitary HTML tags.
It was also possible to create links that went to the `javascript:` link handler (eg `[example](javascript:alert(0)`)
Using bleach to sanitize it solves both of these.

* Added XFO header by default to prevent clickjacking attacks

Note that with this application clickjacking can be relatively severe via the SQLLab functionality
which allows executing arbitary SQL.

* Added justification for dangerouslySetInnerHTML

* Fixed linting errors

* Fixed linting errors
2018-02-09 14:33:29 -08:00
Maxime Beauchemin 1769804ffd
Minor fixes to sunburst (#4349)
* Minor fixes to sunburst

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

* nit
2018-02-09 14:27:22 -08:00
Jay Lindquist 54d387598d Add permission checks to save_or_overwrite_slice (#4346)
* Add permissions checks for save_or_overwrite_slice

* Change is_owner to check_ownership

* Add translation to chart and dashboard error messages

* Appease the python linter by using single quotes
2018-02-08 16:40:46 -08:00
Grace Guo 5ab4915a1f
Remove permission check for frontend logging API (#4388) 2018-02-08 11:50:51 -08:00
Maciej Bryński 387bf766d3 Superset issue #4323 (#4353)
Adding configurable poll interval for Hive Engine
2018-02-07 21:29:31 -08:00
Maxime Beauchemin 0480fa0121
Bump pydruid to 0.4.1 (#4377) 2018-02-07 16:45:44 -08:00
John Bodley 6f1150fef4 [revert] Reverting PR #4062 (#4359) 2018-02-07 15:56:07 -08:00
Maxime Beauchemin 2e172d77cf
Fix caching issues (#4316) 2018-02-07 14:49:19 -08:00
Maxime Beauchemin 8fe1f8fb3f
Set default row_limit to 50k (#4372) 2018-02-07 14:34:14 -08:00
Maxime Beauchemin c4eba9e467
[line] improve feature (#4363)
Require Since and Until parameter as they are needed to time shift
2018-02-07 14:33:04 -08:00
Maxime Beauchemin 90d9616f2b
Remove dangerouslySetInnerHTML in StackTraceMessage component (#4373)
Druid sometimes returns error message that are contained in "<>", as in
`<urlopen error [Errno 61] Connection refused>`. Since Superset's
approach is often to bubble up messages coming from external library,
it's impossible to predict whether it will contain special characters.

There are some cases where our error handling does return some html
(presto?),
but we should manage that upstream. Plus the current setup has security concerns,
so let's move away from that.
2018-02-07 14:32:45 -08:00
Maxime Beauchemin 803738436e
Bump python dependencies (#4341)
* Bump python dependencies

* Fix conflict
2018-02-07 14:32:29 -08:00
Beto Dealmeida f14c1bb593 Add hour grain to Sqlite (#4333) 2018-02-07 14:07:15 -08:00
Maxime Beauchemin 31a0b6e5b0
[druid] fix bug around handling NULLs (#4358)
fillna would miss out on identifying STRING columns for Druid and
replace None in string columns with a numeric `0`. This
mixed type column would confuse
pandas down the line on some operations like `df.pivot_table`.
2018-02-07 08:19:48 -08:00
Xiao Hanyu 27538386bc Add ipdb to dev dependencies. (#4368)
Though flask has a builtin web debugger, ipdb some times still work
better. So I think add ipdb to dev dependencies is a good option for
people who prefer CLI debugging.
2018-02-07 08:19:18 -08:00
Teemu Haapoja 3b35ddf135 convert postgresql date_trunc() to UTC to prevent pandas error (#4319)
* cast postgresql date_trunc() to timestamp without time zone to prevent pandas error

* fix formatting for flake8

* change cast to timezone conversion instead
2018-02-07 08:18:11 -08:00
Xiao Hanyu d5ab6c8d3d Remove useless empty npm-debug.log (#4367)
The log file comes from
a7a6678d5c

Also modify .gitignore to ignore all future npm-debug.log
2018-02-07 08:12:45 -08:00
Raffaele Spangaro a4ecff4e23 New options for european time format in in D3_TIME_FORMAT_OPTIONS (#4364)
* Update installation.rst for Ubuntu 16.04 LTS 

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.

* Add options in D3_TIME_FORMAT_OPTIONS for non-english Time Format.
Added '%d/%m/%Y' and '%d/%m/%Y %H:%M:%S' as valid drop-down option for Axis Format
2018-02-06 16:24:00 -08:00
michellethomas 19a0827d1f Adding dashboard add view (#4344)
* Adding DashboardAddView and setting show_columns on SLiceAddView

* Adding tests for sliceaddview read api

* Dedupe show_columns
2018-02-06 12:38:07 -08:00
timifasubaa 2d8a0cc6c9 fix uri form data' (#4345)
'
2018-02-05 20:49:37 -08:00
Hugh A. Miles II 2789385688 read query params for json in dashboard endpoint (#4337) 2018-02-05 11:48:12 -08:00
Grace Guo e965f95477
1. fix check filters change logic (#4339)
2. should show chart after loading completed
2018-02-05 10:21:17 -08:00
liutgnu ad212272d1 Fix the bug of charts/slices cannot be filtered by datasource name. (#4338) 2018-02-04 23:03:44 -08:00
timifasubaa 6d37d97ba5 Refactor import csv (#4298)
* move helpers to utils

* make form use queryselector

* refactor exception throwing and handling

* update db_connection access point

* nits
2018-02-03 20:22:06 -08:00
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