Commit Graph

4303 Commits

Author SHA1 Message Date
Ville Brofeldt cbac428b28 Bump python requirements file (#7965)
* Bump requirements.txt

* Cap gunicorn to <19.9.0 due to X-Forwarded-Proto regression

* Remove python-dotenv from requirements-dev.txt

* Cap sqlparse due to regression in 0.3.0
2019-08-01 13:41:07 -07:00
Ville Brofeldt 1f121183fb
Use python3 for black to support py>=3.6 (#7964) 2019-08-01 18:06:43 +03:00
Beto Dealmeida a09f258379 Fix createDatasource (#7955) 2019-08-01 11:01:46 +03:00
Beto Dealmeida 10f00cdde3
[fix] Isolate and improve performance on tagging system (#7858)
* Fix tag perf

* Add ASF header

* Make script idempotent

* Add CLI to sync tags

* Add missing file

* Merge heads

* Fix lint

* Remove script
2019-07-31 09:19:39 -07:00
John Bodley 9b7261f101
Update .travis.yml (#7943) 2019-07-30 07:45:25 -07:00
Erik Ritter dcef5a25b1 Bump nvd3 chart plugin (#7932) 2019-07-29 16:56:03 -07:00
Tom Hunter b7b517a102 [fix] bug on FixedOrMetricControl component causing issues with deck.gl polygon height + deck.gl scatter radius controls (#7924)
* [WIP] bug fix for FixedOrMetricControl not rendering

* Updated value preview and type selection

* fix metric control not on setting polygon elevation data

* Updated layout of FoM comp

* linting fixes

* linting fix pt. 2

* linting fix pt. 3

* fix scatter tooltip to work with metric control

* Fixed tests
2019-07-29 16:53:52 -07:00
Grace Guo 06d547fbac
[feature flag] Enforce csrf protection on explore_json endpoint (#7935)
also added a section for featured flags in http://superset.incubator.apache.org/installation.html
2019-07-29 16:22:47 -07:00
Sayed Mohammad Hossein Torabi d37b7cdce8 fixing error related to install codecove in travis (#7940) 2019-07-29 11:18:12 -07:00
John Bodley af462fe79f
[revert] Partial revert of #7888 (#7933) 2019-07-29 09:19:21 -07:00
Daniel Vaz Gaspar 994ac04c1f [cli] New, command line option to create or set a db URI (#7918)
* [cli] New, command line option to create or set a db URI

* [tests] New, get or create db on utils

* [tests] flake8 and black

* [tests] Fix, remove dummy comments

* [cli] dummy commit to re-trigger build

* [cli] dummy commit to re-trigger build
2019-07-27 17:43:39 -07:00
Maxime Beauchemin 5f98d661f8
Fix #7130 - SQL Lab table name autocomplete (#7926) 2019-07-27 17:42:41 -07:00
Daniel Vaz Gaspar 54875756bb [log] Disable Log view when FAB security views are disabled (#7920)
* [log] Disable Log view when FAB security views are disabled

* [tests] New, config flag SUPERSET_LOG_VIEW to have more control

* [tests] Fix, flake8

* [log] Fix, pylint

* [log] Fix, pylint at log module

* [log] Fix, pylint at log module

* [log] Fix, black
2019-07-27 17:42:10 -07:00
Daniel Vaz Gaspar eb891dc5b8 [sqllab] Fix, #7928 query async not working (#7930)
* [sqllab] Fix, #7928 query async not working

* [sqllab] Fix, allow_ctas and allow_multi_schema_metadata_fetch missing

* [sqllab] Fix, removed column selection on database selector

* [sqllab] Fix, removed config
2019-07-27 09:26:03 -07:00
Maxime Beauchemin f1d566a90c
Fixing the build after travis upgraded Ubuntu (#7931)
* Fixing the build after travis upgraded Ubuntu

It seems Travis has been updated/ing its build environment to Ubuntu
16.04 from Ubuntu 14 in the past few days. This broke a bunch of things
on our side.

* postgres -> postgresql

* Fix java

* Try openjdk8

* Fix, license check oracle and python

* Fix, license check oracle and python v2

* Fix, license check oracle and python v3

* Fix, license check oracle and python v4

* dummy commit, just to trigger the build
2019-07-27 08:33:03 -07:00
Grace Guo df9efa8ed9
[dashboard] fix chart showing loading icon when filter updated immuned fields (#7895) 2019-07-25 10:37:44 -07:00
Erik Ritter 51b34e4751 [Profile] Fix 5xx when user not found (#7864) 2019-07-24 09:16:05 -07:00
Ville Brofeldt 72d1011023
[sqllab] Fix limit parsing bug when using limit-offset comma notation (#7912)
* Fix limit parsing bug when using limit-offset comma notation

* Use native sqlparse semantics to find limit

* black
2019-07-24 08:18:39 +03:00
Ville Brofeldt 07a76f83b1
[Bugfix] Remove prequery properties from query_obj (#7896)
* Create query_obj for every filter

* Deprecate is_prequery and prequeries from query_obj

* Fix tests

* Fix typos and remove redundant ; from sql

* Add typing to namedtuples and move all query str logic to one place

* Fix unit test
2019-07-23 22:13:58 +03:00
Maxim Sukharev 2221445f44 Fix incorrect datasource_name in dashboard export (#7892)
The bug was introduced in #7773

It uses filter by `cls.table_name == datasource_name`:
https://github.com/apache/incubator-superset/pull/7773/files#diff-a8dd5ec8d8decda2e3c5571d1ec0cdb6R740

But export puts `slc.datasource.name` into exported json:
https://github.com/apache/incubator-superset/pull/7773/files#diff-ceeb7eee8d573333109e0037299c9711L673

`slc.datasource.name` in case of `SqlaTable` is `"{}.{}".format(self.schema, self.table_name)`
2019-07-22 22:31:47 -07:00
Maxim Sukharev 648f9fa54b Set owner to dashboards and charts on import (#7894)
* Allow to pass user for dashboard import cli

Dashboard import assign current user from flask context during import.
But in case of cli import there is no flask user and imported charts
don't have an owner which prevents ability to edit them.

* Reset ownership on dashboard import

For overriding existing charts it requires `owners` property to be set.

* Add tests for reset ownership

* Use ORM to decode dashboards json

Creating instances using ORM allows to normally work with relations

* Fix test_import_dashboard_1_slice test

Previously tests used side-effect of slices import which kept id from
json on insert into db.
2019-07-22 22:30:28 -07:00
Daniel Vaz Gaspar b65ab51b63 [api] [database] New, migrate to new FAB API side by side (#7665)
* [api] [database] New, migrate to new FAB API side by side

* [database] view and api module reorganization

* [style] Fix, flake8

* [test] [database] Fix, tests for new database view structure

* [style] [database] black

* [database] Fix, missing apache license

* Migrate databaasync api to the new api

* flake8

* More efficient api call

* Revert querySearch to old API, test

* dummy commit

* revert config.py commit

* Remove unused import

* Remove old API view

* Remove new API view

* Add database filter

* Add database filter

* Add database filter

* Remove comments on js

* Fix JS test

* Fix pylint

* QuerySearch new databaseasync API endpoint

* Fix, query search new api endpoint

* Reintroduce old API for smooth side by side migration

* Better naming and use common hooks for view and API

* black it

* Fix, database mixin must come first

* Fix, lint
2019-07-22 21:25:16 -07:00
Grace Guo 9dd6a385e6
[migration] add unique constraint on dashboard_slices table (#7880)
1. remove duplicated entries in many-to-many relation tbl dashboard_slices
2. add unique constraint on tbl
3. update the model to include the uniqueness constraint
2019-07-22 16:48:41 -07:00
Erik Ritter 92eed8a529 Bump nvd3 charts for responsive y axis fix (#7915) 2019-07-22 14:47:47 -07:00
Erik Ritter 7a1dcaae8a [SQL Lab] Fix TableSelector perf for large option sets (#7868) 2019-07-22 14:39:12 -07:00
Arpit ee3430cce5 [Bugfix] Response header and response mismatch on explore result from sqllab (#7907)
* fix(sql-lab explore):   fixed response data and header type to be aligned

* fix(sql-lab explore):   fixed test error caused by incorrect test at master

* fix(sql-lab explore):   reformatted

* fix(sql-lab explore):   removed unused import
2019-07-22 08:47:34 +03:00
Ville Brofeldt 4568b2a532 Add cache_key_wrapper to Jinja template processor (#7816) 2019-07-20 09:12:35 -07:00
Grace Guo f570b459f2
[test] Fix test data remove slice_name (#7898)
* [text] Fix test data remove slice_name

* fix review comment
2019-07-19 15:36:19 -07:00
John Bodley ccedbea506
[fix] Adding space after -- for SQL comments (#7897) 2019-07-18 13:17:26 -07:00
Bruno Santos fce11665f4 Fix missing `gevent` extra dependency in Docker setup (#7744)
* Fix missing `gevent` extra dependency in Docker setup

* Add missing ASF header
2019-07-18 13:13:08 -07:00
John Bodley 2b3e7fe4de
[sqla] Adding check for invalid filter columns (#7888) 2019-07-18 08:51:41 -07:00
Maxim Sukharev 174a48ab55 Sort dashboards exported json (#7883)
It makes easier to review changes in dashboards and use git diff
2019-07-17 22:23:04 -07:00
Maxim Sukharev b512502d72 Remove unnecessary fields from dashboard exported json (#7879)
* Remove unnecessary fields from dashboard exported json

This commit makes export respect export_fields and doesn't export
unnecessary relations (like users with passwords hashes) which are
ignored during the import.

* Allow to import dashboard without position_json

In case charts were added from chart-edit page and wasn't re-ordered on
the dashboard position_json field is empty and import was failing with
error.

* Update export/import tests
2019-07-17 22:22:10 -07:00
TheLastSultan a993da6628 Corrected ISO codes on India Country Map (#7882) 2019-07-17 22:14:56 -07:00
Maxime Beauchemin 32f33f2a4d
[sql lab] improve TableElement controls (#7881)
* [sql lab] improve TableElement controls

Making TableElement (table metadata shown in left panel in SQL Lab) show
controls only on hover, and use caret to expand/collapse

* Lint
2019-07-17 22:14:15 -07:00
Maxime Beauchemin d65b039219
Improve examples & related tests (#7773)
* [WiP] improve load_examples

related to #7472, longer term we will generate the examples by exporting
them into tarball as in #7472. In the meantime, we need this subset of
the features:

* allowing specifying an alternate database connection for examples
* allowing a --only-metadata flag to `load_examples` to load only
  dashboard and chart definitions, no actual data is loaded

* Improve logging

* Rename data->examples

* Load only if not exist

* By default do not load, add a force flag

* fix build

* set published to true
2019-07-16 21:36:56 -07:00
michellethomas 86fdceb236
Avoid removing custom sql adhoc metric when columns change (#7877)
* Avoid removing custom sql adhoc metric when columns change

* Add tests to confirm sql metric does not get removed
2019-07-16 16:23:12 -07:00
Ali Bahjati a36c136f4a Fix docker configurations and docker installation guide. (#7827)
* Add Auto option to point radius to make it work as expected since the example using this didn't work because of this (and also as the tooltip says the auto option should be available)

* Remove trailing space

* Fix docker configurations and docker installation guide.
- Fix installation guide regarding passing enviromental variable to docker-compose.
- Add gevent installation command in Dockerfile. (Didn't add it in requirements because it's not really a requirement for the whole project)
- Add user: root:root to allow superset service to work in development mode. Since access to binded superset directory to local requires root user.
- Also add localhost to postgres and redis services to reduce unintended security risk.

* Fix docker configurations and docker installation guide.
- Fix installation guide regarding passing enviromental variable to docker-compose.
- Add gevent installation command in Dockerfile. (Didn't add it in requirements because it's not really a requirement for the whole project)
- Add user: root:root to allow superset service to work in development mode. Since access to binded superset directory to local requires root user.
- Also add localhost to postgres and redis services to reduce unintended security risk.
2019-07-16 14:00:46 -07:00
Michał Misiewicz 9b8bfbbe7f DruidEngineSpec: set allows_subquery to True (#7863) 2019-07-16 13:59:39 -07:00
Tom Hunter a27b8b7638 fix: add check to re-render only if underlying layers change (#7878) 2019-07-16 09:25:36 -07:00
Rahul Rahul b99a3a193b bug fix for all_database_access() call (#7875) 2019-07-15 21:31:28 -07:00
Daniel Vaz Gaspar 78d46fa18d [docs] Advise about celery 4.3.0 requirement on redis (#7872) 2019-07-15 10:22:20 -07:00
Grace Guo eed99b13a2
[cypress] Disable chromeWebSecurity globally (#7853) 2019-07-14 22:59:59 -07:00
Ville Brofeldt f53acd84a7 Bump pandas to 0.24 (#7852) 2019-07-14 08:38:11 -07:00
Tom Hunter 1197d25c3c [wip] fix: multi deck.gl bug fixes (pt 2) (#7866)
* fix: update polygon example data to work with multi deck.gl 

- both "point_radius_fixed" and "multiplier" attributes were not set during load_examples so these charts were failing when viewing as a multi deck.gl chart

* fix: unify deck.gl getLayers api to fix multi deck.gl tooltips

- various deck.gl layers implemented getLayers slightly differently which caused issues with generating default tooltips when the layers are viewed in a multi deck.gl chart

* fix: cleanup formData variable in scatter chart for consistency

* linting fix + polygon regression fix

* additional linting fixes
2019-07-13 14:25:04 -07:00
John Bodley fc8268b086
Update tox.ini (#7867) 2019-07-12 16:20:01 -07:00
Rob DiCiuccio df051813d5 Adds the ability to replace/extend caching backend (#7856)
* Add ability to override cache backend with custom module

* Tests for setup_cache

* Add custom CACHE_CONFIG documentation

* Fix linter errors and documentation link

* Fix black formatting errors
2019-07-12 14:06:56 -07:00
Tom Hunter 7946165e6e fix: multi deck.gl bug fixes (#7854)
* fix: multi deck.gl viewport frozen

add onViewportChange method to handle changes to the viewport

* fix: add max_radius to deck.gl scatter example

- causes multi deck.gl to fail to render scatter without max_radius attribute
2019-07-12 11:33:15 -07:00
Maxime Beauchemin 87f50ba0d8
Make SHOW_STACKTRACE config apply across the board (#7845) 2019-07-12 08:58:44 -07:00
Daniel Vaz Gaspar 5ebc5a69d9 [celery] Bump celery to 4.3.0 (#7848)
* [celery] Bump celery to 4.3.0

* re-triggering CI

* re-trigger CI

* Bump redis to 3.2.1
2019-07-12 08:41:58 -07:00