Commit Graph

4419 Commits

Author SHA1 Message Date
Grace Guo
b380879c41
[fix] reduce content in sql lab localStorage (#7998) 2019-08-06 21:23:40 -07:00
Maxime Beauchemin
af2b92d147
Fix #7984 (#7985)
See https://github.com/apache/incubator-superset/issues/7984 for more
details
2019-08-06 21:15:47 -07:00
Erik Ritter
e830474e5b Revert "Bump FAB to 2.1.8 (#7986)" (#7996)
This reverts commit 0c817e5fa9.
2019-08-06 16:56:02 -07:00
Erik Ritter
b62c122b4d Revert "[database] Fix, Removes the limit for the page size (#7987)" (#7995)
This reverts commit 8db419fe99.
2019-08-06 16:14:27 -07:00
Erik Ritter
4543898e29 Bump nvd3 charts for tooltip fix (#7994) 2019-08-06 15:23:54 -07:00
John Bodley
c6867d22b9
[init] Setting up cache before registering blueprints (#7992)
* [init] Setting up cache before registering blueprints

* Update __init__.py
2019-08-06 14:45:39 -07:00
Krist Wongsuphasawat
e455f1d86a
Bump @superset-ui versions (#7989)
* starting

* fix: upgrade chart error

* fix: address comments

* fix: package lock

* fix: bump typescript version
2019-08-06 10:41:37 -07:00
Daniel Vaz Gaspar
8db419fe99 [database] Fix, Removes the limit for the page size (#7987)
Old FAB API had no limits by default, this will keep this behaviour
but only for this endpoint
2019-08-05 22:52:43 -07:00
Daniel Vaz Gaspar
0c817e5fa9 Bump FAB to 2.1.8 (#7986) 2019-08-05 22:52:17 -07:00
John Bodley
fdb62e9865
[flake8] Ignoring I202 (#7988) 2019-08-05 15:01:33 -07:00
Erik Ritter
d58dbad076 [DB Engine] Support old and new Presto syntax (#7977) 2019-08-05 11:56:56 -07:00
John Bodley
f7af50c399
[security] Adding docstrings and type hints (#7952) 2019-08-05 11:24:13 -07:00
Ville Brofeldt
b856666ae2
Remove collation info from MSSQL column type (#7963) 2019-08-05 17:08:58 +03:00
Ville Brofeldt
a1261d7f9a
Bump sqlparse to 0.3.0 (#7973)
* Black

* Bump sqlparse to 0.3.0

* Convert str.format() to f-string
2019-08-05 17:08:05 +03:00
Beto Dealmeida
b8ca0783ff
Fix for new Pandas API (#7975) 2019-08-02 15:28:39 -07:00
Gianluca Ciccarelli
e23920b8ba 7620: Start removing dependencies on requests (#7643)
* 7620: Start removing dependencies on requests

* Patch urllib.request.urlopen instead of requests.get

* Try to fix flake8

* More work on flake8 import errors

* First attempt at using urllib with cookies

* Fix pylint/flake8

* Fix test_deliver_slice_csv_attachment

* Fix test_deliver_slice_csv_inline

* Import requests and pydruid conditionally, remove dependency on prison

* Fix flake errors

* Fix load_examples

* Please flake

* Skip tests depending on optional deps

* Try to please flake

* Address review comments

* Remove Druid-related UI

* Revert "Remove Druid-related UI"

This reverts commit d7e0f166cc3f3dd2496b4a666e177f0c191aeb0f.

* Skip a few tests more

* Put imports in right order

* Apply black patch

* Please flake

* Please black, silence flake

* Use flake8 silencing the right way

* Add deps for CI
2019-08-02 10:01:28 -07:00
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