Compare commits

...
2463 Commits
Author SHA1 Message Date
Ville Brofeldt 7cb3d3b5d2 Remove reverted PR from CHANGELOG 2020-01-06 18:01:24 +02:00
Ville Brofeldt 39cf672a04 Revert "Fix for BigQuery connection checks and CSV uploads (#8511)"
This reverts commit 611fd02a5f.
2020-01-06 17:15:13 +02:00
Ville Brofeldt 38ea8182f5 Bump version to 0.35.2 2020-01-04 22:01:58 +02:00
Daniel Vaz Gaspar bb5f5fc335 [database] [log] Fix, Limit the amount of info on response (#8918) 2020-01-03 18:42:05 +02:00
Erik Ritter 6f102bb942 Bump viz plugins for bug bash (#8759) 2020-01-02 16:54:25 +02:00
Maxime Beauchemin ff092e20f5 fix: don't show filter popover on explore view load (#8729)
* fix: don't show filter popover on explore view load

There's this confusing "feature" that I thought was a bug that shows the
metric popover opened when entering the explore view when the filter
comes from an active dashboard filter, based on the "fromFormData"
attribute of the filter.

The popover is confusing and often shows as misaligned with the actual
element it's supposed to float over when overflowing.

* warn

* fix cypress

* also shut off  metrics
2020-01-02 16:54:19 +02:00
Beto Dealmeida b7cc619142 Migrate filter_immune_slice_fields (#8718) 2020-01-02 16:54:14 +02:00
John Bodley f416f910c1 [fix] Druid IS NULL/IS NOT NULL filters (#8714) 2020-01-02 16:54:10 +02:00
Ville Brofeldt 8e47b1120e fix: default missing values to zero on area chart (#8678)
* Add fill_value to area chart pivot

* Only fill for area chart

* Linting
2020-01-02 16:54:05 +02:00
ʈᵃᵢ 946f5c17b6 [SECURITY] bump packages with security vulnerabilities (#8573)
* bump packages with security velnerabilities

* bring back cypress

* remove cypress
2020-01-02 16:54:00 +02:00
Will Barrett 611fd02a5f Fix for BigQuery connection checks and CSV uploads (#8511)
* Fix for BigQuery connection checks and CSV uploads

* Don't assume encrypted_extra will be populated

* Fix undefined method error

* Refactor to avoid circular import strangeness
2020-01-02 16:53:54 +02:00
Rob DiCiuccio f92bc2cb8c Bump pyarrow to 0.15.1 due to CVE (#8583) 2020-01-02 16:53:50 +02:00
Beto Dealmeida b9941df132 Fix error when templateParams is undefined (#8581) 2020-01-02 16:53:45 +02:00
Beto Dealmeida 7db52832f2 Math.max(...array) considered harmful (#8575)
* Do not use Math.max

* Small fix
2020-01-02 16:53:42 +02:00
Erik Ritter 8e38ee28c6 [Dashboard Import] Log error on dashboard import failure (#8550) 2020-01-02 16:53:38 +02:00
Juliette Tisseyre 240a1c490a Default page: remove title attribute to fall back on appbuilder.app_name (#8427) 2020-01-02 16:53:33 +02:00
Grace Guo 27612a16c1 [datasource editor] Only one click target for edit action (#8495) 2020-01-02 16:53:27 +02:00
John Bodley 87d481b0a0 Update UPDATING.md (#8465) 2020-01-02 16:53:23 +02:00
Grace Guo 811b0e935f [Datasource Editor] A few small UI changes in modal to prevent accidental edits (#8471) 2020-01-02 16:53:19 +02:00
Daniel Vaz Gaspar 3e6a206c1e [setup] Fix, download_url (#8439)
* [setup] Fix, download_url
2020-01-02 16:53:14 +02:00
Will Barrett ddeb43677f Split up tests/db_engine_test.py (#8449)
* Split up db_engine_specs_test.py into a number of targeted files

* Remove db_engine_specs_test.py

* isort
2020-01-02 16:53:10 +02:00
Christoph Lingg e941bda7aa introduce a space in command line option (#8438)
see https://docs.celeryproject.org/en/latest/userguide/optimizing.html
2020-01-02 16:53:05 +02:00
Christoph Lingg ba8bb6b4d7 explain the need to enable async queries (#8444) 2020-01-02 16:53:01 +02:00
Austin Pray ee35bd5873 spelling fix (#8442) 2020-01-02 16:52:57 +02:00
Maxime Beauchemin 5493709e50 docs: add a note to RELEASING about Slack Channel (#8419) 2020-01-02 16:52:52 +02:00
Daniel Gaspar 62c2e15a0a Bump version to 0.35.1 2019-11-15 14:15:31 +00:00
Daniel Gaspar b5d03ccf4f Update CHANGELOG for 0.35.1 2019-11-15 14:14:11 +00:00
Ville Brofeldt 16459902e0 [fix] Improve csv upload functionality (#8457)
* [fix] csv upload when table metadata present

* Remove table from hive spec

* Move upload before table metadata creation

* Refine upload logic, dd unit tests and fix translations

* Use ALLOWED_EXTENSIONS from config

* Address review comments

* Fix error message grammar

* Add return type to hive csv upload and replace first with one_or_none
2019-11-15 11:37:20 +00:00
Daniel Vaz Gaspar bc196b4b15 [druid] Fix, pydruid forced dependency (#8566)
* [druid] Fix, forced pydruid dependency

* [druid] Fix, more type annotation that force pydruid dependency
2019-11-15 11:20:58 +00:00
ʈᵃᵢ 05e2c8e71a bump legacy-preset-chart-nvd3 to 0.11.5 (#8558) 2019-11-15 11:18:38 +00:00
Marcus 4c2a653797 build: bump dompurify version because of nasty xss bypass. (#8498) 2019-11-15 11:18:09 +00:00
Daniel Vaz Gaspar fec3dac424 [cli] Fix, import datasources exported by UI (#8477)
* [cli] Fix, import datasources exported by UI
2019-11-15 10:47:44 +00:00
Marcus 391be09aa3 fixing typo. (#8487) 2019-11-15 10:47:20 +00:00
John Bodley 5cc062bc92 [pydruid] Bumping the pydruid version (#8430) 2019-11-15 10:46:56 +00:00
Daniel Gaspar 49d672eb34 Update changelog 2019-10-31 12:13:57 +00:00
Daniel Gaspar d2cfebe6fa Fix, package version bump to 0.35.0 2019-10-31 10:46:11 +00:00
Daniel Gaspar cc69e3ab20 0.35.0rc2 2019-10-28 09:50:37 +00:00
John Bodley 59318977f1 [fix] Updating parse_human_timedelta typing (#8436) 2019-10-28 09:48:56 +00:00
Daniel Gaspar 11774262d8 0.35.0rc1 2019-10-23 10:46:37 +01:00
Maxime Beauchemin 8f246cec34 chore: disable another flaky cypress test (#8423)
Also fix isort issue on master
2019-10-22 11:50:23 +01:00
Beto Dealmeida cca689b712 Add improved typed casting to BigQuery (#8331) 2019-10-21 09:19:24 -07:00
Marcus 4cfd6b3ce1 [tests] Fix, removing deprecated function for future Python release compatibility. (#8353)
* removing deprecated function for future Python release compatibility.

* also removed assertNotEquals per @dpgaspar
2019-10-21 15:49:12 +01:00
francishemingway 1e533db3a2 fixed typo in installation instructions (#8413) 2019-10-20 21:21:40 -07:00
John Bodley 9fc37ea9f1 [ci] Deprecate flake8 (#8409)
* [ci] Deprecate flake8

* Addressing @villebro's comments
2019-10-18 14:44:27 -07:00
John Bodley a19990185d [sqla] Enforcing ISO 8601 date/timestamp formats (#7702) 2019-10-17 10:06:42 -07:00
Erik Ritter d3406e0a04 [Config] Cache static resources (#8370) 2019-10-17 09:09:25 -07:00
Daniel Vaz Gaspar c62b2f4340 [docs] CTAS on PostgreSQL needs commit to apply (#8367)
* [docs] New, document need for PG to use autocommit for CTAS
2019-10-17 14:54:02 +01:00
Rob DiCiuccio c422b492eb Update Slack invitation link (#8399)
* Update Slack invitation link

* Update remaining Slack links
2019-10-16 08:33:43 -07:00
serenajiang 876d329474 [fix] make names non-nullable (#8371) 2019-10-15 16:51:04 -07:00
John Bodley fcb39f9091 [form-data] Deleting obsolete Superset.get_form_data method (#8390)
* Update core.py

* Update core.py
2019-10-15 09:11:55 -07:00
Ville Brofeldt 2117d1ef9d Add 0.34.1 PRs to CHANGELOG (#8376) 2019-10-12 18:08:58 +03:00
John Bodley 03b35b3c11 [migration] Migrating since/until to time_range (#8372) 2019-10-11 13:41:23 -07:00
Erik Ritter 558680d6ac [Cypress] Skip another flaky sqllab test (#8374) 2019-10-11 13:02:28 -07:00
Ville Brofeldt 9a186ffba3 Add incubating to NOTICE (#8369) 2019-10-10 23:41:25 +03:00
Erik Ritter 7133429a3f [Docs] Put superset users in abc order (#8368) 2019-10-10 13:37:52 -07:00
Christoph Lingg 66e3708af6 Update README.md (#8365) 2019-10-10 10:50:22 -07:00
serenajiang 7e7ea3d9a0 Revert "[fix] make datasource names non-nullable (#8332)" (#8363)
This reverts commit 65a05ca47e.
2019-10-09 11:38:57 -07:00
Grace Guo 8b85a8f398 [dashboard] show less filter indicators (#8345) 2019-10-07 22:34:09 -07:00
Ville Brofeldt c09e3e7e46 Fix pypi link and replace gitter badge with slack (#8330) 2019-10-06 14:06:51 -07:00
John Bodley edec8745b8 Revert "[init] Setting up cache before registering blueprints (#7992)" (#8005)
This reverts commit c6867d22b9.
2019-10-06 13:31:00 -07:00
kevang 783667168b Add support for Exasol (#8343)
* Add support for Exasol

* add time grain functions for Exasol

* remove duplicate of

* override ExasolEngineSpec's fetch_data method

* remove duplicate https

* simplify super call
2019-10-06 14:43:45 +03:00
David Aaron Suddjian b093406536 fix saving new sql lab queries (#8351)
* fix saving new sql lab queries

* allow freshly saved queries to be updated immediately
2019-10-04 16:43:05 -07:00
Beto Dealmeida 04c3d1f58d Remove unused methods from Presto (#8350)
* Remove unused methods from Presto

* Remove tests

* Fix bug in PRESTO_SPLIT_VIEWS_FROM_TABLES

* Fix lint
2019-10-04 11:22:02 -07:00
Will Barrett ec86d9de17 Fix lint in superset/db_engine_spec (#8338)
* Enable lint checking for files in db_engine_spec that have few to no
lint issues

* Enable lint and fix issue in db_engine_spec/mysql.py

* Enable pylint and fix lint for db_engine_spec/pinot.py

* Enable lint and fix issues for db_engine_specs/hive.py

* Enable lint and fix for db_engine_spec/presto.py

* Re-enable lint on base.py, fix/disable specific failures, including one
bad method signature

* Make flake8 happy after a number of pylint fixes

* Update db_engine_spec_test test cases related to Presto to support
different method naming

* automated reformatting

* One more pylint disable for druid.py

* Find the magic invocation that makes all the lint tools happy
2019-10-04 09:19:21 -07:00
serenajiang 65a05ca47e [fix] make datasource names non-nullable (#8332) 2019-10-04 09:13:25 -07:00
Bhargava Vadlamani b6b6a753e2 Add Fanatics to companies that use Superset (#8344)
* Add Fanatics to companies that use Superset

We at Fanatics use Apache Superset to visualize data stored in Apache Druid. I wanted to add my firm's name to this list since we are very happy with the performance and visualization features provided by Apache Superset.

* Update README.md
2019-10-04 18:28:28 +03:00
Juliette Tisseyre 46227b75a7 [docs] Add Deepomatic in organization list (#8347) 2019-10-04 18:08:35 +03:00
Oskar Hinc 9596935c44 feat: Set moment library language during app setup (#8296)
* #8294: Set moment library language during app setup

* #8294: Added 'local-storage' to superset/assets/package.json

* #8294: change 'locale' in localStorage when language is set

* #8294: Fixed eslint issues

* #8294: Removed localStorage usage
2019-10-01 23:12:21 -07:00
Maxime Beauchemin 4a8799b918 fix: npm audit fix bumps handlebars 4.1.2->4.3.1 (#8299) 2019-10-01 21:54:08 -07:00
John Bodley 05b67673c3 [metric] Adding security for restricted metrics (#8175) 2019-10-01 16:52:15 -07:00
Erik Ritter 8c708037e8 [Presto] Handle uncaught exception in get_create_view (#8304) 2019-10-01 07:45:12 -10:00
Erik Ritter f21cc63030 [SQL Lab] Improve autocomplete (#8305) 2019-10-01 06:07:34 -10:00
David Aaron Suddjian fbbc5f0577 Allow overwriting a SQLLab query that has previously been saved (#8298)
* ignore direnv

* allow overwriting saved queries

* simplify state management a little bit

* fix tests and linting
2019-09-30 23:09:45 -07:00
Krist Wongsuphasawat d55fe54198 refactor: remove unused code (#8300) 2019-09-30 16:57:35 -07:00
Nabin Khadka 25e2517dcb Update RunQueryActionButton.jsx (#8320) 2019-09-30 16:55:56 -07:00
Craig Rueda cff10ebfcb Adding explicit Flask session cookie options to default config (#8317)
* Adding explicit Flask session cookie options to default config

* Blacking
2019-09-30 00:11:22 +01:00
Daniel Vaz Gaspar d59e0c4641 [superset] Fix, missing return on error and improved query (#8239) 2019-09-30 00:09:30 +01:00
ʈᵃᵢ 7ea769228e allow non-relative LOGO_TARGET_PATH (#8307) 2019-09-27 19:47:20 -07:00
Matthew Mutiso 3764d43f7f Add safaricom to companies using superset (#8311) 2019-09-27 17:55:45 +03:00
Ville Brofeldt 52a84d2581 Add explicit support for python 3.7 (#8309) 2019-09-27 17:54:45 +03:00
Kartik Khare 0a8f3eb43f Fix: Missing time series datapoints in druid show up as absurd values in line chart (#8271)
* Adding support for filter box in annotations

* Fixing tox lint errors

* fixing lint errors

* superset should skip empty time buckets

* removing whitespace
2019-09-24 17:46:34 -07:00
Ville Brofeldt 6d418308c7 Refine release instructions (#8272)
* Refine release instructions

* Add version to svn message
2019-09-24 08:34:43 +03:00
Erik Ritter 11935ce118 Add commit to attempt to resolve query table lock (#8262) 2019-09-23 14:37:50 -07:00
Maxime Beauchemin 09bbdd277c chore: skip flaky SQL Lab test (#8282)
Tried 2-3 difference approaches to fix the flaky SQL Lab test that has
been biting us for a while. My guess is that the flakiness comes from
brace (the editor). Hoping a future release of brace and/or cypress
may help with this.

But for now, no test is better than a flaky one.
2019-09-23 11:28:10 -07:00
John Bodley d46510779f [migration] Stripping leading and trailing whitespace (#8261) 2019-09-23 09:13:01 -07:00
John Bodley 5d1bf4245d [sql_json] Ensuring the request body is JSON encoded (#8256) 2019-09-23 09:09:12 -07:00
Daniel Vaz Gaspar f3065a763f [database] Improve form and API validation for invalid URI (#8240)
* [database] Improve form and API validation for invalid URI

* [database] Added missing EOL

* [database] lint
2019-09-23 08:28:08 -07:00
kuckjwi 6a08f25b15 Fixed korean translation error. (#8265) 2019-09-22 16:25:56 -07:00
Ben bc83b5fbe6 More intuitive display of negative time deltas (#8274) (#8276)
* WIP - Add easily interpretable negative timedelta formatting

* Add unit tests for utils.core.timedelta_f

* Reformat tests.utils_tests.test_timedelta_f test code. Fixes #8274.

* Add type annotations to utils.core.timedelta_f (#8274)

* Replace recursion with absolute value in utils.core.timedelta_f (#8274)

* Rename utils.core.timedelta_f to format_timedelta (#8274)

* Fix small typo (#8274)
2019-09-22 19:37:43 +03:00
Beto Dealmeida 7090725de9 Fix no data in Presto (#8268)
* Fix no data in Presto

* Fix test
2019-09-20 14:31:13 +02:00
Krist Wongsuphasawat 731c19b630 refactor: use deck.gl plugins from npm package (#8258)
* refactor: use deck.gl plugins from npm package

* fix: remove test files
2019-09-19 16:55:44 -07:00
serenajiang dfb3bf69a0 [typing] add typing for superset/connectors and superset/common (#8138) 2019-09-19 16:51:01 -07:00
Daniel Vaz Gaspar 8bc5cd7dc0 [SQLLab] Refactor sql json endpoint (#8163)
* [superset] sql_json endpoint refactor

* [superset] sql_json endpoint refactor sync

* [superset] Fix, wrong parameter name

* [superset] flake8 and black

* [SQLLab] Don't need to pass request to helper SQLJsonParams

* [SQLLab] try except on query add

* [SQLLab] Remove unwanted changes

* [SQLLab] refactor (cont.)

* [superset] black

* [SQLLab] Remove SQLJsonParams class

* [SQLLab] Fix, add missing type annotations

* [superset] Better exception handling when saving query

* [superset] Remove unnecessary commit

* [superset] one or none instead of first

* [superset] Fix, missing return on error sql_json

* [superset] Fix, black

* [database] Use f strings
2019-09-19 12:15:40 -07:00
Yongjie Zhao 2cd631a26c Fix sync failed when datasource is schema-less (#8223) 2019-09-19 09:11:21 -07:00
Beto Dealmeida 6df74c6b8e Remove __row_id (#8257) 2019-09-18 20:32:33 -07:00
Erik Ritter 799e08d76f Update another pypi case from superset to apache-superset (#8250) 2019-09-18 16:36:08 -07:00
Maxime Beauchemin 115bc83b28 docs: reflect the pypi move from superset to apache-superset (#8244) 2019-09-18 14:55:20 -07:00
serenajiang 0c94f0fd82 [sqllab] create query slightly earlier (#8224) 2019-09-18 14:29:07 -07:00
Beto Dealmeida 8e1fc2b0ba Fix array casting (#8253) 2019-09-18 13:32:58 -07:00
Beto Dealmeida 12fb8e70cc Show Presto views as views, not tables (#8243)
* WIP

* Implement views in Presto

* Clean up

* Fix CSS

* Fix unit tests

* Add types to database

* Fix circular import
2019-09-18 12:47:10 -07:00
Beto Dealmeida 4088a84eb4 Small fix for Presto dtype map (#8251)
* Small fix for Presto dtype map

* Add unit test
2019-09-18 12:46:50 -07:00
MaiTiano 8d04e1f55f Update README.md (#8246) 2019-09-18 08:15:47 -07:00
1AB9502 0cd4ef54f8 Add RegisteredLookupExtraction support to extraction function (#8185)
* Add RegisteredLookupExtraction support to extraction function

* Fix formatting issues

* Reformat druid_func_tests through black
2019-09-17 23:45:47 -07:00
Beto Dealmeida 88777943fa Better distinction between tables and views, and show CREATE VIEW (#8213)
* WIP

* Add missing file

* WIP

* Clean up

* Use label instead

* Address comments

* Add docstring

* Fix lint

* Fix typo

* Fix unit test
2019-09-17 14:24:38 -07:00
Beto Dealmeida 4132d8fb0f Simplify and improve expand_data in Presto (#8233)
* WIP

* Working version, needs cleanup

* Add unit tests to split

* Small fixes

* Dedupe array columns

* Fix lint
2019-09-17 14:04:14 -07:00
Beto Dealmeida 8847e10529 Allow users to estimate query cost before executing it (#8172)
* WIP

* Basic functionality working

* Enable per DB

* Show error message

* Small improvements

* Fix lint

* Address comments

* Address comments

* Remove logging, fix exception

* Fix tests

* Bump FAB requirements
2019-09-17 09:09:40 -07:00
Beto Dealmeida b9be01fcd8 Handle int64 columns with missing data in SQL Lab (#8226)
* Handle int64 columns with missing data in SQL Lab

* Fix docstring

* Add unit test

* Small fix

* Small fixes

* Fix cursor description update

* Better fix

* Fix unit test, black

* Fix nan comparison in unit test
2019-09-17 08:16:09 -07:00
Erik Ritter 1ad17936ba [SQL Lab] Fix bug when filtering on results that include nulls (#8231) 2019-09-16 21:05:58 -07:00
Krist Wongsuphasawat bf7ce62166 refactor: prepare control panel configs for separation into plugins (#8222)
* move paired t-test

* fix: remove nvd3sections

* move more controls
2019-09-13 15:52:51 -07:00
Krist Wongsuphasawat 1522d3fbaa fix: initialize control state for inline control config object (#8221) 2019-09-13 10:36:53 -07:00
John Bodley 762edf430b [talisman] Enforcing HTTP for status checks (#8214) 2019-09-12 15:54:57 -07:00
Krist Wongsuphasawat c566141f25 feat: read control panel configs from registry (#8173)
* feat: read control panel configs from registry

* fix: order imports

* fix: remove index.js and get items on-the-fly, remove extraOverrides

* fix: lint

* fix: unit tests

* fix: unit tests

* fix: lint

* fix: unit tests
2019-09-11 08:58:24 -07:00
Maxime Beauchemin 30483cee31 chore: fix version info (#8196)
* Fix version info

Ran into Cypress issues while getting too ambitious in #8157
this is a simplified more targeted version of it

* include package.json (but not under static/)
* use package.json as single source of truth for version info

* typo
2019-09-10 22:25:58 -07:00
Maxime Beauchemin cb6abe343b fix: attempt to fix the flaky SQL Lab test (#8212)
* fix: attempt to fix the flaky SQL Lab test

https://docs.cypress.io/api/commands/clear.html#Syntax

doubling our chances to selectall and clear the text box

* Add {force: true}

* fix typo

* more clears
2019-09-10 22:16:26 -07:00
klxiang 50cd558d40 Update messages.json (#8210) 2019-09-10 15:51:51 -07:00
Grace Guo b4a1234670 [feature][dashboard] Show/hide filter indicator on the applicable charts when filter options are open/close (#8166)
* show ellipsis for long filter name in tooltip

* show filter indicator color bar when filter is applied

* show/hide filter indicator when filter is showing/hiding options

* use component local state to hide/show chart outline

* fix review comments + unit tests
2019-09-10 15:29:13 -07:00
garnservo 296f3e81a7 Update README.md (#8206)
Corrected typos
2019-09-10 11:11:42 -07:00
Maxime Beauchemin b8819226b9 chore: update UPDATING.md with a 0.34.0 section (#8208)
Also documenting this step under RELEASING/README.md
2019-09-10 10:36:07 -07:00
John Bodley 84bf5b40fa [viz] Adding get_def typing (#8034) 2019-09-10 09:55:17 -07:00
Daniel Vaz Gaspar 83f7038374 [examples] Fix, sf population polygons div by zero error (#8209) 2019-09-10 09:53:27 -07:00
Maxime Beauchemin 9d4b955cc7 chore: deprecate restricted metrics (#8197)
* chore: deprecate restricted metrics

An early community contribution added the concept of restricted metrics.

The idea was to allow for some metrics to be restricted, and if a metric
was tagged as such, a user would need to be given access to that metric
more explicitely, through a special perm we would maintain for that
metric.

Now since the new concept of "Adhoc Metrics", the popover that lets a
user pick a column and an aggregate function or to write their own SQL
expression inline, this restriction is completely bypassed. Adhoc
metrics was developed without the restricted metrics in mind.

Anyhow, in the near future, we'll be rethinking the ideas behind
data-access permissions, and things like column-level or row-level
security will be redesigned from scratch.

By deprecating this feature, we're removing a confusing and mostly broken
feature, and making it easy to move forward

* Use context manager to drop columns

* disable jest's maxWorkers
2019-09-09 17:20:32 -07:00
klxiang 7546ea3191 Update messages.json (#8198)
"dashboards" 有的翻译成"看板", 有的翻译成"仪表盘". 为了统一现在全部改为"看板".
2019-09-09 11:25:01 -07:00
Dave Smith 1a02d61582 change log from csv_export to data_export; fix db name in log (#8204)
* change log from csv_export to data_export; fix db name in log

* add exported_format field to data_export event log
2019-09-09 11:08:47 -07:00
serenajiang 4e2d1c1a62 more detailed async error messages (#8164) 2019-09-09 09:09:15 -07:00
Erik Ritter c053e23397 [Config] Disable celery acks late (#8182) 2019-09-09 09:07:38 -07:00
Daniel Vaz Gaspar 055d2ef252 Bump FAB to 2.1.13 (#8176)
* Bump FAB to 2.1.13

* [SQLLab] dummy commit

* [SQLLab] remove dummy commit

* [SQLLab] test

* [SQLLab] bump back to 13
2019-09-08 22:06:24 -07:00
Maxime Beauchemin 68c4c3a0b9 Prevent 'main' database connection creation (#8038)
* prevent 'main' database connection creation

* fix tests

* removing get_main_database

* Kill get_main_database

* Point to examples tables
2019-09-08 10:18:09 -07:00
Garrett Bates 9d350aadf0 ignore formatting for <Select> (#8187) 2019-09-08 10:16:07 -07:00
Paul Vickers 22302e341f Bump flask-appbuilder to 2.1.13 (#8174)
* Bump flask-appbuilder to 2.1.12

To pick up this fix https://github.com/dpgaspar/Flask-AppBuilder/pull/1095 which addresses https://github.com/apache/incubator-superset/issues/7739

* Bump FAB again to 2.1.13
2019-09-08 09:58:59 -07:00
Ville Brofeldt 3250c5ac94 [bugfix] fix timegrain addon regression (#8165)
* Fix regression in time grain addons

* Revert privatization of time_grain_functions

* Fix test

* Rename variable

* Fix test

* Fix typing error

* Refactor and add tests

* Add TODO
2019-09-08 08:34:40 +02:00
John Bodley 9dfa0a3f8e Update core.py (#8191) 2019-09-07 23:32:17 -07:00
serenajiang be33934b83 [fix] retry stop_query on all exceptions (#8184) 2019-09-06 10:16:08 -07:00
Ville Brofeldt 15e623898d Make orderby native sqla construct (#8180) 2019-09-06 13:05:17 +03:00
Ville Brofeldt 4e1e54b538 [bugfix] Correctly quote table and schema in select_star (#8181)
* Fix select_star table quoting bug

* Add unit test for fully qualified names in select_star

* Rename main_db to db

* Rename test function
2019-09-05 22:44:34 +03:00
klxiang 8f071e8f7e Update messages.json (#8179)
"Pop"这里应该翻译成"弹出",而不是"流行"。
2019-09-05 11:25:24 -07:00
ericandrewmeadows ae0dc30c0a Fix to Werkzeug ProxyFix; expose ProxyFix configuration items (#8117)
* Fix to werkzeug proxy; expose additional configuration items

* Forced to all x-forwarded configurations ON; black done

* added comments related to x_port after testing

* Updated UPDATING.md

* Removed accidental notebook; added *.ipynb to gitignore

* Delete Untitled-checkpoint.ipynb
2019-09-04 10:21:13 -07:00
Maxime Beauchemin 650de93752 Bump cypress from 3.1.5 to 3.4.1 (#8158) 2019-09-03 23:56:50 -07:00
serenajiang 00257b9433 [sqllab] add retries for stop_query (#8139)
* [sqllab] add retries for stop_query

* use backoff for retries

* address PR comments

* import statement order
2019-09-03 16:37:42 -07:00
Erik Ritter 436261e703 [Codemod] Rename react unsafe lifecycles (#8143)
* [Codemod] Rename react unsafe lifecycles

* Fix lint errors

* [Codemod] Rename react unsafe lifecycles

* Fix lint errors
2019-09-03 14:13:58 -07:00
Maxime Beauchemin ee24539bd2 chore: remove PY3 conditional logic (#8149) 2019-09-02 12:46:18 -07:00
Maxim Sukharev 522e8015cf Forward SIGTERM signal to gunicorn (#8156)
Currently docker entrypoint is a bash script.
`docker stop` command (or restart in kubernetes) sends SIGTERM to the
container but it isn't catched by gunicorn.
So gunicorn can't start graceful shutdown which may lead to killing
user's connection and also adds 10s (default value) delay for stopping
until docker sends SIGKILL.
Using `exec` replaces the shell with the process being opened and
signals are propagated correctly.

Ref: https://docs.docker.com/engine/reference/commandline/stop/
Ref: https://unix.stackexchange.com/questions/146756/forward-sigterm-to-child-in-bash
2019-09-02 12:43:03 -07:00
Craig Rueda 2abec1908e Adding explicit include for version_info.json (#8148) 2019-08-30 15:43:30 -07:00
Erik Ritter 96f21d3cb6 Revert "Fix tooltips not visible for NVD3 charts on Firefox (#7822) (#7929)" (#8147)
This reverts commit 6df2a713e4.
2019-08-30 15:25:37 -07:00
Erik Ritter 96eb51f0e1 Revert "Allow resizing width of SQL Lab left bar / editor (#8099)" (#8146)
This reverts commit ed3360b135.
2019-08-30 15:19:01 -07:00
Erik Ritter 1b031fc7d7 Revert "Fixed Histogram visualization bug. (#8077)" (#8145)
This reverts commit 7ac1a290eb.
2019-08-30 14:11:46 -07:00
ʈᵃᵢ 7f17ba7ee2 removes unused state values and redundant presence checks (#8130) 2019-08-29 21:29:34 -07:00
Ville Brofeldt 149d6344ac Add duration formatter for numeric data (#8136)
* Add duration formatter

* Remove sec and min formatters and add subMillisecond option
2019-08-29 21:29:08 -07:00
Krist Wongsuphasawat b150b3d5e6 remove unused files (#8140) 2019-08-29 15:19:05 -07:00
Daniel Vaz Gaspar 6aa10dc016 [setup] use new python requires metadata key (#8135) 2019-08-28 10:12:46 -07:00
Craig Rueda de6d963432 Moving towards a whitelist approach for MANIFEST.in (#8109)
* Moving towards a whitelist approach for MANIFEST.in when it comes to static resources

* Tuning static exclude

* Fix for fetching version string from package.json, which no longer exists

* Adding package.json fallback for unit tests
2019-08-27 14:51:35 -07:00
Rob DiCiuccio 7595d9e5fd [SQL Lab] Async query results serialization with MessagePack and PyArrow (#8069)
* Add support for msgpack results_backend serialization

* Serialize DataFrame with PyArrow rather than JSON

* Adjust dependencies, de-lint

* Add tests for (de)serialization methods

* Add MessagePack config info to Installation docs

* Enable msgpack/arrow serialization by default

* [Fix] Prevent msgpack serialization on synchronous queries

* Add type annotations
2019-08-27 14:23:40 -07:00
Krist Wongsuphasawat 56566c2645 feat: bump superset-ui dependencies to v0.12 and plugins to v0.11 (#8115)
* feat: bump superset-ui dependencies to v0.12 and plugins to v0.11

* fix: update transformProps

* fix: update hooks

* fix: pin lunar version

* fix: lint

* fix: revert table
2019-08-27 13:42:18 -07:00
Ville Brofeldt 1982b74af2 Add check for calls to cache_key_wrapper (#8128)
* Add check for calls to cache_key_wrapper to avoid unavoidable compilation of query

* Add fetch_values_predicate to check

* Only check relevant attributes

* Address nit
2019-08-27 13:36:05 -07:00
Dave Smith 6dc760a054 Add LogConfigurator, and add logging for CSV export (#8085)
* Add LogConfigurator, and add logging for CSV export

* tweak for PR feedback

* fix linter issue
2019-08-27 13:22:18 -07:00
Evan Rusackas 2085e897f5 adding spaces missing from string concatenations (#8126) 2019-08-27 10:37:40 -07:00
Marcus b1269c31f7 removed database deps from reqs-dev.txt and typo. (#8111)
* removed database deps from reqs-dev.txt and typo.

* Revert requirements-dev.txt to limit scope
2019-08-26 16:13:58 -07:00
serenajiang 624449816f [logging] add query id to SQL Lab logs (#8104)
* [logging] add query id to logs

* add query_id to hive and presto logging
2019-08-26 10:35:18 -07:00
Erik Ritter 5d8da6aeae [Hive Engine Spec] Fix latest partition logic (#8098) 2019-08-26 10:29:25 -07:00
Beto Dealmeida ed3360b135 Allow resizing width of SQL Lab left bar / editor (#8099)
* wip

* Finish PR

* Remove annoying snap

* Fix lint

* Fix js tests
2019-08-26 10:07:47 -07:00
kuckjwi 7ac1a290eb Fixed Histogram visualization bug. (#8077)
* Fix HistogramViz bug.

* Fix ci black error.
2019-08-24 20:52:38 +03:00
Erik Ritter ee75d03df4 Fix cache set kwargs (#8106) 2019-08-23 16:54:37 -07:00
Erik Ritter 01aa17cb70 Fix sqla query cache keys function (#8105) 2019-08-23 14:14:38 -07:00
felixcodes 6ca3e347d2 refactor: separate vis-specific controls from centralized controls (#7569)
* Separate vis-specific controls from centralized controls

* Remove comment

* Update state's vizType when switching to a new visualization. This fixes the renderTrigger bug.

* Rename functions for better readability

* Fix lint issues

* Fix nits

* Fix vscode rename mistake
2019-08-23 13:41:35 -07:00
Maxime Beauchemin 610b35a01b docs: remove unused release instruction (#8100)
Turns out since we use `git archive`, there's no need for `git clean`
which was pretty disruptive.
2019-08-23 09:03:55 -07:00
friendzis fd119c187e Move Darwin-specific JS libs to optional (#8093) 2019-08-22 22:37:36 -07:00
serenajiang e6956f84b4 [fix] checks for stopped queries (#8097) 2019-08-22 22:23:44 -07:00
Maxime Beauchemin 279307c602 fix: minor release/license related issues (#8087) 2019-08-22 18:16:12 -07:00
Maxime Beauchemin 763af85d04 CHANGELOG for 0.30...0.34 (#8089) 2019-08-22 18:15:49 -07:00
Krist Wongsuphasawat 0d76fc755c feat: replace table and box plot vis with new plugins (#8083)
* add new chart plugins

* fix: pin aphrodite version

* fix: package

* fix: unit test dependencies

* fix: memory
2019-08-22 12:15:54 -07:00
Ville Brofeldt fb51632e18 Add docstrings and typing to db_engine_specs and sql_parse (#8058)
* Add typing to db_engine_specs

* Add more type annotations and docstrings

* Add docstrings and typing to sql_parse and db_engine_specs

* Refine select_star

* Fix execute and add more docstrings

* Revert kwargs change from execute

* Remove redundant or

* Align view and table getter schema types

* Fix return type of latest_partition

* Remove some typing from presto

* Improve docstring for __extract_from_token
2019-08-22 06:29:32 +03:00
Grace Guo 40776bd547 [Feature] Dashboard filter indicators (#7908)
* dashboard filter indicators

* add/fix unit tests
2019-08-21 17:34:08 -07:00
aspedrosa 0fd7364503 Remove gevent installation as a separate layer (#8078) 2019-08-21 11:07:39 -07:00
serenajiang 638fbb1a5c fix: handle case where result exists but corresponding query cannot be found (#8037)
* fix: handle case where result exists but query cannot be found

* changed error code to 404 for query not found
2019-08-20 18:30:33 -07:00
Dave Smith 995b96fc52 remove idna req from setup.py (#8067) 2019-08-20 18:04:59 -07:00
Beto Dealmeida aae9b56232 Move more Presto nested types behind feature flag (#8075)
* Move more stuff behind ff

* Fix unit tests

* Fix more tests

* Fix lint
2019-08-20 16:10:55 -07:00
Maxime Beauchemin d872511e2b bump a set of test-related JS libs (#8051)
* bump a set of test-related JS libs

Mostly upgrading jest as I was trying to tackle issues related to
wrong source-maps reporting in jest. This addresses it

* Bumping more things

* lint

* using core-js/stable

* pointing to the right place
2019-08-20 15:32:50 -07:00
Grace Guo 319c1df120 [Explore view] Fix extra data fetch when user clicks Run Query (#8070) 2019-08-20 11:48:15 -07:00
fzzylogic c97a71b6b9 Make package.json cross platform (#8035)
* Fix: Chain var declaration and webpack invocation

* enh: Add cross-env to make package.json work cross-platform

* Fix: Update lock-file for new package cross-env

* Chores: Update lock-file for new package cross-env
2019-08-20 00:57:41 -07:00
Kartik Khare ae16e69ebf Adding support for filter box in annotations (#8057)
* Adding support for filter box in annotations

* Fixing tox lint errors

* fixing lint errors
2019-08-20 00:56:04 -07:00
Maxime Beauchemin 4e7ea3f3e2 Improve birth example dashboard (#8042)
* Improve birth example dashboard

* Fix tests

* pylint
2019-08-18 22:36:27 -07:00
Grace Guo 51bd34704c [sql lab] persist tables list in localStorage (#8054)
* [sql lab] persist tables list in localStorage

* persist ediotor panel size setting
2019-08-16 14:12:35 -07:00
John Bodley 46f4da5fbe [viz] Revert dropna logic for pivot tables (#8040) 2019-08-16 11:25:57 -07:00
Beto Dealmeida 478d0969a8 Add feature flag for Presto expand data (#8056)
* Add feature flag for Presto expand data

* Fix unit tests

* Fix black

* Revert temporary file change
2019-08-15 20:10:05 -07:00
michellethomas ef1d4a6aa1 Set disableErrorBoundary in SuperChart to fix chart error handling (#8052) 2019-08-15 14:42:03 -07:00
Maxime Beauchemin 5e0c91ef49 fix: onSave datasource raises React error (#8049)
* fix: datasource save raises React error

* add test
2019-08-15 14:13:18 -07:00
Ville Brofeldt 8773fdceb2 [bugfix] Fix deck_polygon metric bug and update examples chart (#8025)
* Fix deck_polygon bug and update examples chart

* Change js elevation to native ad-hoc metric

* Move scale from metric to native multiplier

* Remove redundant js_columns and change color scheme
2019-08-15 09:20:49 -07:00
Maxime Beauchemin ed8bb1b694 fix: issues #8041 - bubble support for complex metrics (#8044) 2019-08-14 09:27:18 -07:00
Maxime Beauchemin 40c21dc1d7 Disable flaky cypress test (#8039)
ref: https://travis-ci.org/mistercrunch/superset/jobs/571524160
```
  1) Dashboard top-level controls should allow dashboard level force refresh:
     CypressError: Timed out retrying: expected '<li>' to have class 'disabled'
      at Object.cypressErr (http://localhost:8081/__cypress/runner/cypress_runner.js:65283:11)
      at Object.throwErr (http://localhost:8081/__cypress/runner/cypress_runner.js:65248:18)
      at Object.throwErrByPath (http://localhost:8081/__cypress/runner/cypress_runner.js:65275:17)
      at retry (http://localhost:8081/__cypress/runner/cypress_runner.js:58816:16)
      at http://localhost:8081/__cypress/runner/cypress_runner.js:50924:18
      at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:127195:23)
      at Promise._settlePromiseFromHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:125213:31)
      at Promise._settlePromise (http://localhost:8081/__cypress/runner/cypress_runner.js:125270:18)
      at Promise._settlePromise0 (http://localhost:8081/__cypress/runner/cypress_runner.js:125315:10)
      at Promise._settlePromises (http://localhost:8081/__cypress/runner/cypress_runner.js:125390:18)
      at Async._drainQueue (http://localhost:8081/__cypress/runner/cypress_runner.js:122119:16)
      at Async._drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:122129:10)
      at Async.drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:122003:14)
      at <anonymous>
```
2019-08-14 07:44:55 -07:00
semantiDan a852eaaa59 Added WPSemantix to list of companies using Apache Superset in README.md file (#8045) 2019-08-14 17:28:03 +03:00
Grace Guo 613dcf5def [fix] Allow dashboard viewer auto refresh dashboard (#8014) 2019-08-13 13:49:39 -07:00
serenajiang 17f0740692 Fix bug where lists in queries cannot contain multiple types (#8032)
* use set instead of sorted to check equality of lists

* run black
2019-08-13 23:06:44 +03:00
Kshira Saagar 075b5a5d33 Two more organisations using Superset - Zalora, GFG (#8026) 2019-08-12 22:37:11 -07:00
Erik Ritter 0754f294e9 [Dashboard] Hide slice titles when they're empty (#8018) 2019-08-12 21:55:46 -07:00
Maxime Beauchemin 5375745193 Improve release instructions (#8016) 2019-08-12 14:01:15 -07:00
Erik Ritter f039e17cd3 [SQL Lab] Improve perf for filterable table rendering (#8011) 2019-08-12 12:24:45 -07:00
Tom Hunter 2476814a6a [feat] Add d3 legend formatting for Arc, Polygon and Scatter deck.gl maps (#7951)
* Legend formatting for Arc, Polygon and Scatter

* fix typo

* refactor from d3-format to superset-ui
2019-08-10 18:55:56 -07:00
Arthur P 2ab8e15ddf Fix: There was an issue fetching the favorite status of this dashboard #6824 (#8013)
Issue: When Superset is running behind a reverse proxy and the dashboard page is requested with HTTPS protocol, the frontend can't retrieve the favorite status of the dashboard and, instead, displays the following toast message: 'There was an issue fetching the favorite status of this dashboard.'

Cause: While the API exposes the /favestar/Dashboard/{id}/count/ endpoint, the frontend executes an API call to /favestar/Dashboard/{id}/count, which leads to a redirect to an endpoint with HTTP protocol

Fix: Call the correct endpoint
2019-08-09 15:44:38 -07:00
schoel-bis 6df2a713e4 Fix tooltips not visible for NVD3 charts on Firefox (#7822) (#7929)
This bug was introduced by #7102

Using `position:absolute` on body gives `document.documentElement` a height of 0 which propagates to `clientHeight` on Firefox. This leads to a wrong calculation of the tooltip position in NVD3.

The solution proposed here is to use `min-height: 100vh` instead of the current technique for stretching the body element to the full window height, thus keeping body and html together.
2019-08-09 13:31:51 -07:00
semantiDan aebffe0b44 Added better display of NULL values in FilterableTable (as in SQL Lab Results) (#8003)
* Added better display of NULL values in FilterableTable (Reults table as in SQL Lab results) and changed sorting order so that NULL values always come last

* fixed syntax according to elint recommendations

* changed code style and logic in getContentCell according to @etr2460 code review

* remvoved 'null-cell' class and replaced it with 'text-muted' as per @mistercrunch review
2019-08-09 19:07:59 +03:00
Dave Smith 9233a63a16 Event logger config takes instance instead of class (#7997)
* allow preconfigured event logger instance; deprecate specifying class

* add func docs and simplify conditions

* modify docs to reflect EVENT_LOGGER cfg change

* commit black formatting fixes and license header

* add type checking, fix other pre-commit failues

* remove superfluous/wordy condition

* fix flake8 failure

* fix new black failure

* dedent warning msg; use f-strings
2019-08-08 13:47:18 -07:00
Dave Smith cd544fa6bc Local config no longer fails to import silently (#8006)
* Local config no longer fails to import silently

* fix types, use f-strings

* fix unhelpful pylint import error

* tweaked comment
2019-08-08 13:36:27 -07:00
Daniel Vaz Gaspar 73cdad2375 [SQLLab] Fix, database api unlimited page size v2 (#8002)
* [database] Fix, Removes the limit for the page size, Bump FAB to 2.1.8

Old FAB API had no limits by default, this will keep this behaviour
but only for this endpoint

* [sqllab] Add test for database API

* [sqllab] Add test for database API

* [sqllab] Include page zero on request

* [sqllab] Fix, Black and requirements

* [sqllab] Make database API return unlimited results

* [sqllab] just a test

* [sqllab] Bump FAB to 2.1.9

* [sqllab] Remove unused import
2019-08-08 11:37:00 -07:00
Maxime Beauchemin 2f2a3b79b4 Setup FOSSA as part of CI (#7999)
* Setup FOSSA as part of CI

* Add comments and links to FOSSA docs on script
2019-08-07 21:08:10 -07:00
Matthew Mutiso cbfd1302c0 Update to fix the broken blueprints link (#7949)
* Updated to fix the broken blueprints link

The current link is http://flask.pocoo.org/docs/0.12/blueprints/ which redirects to a non-existent page. The new link is https://flask.palletsprojects.com/en/1.1.x/tutorial/views/.

* Link to the current Flask version(1.0.x)
2019-08-07 14:31:22 -07:00
Ville Brofeldt 8cd8ec16d5 Fix Pandas 0.24 DateOffset bug pt. 2 (#7981)
* Fix pandas 0.24 DateOffset bug

* Add try-catch for DateOffsets that don't support normalize
2019-08-07 14:17:23 -07:00
Erik Ritter cd6de3a1d8 [Jinja] Make Presto template functions backwards compatible (#7993) 2019-08-07 09:35:16 -07:00
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
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
1AB9502 9eccae3b4f Update down_revision to fix migrations (#7850) 2019-07-11 12:32:34 -07:00
Beto Dealmeida a0ad18c8ba Quick fix (#7843) 2019-07-11 10:50:32 -07:00
Tresdon Jones 97ffb762d0 Add "Published" feature to dashboards (#4725)
* Allow users to publish dashboards

* Rework publish dashboards feature

- The eye next to the title has been replaced with a [draft] badge
- Published status is now toggled in the Header Action Dropdown
- CRUD list shows published status

* Fix linter errors

* Update javascript tests

* Add tests and change DashboardFilter

Add some tests to make sure the published status is rendered and
Make it so that users cannot see dashboards that are published
if they don't have access to any of the slices within

* Fix some linter errors

* Remove commas from core.py

* Fix some failing tests

* More linter errors I introduced

* Fix more linter errors I introduced

* update alembic migration

* Update design of publish dash feature

* Upgrade migration version

* Secure publish endpoint

* Remove bad quotes

* Give publish span its own style

* fix publish rendering

* Add new test for publish feature

* Update migration

* update slug in test

* Update migration

* Address reviwer comments

* Fix linter errors

* Add licenses

* Remove fetchPublished(), use bootstrap data

* Update migration

* Update croniter to existing version

* Fix linter errors

* Upgrade DB Revisions

* Fix flake8 linter error

* Set all dashboards to published on migration

* Migration proper line spacing

* Fix migration to work with postgres

* UPDATE statement works with postgresql and sqlite hopefully

* Update wording to kick off travis
2019-07-10 23:14:13 -07:00
John Bodley 8d81c3049a Update requirements.txt (#7835) 2019-07-09 08:29:26 -07:00
Taylor Miller 8c9b4b5cf5 * hacky string coercion to fix bug in cli datasource export (#7728) 2019-07-08 21:10:45 -07:00
Thoralf Gutierrez 953e5c7a72 Refactor testconn to use get_sqla_engine (#7717)
Creating the database connection will actually go through the get_sqla_engine path so that's what should be used to test the connection. This was triggered by realizing that testconn was not using the DB_CONNECTION_MUTATOR hook.

See #7668
2019-07-08 21:09:06 -07:00
michellethomas 51ff0e168d Updating superset-ui/legacy-preset-chart-nvd3 to 0.10.35 (#7837) 2019-07-08 17:43:21 -07:00
Maxime Beauchemin 16b6ccace9 Set up a few more pre-commit hook (#7830) 2019-07-08 09:38:36 -07:00
Daniel Vaz Gaspar 1ab04190cd [log] New, make action log configurable and generic (#7705)
* [log] New, make action log configurable and generic

* [log] Fix, missing apache license

* [log] Fix, user_id is a required parameter on event logs

* [log] Fix, Rename Action to Event

* [log] Fix, flake8

* [logger] Change all log_this decorators to new abstract one

* [logger] [docs] Simple docs to show how to override the event log

* [style] Fix, single quote to double quote

* [style] Fix, single quote to double quote
2019-07-08 09:38:12 -07:00
Daniel Vaz Gaspar f5839c413e Bump FAB to 2.1.6 (#7832) 2019-07-08 09:33:40 -07:00
Maxime Beauchemin d08efd39d3 Add missing 'babies.png' image (#7817) 2019-07-04 13:23:48 -07:00
Maxime Beauchemin ab8af536b0 Fixing the examples (#7376)
Fixing a few failing examples, examples were referencing metrics that
were getting auto-generated in the past (like `sum__num`),
that we now prevent from getting created.
2019-07-04 13:23:02 -07:00
Marcelo Novaes 39f83b5490 Add source{d} to user list in README.md (#7821) 2019-07-04 21:26:18 +03:00
Maxime Beauchemin 5c7a50c104 Improvements related to ASF release process (#7539)
* [WiP] Improvements related to ASF release process

* Removing translation binaries (.mo)
* Working on 2 docker files to help package and validate releases
  * Dockerfile.from_tarball: takes a VERSION as input, downloads
    official source release fro svn and bakes it into a functional
    docker image that can be validated
  * Dockerfile.make_tarball: helps a maintainer to package and sign a
    release candidate or release

* Address COPYRIGHT + LICENSE issues

(cherry picked from commit 5ae2836b25)

* Add Roboto font to LICENSE, remove glyphicons files

(cherry picked from commit 9615f39f7a556afe217b4e3288c9116f8ffaab91)

* remove unused LICENSE entries

* Change babytux to open image in birth dashboard

(cherry picked from commit 2776d11893596a029b8af37b96fd6ce1a9f12059)

* Improve instructions

* Docker tweaks

(cherry picked from commit df6e6462458ea8cff1482c142921b20f5607ad8e)

* Include image
2019-07-03 22:33:14 -07:00
Maxime Beauchemin 08b4a1735a fix: unicode word cloud example (#7747)
closes #7339
2019-07-03 22:32:30 -07:00
Daniel Serkowski 8c17c19279 Added possibility to translate the phrase 'No results found' in FilterBox (#7796) 2019-07-03 21:52:34 -07:00
Maxim Sukharev 2fa071a3ac fix: Better error message for dashboard import (#7621)
Common mistake is trying to import dashboard without creating
datasources first. Currently it causes error 500 with a message

> sqlalchemy.orm.exc.NoResultFound: No row was found for one()

which is difficult to understand.

This commit catches NoResultFound error and returns human readable error
using flash('danger').

Ref: #2992
2019-07-03 21:52:00 -07:00
Grace Guo 9b8996038e [dashboard] Fix URLShortLinkButton position after click anchor link (#7812) 2019-07-03 15:05:51 -07:00
John Bodley 9dac805e7e [schema] Deprecating the table_columns.database_expression column (#7653) 2019-07-03 14:05:59 -07:00
Ville Brofeldt 346638a339 Add second and minute grains (#7810) 2019-07-03 23:04:34 +03:00
Ville Brofeldt 0125ba40ef Improve documentation (#7813)
* Improve documentation and add type annotations for jinja context

* Fix linting errors

* Move requirements to correct place and remove redundant line change

* Make example query more ANSI SQL
2019-07-03 19:54:03 +03:00
John Bodley 6d7701e684 [fix] Updating Pandas resample logic (#7799) 2019-07-02 11:10:50 -07:00
Marcus 56eac687f8 Add Table List Refresh Button (#7502)
* Keep Search button because previously it disappeared + formatting.

* more stylistic consistency.

* more reliable event listener

* revert auto-formatting
2019-07-01 18:29:12 -07:00
John Bodley ffa7c617ad [travis] Adding Black tox environment (#7809) 2019-07-01 18:05:15 -07:00
Yongjie Zhao 459276f00d [Viz] transpose pivot table (#7325) 2019-07-01 15:44:01 -07:00
Jesus EKIE 3b2ac20396 Update messages.json (#7435) 2019-07-01 15:28:11 -07:00
Kim Truong 963dce6421 Autocomplete in the table browser in SQL lab is broken - Fix part 2 (#7770)
* fix: table autocomplete and update unit tests

* fix: linting issues

* fix: disable tests properly

* empty commit

* fix: align structure across fe and be
2019-07-01 12:44:46 -07:00
John Bodley e0d040c377 [fix] Handling of non-existent datasource (#7755) 2019-07-01 11:55:25 -07:00
Erik Ritter 15426febbe Improve performance for add slice container (#7791) 2019-07-01 10:55:12 -07:00
Chris d1158d6f4b add new user (#7801) 2019-07-01 10:53:36 -07:00
Beto Dealmeida 34ca2aefbe Truncate data that is expanded (#7777)
* Truncate data that is expanded

* Fix object check

* Small optimizations
2019-07-01 10:36:40 -07:00
Erik Ritter fc6a53eda9 [SQL Lab] Add hard time limit fallback for async queries (#7783) 2019-07-01 10:02:37 -07:00
Christopher Guan 61281d1836 Fix SQL editor tooltip to not cut off long column names (#7788) 2019-06-28 12:07:01 -07:00
Rahul Rahul 4740086bd7 Change kv content-type to text/plain (#7467)
* Change kv content-type to text/plain

* use single quote to fix linter errors
2019-06-28 18:24:11 +03:00
michellethomas d27fbd6718 Updating legacy-plugin-chart-heatmap to fix an issue with heatmap (#7787) 2019-06-27 15:33:38 -07:00
Kim Truong 5994e432d4 feat: query based on all partitions (#7782)
* feat: query based on all partitions

* fix: address Beto's comments
2019-06-27 11:19:55 -07:00
Ville Brofeldt ebb7fbc5f0 bugfix: Oracle timegrains fail to render when wrapped in outer query (#7767)
* Add check if TimegrainExpression col is None

* Clean up TimestampExpression proxying logic

* Remove redundant optionality from init
2019-06-26 08:56:19 +03:00
John Bodley 5c58fd1802 [format] Using Black (#7769) 2019-06-25 13:34:48 -07:00
John Bodley 0c9e6d0985 [testconn] Fixing response (#7753) 2019-06-24 23:07:41 -07:00
Rahul Rahul d06b77c3fd Show generic error msg and hide stacktrace if feature flag is enabled (#7764)
* Show generic error msg and hide stacktrace if feature flag is enabled

* SHOW_STACKTRACE should not modify msg
2019-06-24 21:11:04 -07:00
Maxime Beauchemin 859d6e7c6a chore: taking db dependencies out of requirements-dev.txt (#7605)
* chore: taking db dependencies out of requirements-dev.txt

The deps on mysqlclient and psycopg2

* Fix unit tests

* fix tox.ini

* fix tests
2019-06-23 22:37:41 -07:00
Ville Brofeldt 1df4fa26c2 Fix deck.gl sample charts with js (#7749)
* Fix js_data_mutator

* Remove redundant line change

* Add missing line changes
2019-06-23 15:53:26 -07:00
jiten-github 9c0c16c71b fix(filterbox): fixed runtime exception in filterbox for allow multiple selection is false (#7011) 2019-06-23 14:22:07 -07:00
Ville Brofeldt 1c4092c61c Add csv upload support for BigQuery (#7756)
* Add extra_require for bigquery to setup.py

* Refactor df_to_db and add df upload capability for BigQuery

* Fix unit tests and clarify kwarg logic

* Fix flake8 errors

* Add minimum versions for bigquery dependencies

* wrap to_gbq in try-catch block and raise error if pandas-gbq is missing

* Fix linting error and make error more generic
2019-06-23 14:20:09 -07:00
Daniel Vaz Gaspar 90d156f186 [security] [ui] Make security views use superset's list widget (#7724) 2019-06-21 14:25:48 -07:00
Daniel Vaz Gaspar f09c916879 Bump FAB to 2.1.5 (#7750) 2019-06-21 19:43:10 +03:00
Erik Ritter 0d248fe630 [SQL Lab] Add JSON modal when clicking on cells with JSON objects (#7720) 2019-06-21 09:12:09 -07:00
Beto Dealmeida 9abcdccf96 [fix] Force refresh table list broken (#7745) 2019-06-20 21:50:36 -07:00
Kim Truong 17c4b72183 Revert "Autocomplete in the table browser in SQL lab is broken (#7736)" (#7743)
* Revert "Autocomplete in the table browser in SQL lab is broken (#7736)"

This reverts commit d1b81e04ac.

* Kick off build
2019-06-20 19:47:39 -07:00
Kim Truong d1b81e04ac Autocomplete in the table browser in SQL lab is broken (#7736)
* fix: explicitly provide value and label strings

* fix: spacing
2019-06-19 16:59:39 -07:00
Ville Brofeldt 43ea51b701 compile column names (#7646) 2019-06-19 21:48:45 +03:00
Erik Ritter cddce63cad [SQL Lab] Polish side pane animation (#7722) 2019-06-19 10:44:06 -07:00
michellethomas 7a575ce20a Fixing time comparison to look for past deltas (#7616)
* Fixing time comparison to look for past deltas

* Adding note to updating about time_compare
2019-06-19 10:10:18 -07:00
Ville Brofeldt 437ca09f94 Bump sqla to 1.3.5 (#7729) 2019-06-19 09:50:10 -07:00
michellethomas 5864ddc079 Allowing withVerification to remove all options if none are valid (#7652) 2019-06-18 14:06:05 -07:00
Maxime Beauchemin f278faa8be css: add margin-top to ResultSet (#7679) 2019-06-17 22:57:40 -07:00
Erik Ritter 0b1a875708 [CSV Upload] Fix Index Column input filter (#7723) 2019-06-17 22:34:29 -07:00
Grace Guo 925b8dbb90 [dashboard] fix nested tab component visible logic (#7700) 2019-06-14 13:39:48 -07:00
Daniel Vaz Gaspar b6ab691ebd [docker] Fix docker-init missing FLASK_APP (#7709) 2019-06-14 09:02:11 -07:00
Erik Ritter 0d122431b2 Update @superset-ui/legacy-preset-chart-nvd3 (#7701) 2019-06-13 10:58:09 -07:00
Daniel Vaz Gaspar 4b1452e15a [docs] Fix, flask fab cli does not need app parameter (#7696) 2019-06-13 09:34:52 -07:00
Erik Ritter 2a453e1878 [SQL Lab] Fix proptypes warning (#7691) 2019-06-12 21:54:47 -07:00
Beto Dealmeida 5cf06331fe Render columns dynamically on wide tables (#7693)
* Use grid for wide tables

* WIP

* Fix CSS issues

* Add unit test

* Add constant

* Improve ref

* Remove wrong refs; no longer need extra height

* Revert number of columns
2019-06-12 10:09:04 -07:00
Kate f3181ca6dc Add Intercom to Superset users (#7687)
Add Intercom in the list of organisations that use Superset.
2019-06-12 09:18:22 -07:00
CoryChaplin 4e3975e229 Adding 6play as users (#7688) 2019-06-12 09:17:17 -07:00
John Bodley 8d6257afcd [epoch] Remove non-UTC epoch logic (#7667) 2019-06-11 22:34:53 -07:00
John Bodley 541db94133 Update index.rst (#7672) 2019-06-11 09:46:27 -07:00
John Bodley 49390b3232 Revert "Allow bigint to be used as time column in Presto" #7670 (#7678) 2019-06-10 16:10:20 -07:00
John Bodley c6179b195f [connectors] Make cluster/database and datasource/table unselectable in CRUD view (#7073) 2019-06-10 10:25:13 -07:00
Marcus f486f435b4 adding command for seeing changes reflected. (#7598) 2019-06-09 19:13:43 -07:00
Daniel Vaz Gaspar 6eb60ed89d Bump FAB to 2.1.4 (#7478)
* Bump FAB to 2.1.0

* Bump FAB to 2.1.1

* Bump FAB to 2.1.2

* Test revert to 2.1.1

* again to 2.1.2

* Bump FAB to 2.1.4
2019-06-09 18:25:31 -07:00
Evan Rusackas 514c308bcf Fixed SQL Lab Query Search scrolling issue(#7526) (#7674) 2019-06-09 16:05:43 -07:00
Ville Brofeldt 95291facff Break up db_engine_specs (#7676)
* Refactor db_engine_specs into package

* Rename bigquery class and add epoch funcs

* Fix flake8 errors

* Dynamically load all engine specs

* Fix linting errors and unit tests

* Implement Snowflake epoch time funcs

* Implement Teradata epoch time func

* Fix presto datasource query and remove unused import

* Fix broken datasource query

* Add mypy ignore for false positive

* Add missing license files

* Make create_time_grains_tuple public

* Fix flake8 quote

* Fix incorrect licence header
2019-06-08 11:27:13 -07:00
Thoralf Gutierrez f3e5805b92 Remove duplicate paragraph in celery tasks documentation (#7392) 2019-06-08 09:20:49 -07:00
Ville Brofeldt 38abf4e073 Add epoch funcs for BigQuery (#7567) 2019-06-07 20:01:58 -07:00
Erik Ritter f7812a3f27 [SQL Lab] Clarify SQL Lab query and display limits (#7641) 2019-06-07 17:16:38 -07:00
Grace Guo f3091c525e [dashboard] pass dashboard filters to share chart url in dropdown (#7642) 2019-06-07 15:22:56 -07:00
Grace Guo 39d67cbc59 [SQL Lab] Show warning when user used up localStorage (#7572) 2019-06-07 14:27:57 -07:00
Derek Flionis 883a02ae19 docs: Add Tenable to the List of Users (#7610) 2019-06-07 08:28:39 -07:00
Rahul Rahul 2793bdd294 Apply DashboardFilter to the dashboards in SliceModeView (#7475)
* Apply dashboardFilter to dashboards

* added missing comma
2019-06-06 23:20:42 -07:00
1AB9502 271612cfec Add new escape characters to OnPasteSelect (#7638)
* Add new escape characters to OnPasteSelect

* Add Unit Tests to onPasteSelect_spec

* Update new line to tab escape character

* Fix indentation in 2 cases
2019-06-06 22:24:50 -07:00
Daniel Vaz Gaspar de9f61e934 [docs] Fix, deprecate fabmanager cli (#7660) 2019-06-06 22:15:00 -07:00
Kim Truong d62c37b895 Revert "Boxplot should not require a datetime column (#5096)" (#7655)
This reverts commit 1ae000a262.
2019-06-05 15:05:26 -07:00
Enrico Berti 1cd0e7f3f4 [SQL Lab] CTAS now uses the right async configuration (#7175)
Closes #6224
2019-06-04 22:59:36 -07:00
Erik Ritter 25da4c773b [Profile] Fix react gravitar size prop type warning (#7647) 2019-06-04 22:46:05 -07:00
Derek Flionis 5470d10155 Add Filter on DatabaseView that filters DBs Based on Role Access (#7618)
* Add Filter on DatabaseView that filters DBs Based on Role Access

* Update with mistercrunch's feedback
2019-06-04 22:37:22 -07:00
Grace Guo f99ae1ad24 [dashboard] click tab anchor link (#7640) 2019-06-03 16:57:21 -07:00
Beto Dealmeida ddd7f8fb17 Fix colors in ellipsis (#7632)
* Fix colors in ellipsis

* Change method name to align with convention

* Fix js lint
2019-06-03 15:40:36 -07:00
michellethomas 6d1f6e9df9 Adding codecov targets and thresholds (#7433)
* Adding codecov targets and thresholds

* Changing diff coverage rules to 1% threshold

* Changing codecov threshold to 0 and removing ignore
2019-06-03 15:26:42 -07:00
John Bodley 45b41aadcc [fix] SQL parsing of table names (#7490) 2019-06-03 11:07:57 -07:00
Jim Horng 78c1674dc7 make filter_values() macro to properly accept value from filter box with single value setting (#7494) 2019-06-03 09:54:07 -07:00
Maxime Beauchemin 45b9880516 fix: SqlaColumn.type overflow on mysql (#7606)
* fix: SqlaColumn.type overflow on mysql

Hitting a new error when loading examples around a datatype that exceeds
the 32 chars limit on SqlaColumn.type

Type includes the 'COLLATE utf8mb4_general_ci' suffix which is too
verbose and not needed in that context.

* fix tests
2019-06-03 09:52:25 -07:00
Daniel Vaz Gaspar 7dd66358f6 [query] Fix, remove not possible to order columns (#7636) 2019-06-02 12:10:59 -07:00
Charles S. Givre 257c100c59 Fixed Time Grain and Added Drill to README (#7635)
* Fixed Time Grain and Added Drill to README

* Capitalization Fix
2019-06-02 16:13:59 +03:00
Maxime Beauchemin 1dc17f357c fix: address issue #7458 (#7593) 2019-06-01 13:33:06 -07:00
Maxime Beauchemin eb4293654e [FAB] set AppBuilder to update_perms=False (#7561)
* [FAB] set AppBuilder to update_perms=False

Upon start, by default, FAB tries to go and update the permission list
in the database based on the list of views, models and menu items that
exist in the code.

Really this should happen once per deployment/upgrade and
not in module scope, so we have `superset init` for this.

The intent was always to set to False by default, but I think we forgot
to add this flag back in
https://github.com/apache/incubator-superset/pull/7323

* Add superset init to tox
2019-06-01 10:19:49 -07:00
Maxime Beauchemin 4b5931f637 Alternative fix for #7559 (#7575)
* Alternative fix for #7559

Just an idea...

* logging
2019-06-01 09:21:35 -07:00
Maxime Beauchemin 687f205508 Wrapping up #7130 (#7633)
* [SQL Lab] Adds autocomplete on table names and auto-add to schema browser

Closes #7059

* Wrapping up #7130

For more details see #7130, this PR addresses the merge conflicts.
2019-06-01 09:02:42 -07:00
Erik Ritter 722043c672 Allow trailing spaces in simple filter values (#7617) 2019-05-31 17:06:41 -07:00
John Bodley 15d0361148 [requirements] Bumping pydruid version (#7622) 2019-05-31 16:28:40 -07:00
Erik Ritter 5895d8c8e1 [SQL Lab] Prevent failed query error from disappearing (#7624) 2019-05-31 15:27:08 -07:00
Grace Guo 5701629d95 [SQL Lab] Old query showing success state but not showing results (#7628) 2019-05-31 15:26:41 -07:00
John Bodley c82a7f42e1 Update bug_report.md (#7583) 2019-05-31 13:47:30 -07:00
Kim Truong 9acafd5b75 fix: handle presto columns with whitespace (#7630) 2019-05-31 13:38:05 -07:00
Kim Truong d2967340d9 View Presto row and array objects clearly in the data grid (#7625)
* feat: rough check in for Presto rows and arrays

* fix: presto arrays

* fix: return selected and expanded columns

* fix: add helper methods and unit tests

* fix: only allow exploration of selected columns

* fix: address Beto's comments and add more unit tests
2019-05-31 11:25:07 -07:00
Beto Dealmeida d408e30594 Show expanded columns in gray in SQL Editor (#7627)
* Show expanded columns in gray

* Remove payload mocking

* Remove empty line

* Safety fallback if expanded_columns is not in the payload

* Fix typo
2019-05-31 10:17:13 -07:00
Ville Brofeldt c1712e5d10 Add relative start param for time filters (#7525)
* Add relative start param for time filters

* Fix typo and add types to parse_human_datetime

* Add relative start/end to query_object

* Fix linting error
2019-05-31 16:55:26 +03:00
Grace Guo dbdb6b093a [SQL Lab] fix unnecessary offline action (#7594) 2019-05-30 10:38:49 -07:00
Erik Ritter 145d72c52b Fix SQL Lab window resizing layout bug (#7615) 2019-05-30 10:37:24 -07:00
Ville Brofeldt 34407e8962 Make timestamp expression native SQLAlchemy element (#7131)
* Add native sqla component for time expressions

* Add unit tests and remove old tests

* Remove redundant _grains_dict method

* Clarify time_grain logic

* Add docstrings and typing

* Fix flake8 errors

* Add missing typings

* Rename to TimestampExpression

* Remove redundant tests

* Fix broken reference to db.database_name due to refactor
2019-05-30 08:28:37 +03:00
Charles S. Givre fc3b043462 Add support for Apache Drill (#6610)
* Add support for Apache Drill

* Updated Docs

* Removed Extraneous Functions

* Removed Extraneous Functions

* Final Mods

* Fixed Unit Test Error

* Fixed Epoch Conversion Functions
2019-05-28 21:16:09 -07:00
Maxime Beauchemin fd5befee38 Bump python libs, address insecure releases (#7550)
* Bump python libs, address insecure releases

Using
https://requires.io/github/mistercrunch/superset/requirements/?branch=apache_release_improv
to identify insecure, old releases we're using and bumping.

* redis <3.0

* fix new flakes
2019-05-28 21:03:49 -07:00
Ali Bahjati 2a2f395e94 Add "Auto" option to Mapbox visualization point radius (#7579)
* 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
2019-05-28 17:07:40 -07:00
Luca Toscano b21f8ec804 Remove the use of Pandas' iloc() in WorldMapViz (#7379)
When the same metric is used in a World Map panel for both bubble size
and an axis (either X or Y), it currently breaks the rendering.

The change in behavior was introduced in:
https://github.com/apache/incubator-superset/commit/71e0c079041c4f955e8529349baa17058e70d256#diff-f451672348fc6071e8d627778bdc4e96L1730

The use of .iloc() is not needed anymore since the code that used
to duplicate the metric is not there anymore.

Should fix #7006
2019-05-28 14:19:04 -07:00
Ville Brofeldt f7d3413a50 Add support for period character in table names (#7453)
* Move schema name handling in table names from frontend to backend

* Rename all_schema_names to get_all_schema_names

* Fix js errors

* Fix additional js linting errors

* Refactor datasource getters and fix linting errors

* Update js unit tests

* Add python unit test for get_table_names method

* Add python unit test for get_table_names method

* Fix js linting error
2019-05-26 06:13:16 +03:00
michellethomas 47ba2ad394 Remove aggregates from metric options if datasource has no columns (#7586) 2019-05-24 11:10:35 -07:00
Grace Guo 20143293eb [sql lab]revert #4833 (#7498) 2019-05-23 17:39:40 -07:00
TheLastSultan e4f8444f82 add American Express to list of users on readme (#7576) 2019-05-23 17:32:16 -07:00
Beto Dealmeida 265e117a4a Add link to scheduled pipeline (#7584)
* Add link to scheduled pipeline

* Split utils into separate file

* Fix unit test

* Fix separator recursion
2019-05-23 11:22:15 -07:00
Beto Dealmeida f68f979052 Fix for polling queries (#7559)
* Fix for polling queries

* Revert changes due to https://github.com/apache/incubator-superset/pull/7575
2019-05-23 09:17:00 -07:00
Beto Dealmeida 9c8f494c9d A few improvements to scheduling queries (#7585)
* Better message for scheduling queries

* Only allow scheduling after success

* Ask for query name and description

* Use CSS instead of <br />
2019-05-23 09:15:04 -07:00
michellethomas 421183d3f4 Adding controls for verifying options (#7468)
* Creating withVerification HOC

* Updating to use componentDidMount and componentDidUpdate and adding propTypes

* Adding tests to withVerification

* Adding documentation to withVerification
2019-05-22 16:39:01 -07:00
John Bodley e5739fbbd2 [testconn] Explicit closing engine connection (#7570) 2019-05-22 09:42:03 -07:00
John Bodley 6b9790c8b1 [ad-hoc] Fixing type for count distinct (#7573) 2019-05-22 09:41:25 -07:00
Grace Guo efb085ad03 [cypress] fix accessing a cross-origin frame error (#7552) 2019-05-21 16:02:46 -07:00
Maxime Beauchemin 551fe926cf Add dotenv to dependencies (#7330) 2019-05-21 13:21:05 -07:00
Axel Mathéi 1ae000a262 Boxplot should not require a datetime column (#5096)
See https://github.com/apache/incubator-superset/issues/2222
2019-05-20 22:14:23 -07:00
Daniel Vaz Gaspar 74704f68c7 [security] New, deprecate merge_perm, FAB method is fixed (#7355)
* [security] New, deprecate merge_perm, FAB method is fixed

* [style] Fix, flakes

* [tests] Fix, change merge_perm to add_permission_view_menu

* [security] Fix, maintain merge_perm for compatibility

* [security] New, deprecation warning on merge_perm method

* [style] Fix, flake8 C812
2019-05-20 17:30:00 -07:00
Russell Jurney 023faf3b56 Rjurney master docs update (#7426)
* resolved conflict

* Docs updated re: Anaconda/certifi issue re #7373

* Removed --console-log "not working" note

* A note about Anaconda virtualenvs

* Make anaconda comment fit on page

* Added README to docker directory

* Added install doc reference to master copy of contrib/docker/README.md

* merged master, removed mysqlclient

* Removed mysql dependency, Anaconda and --console-log references

* Add cypress install command to cypress test instructions

* Fixed cypress instructions re: port 8081

* Removed anaconda reference, runserver references

* Remove anaconda reference

* Added back a self-contained version of mysqlclient to dev requirements

* Added ASF license to docker README.md
2019-05-20 17:06:08 -07:00
Maxime Beauchemin 1fdc96a381 Disabling flask-talisman by default (#7535)
flask-talisman was enabled recently and while it may be virtuous in some
cases, it seems to break things out of the box.

Locally and in dev mode, upon my first redirect it sends to HTTPS and
things it crashes.

I think it should be opt-in, maybe we can recommend turning this on in
production in the docs?
2019-05-20 16:58:36 -07:00
Kim Truong c79077d85d feat: add header tooltip (#7556)
* feat: add header tooltip (#7531)
2019-05-20 12:04:42 -07:00
Beto Dealmeida dcafabd183 Show scheduled queries (#7545)
* Show scheduled queries

* Remove column

* Secure views

* Add import

* Fix unit tests

* Reuse existing db connection from view

* Remove unnecessary import
2019-05-17 17:31:02 -07:00
Beto Dealmeida f0f719cb8d Validate start/end when scheduling queries (#7544)
* Validate start/end when scheduling queries

* Use chrono instead of Sugar
2019-05-17 17:30:13 -07:00
Craig Rueda 21a467094b Talisman config (#7529)
* Making Talisman configurable

* Fixing double quotes

* Fixing flake8

* Removing default
2019-05-16 22:55:59 -05:00
Grace Guo 7f858e4566 [sql lab] Fix new query stuck at pending state (#7523) 2019-05-16 15:22:23 -07:00
Alex Berghage 9423e9a8be chore: Truncate progressbar percentage decimals (#7499) (#7517) (#7519)
This change makes the query progress bar only show
whole number percentage changes, instead of numbers
like 12.13168276%.
2019-05-15 15:33:30 -07:00
Alex Berghage 156b0aaa07 feat: Live query validation in the SQL Lab UI (#7461) (#7516) (#7518)
* [WIP] Live query validation, where supported

This builds on #7422 to build check-as-you-type sql
query validation in Sql Lab. This closes #6707 too.

It adds a (debounced) call to the validate_sql_json
API endpoint with the querytext, and on Lyft infra is
able to return feedback to the user (end to end) in
$TBD seconds.

At present feedback is provided only through the
"annotations" mechanism build in to ACE, although
I'd be open to adding full text elsewhere on the
page if there's interest.

* fix: Unbreak lints and tests
2019-05-15 15:32:40 -07:00
Conglei fda1002654 fix: cache issue for api/v1/query (#7507) 2019-05-14 14:21:05 -07:00
Felix Ouk 5243182129 Change Visual Properties tab label to Customize (#7506) 2019-05-14 10:57:28 -07:00
Felix Ouk a4d18e70ca Flatten legacy preset charts (#7500)
* Flatten MapChartPreset, HierarchyChartPreset, and CommonChartPreset charts into LegacyChartPreset class

* Rename LegacyChartPreset class to MainPreset to reflect new chart preset hierarchy
2019-05-14 10:30:15 -07:00
John Bodley a4392c8fcd [security] Adding Flask-Talisman (#7443) 2019-05-13 17:08:24 -07:00
Maxime Beauchemin d8be0a7dd5 Break line before LIMIT statement to prevent trailing comment issue (#7485)
* Break line before LIMIT statement to prevent trailing comment issue

This may not be a perfect solution but it addresses the issue in 7483

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

* fix tests
2019-05-13 00:34:34 -05:00
cscainiao 4377328e39 Add Chinese translation (#7481)
* add chinese translate

* edit chinese translation

* Add Chinese translation

* Revised Chinese translation

* restore .json
2019-05-11 21:48:43 -07:00
Luca Toscano 51fd43a47b druid connector: avoid using 'dimensions' for scan queries (#7377)
After the following PyDruid change (contained in version 0.5.2)
the Superset Histogram charts rendered with Druid data are
broken:

druid-io/pydruid@0a59a70

Bump the pydruid requirements accordingly in setup.py

Issue: apache#7368
2019-05-09 00:25:34 -05:00
cscainiao f59ed026e4 Revised Chinese translation (#7464)
* add chinese translate

* edit chinese translation
2019-05-08 14:34:59 -07:00
Beto Dealmeida ef13500d1a Refactor ConsoleLog (#7428) 2019-05-08 13:05:01 -07:00
Kim Truong ca48f32a07 fix: alter sql columns to long text #7463 (#7476)
Merge lyft-release-sp8@7bfe7bc to master
2019-05-08 10:30:43 -07:00
Grace Guo 6b8bda6096 [dashboard] After update filter, trigger new queries when charts are visible (#7233)
* trigger query when chart is visible

* add integration test
2019-05-07 23:41:18 -07:00
Ville Brofeldt 959c35d506 bugfix: Improve support for special characters in schema and table names (#7297)
* Bugfix to SQL Lab to support tables and schemas with characters that require quoting

* Remove debugging prints

* Add uri encoding to secondary tables call

* Quote schema names for presto

* Quote selected_schema on Snowflake, MySQL and Hive

* Remove redundant parens

* Add python unit tests

* Add js unit test

* Fix flake8 linting error
2019-05-08 00:37:44 -05:00
Maxime Beauchemin a3f091263a fix: calendar heatmap examples (#7375)
Fixing a set of examples that trip on ValueError vs TypeError
2019-05-08 00:35:14 -05:00
Maxime Beauchemin e2be0221b7 Late import for optional lib pyhive (#7471)
* Late import for optional lib pyhive

* fix
2019-05-07 19:16:27 -05:00
Russell Jurney f3d8e8a424 Adds missing metric sum__SP_RUR_TOTL (#7452) 2019-05-07 10:46:27 -05:00
Alex Berghage 24970485cf feat: Add validate_sql_json endpoint for checking that a given sql query is valid for the chosen database (#7422) (#7462)
merge from lyft-release-sp8 to master
2019-05-06 10:21:02 -07:00
Dave Smith 5cf454b464 feat: Scheduling queries from SQL Lab (#7416) (#7446)
* Merge lastest from master into lyft-release-sp8 (#7405)

* filter out all nan series (#7313)

* improve not rich tooltip (#7345)

* Create issue_label_bot.yaml (#7341)

* fix: do not save colors without a color scheme (#7347)

* [wtforms] Strip leading/trailing whitespace (#7084)

* [schema] Updating the datasources schema (#5451)

* limit tables/views returned if schema is not provided (#7358)

* limit tables/views returned if schema is not provided

* fix typo

* improve code performance

* handle the case when table name or view name does not present a schema

* Add type anno (#7342)

* Updated local dev instructions to include missing step

* First pass at type annotations

* [schema] Updating the base column schema (#5452)

* Update 937d04c16b64_update_datasources.py (#7361)

* Feature flag for client cache (#7348)

* Feature flag for client cache

* Fix integration test

* Revert "Fix integration test"

This reverts commit 58434ab98a.

* Feature flag for client cache

* Fix integration tests

* Add feature flag to config.py

* Add another feature check

* Fix more integration tests

* Fix raw HTML in SliceAdder (#7338)

* remove backendSync.json (#7331)

* [bubbles] issue when using duplicated metrics (#7087)

* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04 (#7359)

* SUPERSET-8: Update text in docs copyright footer (#7360)

* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04

* SUPERSET-8: Extra text in docs copyright footer

* [schema] Adding commits and removing unnecessary foreign-key definitions (#7371)

*  Store last selected dashboard in sessionStorage (#7181)

* Store last selected dashboard in sessionStorage

* Fix tests

* [schema] Updating the base metric schema (#5453)

* Fix NoneType bug & fill the test recipients with original recipients if empty (#7365)

* feat: see Presto row and array data types (#7391)

* feat: see Presto row and array data types

* fix: address PR comments

* fix: lint and build issues

* fix: add types

* Incorporate feedback from initial PR (prematurely merged to lyft-release-sp8) (#7415)

* add stronger type hints where possible

* fix: lint issues and add select_star func in Hive

* add missing pkg init

* fix: build issues

* fix: pylint issues

* fix: use logging instead of print

* feat: view presto row objects in data grid

* fix: address feedback

* fix: spacing

* Workaround for no results returned (#7442)

* feat: view presto row objects in data grid (#7436)

* feat: view presto row objects in data grid

* fix: address feedback

* fix: spacing

* feat: Scheduling queries from SQL Lab (#7416)

* Lightweight pipelines POC

* Add docs

* Minor fixes

* Remove Lyft URL

* Use enum

* Minor fix

* Fix unit tests

* Mark props as required
2019-05-03 16:45:19 -07:00
Kim Truong 88e6ec992c feat: view presto row objects in data grid (#7445)
* Merge lastest from master into lyft-release-sp8 (#7405)

* filter out all nan series (#7313)

* improve not rich tooltip (#7345)

* Create issue_label_bot.yaml (#7341)

* fix: do not save colors without a color scheme (#7347)

* [wtforms] Strip leading/trailing whitespace (#7084)

* [schema] Updating the datasources schema (#5451)

* limit tables/views returned if schema is not provided (#7358)

* limit tables/views returned if schema is not provided

* fix typo

* improve code performance

* handle the case when table name or view name does not present a schema

* Add type anno (#7342)

* Updated local dev instructions to include missing step

* First pass at type annotations

* [schema] Updating the base column schema (#5452)

* Update 937d04c16b64_update_datasources.py (#7361)

* Feature flag for client cache (#7348)

* Feature flag for client cache

* Fix integration test

* Revert "Fix integration test"

This reverts commit 58434ab98a.

* Feature flag for client cache

* Fix integration tests

* Add feature flag to config.py

* Add another feature check

* Fix more integration tests

* Fix raw HTML in SliceAdder (#7338)

* remove backendSync.json (#7331)

* [bubbles] issue when using duplicated metrics (#7087)

* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04 (#7359)

* SUPERSET-8: Update text in docs copyright footer (#7360)

* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04

* SUPERSET-8: Extra text in docs copyright footer

* [schema] Adding commits and removing unnecessary foreign-key definitions (#7371)

*  Store last selected dashboard in sessionStorage (#7181)

* Store last selected dashboard in sessionStorage

* Fix tests

* [schema] Updating the base metric schema (#5453)

* Fix NoneType bug & fill the test recipients with original recipients if empty (#7365)

* feat: see Presto row and array data types (#7391)

* feat: see Presto row and array data types

* fix: address PR comments

* fix: lint and build issues

* fix: add types

* Incorporate feedback from initial PR (prematurely merged to lyft-release-sp8) (#7415)

* add stronger type hints where possible

* fix: lint issues and add select_star func in Hive

* add missing pkg init

* fix: build issues

* fix: pylint issues

* fix: use logging instead of print

* feat: view presto row objects in data grid

* fix: address feedback

* fix: spacing
2019-05-03 16:29:57 -07:00
Craig Rueda c8bb7e0fe4 Quick fix to address deadlock issue (#7434) 2019-05-02 12:45:15 -07:00
cscainiao 598526a8a1 add chinese translate (#7402) 2019-05-01 22:36:25 -07:00
John Bodley fb627ba376 [fix] Fixing SQL parsing issue (#7374) 2019-05-01 22:07:01 -07:00
Anne E. Ulrich ee78fd7b3d Added additional German translations to string file (#6604)
* Added additional German translations to string file

Updates to German translation files as per directions

* Removed messages.json
2019-05-01 21:05:30 -07:00
Russell Jurney f6ebd789bf Fixes dashboard export button missing download and #7353 (#7427) 2019-05-01 21:04:28 -07:00
Russell Jurney 70be44afe1 Removed --console-log and superset runserver (#7421) 2019-05-01 20:46:39 -07:00
Dave Smith a6aabf8268 feature: see Presto row and array data types (#7413)
* Merge lastest from master into lyft-release-sp8 (#7405)

* filter out all nan series (#7313)

* improve not rich tooltip (#7345)

* Create issue_label_bot.yaml (#7341)

* fix: do not save colors without a color scheme (#7347)

* [wtforms] Strip leading/trailing whitespace (#7084)

* [schema] Updating the datasources schema (#5451)

* limit tables/views returned if schema is not provided (#7358)

* limit tables/views returned if schema is not provided

* fix typo

* improve code performance

* handle the case when table name or view name does not present a schema

* Add type anno (#7342)

* Updated local dev instructions to include missing step

* First pass at type annotations

* [schema] Updating the base column schema (#5452)

* Update 937d04c16b64_update_datasources.py (#7361)

* Feature flag for client cache (#7348)

* Feature flag for client cache

* Fix integration test

* Revert "Fix integration test"

This reverts commit 58434ab98a.

* Feature flag for client cache

* Fix integration tests

* Add feature flag to config.py

* Add another feature check

* Fix more integration tests

* Fix raw HTML in SliceAdder (#7338)

* remove backendSync.json (#7331)

* [bubbles] issue when using duplicated metrics (#7087)

* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04 (#7359)

* SUPERSET-8: Update text in docs copyright footer (#7360)

* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04

* SUPERSET-8: Extra text in docs copyright footer

* [schema] Adding commits and removing unnecessary foreign-key definitions (#7371)

*  Store last selected dashboard in sessionStorage (#7181)

* Store last selected dashboard in sessionStorage

* Fix tests

* [schema] Updating the base metric schema (#5453)

* Fix NoneType bug & fill the test recipients with original recipients if empty (#7365)

* feat: see Presto row and array data types (#7391)

* feat: see Presto row and array data types

* fix: address PR comments

* fix: lint and build issues

* fix: add types

* add stronger type hints where possible

* fix: lint issues and add select_star func in Hive

* add missing pkg init

* fix: build issues

* fix: pylint issues

* fix: use logging instead of print
2019-05-01 09:17:34 -07:00
Maxime Beauchemin 46579b1bd6 Refactor out controlUtils.js module + unit tests (#7350)
* [WiP]refactor out a controlUtils.js file

* unit tests

* add missing license

* Addressing comments
2019-04-30 11:45:06 -07:00
michellethomas 8703244198 Setting renderTrigger on label_colors (#7410) 2019-04-30 11:26:13 -07:00
Daniel Vaz Gaspar f504568088 [annotations] Improves UX on annotation validation, start_dttm, end_dttm (#7326) 2019-04-30 09:08:07 -07:00
Daniel Vaz Gaspar 06c4610e8e Bump FAB to 2.0.0 (#7323)
* Bump FAB to 2.0.0

* [tests] whitelist SecurityApi login and refresh endpoints

* [style] Fix, C812 missing trailing commas

* [security] Remove SUPERSET_UPDATE_PERMS flag

Registering sources needs to be performed after the views are
initialized on UPDATE_PERMS=False configuration

* [docs] New, FAB_UPDATE_PERMS and flask fab cli

* [docs] Fix, db upgrade needs to come first, create-admin needs a db

* [cli] New, superset init bootstraps all permissions for FAB and Superset

* [style] Fix, flakes
2019-04-30 09:01:18 -07:00
Grace Guo 11408d0189 [SQL Lab] Increase timeout threshold for offline check (#7411) 2019-04-30 00:56:44 -07:00
Grace Guo 9e703f399b [dashboard] allow user re-order top-level tabs (#7390) 2019-04-30 00:40:35 -07:00
Kiplangat Victor ca2996c78f Added living goods as among the users of Superset (#7407)
* Added living goods as among the users of Superset

Living Goods is a non profit organisation with operation in africa and the middle east. We work in community health use data heavily on day to day. Superset is our platform of choice for dashboards.

* Update README.md
2019-04-29 17:25:55 -07:00
ImPerat0R_ 4fe152d156 Fix NoneType bug & fill the test recipients with original recipients if empty (#7365) 2019-04-24 22:36:10 -07:00
Maxime Beauchemin 929fb6bbb8 Merge branch 'lyftga' 2019-04-24 21:55:12 -07:00
John Bodley f488a3281d [schema] Updating the base metric schema (#5453) 2019-04-24 21:50:14 -07:00
leakingoxide f83b979342 Store last selected dashboard in sessionStorage (#7181)
* Store last selected dashboard in sessionStorage

* Fix tests
2019-04-24 14:43:13 -07:00
John Bodley 3a359fd892 [schema] Adding commits and removing unnecessary foreign-key definitions (#7371) 2019-04-24 12:33:33 -07:00
Andrew Musselman 7bc8355b75 SUPERSET-8: Update text in docs copyright footer (#7360)
* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04

* SUPERSET-8: Extra text in docs copyright footer
2019-04-24 12:31:47 -07:00
Andrew Musselman e8af852e67 SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04 (#7359) 2019-04-24 11:47:07 -07:00
Maxime Beauchemin e61a8ee6bf [bubbles] issue when using duplicated metrics (#7087) 2019-04-24 10:35:55 -07:00
Krist Wongsuphasawat 778812419b remove backendSync.json (#7331) 2019-04-24 10:35:13 -07:00
Maxime Beauchemin fef5b5efb0 Fix raw HTML in SliceAdder (#7338) 2019-04-24 10:34:24 -07:00
Beto Dealmeida cb7c8063f3 Feature flag for client cache (#7348)
* Feature flag for client cache

* Fix integration test

* Revert "Fix integration test"

This reverts commit 58434ab98a.

* Feature flag for client cache

* Fix integration tests

* Add feature flag to config.py

* Add another feature check

* Fix more integration tests
2019-04-23 20:03:57 -07:00
John Bodley f58e7b204e Update 937d04c16b64_update_datasources.py (#7361) 2019-04-23 18:34:41 -07:00
John Bodley 1388452169 [schema] Updating the base column schema (#5452) 2019-04-23 18:06:21 -07:00
Craig Rueda 48b2af471c Add type anno (#7342)
* Updated local dev instructions to include missing step

* First pass at type annotations
2019-04-23 16:37:52 -07:00
Thomas Wang 4bc69c0a61 limit tables/views returned if schema is not provided (#7358)
* limit tables/views returned if schema is not provided

* fix typo

* improve code performance

* handle the case when table name or view name does not present a schema
2019-04-23 13:51:46 -07:00
John Bodley 621cef7048 [schema] Updating the datasources schema (#5451) 2019-04-23 13:22:29 -07:00
John Bodley cf87173c21 [wtforms] Strip leading/trailing whitespace (#7084) 2019-04-23 12:04:50 -07:00
Kim Truong 5f14b559e2 fix: do not save colors without a color scheme (#7347) 2019-04-22 15:46:24 -07:00
Hamel Husain 845218dd88 Create issue_label_bot.yaml (#7341) 2019-04-22 14:11:35 -07:00
Thomas Wang 8fd7d4b670 improve not rich tooltip (#7345) 2019-04-22 11:53:08 -07:00
Maxime Beauchemin 36a219da7f Allow Gamma and Alpha to access '/users/userinfo/' (#6936)
* Allow Gamma and Alpha to access '/users/userinfo/'

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

* Fix unit test

* Fix test
2019-04-22 11:23:54 -07:00
Maxime Beauchemin aa1d9ae303 [table] highlight selected <td>s (#7013) 2019-04-22 10:40:12 -07:00
Connor Hogendorn 0ea8291b77 fixes #6353 by changing tag on base image (#7335) 2019-04-20 13:17:52 -07:00
Maxime Beauchemin 5db20e3545 Fix #7056 'Unhashable type' in paired t-test chart (#7076) 2019-04-20 10:26:37 -07:00
Maxime Beauchemin eb9295d97f [docs] improve the RELEASING.md docs (#7329)
* [docs] improve the RELEASING.md docs

* more tweaks
2019-04-20 10:26:01 -07:00
Thomas Wang 7192d36513 filter out all nan series (#7313) 2019-04-19 08:59:19 -07:00
Maxime Beauchemin 5f28027ce7 Merging lyftga into master 2019-04-18 22:47:47 -07:00
leakingoxide 07d9dbd963 fix: typos in translations placeholders (#7161) 2019-04-18 15:14:44 -07:00
Maxime Beauchemin 97718daea3 Fix control validation handling (#7231)
Fixes a series of unexpected things around control validation.

* when a chart opens in a state where a control is invalid, it still
  runs the query, and sometimes gets stuck in what appears to be a 'running'
  state. After this change, no query is run, and a warning is displayed
  in the chart panel body, just like any other error would
* validation used to be done in the <Control> component and alter the
  redux store as it went. Clearly this is not the right approach, now
  validation occurs on loading the initial redux state, as well as in
  the reducer when controls are changed
* currently, when going from a invalid control state to a valid one
  (user addresses what is needed), it auto-triggers a query which can be
  unexpected. After this change, the error message disappears, and the
  "Run Query" overlay gets displayed
* when changing viz type, it's common to get new validation
  errors, and currently when that occurs it will still go ahead and run
  a query with invalid inputs, which often results in errors
  that are not well handled, since much of the logic
  assumes control-validated input.
* prettier control validation messages

(cherry picked from commit a3212eba5df95bca834d8d6d98c11d522d9172f3)
2019-04-18 11:36:38 -07:00
michellethomas 51068f007e Adding permission for can_only_access_owned_queries (#7234)
* Adding permission for can_only_access_owned_queries

* Fixing lint adding typing to variable

* Adding test for queryview and enabling /queryview/api/read

* Fixing issues with python typing
2019-04-17 16:11:11 -07:00
Kim Truong 81a1e5322b fix: propagate color mapping from dashboard to charts (#7289)
* fix: propagate color map from dashboard to chart

* fix: handle cache scenario

* fix: give default values
2019-04-17 15:36:59 -07:00
Maxime Beauchemin 38dd33e979 Remove LICENSE entry around dataset (#7318) 2019-04-17 14:12:33 -07:00
Krist Wongsuphasawat ab8f4afff7 feat: bump superset-ui versions to 0.11 (#7294)
* feat: bump superset-ui versions to 0.11

* fix: update version number again

* fix: package-lock.json

* test: disable large number test

* fix: revert cors
2019-04-17 14:10:54 -07:00
Maxime Beauchemin 3d08266714 [load_examples] download data at runtime (#7314)
* [load_examples] download data at runtime

When running `superset load_examples` to load example data sets,
Superset used to load from the local package. This created a few issues
notably around licensing (what are these datasets licensed as?) and
around package size.

For now, I moved the data sets here:
https://github.com/apache-superset/examples-data

Altered the logic to download the data from where it is stored.

* flakes
2019-04-17 13:19:14 -07:00
michellethomas 9341995803 fix: time series table (#7302) (#7312)
* fix: time series table

* fix: add default value for label

* fix: use prop values if defined

* fix: revert CollectionControl changes

(cherry picked from commit 5dab983fd8)
2019-04-17 12:37:45 -07:00
Fan Donglai 7aa6c4e9ca Update AceEditorWrapper.jsx (#7315)
THEN is also a keyword in SQL
2019-04-17 08:11:21 -07:00
Daniel Vaz Gaspar 1ffd3b1161 [slice] Fix, remove duplicate label_columns property (#7113) 2019-04-17 08:10:47 -07:00
Kim Truong 5dab983fd8 fix: time series table (#7302)
* fix: time series table

* fix: add default value for label

* fix: use prop values if defined

* fix: revert CollectionControl changes
2019-04-16 10:33:12 -07:00
Kim Truong 154f6abf97 Revert "bugfix: improve 'Time Table' (#6959)" (#7304)
This reverts commit 9b4f5ad8e1.
2019-04-16 10:32:43 -07:00
Maxime Beauchemin d253c5ca0f Add details to release instructions (#7296) 2019-04-15 12:48:51 -07:00
Maxime Beauchemin 9dfa80d5c8 Add all database access permission to 'Alpha' role (#7271)
* Add all database access permission to 'Alpha' role

* Grant all database access to Alpha
2019-04-15 09:22:54 -07:00
Kim Truong 0f1702b88e chore: update legacy packages (#7293) 2019-04-12 16:43:28 -07:00
Maxime Beauchemin b1ebfbc577 Bump nvd3 dep and 'npm audit fix' (#7292) 2019-04-12 09:55:54 -07:00
Maxime Beauchemin 9b4f5ad8e1 bugfix: improve 'Time Table' (#6959)
* [WiP] debugging and improving 'Time Table'

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

* Lint

* Remove passing down props from CollectionControl

* Declarative passthrough of props

* remove console.error
2019-04-11 23:36:48 -07:00
Maxime Beauchemin 14647fc2ed Minor improvements to <Hotkeys /> component (#7261)
* left align, close to button it's related to
* text-muted, so it's a bit more subtle
* fix required func props, where no func it actually passed
2019-04-11 23:08:38 -07:00
Yongjie Zhao 763db8fd76 Improve code smell, use py3k super() call (#7100) 2019-04-11 21:48:35 -07:00
Krist Wongsuphasawat 80070d0eaf fix: make the bot more descriptive (#7279) 2019-04-10 11:02:10 -07:00
Krist Wongsuphasawat f9db605e0d fix: make SIPs exempt from stale bots (#7278)
* fix: make SIPs exempt from stale bots

* update pr template
2019-04-10 09:24:45 -07:00
Maxime Beauchemin 0c3e46f8ae Deprecate npm run backend-sync and related logic (#7211) 2019-04-10 08:46:05 -07:00
Krist Wongsuphasawat 6c38cb1a09 chore: add bot config files and update issue templates (#7249)
* chore: add bot config files and update issue templates

* fix: exclude SIP
2019-04-09 22:45:58 -07:00
Maxime Beauchemin b225507bca Run 'npm audit fix' to address vulnerabilities (#7263) 2019-04-09 22:45:42 -07:00
Kim Truong 65cc0e513c chore: update big number package (#7268) 2019-04-09 20:52:39 -07:00
Beto Dealmeida 9856800cee Do not add tag to non-saved objects (#7266) 2019-04-09 20:51:42 -07:00
Maxime Beauchemin 79dbb3f1fe [SQL Lab] fix table metadata loading spinner (#7121)
* [SQL Lab] fix table metadata loading spinner

The loading spinner used to be close to the new table name that was just
added, and recently flickers and disappears early.

This puts the spinner where it's expected to be.

* Use class

* Addressing comments

* adapt CSS

* add missing license
2019-04-09 20:51:35 -07:00
Beto Dealmeida e505e326b2 Revert "Fix issues around Database permissions (#7009)" (#7267)
This reverts commit f5274a9c7f.
2019-04-09 20:39:24 -07:00
Beto Dealmeida 984b04d1e5 Add extra bucket when max outside range (#7264) 2019-04-09 19:35:13 -07:00
Beto Dealmeida 05afe1b8c2 Bump pydruid to 0.5.2 (#7260) 2019-04-09 17:39:24 -07:00
Grace Guo 1104aca5bd update migration Revision for #6945 (#7258) 2019-04-09 17:38:12 -07:00
Beto Dealmeida 078a9774ce Pass viz type to GET requests (#7255)
* Pass viz type to GET requests

* Fix integration tests
2019-04-09 16:54:37 -07:00
Kim Truong 2a67e8e457 fix: Handle rendering a single point (#7256)
* fix: Handle rendering a single point

* fix: typo
2019-04-09 15:46:47 -07:00
Grace Guo c50e6bc981 feat(dashboard): direct link to single chart/tab/header in dashboard (#6964)
* direct display for pre-selected tab

* update parents

* add AnchorLink component

* add unit tests
2019-04-09 15:42:46 -07:00
Grace Guo 139f299ab3 add parent ids into Dashboard layout metadata (#6945) 2019-04-09 15:41:57 -07:00
John Bodley 92166399da [cache] Render label when cached (#7164) 2019-04-09 15:00:35 -07:00
Maxime Beauchemin 149b31d296 fix: Remove ASF license from github templates (PR and issues) (#7217)
* Remove ASF license from github templates (PR and issues)

It shows as people open issues and PRs and it's confusing...

* add to rat-excludes
2019-04-09 13:18:30 -07:00
Beto Dealmeida 7c80cf58eb Fix refresh frequency (#7248)
* Fix refresh frequency

* Fix unit tests
2019-04-09 11:22:28 -07:00
Beto Dealmeida 51472e9035 Improve cache (#7227)
* Improve cache

* Improve code, add docs

* Simplify flow

* Update docstring
2019-04-09 11:05:44 -07:00
Beto Dealmeida 51544212b6 Add link to documentation (#7251) 2019-04-09 09:40:19 -07:00
Beto Dealmeida 821860ea7d Fix partition query in Presto (#7250) 2019-04-09 08:44:44 -07:00
Maxime Beauchemin 5192270f26 Fix logo / branding files (#7105)
* Fix logo / branding files

SVG was busted in the branding folder. Files were partly corrupt.

This takes back the original logo, and offers a with-Apache and
without-Apache option. SVG renders nicely. The pngs are also bigger.

* add ASF license
2019-04-08 23:49:02 -07:00
Beto Dealmeida 23ef41ffaa Fix spinning in Welcome page (#7247) 2019-04-08 16:43:56 -07:00
Thomas Wang ad7cc01922 increment version numbers (#7245)
* increment version numbers

* increment version numbers

* increment nvd3
2019-04-08 15:45:39 -07:00
Maxime Beauchemin 442cfc692a Tweaks to word cloud controls (#7212) 2019-04-08 15:31:21 -07:00
michellethomas 5ef2712e16 [filter_box] allow empty filters list (#7220) (#7244)
in some cases, people want a time filter only on filter box, without
specifying dimensions (filters), this allows that

(cherry picked from commit e39b169949)
2019-04-08 15:08:47 -07:00
michellethomas 52473c5d34 Fix race condition when fetching results in SQL Lab (#7198) (#7242)
* Fix race condition when fetching results in SQL Lab

* Fix lint

(cherry picked from commit ca6a73b028)
2019-04-08 15:08:32 -07:00
Beto Dealmeida c6876f7829 Fix for tagging backend (#7240) 2019-04-08 11:06:45 -07:00
Thomas Wang 74bdc3248a increment version number for nvd3 (#7232)
* increment version number for nvd3

* fix: update package-lock.json

* fix: update package-lock.json

* remove package-lock.json created by accident
2019-04-04 23:05:14 -07:00
Maxime Beauchemin e39b169949 [filter_box] allow empty filters list (#7220)
in some cases, people want a time filter only on filter box, without
specifying dimensions (filters), this allows that
2019-04-04 22:17:35 -07:00
Kim Truong b4915caa6e fix: give a more accurate time (#7221) 2019-04-04 12:57:57 -07:00
Beto Dealmeida 43874b3750 Fix time grain after revert (#7228) 2019-04-03 21:16:23 -07:00
Kim Truong a875239259 fix: add check for polygon tooltips (#7226) 2019-04-03 18:44:03 -07:00
Beto Dealmeida 4ab89dbcf7 Celery task for warming up cache (#7148)
* Sparkline dates aren't formatting in Time Series Table (#6976)

* Exclude venv for python linter to ignore

* Fix NaN error

* Fix the white background shown in SQL editor on drag (#7021)

This PR sets the background-color css property on `.ace_scroller` instead of `.ace_content` to prevent the white background shown during resizing of the SQL editor before drag ends.

* Show tooltip with time frame (#6979)

* Fix time filter control (#6978)

* Enhancement of query context and object. (#6962)

* added more functionalities for query context and object.

* fixed cache logic

* added default value for groupby

* updated comments and removed print

(cherry picked from commit d5b9795f87)

* [fix] /superset/slice/id url is too long (#6989)


(cherry picked from commit 6a4d507ab6)

* [WIP] fix user specified JSON metadata not updating dashboard on refresh (#7027)


(cherry picked from commit cc58f0e661)

* feat: add ability to change font size in big number (#7003)

* Add ability to change font sizes in Big Number

* rename big number to header

* Add comment to clarify font size values

* Allow LIMIT to be specified in parameters (#7052)

* [fix] Cursor jumping when editing chart and dashboard titles (#7038)


(cherry picked from commit fc1770f7b7)

* Changing time table viz to pass formatTime a date (#7020)

(cherry picked from commit 7f3c145b1f)

* [db-engine-spec] Aligning Hive/Presto partition logic (#7007)


(cherry picked from commit 05be866117)

* [fix] explore chart from dashboard missed slice title (#7046)


(cherry picked from commit a6d48d4052)

* fix inaccurate data calculation with adata rolling and contribution (#7035)


(cherry picked from commit 0782e831cd)

* Adding warning message for sqllab save query (#7028)


(cherry picked from commit ead3d48133)

* [datasource] Ensuring consistent behavior of datasource editing/saving. (#7037)

* Update datasource.py

* Update datasource.py

(cherry picked from commit c771625f10)

* [csv-upload] Fixing message encoding (#6971)


(cherry picked from commit 48431ab5b9)

* [sql-parse] Fixing LIMIT exceptions (#6963)


(cherry picked from commit 3e076cb60b)

* Adding custom control overrides (#6956)

* Adding extraOverrides to line chart

* Updating extraOverrides to fit with more cases

* Moving extraOverrides to index.js

* Removing webpack-merge in package.json

* Fixing metrics control clearing metric

(cherry picked from commit e6194051f4)

* [sqlparse] Fixing table name extraction for ill-defined query (#7029)


(cherry picked from commit 07c340cf82)

* [missing values] Removing replacing missing values (#4905)


(cherry picked from commit 61add606ca)

* [SQL Lab] Improved query and results tabs rendering reliability (#7082)

closes #7080

(cherry picked from commit 9b58e9f492)

* Fix filter_box migration PR #6523 (#7066)

* Fix filter_box migration PR #6523

* Fix druid-related bug

(cherry picked from commit b210742ad2)

* SQL editor layout makeover (#7102)

This PR includes the following layout and css tweaks:
- Using flex to layout the north and south sub panes of query pane so resizing works properly in both Chrome and Firefox
- Removal of necessary wrapper divs and tweaking of css in sql lab so we can scroll to the bottom of both the table list and the results pane
- Make sql lab's content not overflow vertically and layout the query result area to eliminate double scroll bars
- css tweaks on the basic.html page so the loading animation appears in the center of the page across the board

(cherry picked from commit 71f1bbd2ec)

* [forms] Fix handling of NULLs

(cherry picked from commit e83a07d3df)

* handle null column_name in sqla and druid models

(cherry picked from commit 2ff721ae07)

* Use metric name instead of metric in filter box (#7106)


(cherry picked from commit 003364e74e)

* Bump python lib croniter to an existing version (#7132)

Package maintainers should really never delete packages, but it appears
this happened with croniter and resulted in breaking our builds.

This PR bumps to a more recent existing version of the library

(cherry picked from commit 215ed392a1)

* Revert PR #6933 (#7162)

* Celery worker for warming up cache

* Remove testing changes

* Add documentation

* Fix lint

* WIP dashboard filters

* Use new cache so it works with dashboards

* Add more unit tests, fix old ones

* Fix flake8 and docs

* Sparkline dates aren't formatting in Time Series Table (#6976)

* Exclude venv for python linter to ignore

* Fix NaN error

* Changing time table viz to pass formatTime a date (#7020)

(cherry picked from commit 7f3c145b1f)

* SQL editor layout makeover (#7102)

This PR includes the following layout and css tweaks:
- Using flex to layout the north and south sub panes of query pane so resizing works properly in both Chrome and Firefox
- Removal of necessary wrapper divs and tweaking of css in sql lab so we can scroll to the bottom of both the table list and the results pane
- Make sql lab's content not overflow vertically and layout the query result area to eliminate double scroll bars
- css tweaks on the basic.html page so the loading animation appears in the center of the page across the board

(cherry picked from commit 71f1bbd2ec)

* Celery worker for warming up cache

* Remove testing changes

* Add documentation

* Fix lint

* WIP dashboard filters

* Use new cache so it works with dashboards

* Add more unit tests, fix old ones

* Fix flake8 and docs

* Fix bad merge and pylint
2019-04-03 16:57:59 -07:00
Kim Truong 1132c3cbde feat: [lyftga] add tooltips to deck.gl viz types (#7206)
* Add tooltips to deck.gl viz types

* Handle text overflow

* Use .css file instead of .less

* fix: add tooltip component

* Add tooltips to deck.gl viz types

* Handle text overflow

* Use .css file instead of .less

* fix: add tooltip component

* fix: casing, types, and keys
2019-04-03 13:35:27 -07:00
Maxime Beauchemin e714dc19fe Merge branch 'master' into lyftga 2019-04-03 13:31:34 -07:00
Maxime Beauchemin e767e4d9ef Fix <Select> clearable (#7215)
closes https://github.com/apache/incubator-superset/issues/7213
related to
https://github.com/apache/incubator-superset/pull/6722#issuecomment-479366738
2019-04-03 13:25:49 -07:00
Beto Dealmeida 6998b1014a Allow bigint to be used as time column in Presto (#7218) 2019-04-03 12:43:39 -07:00
Beto Dealmeida 538776b470 Fetch charts with GET to benefit from browser cache and conditional requests (#7032)
* Sparkline dates aren't formatting in Time Series Table (#6976)

* Exclude venv for python linter to ignore

* Fix NaN error

* Fix the white background shown in SQL editor on drag (#7021)

This PR sets the background-color css property on `.ace_scroller` instead of `.ace_content` to prevent the white background shown during resizing of the SQL editor before drag ends.

* Show tooltip with time frame (#6979)

* Fix time filter control (#6978)

* Enhancement of query context and object. (#6962)

* added more functionalities for query context and object.

* fixed cache logic

* added default value for groupby

* updated comments and removed print

(cherry picked from commit d5b9795f87)

* [fix] /superset/slice/id url is too long (#6989)


(cherry picked from commit 6a4d507ab6)

* [WIP] fix user specified JSON metadata not updating dashboard on refresh (#7027)


(cherry picked from commit cc58f0e661)

* feat: add ability to change font size in big number (#7003)

* Add ability to change font sizes in Big Number

* rename big number to header

* Add comment to clarify font size values

* Allow LIMIT to be specified in parameters (#7052)

* [fix] Cursor jumping when editing chart and dashboard titles (#7038)


(cherry picked from commit fc1770f7b7)

* Changing time table viz to pass formatTime a date (#7020)

(cherry picked from commit 7f3c145b1f)

* [db-engine-spec] Aligning Hive/Presto partition logic (#7007)


(cherry picked from commit 05be866117)

* [fix] explore chart from dashboard missed slice title (#7046)


(cherry picked from commit a6d48d4052)

* fix inaccurate data calculation with adata rolling and contribution (#7035)


(cherry picked from commit 0782e831cd)

* Adding warning message for sqllab save query (#7028)


(cherry picked from commit ead3d48133)

* [datasource] Ensuring consistent behavior of datasource editing/saving. (#7037)

* Update datasource.py

* Update datasource.py

(cherry picked from commit c771625f10)

* [csv-upload] Fixing message encoding (#6971)


(cherry picked from commit 48431ab5b9)

* [sql-parse] Fixing LIMIT exceptions (#6963)


(cherry picked from commit 3e076cb60b)

* Adding custom control overrides (#6956)

* Adding extraOverrides to line chart

* Updating extraOverrides to fit with more cases

* Moving extraOverrides to index.js

* Removing webpack-merge in package.json

* Fixing metrics control clearing metric

(cherry picked from commit e6194051f4)

* [sqlparse] Fixing table name extraction for ill-defined query (#7029)


(cherry picked from commit 07c340cf82)

* [missing values] Removing replacing missing values (#4905)


(cherry picked from commit 61add606ca)

* [SQL Lab] Improved query and results tabs rendering reliability (#7082)

closes #7080

(cherry picked from commit 9b58e9f492)

* Fix filter_box migration PR #6523 (#7066)

* Fix filter_box migration PR #6523

* Fix druid-related bug

(cherry picked from commit b210742ad2)

* SQL editor layout makeover (#7102)

This PR includes the following layout and css tweaks:
- Using flex to layout the north and south sub panes of query pane so resizing works properly in both Chrome and Firefox
- Removal of necessary wrapper divs and tweaking of css in sql lab so we can scroll to the bottom of both the table list and the results pane
- Make sql lab's content not overflow vertically and layout the query result area to eliminate double scroll bars
- css tweaks on the basic.html page so the loading animation appears in the center of the page across the board

(cherry picked from commit 71f1bbd2ec)

* [forms] Fix handling of NULLs

(cherry picked from commit e83a07d3df)

* handle null column_name in sqla and druid models

(cherry picked from commit 2ff721ae07)

* Use metric name instead of metric in filter box (#7106)


(cherry picked from commit 003364e74e)

* Bump python lib croniter to an existing version (#7132)

Package maintainers should really never delete packages, but it appears
this happened with croniter and resulted in breaking our builds.

This PR bumps to a more recent existing version of the library

(cherry picked from commit 215ed392a1)

* Revert PR #6933 (#7162)

* Add decorator for etag cache

* Fetch charts with GET

* Small fixes

* Fix typo

* Compute correct cache key; fix logging

* Check perms on cached response

* Revert change

* If perms fail, return naked response

* Fix lint

* Compute cache key from all form data

* Pass extra_filters in GET request

* Fix pylint

* Fix flake8

* Use ETags even if no cache is set

* Handle adhoc filters

* Raise in debug mode

* Rename actions

* Fix integration tests

* Do POST request on new charts

* Set extra/adhoc filters only in GET requests

* Raise if check_perms fails

* Refactor auth

* Fix flake8

* Fix js unit tests

* Fix js unit tests that fail in lyftga

* Fix js

* Sparkline dates aren't formatting in Time Series Table (#6976)

* Exclude venv for python linter to ignore

* Fix NaN error

* Changing time table viz to pass formatTime a date (#7020)

(cherry picked from commit 7f3c145b1f)

* SQL editor layout makeover (#7102)

This PR includes the following layout and css tweaks:
- Using flex to layout the north and south sub panes of query pane so resizing works properly in both Chrome and Firefox
- Removal of necessary wrapper divs and tweaking of css in sql lab so we can scroll to the bottom of both the table list and the results pane
- Make sql lab's content not overflow vertically and layout the query result area to eliminate double scroll bars
- css tweaks on the basic.html page so the loading animation appears in the center of the page across the board

(cherry picked from commit 71f1bbd2ec)

* Add decorator for etag cache

* Fetch charts with GET

* Small fixes

* Fix typo

* Compute correct cache key; fix logging

* Check perms on cached response

* Revert change

* If perms fail, return naked response

* Fix lint

* Compute cache key from all form data

* Pass extra_filters in GET request

* Fix pylint

* Fix flake8

* Use ETags even if no cache is set

* Handle adhoc filters

* Raise in debug mode

* Rename actions

* Fix integration tests

* Do POST request on new charts

* Set extra/adhoc filters only in GET requests

* Raise if check_perms fails

* Refactor auth

* Fix flake8

* Fix js unit tests

* Fix js unit tests that fail in lyftga

* Fix js

* Fix bad merge

* Use far future when max_age=0
2019-04-03 12:11:08 -07:00
Christine Chambers 8e14807b2a chore: revert bignumber.js patch for charts and reapply the original bignumber.js change to SQL editor in an opt-in fashion (#7210)
* revert: bignumber patch to prevent rendering regression in charts

* Revert "Fix rendering regression from the introduction of bignumber (#6937)"

* fix: consume the bignumber.js reversion -- apply the bignumber conversion in `actions/sqlLab.js` where it is needed (aka opt into bignumber.js).

* Revert "Fix deck.gl form data (#6953)" b/c formData now returns snake_cased properties for deck vizzes.
2019-04-03 11:19:56 -07:00
agrawaldevesh 8830d3f96e [Data Source Editor] Use type of NUMERIC instead of NUMBER and make editor accept freeform types (#7123) 2019-04-03 10:33:59 -07:00
Kim Truong 200efacc36 fix: [lyftga] pass the latest deckgl props (#7208) 2019-04-02 17:13:18 -07:00
Kim Truong 74a0b57d80 Update necessary packages (#7205) 2019-04-02 15:00:11 -07:00
Kim Truong 62cfb2d2e3 Change number format default (#7137)
* Sparkline dates aren't formatting in Time Series Table (#6976)

* Exclude venv for python linter to ignore

* Fix NaN error

* Fix the white background shown in SQL editor on drag (#7021)

This PR sets the background-color css property on `.ace_scroller` instead of `.ace_content` to prevent the white background shown during resizing of the SQL editor before drag ends.

* Show tooltip with time frame (#6979)

* Fix time filter control (#6978)

* Enhancement of query context and object. (#6962)

* added more functionalities for query context and object.

* fixed cache logic

* added default value for groupby

* updated comments and removed print

(cherry picked from commit d5b9795f87)

* [fix] /superset/slice/id url is too long (#6989)


(cherry picked from commit 6a4d507ab6)

* [WIP] fix user specified JSON metadata not updating dashboard on refresh (#7027)


(cherry picked from commit cc58f0e661)

* feat: add ability to change font size in big number (#7003)

* Add ability to change font sizes in Big Number

* rename big number to header

* Add comment to clarify font size values

* Allow LIMIT to be specified in parameters (#7052)

* [fix] Cursor jumping when editing chart and dashboard titles (#7038)


(cherry picked from commit fc1770f7b7)

* Changing time table viz to pass formatTime a date (#7020)

(cherry picked from commit 7f3c145b1f)

* [db-engine-spec] Aligning Hive/Presto partition logic (#7007)


(cherry picked from commit 05be866117)

* [fix] explore chart from dashboard missed slice title (#7046)


(cherry picked from commit a6d48d4052)

* fix inaccurate data calculation with adata rolling and contribution (#7035)


(cherry picked from commit 0782e831cd)

* Adding warning message for sqllab save query (#7028)


(cherry picked from commit ead3d48133)

* [datasource] Ensuring consistent behavior of datasource editing/saving. (#7037)

* Update datasource.py

* Update datasource.py

(cherry picked from commit c771625f10)

* [csv-upload] Fixing message encoding (#6971)


(cherry picked from commit 48431ab5b9)

* [sql-parse] Fixing LIMIT exceptions (#6963)


(cherry picked from commit 3e076cb60b)

* Adding custom control overrides (#6956)

* Adding extraOverrides to line chart

* Updating extraOverrides to fit with more cases

* Moving extraOverrides to index.js

* Removing webpack-merge in package.json

* Fixing metrics control clearing metric

(cherry picked from commit e6194051f4)

* [sqlparse] Fixing table name extraction for ill-defined query (#7029)


(cherry picked from commit 07c340cf82)

* [missing values] Removing replacing missing values (#4905)


(cherry picked from commit 61add606ca)

* [SQL Lab] Improved query and results tabs rendering reliability (#7082)

closes #7080

(cherry picked from commit 9b58e9f492)

* Fix filter_box migration PR #6523 (#7066)

* Fix filter_box migration PR #6523

* Fix druid-related bug

(cherry picked from commit b210742ad2)

* SQL editor layout makeover (#7102)

This PR includes the following layout and css tweaks:
- Using flex to layout the north and south sub panes of query pane so resizing works properly in both Chrome and Firefox
- Removal of necessary wrapper divs and tweaking of css in sql lab so we can scroll to the bottom of both the table list and the results pane
- Make sql lab's content not overflow vertically and layout the query result area to eliminate double scroll bars
- css tweaks on the basic.html page so the loading animation appears in the center of the page across the board

(cherry picked from commit 71f1bbd2ec)

* [forms] Fix handling of NULLs

(cherry picked from commit e83a07d3df)

* handle null column_name in sqla and druid models

(cherry picked from commit 2ff721ae07)

* Use metric name instead of metric in filter box (#7106)


(cherry picked from commit 003364e74e)

* Bump python lib croniter to an existing version (#7132)

Package maintainers should really never delete packages, but it appears
this happened with croniter and resulted in breaking our builds.

This PR bumps to a more recent existing version of the library

(cherry picked from commit 215ed392a1)

* Revert PR #6933 (#7162)

* [bugfix] SQL Lab 'Filter Results' doesn't stick (#7104)

When using a "Search Results" criteria, the subset of rows that match
the criteria get displayed. While this the filter is applied, if another
query is run, the filter is still active, but not displayed in the input
text box. After this change, the state of the input box sticks after
subsequent queries.

(cherry picked from commit d5e8d663dc)

* Injectable statsd client (#7138)

* Add ability to inject statsd client; some py test/reqs updates

- Updated the metrics logger to allow construction with an existing
statsd client, so that it can be configured by external systems or libs.
- added requirements to requirements-dev.txt which are needed to run
  tests-eg coverage, nose
- removed dependency on mock lib, it is in python stdlib now
- updated tox.ini to remove the now-superfluous deps

* add license to test file, and remove blank line at EOF

(cherry picked from commit ba19a62412)

* [Lyft-GA] Enable color consistency in a dashboard (#7135)

* Enable color consistency in a dashboard

Moved actions, minor UI, allowed dashboard copy

Fix linting errors

Undo unintentional change

Updated and added unit tests

Fail quietly if package has not been updated

Fail quietly on dashboard copy if package is old

* Update packages

* Remove unnecessary code

* Addressed Grace's comments

* Small fix for item key

* Reset chart's color during exploration

* Do not reset chart form data when exploring chart

* Fix double scroll bars when content of sql result table overflows horizontally (#7168)

The PR substracts the scrollbar height from the height of the container of the react virtualized table so we don't see double scrollbars.

(cherry picked from commit 7ffcabd5c0)

* Change number format default

* Use smart formatter instead

* fix merge issues

* Use SMART_NUMBER
2019-04-01 22:04:31 -07:00
Beto Dealmeida ca6a73b028 Fix race condition when fetching results in SQL Lab (#7198)
* Fix race condition when fetching results in SQL Lab

* Fix lint
2019-04-01 22:04:31 -07:00
Beto Dealmeida 82cf55375d Revert PR #6933 (#7162) 2019-04-01 22:04:31 -07:00
Kim Truong e974a23f90 [Lyft-GA] Enable color consistency in a dashboard (#7135)
* Enable color consistency in a dashboard

Moved actions, minor UI, allowed dashboard copy

Fix linting errors

Undo unintentional change

Updated and added unit tests

Fail quietly if package has not been updated

Fail quietly on dashboard copy if package is old

* Update packages

* Remove unnecessary code

* Addressed Grace's comments

* Small fix for item key

* Reset chart's color during exploration

* Do not reset chart form data when exploring chart
2019-04-01 22:04:31 -07:00
Beto Dealmeida f66b598d37 Allow LIMIT to be specified in parameters (#7052) 2019-04-01 22:04:31 -07:00
Kim Truong 7d95036554 feat: add ability to change font size in big number (#7003)
* Add ability to change font sizes in Big Number

* rename big number to header

* Add comment to clarify font size values
2019-04-01 22:04:31 -07:00
Beto Dealmeida 7488b4d329 Fix time filter control (#6978) 2019-04-01 22:04:31 -07:00
Beto Dealmeida fb9fdc87d7 Show tooltip with time frame (#6979) 2019-04-01 22:04:31 -07:00
Thomas Wang a717a90577 fix: deck.gl polygon tooltip (#7188) 2019-04-01 21:26:30 -07:00
Maxime Beauchemin c5bdbc0964 [security] make it easier to redefine Alpha/Gamma (#7036)
* [security] make it easier to redefine Alpha/Gamma

While talking about some security aspect and as to how you'd alter Alpha
or Gamma role in a specific environment, I realized that these
module-scoped constants would be much more useful as class attributes.

This way, someone can override these sets in their security manager
to alter base roles.

* fix

* flake8
2019-04-01 18:06:40 -07:00
Grace Guo a1d4635627 [fix] a typo in variable name (#7197) 2019-04-01 17:55:40 -07:00
Enrico Berti 37d7b2c040 feat: added i18n statements to sqllab (#7194)
Closes #7193
2019-04-01 13:43:22 -07:00
Krist Wongsuphasawat 2af9a84d09 fix: do not crash when a vis type is disabled. (#7180)
* fix: make vis type control handle unregistered type

* fix: hide when not needed

* fix: do not try to read controlpanelconfig for invalid type

* feat: add t
2019-04-01 13:37:40 -07:00
rasmi-ranjan-guavus efede0af91 fix(sqllab): remove duplicate selector in style file (#7126) 2019-04-01 12:33:23 -07:00
Hannah Squier 03752af4e8 fix PRODUCT-67916 Click OK button cannot close error message modal (#7179) 2019-04-01 10:00:22 -07:00
John Bodley f13e0a8d58 Update __init__.py (#7166) 2019-04-01 09:50:20 -07:00
Enrico Berti 03c95c86dd [SQL Lab] Show tooltip on schema and table select options (#7120)
Closes #7119
2019-03-30 11:45:53 -07:00
michellethomas ceb86df063 chore: add main pull request template (#7176)
* Add main pull request template

* Removing individual pull request templates
2019-03-29 13:06:45 -07:00
michellethomas 7059c52a79 Adding pull request templates (#7159) 2019-03-29 08:52:28 -07:00
Christine Chambers 7ffcabd5c0 Fix double scroll bars when content of sql result table overflows horizontally (#7168)
The PR substracts the scrollbar height from the height of the container of the react virtualized table so we don't see double scrollbars.
2019-03-29 06:45:44 -07:00
Alan Carson 41c13152a9 docs: add cloudsmith to company list (#7158)
Thanks!
2019-03-28 22:24:27 -07:00
John Bodley 36a6fade90 [migration] Fixing issue with fb13d49b72f9 downgrade (#7145)
* [migration] Fixing issue with fb13d49b72f9 downgrade

This PR fixes an issue with the downgrade step of migration fb13d49b72f9 which wrongfully labeled the field `metrics` rather than `metric`.

to: @graceguo-supercat @michellethomas @mistercrunch

* Update fb13d49b72f9_better_filters.py
2019-03-28 10:07:55 -07:00
John Bodley 6e79e84b02 [migration] Fixing issue with c82ee8a39623 downgrade (#7144)
* [migration] Fixing downgrade

* Trigger notification
2019-03-27 22:23:21 -07:00
Maxime Beauchemin d5e8d663dc [bugfix] SQL Lab 'Filter Results' doesn't stick (#7104)
When using a "Search Results" criteria, the subset of rows that match
the criteria get displayed. While this the filter is applied, if another
query is run, the filter is still active, but not displayed in the input
text box. After this change, the state of the input box sticks after
subsequent queries.
2019-03-27 17:53:32 -07:00
Dave Smith ba19a62412 Injectable statsd client (#7138)
* Add ability to inject statsd client; some py test/reqs updates

- Updated the metrics logger to allow construction with an existing
statsd client, so that it can be configured by external systems or libs.
- added requirements to requirements-dev.txt which are needed to run
  tests-eg coverage, nose
- removed dependency on mock lib, it is in python stdlib now
- updated tox.ini to remove the now-superfluous deps

* add license to test file, and remove blank line at EOF
2019-03-27 14:08:36 -07:00
Enrico Berti cd54a567dd fix: Superset logo link when logged out (#7118)
Closes #7107
2019-03-27 13:49:34 -07:00
John Bodley ee36ce8b31 chore: updating extra requires (#7115) 2019-03-27 13:48:11 -07:00
Enrico Berti c99d9b5d3c [SQL Lab] Avoid closing save query modal on backdrop click (#7111)
Closes #7110
2019-03-27 13:46:39 -07:00
Maxime Beauchemin c2b971af91 [docs] CONTRIBUTING.md - how to setup SQL Lab in async mode (#7103) 2019-03-26 22:50:19 -07:00
Maxime Beauchemin 215ed392a1 Bump python lib croniter to an existing version (#7132)
Package maintainers should really never delete packages, but it appears
this happened with croniter and resulted in breaking our builds.

This PR bumps to a more recent existing version of the library
2019-03-26 13:27:16 -07:00
Maxime Beauchemin 68d2880bce Remove super verbose logging.debug call (#7122)
I left this behind on a previous PR, and it gets kind of crazy on large
SQL statements, so decided it's probably a good thing to clean this up.
2019-03-26 08:42:13 -07:00
rasmi-ranjan-guavus f556da80cb fix(useless-self-assignment): correct useless-self-assignment (#7090)
* fix(useless-self-assignment): correct useless-self-assignment

* udated code formatting
2019-03-26 08:35:44 -07:00
Maxime Beauchemin ebb32101c9 Scripts & instructions to craft official Apache source releases (#7054)
* Apache Releases

https://github.com/mistercrunch/superset/blob/apache-releases/RELEASING.md#apache-releases

* npm run prod -> npm run build
2019-03-25 16:21:26 -07:00
Don Bowman 4c5e6ca208 Add HTTP Basic Auth for Druid (Issue #4776) (#6795)
* Add HTTP Basic Auth for Druid (Issue #4776)

This should resolve [Issue #4776](https://github.com/apache/incubator-superset/issues/4776)

Add HTTP Basic Auth to the Druid Broker.

Signed-off-by: Don Bowman <don@agilicus.com>

* Encrypt broker password in database

Signed-off-by: Don Bowman <don@agilicus.com>

* Merge from master, new migration needed

Signed-off-by: Don Bowman <don@agilicus.com>

* Do not expose hashed druid basic auth password

* docs: add description_columns for druid basic auth
2019-03-25 16:20:12 -07:00
Christine Chambers 71f1bbd2ec SQL editor layout makeover (#7102)
This PR includes the following layout and css tweaks:
- Using flex to layout the north and south sub panes of query pane so resizing works properly in both Chrome and Firefox
- Removal of necessary wrapper divs and tweaking of css in sql lab so we can scroll to the bottom of both the table list and the results pane
- Make sql lab's content not overflow vertically and layout the query result area to eliminate double scroll bars
- css tweaks on the basic.html page so the loading animation appears in the center of the page across the board
2019-03-25 15:19:43 -07:00
Maxime Beauchemin 87fae5c602 [docs] improve UPDATING.md around 0.31's [now] optional deps (#7117) 2019-03-25 15:03:08 -07:00
michellethomas 003364e74e Use metric name instead of metric in filter box (#7106) 2019-03-25 09:57:39 -07:00
John Bodley b3c4bd95ef [forms] Fix handling of NULLs (#7078) 2019-03-25 00:24:26 -07:00
Ville Brofeldt 23e823f0c1 Bump SQLAlchemy to 1.3 (#7099)
* Bump sqla to >=1.3.1

* Refine mssql column types to only use N-prefixing when necessary

* make join explicit

* replace set with list

* Add additional test case for N-prefix

* Replace engine with dialect and fix linting error

* Remove unneeded import
2019-03-24 20:44:05 -07:00
John Bodley 80d6f5a090 [mypy] Adding mypy linting (#7053) 2019-03-24 20:35:48 -07:00
Grace Guo 60a7b6df59 handle null column_name in sqla and druid models (#7063) 2019-03-22 20:21:25 -07:00
Chris Williams 7457a35b12 [api] add available_domains/ endpoint (#7097)
* [api] add available_domains/ endpoint

* [available_domains] no trailing whitespaces
2019-03-22 17:51:28 -07:00
Yongjie Zhao 33d67dad79 [Dashboard] Keeping refresh frequency value in Dashboard (#5741)
* Keeping refresh frequency value in Dashboard

* fix eslint

* Fix arrow function

* Update ut

* start refresh when load dashboard
2019-03-22 14:29:18 -07:00
Krist Wongsuphasawat 4631b7b791 fix: bump pivot table version (#7088)
* fix: bump pivot table version

* fix: update package.json
2019-03-21 22:26:20 -07:00
hitdemo 5241486971 [bugfix] throw "TypeError: 'NoneType'..." when save chart to new/existing dash. (#5835) 2019-03-21 21:03:53 -07:00
Daniel Vaz Gaspar 10d003346f Bump FAB to 1.12.5 (#7085)
* Bump FAB to 1.12.5

* [requirements] New dependency pyJWT added on FAB 1.12.4 for OAuth redirect

* [requirements] Fix, pip-tools bump to 3.5.0 related to #714
2019-03-21 17:03:52 -07:00
Enrico Berti 9b58e9f492 [SQL Lab] Improved query and results tabs rendering reliability (#7082)
closes #7080
2019-03-21 15:13:42 -07:00
Maxime Beauchemin b210742ad2 Fix filter_box migration PR #6523 (#7066)
* Fix filter_box migration PR #6523

* Fix druid-related bug
2019-03-20 21:41:33 -07:00
John Bodley 61add606ca [missing values] Removing replacing missing values (#4905) 2019-03-20 17:14:15 -07:00
Enrico Berti 30f88caf55 [SQL Lab] Fixed TableElement sorting functionality and tests (#7069) (#7070) 2019-03-20 08:32:04 -07:00
Enrico Berti 209e7a9d91 [SQL Lab] Copy to clipboard should work on the preview tab too (#7068) (#7071) 2019-03-20 08:26:56 -07:00
John Bodley 2524219f98 [tox] Enforcing consistent ordering (#7060) 2019-03-19 21:14:12 -07:00
Ville Brofeldt c1c8e50360 Handle memoryview like bytes instances and decode bytes to utf8 (#7062) 2019-03-19 17:57:09 -07:00
Krist Wongsuphasawat aa9e273900 docs: add hostnfly to company list (#7065)
From old PR #4011
2019-03-19 17:55:55 -07:00
bipinsoniguavus 84109be1bf fix: search for visualizations with case-insensitive keyword 2019-03-19 16:03:49 -07:00
Maxime Beauchemin c7ffdd643f docs: fix RST issues while building docs (#7012) 2019-03-18 18:11:53 -07:00
Rosen Velikov 42a8a92c57 feat: add Bulgaria to country map (#6938) 2019-03-18 18:10:42 -07:00
Krist Wongsuphasawat d56362f248 feat: bump superset-ui-plugins to v0.10.2 (#7051)
* feat: bump superset-ui-plugins version to 0.10.1

* fix: bump version again
2019-03-18 17:56:23 -07:00
michellethomas ead3d48133 Adding warning message for sqllab save query (#7028) 2019-03-18 10:14:26 -07:00
John Bodley c771625f10 [datasource] Ensuring consistent behavior of datasource editing/saving. (#7037)
* Update datasource.py

* Update datasource.py
2019-03-18 09:56:52 -07:00
Boris Hajduk 5137539a86 [fix] Use HTTPS, not HTTP wherever practical (#7040)
* Download RAT binary via HTTPS, not HTTP

* Merge branch 'patch-1' of github.com:hajdbo/incubator-superset into patch-1
2019-03-17 23:21:32 -07:00
Maxime Beauchemin f5274a9c7f Fix issues around Database permissions (#7009) 2019-03-17 22:49:40 -07:00
Grace Guo a6d48d4052 [fix] explore chart from dashboard missed slice title (#7046) 2019-03-16 10:44:14 -07:00
Enrique Macip 4a3009406a User can turn off download - export csv from a dashboard (#6821)
* User can turn off download - export csv from a dashboard

* Revert changes in the backendSync

* Fix space error in the MenuItem Export CSV
2019-03-16 10:33:45 -07:00
1AB9502 f760ba8d4c fix: groupable only columns populating in filters (#6993) 2019-03-15 15:20:53 -07:00
Grace Guo fc1770f7b7 [fix] Cursor jumping when editing chart and dashboard titles (#7038) 2019-03-15 10:56:19 -07:00
John Bodley 07c340cf82 [sqlparse] Fixing table name extraction for ill-defined query (#7029) 2019-03-15 09:19:30 -07:00
Chris Williams 7d7210d6ce [api/v1][query_obj] add default prequeries array (#7039)
* [api/v1][query_obj] add default prequeries array

* [api/v1][query_obj] fix prequeries type
2019-03-15 00:22:29 -07:00
Ville Brofeldt 5e66008ba1 Add handling for memoryview (#6987) 2019-03-14 22:35:40 -07:00
bipinsoniguavus 4ca2cc1ef2 fix(css-selector): Fixed incorrect css-selector for CRUD page reported by sonarqube report as a critical vulnerability (#7034) 2019-03-14 17:51:16 -07:00
Conglei 0782e831cd fix inaccurate data calculation with adata rolling and contribution (#7035) 2019-03-14 14:05:06 -07:00
Tom Hunter cc58f0e661 [WIP] fix user specified JSON metadata not updating dashboard on refresh (#7027) 2019-03-14 11:20:22 -07:00
John Bodley 05be866117 [db-engine-spec] Aligning Hive/Presto partition logic (#7007) 2019-03-13 13:22:28 -07:00
michellethomas 7f3c145b1f Changing time table viz to pass formatTime a date (#7020) 2019-03-13 09:34:51 -07:00
Maxime Beauchemin d308c842f9 Bump sqlalchemy dependency (#7000)
* Bump sqlalchemy dep

* Addressing comments
2019-03-11 23:03:20 -07:00
Marcus 83b5dcc8c2 fixing a broken link for the ORM documentation (#7005) 2019-03-11 22:41:16 -07:00
Grace Guo 6a4d507ab6 [fix] /superset/slice/id url is too long (#6989) 2019-03-09 20:49:08 -08:00
Ville Brofeldt 0535a11fe6 Retrieve df from get_df_payload to hit cache (#6990) 2019-03-09 11:14:04 -08:00
Christine Chambers e47a1b2868 Split tags migration (#7002)
This PR removes the iteration over charts, dashboards and saved queries to create tags in the original migration, leaving only the logic to create the tags and the tagged objects tables.
Tested locally by running `superset db downgrade` to revert to the previous migration and then running `superset db upgrade` to the current version.
2019-03-08 16:27:13 -08:00
ankursinghal2005 83b48a901e fix(fetch-datasource-meta-data): Chart data is not showing after in charts added by edit mode (#6980)
UIC-1046
2019-03-06 23:57:31 -08:00
Krist Wongsuphasawat 23f4c95d47 refactor: bump @superset-ui versions (#6982)
* feat: bump @superset-ui versions

* refactor: remove visUtils and use @superset-ui/dimension

* refactor: remove dead code

* fix: update package lock

* fix: lint two files

* fix: package lock
2019-03-06 22:30:05 -08:00
michellethomas e6194051f4 Adding custom control overrides (#6956)
* Adding extraOverrides to line chart

* Updating extraOverrides to fit with more cases

* Moving extraOverrides to index.js

* Removing webpack-merge in package.json

* Fixing metrics control clearing metric
2019-03-06 15:04:04 -08:00
Maxime Beauchemin c1ba914a41 docs: warn that docker installation instructions are contrib/ (#6925)
* [docs] warn that docker installation instructions are `contrib/`

* Words
2019-03-06 08:33:11 -08:00
Thomas Wang 8346e62dec Sort Chart Types based on Usage (#6849)
* initial commit for VIZ-58

* address @kristw's comments

* per @mistercrunch's comment to use a static list for now

* fix javascript test errors

* fix lint errors

* per @betodealmeida's comments

* remove unnecessary loop
2019-03-05 21:32:10 +02:00
John Bodley 3e076cb60b [sql-parse] Fixing LIMIT exceptions (#6963) 2019-03-05 09:36:08 -08:00
Maxime Beauchemin 0421786fed [dashboard editor] use the theme's btn-primary (#6859) 2019-03-04 20:54:17 -08:00
Maxime Beauchemin ed79134e7f auto-set 'Is Temporal' to true where column_name == '__time' (#6857)
* auto-set 'Is Temporal' to true where column_name == '__time'

* Adress comments

* lint

* clarifying name and comments
2019-03-04 20:51:11 -08:00
Conglei d5b9795f87 Enhancement of query context and object. (#6962)
* added more functionalities for query context and object.

* fixed cache logic

* added default value for groupby

* updated comments and removed print
2019-03-04 18:06:59 -08:00
John Bodley aded70a156 [date-filter] Adding minus infinity (#6968)
* [date-filter] Adding minus infinity

* Update DateFilterControl.jsx

eqeqeq
2019-03-04 11:34:21 -08:00
John Bodley 48431ab5b9 [csv-upload] Fixing message encoding (#6971) 2019-03-03 15:27:08 -08:00
Kim Truong 0a8bc84a02 Exclude venv for python linter to ignore (#6965) 2019-03-01 13:38:06 -08:00
Beto Dealmeida 41041f2113 Show charts and dashboards based also on database permissions (#6933)
* Per database policies for slices

* Show charts and dashboards based on DB perms as well

* Revert indentation change

* Fix reference

* Fix pylint
2019-02-28 10:05:28 -08:00
Serg 6f82f974d2 re-added deleted example file (#6952) 2019-02-27 21:33:06 -08:00
Kim Truong 5026401171 VIZ-190 fix (#6958) 2019-02-27 21:00:56 -08:00
Benjamin 57ef1a06b2 All french translations (#6955) 2019-02-27 18:02:12 -08:00
Maxime Beauchemin 3ae02d1a54 Allow for dynamic feature flags (#6808)
* Allow for dynamic feature flags

Giving more control over feature flags, allowing administrator to define
custom logic around whether features are enabled for particular users /
roles.

The exposed function can be used for things like:
* progressive rollout of features (1%, 5%, 50%, 100%)
* experimentation
* role-based feature affectation (only admins see a particular feature)

* fix build

* Addressing comments

* Addressing @hughhh's comments
2019-02-27 15:11:38 -08:00
Beto Dealmeida e0feec9117 Fix deck.gl form data (#6953)
* Fix deck.gl viz

* Fix more form data

* Fix a few more places

* Fix unit tests
2019-02-27 10:19:52 -08:00
Maxime Beauchemin 8f2ce75665 Remove Cypress from package.json (#6912)
* Remove Cypress from package.json

I'm building some Docker images these days and realizing just how big
the Cypress package is. Looks like its ~500mb or so.

I prefer adding it as needed only as opposed to having to play tricks as
in `npm ci && rm node_modules/cypress`

* Pin cypress version

* Add script entry install-cypress

* bump cypress and fix ts-jest warning
2019-02-26 15:51:14 -08:00
Maxime Beauchemin 0ffccb76bd [js deps] fix dependencies vulnerabilities (#6904)
* [js deps] fix dependencies vulnerabilities

* Addressing comments

* Fix bug with Mapbox default example
2019-02-26 15:16:13 -08:00
Maxime Beauchemin ac198754f2 Erase previously shown chart on error (#6905)
* Erase previously shown chart on error

* Addressing comments

* lint
2019-02-26 15:15:44 -08:00
Prashant Shahi 3c2e3d7f97 Fixes #6842: Refreshes all metadata and datasource (#6944) 2019-02-25 17:44:47 -08:00
Christine Chambers 73cdb37f7e Fix rendering regression from the introduction of bignumber (#6937)
In superset-ui 0.8.0, we used bignumber.js to transform numbers in chartProps' payload from plain 64-bit floats to BigNumber instances. This causes a number of charts to render incorrectly when comparison functions in the rendering algorithms operate on BigNumber objects instead of floats. This PR uses the preTransformProps step in SuperChart to transform BigNumber instances back to floats so charts can render properly.
2019-02-25 16:14:56 -08:00
Jack Zhang a0402b76c7 [datasource editor] Add description and label fields (#6927)
* Add description field for columns

* Add label for metrics
2019-02-25 14:21:41 -08:00
Ville Brofeldt e112659173 Remove redundant UTC casts (#6786) 2019-02-23 10:33:21 -08:00
agrawaldevesh b5d03c85c5 Do label name mutation before anything else on the dataframe (#6831)
This problem especially happens with pinot when you select two metrics
with different aliases but same function. For example, effectively the
sql like 'select type, count(*) as one, count(*) as two from bar group
by type'. In such a case, pinot will return two columns, both named
count_star.

So when we try to do a df['count_star'], the result is a Dataframe and
not a Series. This causes a KeyError in the get_df method.

So we push the DB specific label mutation inside get_df before we do any
other mutation.
2019-02-22 20:32:46 -08:00
Ignacio Pérez Vergara 5c484e78a2 [fix] fix for css not loading on docker dev mode (#6934) 2019-02-22 20:03:17 -08:00
Ville Brofeldt ea9d22b2ec Force quotes on non-expression time grains on Postgres (#6897)
* Force quotes on non-expression time grains on postgres

* Change to or semantics

* Return lower case column name as unmutated

* Add testcases for postgres time grains

* Make expression MixedCase
2019-02-21 13:16:28 -08:00
Ville Brofeldt f5277fe684 Refactor dataframe and column name mutation logic (#6847)
* Merge dataframe and column name mutation logic, add flag for disabling column aliases and add column name length checking

* Remove custome mutate_label from oracle spec

* Move hashing from mutate_label() to make_label_compatible()

* Remove empty line

* Make label mutating and truncating more robust

* Rename variables and make proposed changes from review

* Always execute labels_expected codepath

* Fix linting error

* Add comments and fix subquery errors

* Refine column compatibility

* Simplify label assignment

* Add unit tests for BQ and Oracle

* Linting
2019-02-20 23:05:35 -08:00
不知是哪个号 1cac31dcce Update CHANGELOG.md (#6920)
Update CHANGELOG.md
2019-02-20 22:16:18 -08:00
Grace Guo 16f4721a92 [fix] minor fix for Superset logger (#6922) 2019-02-20 15:38:45 -08:00
michellethomas ba9523c7c4 Adding dropdown to DatasourceControl and ability to change datasource (#6816)
* Adding dropdown to DatasourceControl and ability to change datasource

* Style fixes

* Adding unit tests for datasource/get endpoint

* Fixing issue with dropdown overflow and style changes

* Fixing issues rebasing metadata button and fixing sort for datasource with no name
2019-02-20 14:32:33 -08:00
Christine Chambers c04c0cd8f0 Add a safety check before getting clientHeight (#6923)
Seeing an intermittent repro of the `current` nodes of the sql editor and south pane refs returning null. Adding a safety check for both nodes.
2019-02-20 14:31:28 -08:00
Beto Dealmeida 25ec00b3c6 Fix database typeahead in SQL Lab (#6917)
* Fix database typeahead in SQL Lab

* Fix lint

* Use string interpolation
2019-02-19 16:10:17 -08:00
Beto Dealmeida 3f96b0c5c4 Fix tooltip (#6895) 2019-02-19 10:32:14 -08:00
Maxime Beauchemin f715f36ed3 [box plot] add X tick layout control (#6903) 2019-02-19 09:47:04 -08:00
Christine Chambers f8cf0fb7f3 Add show metadata button back to the explore view (#6911)
* Add show metadata button back to the explore view

- Add the show metadta button, accidentally removed from PR #6046, back to the explore view
- Remove dead code that is no longer reachable from DataSourceModal.jsx.

* Adding additional code back to make the button function and remove more dead code.
2019-02-19 09:44:35 -08:00
Ville Brofeldt 30cd0e3836 Raise exception if long or lat not set in mapbox viz (#6867) 2019-02-18 09:20:59 -08:00
Marcus 3956bd20c2 add Filters copy change (#6885) 2019-02-17 20:42:38 -08:00
Krist Wongsuphasawat dce853d450 Fix npm warning by bumping @superset-ui version (#6894)
* Fix npm warning by bumping @superset-ui version

* bump one more time
2019-02-17 20:16:56 -08:00
Daniel Vaz Gaspar a97f3b639e [fix] Typo on config comments for SILENCE_FAB (#6901) 2019-02-17 14:03:04 -08:00
Grace Guo 47f42ed351 Improve Superset logger (#6879)
* enable beacon

* add middleware

* add unit tests
2019-02-15 23:10:05 -08:00
Krist Wongsuphasawat bd9a2c15e7 remove dead code (#6884) 2019-02-15 11:51:49 -08:00
John Bodley 5728946270 [sqla] Fixing order-by for non-inner-joins (#6862) 2019-02-15 11:23:02 -08:00
michellethomas b0f7f51ab7 Adding template_params to datasource editor for sqla tables (#6869) 2019-02-15 11:16:04 -08:00
Maxime Beauchemin 49868748e6 [ci] take #2, improve build times by saving TerserPlugin cache (#6882)
The problem with the previous solution was that the `npm ci` command
nuke the `node_modules` folder, including the `.cache` that was used by
default. By moving the cache out of `node_modules`  we get to both run
`npm ci` and accelerate `TerserPlugin`
2019-02-15 08:53:06 -08:00
Christine Chambers ec6657ab2d Relayout SQL Editor (#6872)
* Relayout SQL Editor

- Refactor SQL editor to remove usage of bootstrap col, row and collapse to simplify the layout
- Replace the react-split-pane libraray with react-split to allow custom styling of the gutter area without sacrifice correctness of the ace editor height calculation
- Rewrite the left pane animation via plain css transition and animate it to slide in and out
- General code and css clean up

* Smooth out the visual transition during dragging

(cherry picked from commit 19f82b729c7a939f12b1c5da6022c0fd76fa3ec9)

* Adjust how the height of the south pane is computed, fixing cypress tests
2019-02-14 18:03:43 -08:00
Krist Wongsuphasawat 8302b9a276 Update webpack config to facilitate debugging charts via npm link (#6880)
* Update webpack config to facilitate debugging charts via symlink and update babel plugin version

* update @superset-ui-legacy version

* update packages
2019-02-14 17:57:34 -08:00
Maxime Beauchemin 16ae747da1 Speed up CI by caching TerserPlugin cache (#6874)
* Speed up CI by caching TersetPlugin cache

This should accelerate the `npm run build` part of the build by ~5
minutes or so I believe.

* targeting terser-webpack-plugin/
2019-02-14 12:14:07 -08:00
Krist Wongsuphasawat 75e1045da4 Use chart plugins and remove code under visualizations (#6838)
* add dependencies

* add the basic charts

* use plugins except tables

* remove old vis code

* Clean dependencies

* remove paired-t-test code and a few more dependencies

* remove tests

* remove unused packages

* integrate nvd3

* bump version

* update ref

* fix issue with table and pivottable

* delete table, pivot table and dependency

* Resolve bubble chart issue by using lib instead of esm

* add comments

* delete nvd3

* add mapbox
2019-02-14 11:28:39 -08:00
agrawaldevesh 2132522fbb Update docs for pinot support (#6865) 2019-02-14 10:56:36 -08:00
John Bodley 60d5f89faa [main] Disable resetting main DB attributes (#6845) 2019-02-13 16:41:16 -08:00
Patrick Tyler Haas 103a97f87d Docs: update user list in README (#6870) 2019-02-13 15:28:12 -08:00
Karri Niemelä 3f47c61dff Adding chart-id to chartrenderer (#6832)
* Adding chart-id to chatrenderer

* Update ChartRenderer.jsx
2019-02-12 14:41:22 -08:00
Pablo 044f660f48 Adding BigQuery to the list of supported DBs. (#6848) 2019-02-11 23:01:03 -08:00
Maxime Beauchemin de403de6fe Bump FAB to 1.12.3 (#6854)
Related CHANGELOG:
https://github.com/dpgaspar/Flask-AppBuilder/blob/master/docs/versions.rst#improvements-and-bug-fixes-on-1123
2019-02-11 22:36:18 -08:00
michellethomas 4638618545 Fixing issue where tooltip gets hidden on dashboard for all charts (#6852) 2019-02-11 15:15:47 -08:00
Maxime Beauchemin 73e119a84e [config] clarifications around SUPERSET_WEBSERVER_TIMEOUT (#6840) 2019-02-11 10:32:11 -08:00
Krist Wongsuphasawat 0b1fbf8299 fix dist-bar overflow css (#6844) 2019-02-08 16:30:38 -08:00
Krist Wongsuphasawat 1c090df4a5 Add check for invalid color scheme (#6828)
* add check for invalid scheme

* revert package-lock.json

* revert again
2019-02-08 10:47:57 -08:00
Krist Wongsuphasawat e14c0cf9a3 Use SuperChart from package and remove one in apache (#6839)
* use SuperChart from package and remove one in apache

* revert package-lock
2019-02-07 16:52:47 -08:00
Krist Wongsuphasawat 5f0b5f63c6 update @superset-ui/packages (#6830) 2019-02-07 09:58:10 -08:00
Krist Wongsuphasawat 823555e07d Fix line chart overflowing the right side (#6829)
* Fix line chart overflowing the right side

* revert package-lock.json

* revert again
2019-02-06 21:28:30 -08:00
Christine Chambers 231d826757 Make the target path of the superset logo configuable (#6815)
* Make the target path of the superset logo configuable

There is a need to have the target path of the logo go to different places in different installations of superset. The PR makes the target path (after `/superset`) configurable via the LOGO_TARGET_PATH configuration key and sets the default to the existing `/profile/{{ current_user.username }}/`

* addressing pr comments
2019-02-06 15:41:19 -08:00
Beto Dealmeida 8041b63af6 Backend only tagging system (#6823)
This PR introduces the backend changes for a tagging system for Superset, allowing dashboards, charts and queries to be tagged. It also allows searching for a given tag, and will be the basis for a new landing page (see #5327).

# Implicit tags
Dashboard, chart and (saved) queries have implicit tags related to their owners, types and favorites. For example, all objects owned by the admin have the tag `owner:1`. All charts have the tag `type:chart`. Objects favorited by the admin have the tag `favorited_by:1`.

These tags are automatically added by a migration script, and kept in sync through SQLAlchemy event listeners. They are currently not surfaced to the user, but can be searched for. For example, it's possible to search for `owner:1` in the welcome page to see all objects owned by the admin, or even search for `owner:{{ current_user_id() }}`.
2019-02-06 13:42:42 -08:00
Michael McDuffee 16a8e314a1 Removing additional unguarded calls to JSON.stringify (#6802)
* removing further calls to unguarded stringify when input data is unknown or to be displayed

* updating one more react component

* fixing lint errors
2019-02-06 13:27:21 -08:00
Hugh A. Miles II 9573fe338e added docs on proper function call for db mutator (#6826) 2019-02-06 13:17:15 -08:00
agrawaldevesh ff9506fec2 Adding support for Pinot (#6719)
Summary: Added limited support for visualizations with Pinot via
Sqlalchemy.

Pinot QL (PQL) is a bit weird and limited, and this patch hacks superset to
deal with that weirdness:

1. Pinot's grouping by time is best done as a long epoch. Grouping by a
time string is really slow and times out.

2. Pinot's response does not respect column aliases. So columns are not
named what they are expected to. So we remember the given column aliases
and then stamp them back onto the dataframe

3. Pinot's Json rest call does not return the output types. Instead
everything is cast to string. So when grouping by time, the group key
is integral and has to be treated specially when casting back to the
dataframe __timestamp column.

4. Finally, pinot does support grouping by on expressions. But those
expressions cannot then appear on the select clause. They are returned
regardless in the response. ie, 'select foo, count(*) from bar group by
foo' is okay, but 'select expr(foo), count(*) from bar group by
expr(foo)' ain't. One must use 'select count(*) from bar group by
expr(foo)'.

I also fixed a couple of things that looked like bugs to me: for
example, the row-ordering-limit should come at the end always.

Test Plan: Tested with the modified pinotdb sqlalchemy driver and an
internal pinot cluster. The pinotdb driver changes are in
https://github.com/agrawaldevesh/pinot-dbapi.

Pinot does not support orderby-limit for aggregated queries. To annotate
a query as an aggregate query, this patch adds a hint to the prepared
select statement that the pinotdb sqlalchemy driver then heeds.
2019-02-05 17:04:19 -08:00
Raphaël Merx 6e9130550d Add .standalone class to <body> when in standalone mode (#6811)
* Add .standalone class to <body> when in standalone mode

* Add test for .standalone class on <body>
2019-02-04 16:44:17 -08:00
Maxime Beauchemin 5a40f71710 [sql lab] improve table name detection in free form SQL (#6793)
* [sql lab] improve table name detection in free form SQL

* flake

* Addressing comments
2019-02-04 16:03:23 -08:00
agrawaldevesh fc4042a28b SelectControl hackery: Fixing freeform select and allowing group by and non group-by column selectors to take in arbitrary expressions including select-all semantics. (#6722)
Summary: We want to allow grouping by on expressions, including the
ability to select expressions (without group-by). The UI ain't good yet
.. it is not at the feature parity of say adhoc filters/metrics that
come with a nice text-box to edit the SQL. But
this suffices for my usecase for now.

(The UI would have to be redone ... but that would require some refactoring
to merge the AdhocFilter/Metric/Popover stuff such that it can be used
for this use case too.)

Also fixed a bug in the SelectControl freeForm selection.

Allow selecting all columns easily: Added a new Select-All special item
that users can select to make all the options in the selectable show
up.

The ability to group by arbitrary expressions is useful because now two
users don't need to create custom computed-fields for this.
2019-02-04 12:34:24 -08:00
John Bodley e1b907783a [wtforms] Using wtforms-json which supports None (#5445) 2019-02-04 09:35:40 -08:00
Wonjin Kim b7b51ecc37 Add Korean translations (#6809)
* fix #6760

* start adding Korean translation

* Add Korean translation

* Add Korean translation (#6790)
2019-02-03 11:15:52 -08:00
Hugh A. Miles II 4f3d2bce4d Omnibar (#6745)
* add starter workspace

* move code into omni container

* 🚢

* add logger

* removed jquert

* remove example ref

* moved all the code into Fragments

* adressed comments

* 🚢

* remove ref

* remove unneeded code

* added featureflag

* change prompt text

* fix omni location

* cleanup comment
2019-02-02 13:02:08 -08:00
agrawaldevesh cecbba3fe6 Summary: Introduce configs for default relative end time and the epoch-tz (#6721)
Introduce a config DEFAULT_RELATIVE_END_TIME which is used when
computing the "Last X days". The default behavior (as currently) is to
let that be 'today', which actually means the 0th second of today. We
can also let it be 'now' which means the data as of now (ie at query
time).

Secondly, also introduce another config IS_EPOCH_S_TRULY_UTC, which
means that the logged time in epoch_s format is actually in UTC.
Currently (as the default) is that it it is in the local (superset
webserver) timezone.

** There is no backward incompatibility with thes config features since
the default behavior hasn't changed. **
2019-02-01 16:34:13 -08:00
Christine Chambers 11bace3808 Merge pull request #6805 from lyft/xtinec--fix-sticky-tooltip
Fix sticky tooltips on nvd3 vizzes
2019-02-01 15:07:06 -08:00
Maxime Beauchemin ba64ae6974 Add missing license (#6801) 2019-02-01 14:42:37 -08:00
Christine Chambers 7846bae8e0 Merge pull request #6781 from lyft/xtinec--merge-feature-flags
Merge default feature flags and user defined feature flags
2019-02-01 14:36:25 -08:00
Christine Chambers 501340b5db Fix sticky tooltips on nvd3 vizzes
Currently, we attempt to hide the nvd3 tooltips (if any were on screen) before we draw a new viz after rerunning a query. The hiding is done by selecting the first nvtooltip element and setting the opacity to 0.

This somtimes leave behind a trail of old tooltips if a tooltip is left behind by this nvd3 bug https://github.com/novus/nvd3/issues/1262. This PR modifies the behavior of how we clean up tooltips between rerun of queries by selecting all nvd3 tooltips and removing them all from the DOM before redrawing nvd3 vizzes.
2019-02-01 14:30:13 -08:00
Christine Chambers 19b3753d2c Move feature flag utility function into superset/__init__.py 2019-02-01 13:35:50 -08:00
AlexRRR 416534add5 fix: don't remove leading new line (#6800) 2019-02-01 12:03:34 -08:00
Maxime Beauchemin 713b0ae4f4 [cosmetic] TableSelector use <i> instead of <Button> for refresh (#6783)
* [cosmetic] TableSelector use <i> instead of <Button> for refresh

* Add ASF licenses

* css hover

* missing license

* remove license header
2019-02-01 12:01:30 -08:00
Christine Chambers 5669a82350 Merge pull request #6797 from lyft/VIZ-187
Fix play slider in deck.gl visualizations
2019-01-31 22:02:56 -08:00
Beto Dealmeida a09348d0ec Fix playslider 2019-01-31 17:23:59 -08:00
Wonjin Kim adc9a6b495 Add Korean Translation (#6790)
* fix #6760

* start adding Korean translation

* Add Korean translation
2019-01-31 14:13:43 -08:00
John Bodley 2631558ac4 Revert "Removing uniqueness constraints on tables table" (#6777)
* Revert "creating new circular-json safe stringify and replacing one call (#6772)"

This reverts commit 11a7ad00b7.

* Revert "Improve Unicode support for MSSQL (#6690)"

This reverts commit c44ae612df.

* Revert "Fix uniqueness constraints on tables table (#6718)"

This reverts commit c4fb7a0a87.
2019-01-31 09:57:51 -08:00
Christine Chambers b70a9ae524 Merge default feature flags and user defined feature flags
- Rename the default feature flags key in `config.py` to DEFAULT_FEATURE_FLAGS
- Merge default feature flags with user defined ones allowing the latter to overwrite the former
- Expose feature_flags for both server and client to use
- Add a utility method for checking whether a feature flag is on on server side
2019-01-30 22:23:27 -08:00
agrawaldevesh 817783f466 Allow any column to be filterable or groupable (#6764)
This is not configurable and will be the default (and only !) behavior
going forward !
2019-01-30 11:18:49 -08:00
Maxime Beauchemin 36176f3e20 [sql lab] fix stuck offline (#6782) 2019-01-30 11:12:31 -08:00
Michael McDuffee 11a7ad00b7 creating new circular-json safe stringify and replacing one call (#6772) 2019-01-29 10:59:42 -08:00
Ville Brofeldt c44ae612df Improve Unicode support for MSSQL (#6690)
* Implement unicode where cluases for mssql queries

* Add comment about unicode support on sqla 1.3+
2019-01-28 22:56:46 -08:00
agrawaldevesh c4fb7a0a87 Fix uniqueness constraints on tables table (#6718)
Summary: Superset code enforces (in Table crud view pre_add) that the
table is unique within <database, schema, table_name). Indeed in commit
15b67b2c6c (in 2016), the model was
updated to reflect that. However, it was never ported over to a
migration.

I am fixing that in this diff. I am choosing to make this be a new
migration instead of fixing an existing one since I want to fix existing
installations also cleanly.

I also considered removing the uniqueness constraint, but that won't
work: First because anyway there are other places where the <database,
schema, table> uniqueness is enforced in code. But also, the .sql field
isn't a first citizen yet: The schema of the table is picked up from the
table-name and the sql part is only used when creating the explore
query. So indeed we want this uniqueness constraint. (Also it breaks the
unit tests in dict_import_export_tests.py)
[Perhaps it can be removed when we have true .sql support, but for now
the user would have to create a database view and he can use that as the
'table name'. That way he gets schema inference also]

Also added INFO logging to the alembic migration.
2019-01-28 22:49:31 -08:00
Wonjin Kim 5938ac30d6 fix #6760 (#6762) 2019-01-28 22:45:16 -08:00
Maxime Beauchemin 7c02587924 [docs] improve upgrading instructions (#6766) 2019-01-28 22:14:02 -08:00
Grace Guo 744135c7fe [fix] Add action for update chart id (#6769) 2019-01-28 17:42:35 -08:00
ziheng 83ee917832 [fix] pandas>=0.24.0 datetimelike API changes (#6765) 2019-01-27 17:29:56 -08:00
Maxime Beauchemin a62a8d3d98 [docs] bump cryptography lib version in docs (#6755) 2019-01-25 14:26:08 -08:00
Maxime Beauchemin a93219f291 [cosmetic] Align table sort icons to the left (#6754) 2019-01-25 14:25:41 -08:00
michellethomas 8100a8fa97 Fixing sort issue with area chart and adding tests (#6358) 2019-01-25 10:30:31 -08:00
Hugh A. Miles II 6b0ab2100d fix dashboard links in welcome page (#6756) 2019-01-25 08:20:00 -08:00
davidkohcw f38cea3ee3 Update User List in README.md (#6758)
Added a new company into the company list
2019-01-25 08:19:19 -08:00
Marcus 01689c38ea bump PyHive version for prod requirements.txt (#6751) 2019-01-24 23:11:22 -08:00
Grace Guo 879c553b0a [fix] JS error out when rename a new chart (#6752) 2019-01-24 21:31:21 -08:00
michellethomas 97cb10dbc8 Make it easier to select dropdown options in control tests (#6546) 2019-01-24 10:10:22 -08:00
agrawaldevesh 594cd70960 A few fixes for Presto connection (#6720)
* Preserve existing configuration when modifying it in case of user impersonation

* Add logging when a table cannot be added due to some schema issues
2019-01-23 21:12:27 -08:00
Maxime Beauchemin 1ffee8b236 [cosmetic] remove 'List' prefix from list headers (#6725)
* [cosmetic] remove 'List' prefix from list headers

* Same change to connectors
2019-01-23 21:06:56 -08:00
Krist Wongsuphasawat 3ae7d32caa Add iframe and markup legacy plugin (#6741)
* Add iframe plugin

* Use lazy load and add description

* remove unintended files

* Add markup

* minor adjustment
2019-01-23 10:21:57 -08:00
Krist Wongsuphasawat 954e42bafe Update gitignore (#6742)
internal: update gitignore
2019-01-23 10:21:41 -08:00
michellethomas bab7ee7ecf Adding a note about 0.30 to updating (#6730) 2019-01-22 14:38:01 -08:00
Beto Dealmeida bbd781b66e Remove test URL (#6740) 2019-01-22 14:27:51 -08:00
Beto Dealmeida cf1a35b94b Allow specifying custom width for logo (#6739) 2019-01-22 14:25:49 -08:00
bolkedebruin d65059b06a Add disclaimer and remove counter (#6738) 2019-01-22 14:18:16 -08:00
bolkedebruin 1fece0d2fa Add licenses to translations (#6732)
* Add licenses

* More licenses

* Ignore messages.json as they are generated

* More licenses

* Also typescript

* Fix alignment

* Add to svg

* Many more licenses

* more licenses

* Better excludes

* Add licenses to docs and md files

* Pre-finalize licenses

* Fix newlines

* Finalize all sourde licenses

* Fix lint
2019-01-22 08:21:13 -08:00
Hugh A. Miles II d628907be3 Hotkeys in Explore View (#6526)
* working .... hotkeys in example of hotkeys in explore

* added save functionality

* Added proper overwrite functions

* cleanup

* cleanup

* cleanu

* fixe linting

* add global

* move match to utils

* linting

* change some stuff

* Delete example_filter_immune_slice_fields.json

* hide annoying blue bar

* switch hotkeys to reference s

* remove console.log

* have hotkey generate help

* 🚢

* move functions out of component

* refactor

* Delete yarn.lock

* addressed comments

* remove comments

* remove Hotkeys component from ChartView

* Add hotkeys button next to save&run

* moved keyboard

* cleanup

* checkout package.json

* checkout chart panel

* reference apache

* remove style change

* whitespace

* clean up on hotkey popup

* fds

* linting

* fix all linting errors
2019-01-21 02:10:46 -08:00
bolkedebruin 88283dc2cb Add cc-by 4.0 for geojson files (#6731) 2019-01-19 14:28:40 -08:00
Maxime Beauchemin f742b9876b Making thrift, pyhive and tableschema as extra_requires (#6696)
* Making thrift, pyhive and tableschema as extra_requires

Looking at the dependency tree for license related questions, I noticed
that tableschema had a huge tree, and only people running Hive really
need it. Making this as well as pyhive and thrift optional.

Also bumping some python dependencies

* Run pip-compile

* Removing refs to past.builtins (from future lib)

* Add thrift
2019-01-19 14:27:18 -08:00
Krist Wongsuphasawat ebb799140a Update CONTRIBUTING.md based on SIP-13 and add how to use labels (#6701)
* update contributing based on SIP-13

* update link

* add labels instruction

* minor edit

* minor edit

* update table of content

* Add ASF header and update insructions

* update table

* update text
2019-01-19 03:18:22 -08:00
bolkedebruin 3cc7cdfee0 Fix setup.py ASF issues (#6677)
* This renames the package to apache-superset instead of superset.
  This is required.
* It sets the download location to the official ASF repositories
2019-01-19 03:16:33 -08:00
Andrew Kovalyov 01063ce96c Fix link to SQLAlchemy docs about database URLs format (#6698)
'Add database' grid refers to SQLAchemy docs, where database URL format is described. 
Documentation for 1.0 does not exist on https://docs.sqlalchemy.org/, which results in 404 when following the current URL.
The link is fixed taking into account [SQLAlchemy 1.2](https://github.com/apache/incubator-superset/blob/master/requirements.txt#L87) as a project dependency.
2019-01-18 22:32:29 -08:00
Maxime Beauchemin 057c43c56d Revert "Truncate long labels (#6631)" (#6723)
This reverts commit 5055157b64.
2019-01-18 17:24:40 -08:00
Beto Dealmeida ef79757973 Merge heads (#6729)
* Merge heads

* Add ASF header
2019-01-18 16:04:06 -08:00
Beto Dealmeida 00388811b6 Allow empty results in Hive (from SET, eg) (#6695)
* Allow empty results in Hive (from SET, eg)

* Remove patch

* Merge heads

* Delete merge heads
2019-01-18 10:11:59 -08:00
Beto Dealmeida c954fe314d Insert a space after auto complete (#6717)
* Insert space after auto complete

* Fix autocomplete with space
2019-01-18 09:38:56 -08:00
Beto Dealmeida b260cb66b3 Expose more columns in saved queries API (#6686) 2019-01-18 09:38:31 -08:00
Beto Dealmeida 31ea6817b7 Add extra column to SavedQuery (#6687)
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header
2019-01-18 09:38:07 -08:00
Ville Brofeldt 7ee8afb608 Improve support for BigQuery, Redshift, Oracle, Db2, Snowflake (#5827)
* Conditionally mutate and quote sqla labels decouple sqla logic from viz.py

* Prefix hashed label with underscore if bigquery label exceeds 128 chars

* Add comments for label cache

* Rename to mutated_labels and simply

* Rename mutated_label to get_label and simplify make_label_compatible in db_engine_specs

* Add note about deterministic and unique mutated labels

* add hash to label that has been prefixed with underscore

* Fix PEP8 escape warning

* Fix DeckPathViz get_metric_label call
2019-01-18 08:24:11 -08:00
Jeffrey Wang 055467de86 Explicitly declare flags as flags (#6693) 2019-01-18 08:19:54 -08:00
Maxime Beauchemin 69fe50a5c9 [cosmetic] remove margin-bottom on dropdowns (#6627)
* [cosmetic] remove margin-bottom on dropdowns

react-select components have been added 15px bottom-margin without a
good reason. Other controls like text or checkboxes don't have that,
making Selects look non-standard, add making the control list too
sparse.

My perspective is that all controls should have the same
padding/margins.

* Adding a few licenses
2019-01-17 22:56:39 -08:00
Maxime Beauchemin 75322ab12c More ASF licenses (css + html/jinja) (#6711)
* More ASF licenses

* html

* removing from vendors
2019-01-17 22:39:00 -08:00
Maxime Beauchemin 6718588781 Add universal "New" button (#6670)
* [cosmetic] CRUD's list from 'Add Filter' to 'Filter Results'

* Add global new button

* A better viz type selector

* lint

* Move view to new module, add unit test

* 'Filter Results' -> 'Filter'

* db merge

* Filter -> 'Filter List'
2019-01-17 15:48:40 -08:00
Beto Dealmeida 99d6dc07d6 Trim query before parsing (#6703)
* Ignore empty lines

* Fix unit tests

* Use stripped

* Fix another unit test
2019-01-17 09:16:35 -08:00
Krist Wongsuphasawat 9c7b98a27a Add more format shims (#6709)
* add more shims
* update package-lock.json
2019-01-16 23:31:43 -08:00
Christopher Council 30c911919e Fix Text field to edit SQL snippet of a metric is not large enough (#6702)
* Fix Text field to edit SQL snippet of a metric is not large enough for entire snippet
* Fix Airbnb bug PRODUCT-62223
2019-01-16 23:28:38 -08:00
Maxime Beauchemin 88964b7dfc Deprecate auto-generated metrics (#5461)
* [WiP] deprecate auto-generated metrics & fix examples

Picking up some leftover pieces not needed anymore since the
MetricsControl

* db merge

* db merge

* fix migration

* Creating metrics required for tests
2019-01-16 22:32:13 -08:00
Maxime Beauchemin 65f7f2920d Fix url_param macro when param is missing (#6699)
User @ravi on Slack reported issues trying to use url_param jinja macro.
explore_json would raise a "KeyError: 'url_params'".

The feature works when a parameter is passed, but fails hard when none
are passed.

I improved the docstring on the macro as well.
2019-01-16 20:44:28 -08:00
Maxime Beauchemin e03e276571 Bump some of the requirements-dev.txt (#6700)
* Bump some of the requirements-dev.txt

* addressing comments
2019-01-16 20:40:16 -08:00
Yuan Liu 4c658444e4 Update README.md (#6682) 2019-01-15 21:56:31 -08:00
Maxime Beauchemin 1dd4d7a587 Apply ASF licenses throughout the code base (#5800)
* Add license headers

* reabased

* lint

* Removing licenses from vendors folder
2019-01-15 15:53:27 -08:00
Maxime Beauchemin da813b7ee3 [table editor] allow selecting physical table (#6046)
* [table editor] allow selecting physical table

* Using classes for padding
2019-01-15 08:53:24 -08:00
Maxime Beauchemin 4667f0c288 Committing some licenses to fix master (#6689) 2019-01-14 22:28:03 -08:00
Christopher Council 207d9529b2 Fix for #6590: Numeric values in columns sometimes returned as quoted strings (#6591)
* Fix: https://github.com/apache/incubator-superset/issues/6590, also depends on https://github.com/apache-superset/superset-ui/pull/71

* Bumped version of superset-ui-connector

* Added @babel/polyfill import

* Reset mock history before each test, not after each test

* Update CONTRIBUTING.md
2019-01-14 15:35:28 -08:00
Yao Zhou f480a52074 Add doc about translation using poedit (#6600)
* Update CONTRIBUTING.md
2019-01-15 01:48:12 +07:00
Beto Dealmeida 5055157b64 Truncate long labels (#6631) 2019-01-14 10:42:12 -08:00
Junda Yang b1dbd1cab6 [bugfix] show results in query history & revert #5848 (#6436)
* revert 848

* nit
2019-01-13 22:31:27 -08:00
Chinh Nguyen 284a0cccd3 Add fix for pyodbc+mssql (#6621)
* add fix for odbc+mssql

* fix for pylint/pep8
2019-01-13 09:30:05 -08:00
Maxime Beauchemin ae6217ba55 Remove dep on unidecode (#6673)
Not needed anymore in py3
2019-01-13 09:22:13 -08:00
Sirius b2f0b2bde6 Update Dockerfile (#6678)
Fix permission issue.
2019-01-13 08:37:37 -08:00
Mahendra M 42cf929f62 Fix scheduled reports for mysql (#6512)
* Fix scheduled reports for mysql

* Really revert setup.py

* Fix after rebase
2019-01-12 20:29:03 -08:00
bolkedebruin 8e6c114195 Add Apache Rat for license checks (#6663) 2019-01-12 20:28:12 -08:00
bolkedebruin 855228c66c Add NOTICE file and include initial third party licenses (#6671)
* Add NOTICE file and include initial third party licenses

* Add to manifest

* Use txt

* Fix notice
2019-01-12 16:10:03 -08:00
Kaxil Naik a55a5e06c6 Remove bad git conflicts from Readme (#6669) 2019-01-12 09:57:13 -08:00
Yongjie Zhao b143b16dff #6588 Clear all other query tabs (#6617)
* #6588 Clear all other query tabs

* Improve SQLEditor methods bind

* Update loop syntax
2019-01-11 16:35:53 -08:00
Maxime Beauchemin 0053a86684 [README] use a numbered list instead of bullets for org list (#6629)
* [README] use a numbered list instead of bullets for org list

* Add companies frmo https://stackshare.io/superset/in-stacks
2019-01-11 16:06:39 -08:00
Maxime Beauchemin 7e0e7c89ba Improving Filter Box (#6523)
* Improve Filter Box

* layout tweaks
2019-01-11 15:28:23 -08:00
Tao Feng fafa6b4dda Minor doc fix for superset (#6662) 2019-01-11 09:50:31 -08:00
Maxime Beauchemin 8051818693 [pie] allow formating nubmers on pie chart (#6628) 2019-01-11 08:28:58 -08:00
timifasubaa 9d70c348d3 pass source to db api mutator (#6497) 2019-01-10 17:30:32 -08:00
zhaoyu89730105 a2ce9974cd Add kuaishou to README.md (#6630)
* add kuaishou
2019-01-10 23:21:59 +07:00
zhaoyu89730105 42437236b2 data point no clipEdge (#6614) 2019-01-09 20:35:20 -08:00
Mahendra M fbf9586adf Bump requirements (#6625)
* Bump requirements

* Fix setup.py for email reports
2019-01-09 16:00:04 -08:00
Beto Dealmeida f6ac0daf7e Improve padding in NVD3Vis (#6626)
* WIP, fixing padding

* Remove testing code
2019-01-09 15:43:57 -08:00
Maxime Beauchemin eafb4f9600 Upgrade webpack-dev-server to fix 'npm audit' issue (#6607) 2019-01-08 15:55:27 -08:00
Maxime Beauchemin accc754a87 Improve false negative on AlteredSliceTag (#6578)
The "altered" tag in the explore view shows up more often than it
should. By treating null, [] {}, undefined as identical will help reporting
only the differences that matter.
2019-01-08 12:23:12 -08:00
Christine Chambers 49e3638eee Introduce a more visible resize grabber to the SQL editor (#6593)
- Clean up css and html of the sql editor button area (removing unused styles)
- Restyle the button area and the resizer to be more like the one proposed in issue 6565
2019-01-08 10:06:00 -08:00
Joe Bordes 28ca07e640 fix(i18n) syntax errors detected by grammarly while translating (#6271) 2019-01-09 00:27:26 +07:00
Beto Dealmeida 3c17dac35a Upgrade gsheetsdb (#6609) 2019-01-07 22:48:33 -08:00
hmanuel 818a6a832c Make NULL value grouping keys show up properly in rich tooltip (#6003)
* resolved merge conflicts with upstream

* changed the key in a spot I missed

* linting

* refactored my code out into a function

* update util

* simplified the code logic

* cleaned up code
2019-01-07 17:23:11 -08:00
Grace Guo be1895f2dc [fix] url shortner for long explore url (#6449)
- redirect explore url with r parameter
- redirect to relative path
2019-01-07 14:28:30 -08:00
Maxime Beauchemin 68e9d2970a Fix 'Uncaught TypeError: Cannot read property 'value' of undefined' #6556 (#6574)
closes #6556
2019-01-08 00:22:07 +07:00
Marcus f291dae200 shift labels down along y-axis (#6596) 2019-01-05 09:50:01 -08:00
Yao Zhou bc9c183243 Fix bug: some word not translate in js. (#6598)
delete the 'null,' in messages.json,
so that word can be translate in js.
2019-01-05 09:48:08 -08:00
Yao Zhou 3802f011d9 add chinese translate (#6592) 2019-01-04 09:03:47 -08:00
oliviermichaelis c01230afb7 Enhance Docker (#6504)
Refactored deprecated functionalities:
  - Used 'celery worker' command instead of 'superset worker' which is
    deprecated since 0.26.0
  - Used 'gunicorn' command instead of 'superset runserver'
2019-01-03 11:33:31 -08:00
Maxime Beauchemin 142e7b6df7 Finish move to babel 7 (#6573)
* Finish move to babel 7

* Bump jest to 23.6.0

* Address comments
2018-12-30 16:41:38 -08:00
Maxime Beauchemin 6099519896 Using batch_op in db migration 0b1f1ab473c0 (#6581)
As I needed to downgrade from db migration 0b1f1ab473c0, I realized I
needed to use batch_op against SQLLite.
2018-12-28 12:41:11 -08:00
Maxime Beauchemin b16498796f [bugfix] moving from reactable to reactable-arc fork (#6576) 2018-12-28 10:45:51 -08:00
Brayan Arrieta d80cbbc7ec Change margin for slice description in charts for the dashboard view (#6575)
Changed margin for the slices description in dashboard view, previously the margin was 5px for all the sides but for improve the view just apply margin for top and bottom.
2018-12-28 08:52:38 -08:00
ghsalem f761237260 fixing issue #6572 with Oracle date handling (#6580)
* fix Oracle engine specs for dates issue #6572

* fix Oracle engine specs for dates issue #6572

* fix Oracle engine specs for dates issue #6572, removing comment

* ng a trailing space
2018-12-28 08:51:48 -08:00
Maxime Beauchemin 2c3794e28d [design] use angle icons instead of carets for expandable panels (#6564)
* [design] use angle icons instead of carets for expandable panels

Also moving to the right to conform to the material design specs

* Fix cypress test
2018-12-27 22:18:27 -08:00
Beto Dealmeida a0b2f2ca0f Fix multi/dual when no right y axis (#6571) 2018-12-27 21:17:48 -08:00
Patrick Tyler Haas d99b36e892 Fix: updated required cryptography version to 2.4.2 to resolve #6509 (#6516)
* Fix: updated required cryptography version to 2.4.2 to resolve #6509

* Fix: updated cryptography version to 2.4.2 to resolve #6509

* Fix: updated cryptography version to 2.4.2 to resolve #6509

* Revert "Fix: updated required cryptography version to 2.4.2 to resolve #6509"

This reverts commit b57b08c8e5.

* Fix: updated cryptography version to 2.4.2
2018-12-27 14:14:01 -08:00
shizidushu 4e03d41f17 fix #6530 and add some other chinese translation (#6569) 2018-12-27 12:45:50 -08:00
Karri Niemelä f424af8385 json_iso_dttm_ser use for TableViz (#6563) 2018-12-27 11:38:05 -08:00
Maxime Beauchemin fe77b57581 [refactor] moving some datasource-related code to the frontend (#5769)
* [refactor] moving some datasource-related code to the frontend

* fix js tests

* fix tests

* fix test
2018-12-22 18:06:36 -08:00
Karri Niemelä eff4e6362c Adding missing slash (#6567) 2018-12-22 16:44:31 -08:00
Maxime Beauchemin d427db0a8b [SQL Lab] Allow running multiple statements (#6112)
* Allow running multiple statements from SQL Lab

* fix tests

* More tests

* merge heads

* fix heads
2018-12-22 10:28:22 -08:00
Maxime Beauchemin 6e942c9fb3 Make boto3/botocore installation optional (#6540)
* Make boto3 installation optional

* pylinting
2018-12-21 12:27:57 -08:00
Maxime Beauchemin 60ccf3eb9d [SIP-14] remove dependency on yarn in favor of npm (#6541)
* [SIP-14] remove dependency on yarn in favor of npm

Find more details here
https://github.com/apache/incubator-superset/issues/6217

* Add core-js to dev deps

* lint

* fix cypress

* break down cypress_build.sh

* fix cypress

* Use 'npm ci' in place of 'npm install'

* Bump npm req to >=6.5.0

* Enforcing  npm@'>=6.5.0'

* Using latest lts of nvm

* Make cache settings global

* remove uneeded 'npm run test' as 'npm run cover' takes care of that

* Prefix with 'time'

* Trying to upgrade babel-eslint instead of downgrading

* upgrading babel-polyfill to '@babel/polyfill'

* Moving to babel 7

* remove unused packages
2018-12-21 10:24:49 -08:00
Maxime Beauchemin 8c6ddbc842 Fix multiple db_migrations heads (#6560) 2018-12-20 22:08:52 -08:00
leakingoxide fd0338614a Make owner a m2m relation on datasources (#6544)
* Make owner a m2m relation on datasources

* Fix pylint

* Make migration work in mysql & sqlite
2018-12-20 20:35:32 -08:00
Yongjie Zhao 6a95f8070a minor, auto tune debug mode when use flask_env (#6550)
* minor, auto tune debug mode when use flask_env

* update changes
2018-12-20 20:35:06 -08:00
Maxime Beauchemin 42067e077b [RfC] Fix URL too long (#6519)
When a URL gets too long (usually happens with controls that allow
free form text), it creates an array of bugs.
* bug when creating a short URL, because the POST request's referrer
field is too long
* a bug when saving a chart (when the modal shows up) also because of
the referrer being too long

Some work has been done in the past to mitigate this, and I'm unclear if
it's some sort of regression because of the Flask upgrade or some
browser change, or whether these bugs have always been around.

This is a request for comment on an approach that works. Let me know if
you can think of better ideas as to how to manage this.

My current solution looks for 8000+ characters URLs and shrinks them to
only `/superset/explore/?URL_IS_TOO_LONG_TO_SHARE&form_data=...` and we
only keep the formData keys for `datasource` and `viz_type`. Not super
elegant but does the trick.
2018-12-18 16:14:20 -08:00
Maxime Beauchemin 5a1ff0f09d [cosmetic] add css no-wrap on CRUD's last modified (#6522) 2018-12-18 16:13:21 -08:00
Maxime Beauchemin 3f29a1dd70 Secure unsecured views and prevent regressions (#6553)
* Secure views and prevent regressions

* Force POST on shortner

* Fix tests
2018-12-18 11:57:13 -08:00
MukaJiTrue 926f78c21d Fix deck.gl Polygon not show (#6545)
* Fix deck.gl Polygon not show

* Replace "//" to "// "
2018-12-18 11:16:09 -08:00
dragons b06941945c fix addr_str format bug (#6551) 2018-12-18 11:03:15 -08:00
Beto Dealmeida e2b9625d84 Increase size of column name in table ab_view_meu (#6532)
* Create migration script

* Use batch operation for ALTER COLUMN
2018-12-18 10:57:45 -08:00
Beto Dealmeida 672c470e79 Pass security manager to QUERY_LOGGER (#6548)
* Pass security manager to log_query

* Fix lint
2018-12-18 10:55:58 -08:00
Antoan Milkov fe994900ec filter_values documentation fix (#5977) 2018-12-17 21:20:46 -08:00
Ville Brofeldt c4884e3c2e Remove note about snowflake-sqlalchemy stable version regression (#6398) 2018-12-17 21:20:00 -08:00
Chanakya c6263fc096 Documentation Correction to use http.server for Python3 (#6549) 2018-12-17 17:20:33 -08:00
Mars 95cdda4482 Fix string value displaying NaN (#6534) 2018-12-17 17:03:51 -08:00
Marcus 9ec3e18ecb adding in a dependency version to fix an error with Flask CLI (#6547) 2018-12-17 13:46:04 -08:00
Hugh A. Miles II e2854994ba Add docker files to gitignore (#6507)
* add docker files to gitignore

* Update .gitignore
2018-12-16 21:24:16 -08:00
Ville Brofeldt 5bac723df4 Refactor teradata to new time_grain_functions spec (#6539)
* Refactor teradata to new time_grain_functions spec

* Add test for time_grain_functions
2018-12-16 08:53:29 -08:00
michellethomas fe0f5e968e Avoid resetting margin to 0 (#6536)
* Avoid resetting margin to 0

* Fixing margin for pie chart
2018-12-14 14:17:45 -08:00
John Bodley 1fba6f7a17 [warm] Enforcing consistent form-data (#6531) 2018-12-14 14:00:38 +13:00
Beto Dealmeida 852c51219b Update requests version (#6510)
* Update requests version

* Run pip-compile --output-file requirements.txt
2018-12-11 22:01:06 -08:00
Kengo Seki d203886e47 Fix malformed table in docs/visualization.rst (#6409) 2018-12-11 16:49:17 -08:00
Krist Wongsuphasawat 96a0105f7a Update contributing.md with latest local dev instructions (#6513) 2018-12-11 13:45:50 -08:00
Omkar Yadav 56aa7ac7c6 Typo: Fixed link (#6087) 2018-12-11 10:42:13 -08:00
Mahendra M 808622414c [SIP-3] Scheduled email reports for Slices / Dashboards (#5294)
* [scheduled reports] Add support for scheduled reports

* Scheduled email reports for slice and dashboard visualization
  (attachment or inline)
* Scheduled email reports for slice data (CSV attachment on inline table)
* Each schedule has a list of recipients (all of them can receive a single mail,
  or separate mails)
* All outgoing mails can have a mandatory bcc - for audit purposes.
* Each dashboard/slice can have multiple schedules.

In addition, this PR also makes a few minor improvements to the celery
infrastructure.
* Create a common celery app
* Added more celery annotations for the tasks
* Introduced celery beat
* Update docs about concurrency / pools

* [scheduled reports] - Debug mode for scheduled emails

* [scheduled reports] - Ability to send test mails

* [scheduled reports] - Test email functionality - minor improvements

* [scheduled reports] - Rebase with master. Minor fixes

* [scheduled reports] - Add warning messages

* [scheduled reports] - flake8

* [scheduled reports] - fix rebase

* [scheduled reports] - fix rebase

* [scheduled reports] - fix flake8

* [scheduled reports] Rebase in prep for merge

* Fixed alembic tree after rebase
* Updated requirements to latest version of packages (and tested)
* Removed py2 stuff

* [scheduled reports] - fix flake8

* [scheduled reports] - address review comments

* [scheduled reports] - rebase with master
2018-12-10 22:29:29 -08:00
Beto Dealmeida f366bbe735 Google spreadsheets (#5915)
* Google spreadsheets

* Fetch table metadata in SQL Lab

* Show full URL for spreadsheet

* Fix version

* Remove sqllab changes
2018-12-10 13:11:54 -08:00
michellethomas 23a2ab1077 Adding tests for time table, formatting, and annotations (#6498) 2018-12-10 12:16:11 -08:00
aboganas 96f510619c Fix Annotation (#6457) 2018-12-09 08:00:47 -08:00
Maxime Beauchemin f5a277cc72 Pypi has a 60mb package size limit, and we're over (#6493)
* removing india country map which is 12MB+
* removing src/ in general, keeping the countries folder which has geo
data
2018-12-08 23:52:47 -08:00
Maxime Beauchemin 4109e893d3 Bump pydruid to 0.5.0 (#6454) 2018-12-08 23:47:55 -08:00
Beto Dealmeida 5168c69a25 Hook for auditing queries (#6484)
* Hook for auditing queries

* Address comments

* Use __name__
2018-12-07 12:19:19 -08:00
leakingoxide eb408d71c4 Add copy to clipboard buttons in explore and sqllab (#6461)
* Add copy to clipboard buttons in explore and sqllab

* Eslint fixes

* Review changes: deconstruct props, extract function to utils, add tests
2018-12-07 10:03:33 -08:00
Conglei fc8acf27c8 [Bug Fix]Prevent re-rendering when non-instant controls change (#6483)
fix: Prevent re-rendering when non-instant controls change
2018-12-05 17:31:59 -08:00
zhaoyu89730105 fd54de7856 FixBug druidMetricModels No attribute get_perm (#6432) 2018-12-05 09:46:38 -08:00
leakingoxide 8307716d72 Add See Tableview Form button to the Datasource Editor modal (#6430)
* Add See Tableview Form button to the Datasource Editor modal

* Change the text on datasource edit button
2018-12-04 20:44:13 -08:00
Junda Yang 13f374aa9e make loading icon bigger (#6485) 2018-12-04 20:43:14 -08:00
Krist Wongsuphasawat fcec748b62 Use @superset-ui/number-format and @superset-ui/time-format for formatting. (#6470)
refactor: proxy all d3 number and time formatting calls
2018-12-04 13:24:07 -08:00
Maxime Beauchemin cc3a625a4b Use py3's f-strings instead of s.format(**locals()) (#6448)
* Use py3's f-strings instead of s.format(**locals())

In light of the bug reported here
https://github.com/apache/incubator-superset/issues/6347, which seems
like an odd `.format()` issue in py3, I greped and replaced all
instances of `.format(**locals())` using py3's f-strings

* lint

* fix tests
2018-12-02 13:50:49 -08:00
Marek Šuppa 002518ba49 Update sqllab.rst (#6469)
* Set correct link to the Celery Project
2018-12-01 09:34:49 -08:00
Grace Guo 8e14e0bd67 allow domain sharding in frontend (#5039) 2018-11-30 10:30:04 -08:00
Krist Wongsuphasawat 20e1ac6242 Update @superset-ui/colors (#6464)
* Update package version and update breaking changes for color

* update color function usage

* update dependency
2018-11-30 09:50:42 -08:00
Chris Williams 5f7817a6a3 [SIP-5] Build metrics in query_object in the client (#6423)
* [SIP-5] Build metrics in query_object in the client
- Unify the metric interface (absorb the current plain string metric for built-in metric keys into the format used by adhoc metric)
- Port the logic in adhocMetric on the client and process_metrics in the backend to the new typed Metrics class
- Omit hasCustomLabel and formFromData properties from the new metric interface as their value can be inferred from label and optionName
- Expose from the Metrics class both metrics and their labels as public methods to match the all_metrics and metric_labels fields in the backend code
- Provide defaut values for filters, metrics and groupby in the backend

* addressing PR comments

* Adding a comment for metrictype values
2018-11-29 20:57:55 -08:00
michellethomas 5261d8a9fe Fixing error when clearing big number (#6465) 2018-11-29 18:52:49 -08:00
Krist Wongsuphasawat e715cdb9ac [READY] Update SuperChart onRenderXXX listeners (#6376)
* Revise LoadableRenderer (+3 squashed commits)
Squashed commits:
[f1614c7c] extract createLoadableRenderer into a separate function
[8689bc94] extend LoadableRenderer
[3d04ff2b] remove skipRendering

* add number of times function was called to the test
2018-11-29 11:09:08 -08:00
Christine Chambers e06f87304c Adding a comment for metrictype values 2018-11-29 13:31:22 -05:00
Christine Chambers a4597afee0 addressing PR comments 2018-11-28 19:39:18 -05:00
Christine Chambers c11e9c8b67 [SIP-5] Build metrics in query_object in the client
- Unify the metric interface (absorb the current plain string metric for built-in metric keys into the format used by adhoc metric)
- Port the logic in adhocMetric on the client and process_metrics in the backend to the new typed Metrics class
- Omit hasCustomLabel and formFromData properties from the new metric interface as their value can be inferred from label and optionName
- Expose from the Metrics class both metrics and their labels as public methods to match the all_metrics and metric_labels fields in the backend code
- Provide defaut values for filters, metrics and groupby in the backend
2018-11-28 19:39:18 -05:00
Junda Yang 2731a010ca fix metadata cache bug (#6458) 2018-11-28 15:15:28 -08:00
Junda Yang f1cae2ecdd override get_view_names in PrestoEngineSpec (#6459)
* override get_view_names in PrestoEngineSpec

* add test

* flake 8

* flake 8
2018-11-28 15:13:38 -08:00
Ville Brofeldt 4579b12732 Ensure that dttm is of same timezone as epoch_with_tz (#6453) 2018-11-27 21:59:23 -08:00
aboganas 71a713dcec replace missing round function in d3 to fix MapBox (#6444)
* replace missing round function in d3

* added unit test

* fixed linting
2018-11-27 21:34:27 -08:00
Maxime Beauchemin 2931baa294 Deprecate database attribute allow_run_sync (#4961)
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op
2018-11-27 21:08:44 -08:00
aboganas 529cb5cab1 fix Calendar Heatmap (#6445)
* fix  D3 v4.0, selections are not arrays anymore

* added vale checking

* fixed linting

* cleanup
2018-11-27 20:54:25 -08:00
aboganas b0a55743b3 fix sunburst breadcrumbs (#6451) 2018-11-27 16:54:10 -08:00
Fokko Driesprong 8a8e840819 Rename Druid to Apache Druid (Incubating) (#6419) 2018-11-27 11:59:10 -08:00
Hugh A. Miles II 52bb92d0d4 [Docs] Make sure venv is py3 and export app (#6401)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2018-11-27 11:41:50 -08:00
Victor Noël 02aa3c6395 Improve development experience with Docker (#5966)
- Improve Docker image
  - smaller
  - faster to build
  - deterministict dependencies (see #5958)
- Rework process to simplify setting things up
  - updated documentation
  - less commands to type
  - no files to move and modify
  - optional loading of samples
- Still working in standalone mode (without volumes for superset)
2018-11-27 11:19:55 -08:00
Grace Guo 3e4742fa7b [fix] edit chart title cause JS error (#6438) 2018-11-27 10:36:56 -08:00
Jiaji Zhou 1eb0d0d835 Remove coordinator in Druid Cluster config (#5164) (#6443) 2018-11-27 09:41:16 -08:00
pavitranrambo 2b2c650040 Grammatical Error (#6439) 2018-11-26 23:22:05 -08:00
Grace Guo 2489876bc9 [logging] Add render failure error into log (#6422) 2018-11-26 11:51:25 -08:00
Craig Rueda 5ca8c0ba3c Updated local dev instructions to include missing step (#6428) 2018-11-26 11:16:58 -08:00
Krist Wongsuphasawat 3c6e882d28 [bugfix] Display raw value in addition to ERROR (#6417)
* Display raw value in addition to ERROR

* update unit test
2018-11-26 10:44:42 -08:00
zhaoyu89730105 7eb46843cb FixBug sqlMetricModels No attribute get_perm (#6433) 2018-11-26 09:08:54 -08:00
Christian Jauvin 0b830ced93 Fix French typos (#6435) 2018-11-26 09:07:37 -08:00
Maxime Beauchemin 9dffe3abb0 Link to the ASF's code of conduct (#6406) 2018-11-25 08:46:37 -08:00
Krist Wongsuphasawat 2916c48567 use same xaxis formatter for line chart tooltip (#6412) 2018-11-20 17:35:13 -08:00
timifasubaa 91b758f3bc Reduce data loaded before loading tests (#6298)
* reduce data loaded before loading tests

* make cypress only load needed tests
2018-11-19 15:27:25 -08:00
Evans Hauser a6f013270d Update README.md (#6410) 2018-11-19 14:04:57 -08:00
Maxime Beauchemin 8155f4bf30 [bugfix] deckgl legend is not interactive (#6365)
* [bugfix] deckgl legend is not interactive

Somehow when clicking categories in the legend, nothing happened. The
problem seemed to be around the `getDerivedStateFromProps` override
which gets triggered after each render and would alter the state and
reset the categories state to their origin.

Changed the method name to not be an override and just be called once
in the constructor

https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops

* lint
2018-11-19 14:02:07 -08:00
Maxime Beauchemin 4c4b6c41a1 Minor improvements to Histogram viz (#6391)
* Minor improvements to Histogram viz

* prevent legend overflow (spill) by simply hiding it
* legend title only includes metric name when necessary
* control validator asking forcing at least one numeric column to be
selected

* Removing print()
2018-11-19 14:01:20 -08:00
michellethomas d1a3ba85dd Adding cypress tests for showing errors, time range filter, and verbose name (#6407)
* Adding cypress tests for showing erros, time range filter, and verbose name

* Adding tests for time range without ago

* Adding test to verify error message showing
2018-11-19 11:29:46 -08:00
Andy 8f3d911149 'Fligth' filename typo (#6364)
* renamed the raw data to correct typo

* renamed flight data ref to correct typo
2018-11-18 15:26:30 -05:00
Yongjie Zhao 5913c27830 Expose Sqllab status in databases list view (#6388) 2018-11-16 21:00:58 -08:00
Grace Guo e469086d61 [fix] view results in sql lab (#6405) 2018-11-16 20:58:05 -08:00
Maxime Beauchemin 8177fa17fa [bugfix] deck.gl grid&hex don't respond to zoom&drag (#6363)
* [bugfix] deck.gl grid&hex don't respond to zoom&drag

Following recent changes, Hex & Grid component wouldn't respond to
viewport interactions. This fixes the issue.

This PR also greatly improve rendering performance by only recomputing
the deck.gl layers when needed, as opposed to every time the viewport
changes, which is very inneficient.

Note that most other deck.gl layers seem to be systematically
recomputing layers, we'll have to fix this in another PR.

* Addressing comments
2018-11-16 17:12:19 -08:00
Maxime Beauchemin 4c94447635 Fix adhoc metrics in Polygon (#6399)
* Fix adhoc metrics in Polygon

* Addressing comments
2018-11-16 17:06:21 -08:00
Christine Chambers 8b2cae007d [SIP-5] QueryBuilder in the client for granularity and groupby in word cloud (#6377)
* [SIP-5] QueryBuilder in the client for groupby field

- Lay the structure of the QueryContext builder in the client
- QueryContext builder composes different portions of the queryContext object (to be sent to server from the client) from the datasourceBuilder and the queryObjectBuilder.
- The datasourceBuilder builds the datasource id and type by parsing them from the datasource field in formdata
- The queryObjectBuilder currently only builds the groupby field. It will further compose the queryObject from sub query builders in future PRs.
- Create a buildQuery method for WordCloud and override the groupby value with the value of series from formdata.

* Addressing PR comments
- Rename query builder files and their default exports
- Move tests into spec/javascripts/superset-ui for easy mass migration to superset-uiin the future
- Define viz specific formData and export formData for each viz type as intersection type of the generic formData and the viz specific one
- Specify the type signature for sqla and druid based data sources

* Addressing additional PR comments.
- Introduce a Datasource class and leverage Typescript's declaration merging of the interface
by the same name.
- Let Typescript infer the return type of various builders instead of specifying them explicitly

* Further tweaking the generic buildQueryContext method and viz speicific buildQuery methodes per PR comments.

* git mv a renamed file.

* addressing additional pr comments
2018-11-16 15:51:50 -08:00
Grace Guo c42bcf81bc [migration]clean up __from and __to parameters in dashboard json_metadata (#6378) 2018-11-16 11:03:22 -08:00
Jeffrey Wang 8c4f723a61 Set default limit on creation of new qe and on run (#6400) 2018-11-15 15:38:51 -08:00
timifasubaa c17de3940c Split cypress tests (#6241)
* aplit cypress tests

* split into three
2018-11-15 12:26:33 -08:00
Grace Guo ec1316a5a8 [fix] JS error after delete row level tab (#6393) 2018-11-15 10:30:08 -08:00
Kengo Seki e66b0469b4 Add Japan country map (#6368)
* Add Japan country map

* Fix obsolete paths in the document about adding new country map
2018-11-14 18:46:57 -08:00
Maxime Beauchemin d6953210b8 Disable flaky cypress SQL Lab test (#6302)
* Disable flaky cypress SQL Lab test

* lint
2018-11-14 18:21:55 -08:00
Kengo Seki a5b528c688 Update the installation document based on Python 3.6+ (#6370)
* Update the description based on Ubuntu 16.04 with 18.04,
  since Python version bundled with the former is 3.5,
  which is not already supported

* Remove obsolete descriptions based on Python <= 3.5
2018-11-14 18:14:11 -08:00
Maxime Beauchemin 4690563d40 [bugfix] prevent d3-format from raising (#6386)
Since https://github.com/apache/incubator-superset/pull/6287 and
effectively moving to a new version of d3, d3-format and d3-time-format
raises when receiving invalid input strings.

This code wraps the potential issues inside `try` blocks that will
effectively return an `ERROR` string as output to the formatting
function.
2018-11-14 11:22:06 -08:00
Krist Wongsuphasawat cb556688ec do not convert value to lowercase when looking up color (#6384) 2018-11-13 13:44:43 -08:00
timifasubaa d9a7d565a0 remove user params (#6345) 2018-11-13 09:27:08 -08:00
Conglei 8e2d28dd6e Fixed the cache issue for BigNumber (#6375)
* fixed the cache issue for bignumber

* fixed
2018-11-12 12:57:46 -08:00
Maxime Beauchemin e0b3927ece [bugfix] visualization flickers when rerunning query (#6374)
When hitting the Query button in the explore view, the previous chart
gets shown (flaskhed quickly) between the moment where the loading
spinner goes away and the new chart show up. This fix seems to prevent
this.
2018-11-12 10:49:27 -08:00
James Finucane b44c8349ee [bugfix] EventFlow does not display (#6367)
* Fix EventFlow transform is not a function

transformProps was being passed into EventFlowChartPlugin as object (module) as opposed to function. This commit changes the implementation to be consistent with the other ChartPlugins and fixes the typeError that causes EventFlow Chart to not display.

* Revert to lazy-loading transformProps

- Revert to lazy-loading transformProps
- Fix in Superchart will default to transformProps.default if available to allow for the lazy-loading

* Fix for lazy-loaded imports in ChartPlugins

* Fix lint error
2018-11-12 10:41:21 -08:00
John Bodley 0873abde12 [404] Aborting for views with invalid dashboard/slice IDs (#6355) 2018-11-12 10:08:20 -08:00
John Bodley 74f0817bf0 [hive] Fixing where lastest partition logic (#6357) 2018-11-12 10:07:38 -08:00
Grace Guo 1a5ca35a55 [cypress] Test dashboard save/save_as functions (#6361) 2018-11-11 21:57:23 -08:00
Krist Wongsuphasawat a7b52da6ce [reviewable] Integrate @superset-ui/{core,color,chart} modules (#6234)
* Add d3 micro packages

* Replace d3 imports with specific modules import

* Define d3 colors

* import specific d3 submodules instead of entire d3

* update function name

* move function location and fix small bug

* Move primary color to control

* remove colorscalefactory usage

* remove unused d3

* fix unit test

* fix color picker

* use @superset-ui/color

* update package version

* remove files that are extracted

* replace all references

* fix two files

* Revert some changes to split to another PR

* remove adaptor

* Address Christine's comment

* remove d3 v3 from calendar

* remove d3.scale.threshold

* Get rid of colorScalerFactory and revise hexToRGB

* fix color cleaning

* fix lint
2018-11-11 10:07:05 -08:00
Maxime Beauchemin 841d5e6338 [nvd3] refactor margins (#6282) 2018-11-10 15:56:20 -08:00
Christine Chambers 81349df625 Parse datasource_id as integer on the server side (#6359)
- Datasource ids are being serialized into strings on the client side and python's default json.load doesn't deserialize strings representing integers as integers. Adding an integer parsing step when initializing QueryContext.
2018-11-10 15:45:03 -08:00
Krist Wongsuphasawat 3ffb48c492 [reviewable] Organize d3 utilities usage (#6287)
* update package.json

* extract changes from another PR

* add d3 prefix

* two more places

* update lockfile
2018-11-09 11:42:54 -08:00
Chris Williams 8bf9a5b9a3 [dashboard] fix save/save-as flow (#6350)
* [dashboard] fix save/save-as flow

* [bugfix][dashboard] consistent response type for save/save-as
2018-11-09 11:15:42 -08:00
Krist Wongsuphasawat 5a3773223d change to camelcase (#6354) 2018-11-09 11:06:30 -08:00
Brayan Arrieta 04865f0280 Update docker-entrypoint.sh (#6346)
Previously in the issue #6289 change the port for docker, but the port must be changed also in the entrypoint for docker
2018-11-08 23:08:05 -08:00
Chris Williams 62dcce890c [bugfix] don't parse save dashboard response (#6349)
* [bugfix] don't parse save dashboard response

* [dashboard] remove bracket in error message
2018-11-08 19:27:22 -08:00
Krist Wongsuphasawat 3d7752600b [reviewable] [refactor] Split visTypes into one file for each visualization type (#6290)
* extract two files

* pass linting

* rename variables

* rename file

* fix lint

* Rename controlPanelConfigs.js to controlPanels/index.js

* use specific imports
2018-11-08 12:50:39 -08:00
Maxime Beauchemin 4934605043 Make stacktraces available in many more cases (#6299)
* Wrap <LoadableRenderer /> with <ErrorBoundary />

It appears that since the introduction of <SuperChart />, errors in the
visualization javascript (which are somewhat common and expected,
especially as we'll support plugins) were not handled and the whole
page would throw and go missing.

Here I'm introducing a new <ErrorBoundary /> component that elegantly
wraps other
components and handles errors. It's inspired by:
https://reactjs.org/docs/error-boundaries.html

The default behavior of the component is to simply surface the error
as an <Alert bsStyle="danger" /> and exposes the React stacktrace
when clicking on the error.

It's also possible to use component and pass an onError handler and not
show the default message.

This also fixes some minor bugs in TimeTable.

* Addressing comments

* Getting more stack traces

* Adressing comments
2018-11-08 09:38:10 -08:00
Antonin Kral 1fcfda4fdc Add Showmax among users (#6308)
Would like to add Showmax as a user of Superset.
2018-11-08 08:13:16 -08:00
Maxime Beauchemin 2607d0a6a0 [fix warning] Warning: Failed prop type: Invalid prop bsSize of value md (#6293) 2018-11-07 23:12:32 -08:00
Irfan Faizullabhoy 70327ca42c Docker Demo, Port Change (#6289)
If you follow the documentation, the current docker instructions return an error when trying to connect via localhost. This seems to be due to the fact that it's running on port 8080, but forwarding port 8088. I suppose the cleaner solution is to do this, as opposed to changing both the compose file and the instructions... Hope this helps!!
2018-11-07 21:28:04 -08:00
Grace Guo ede5c710ed [annotation] Only allow override whole time_range (#6286) 2018-11-07 19:26:06 -08:00
timifasubaa 77845ab081 add logging to csv upload (#6297) 2018-11-07 18:40:07 -08:00
Christine Chambers 8c0551ed46 [SIP-5] Open a new /api/v1/query endpoint that takes query_obj (#6220)
* [SIP-5] Open a new /api/v1/query endpoint that takes query_obj

- Introduce a new handle_superset_exception decorator to avoid repeating the logic for catching SupersetExceptions
- Create a query_obj_backfill method that takes form_data and constructs a query_obj that will be constructed in the client in the future. Use the backfill in explore_json.
- Create a new /api/v1/query endpoint that takes query_obj only and returns the payload data. Note the query_obj is constructed in the client. The endpoint currently only handles query_obj for table view viz (we'll be adding support to new viz types as we go).
- Unit test to verify the new endpoint for table view

* fix tests and lint errors

* - Move the new query endpoint into its own api.py view.
- Create QueryObject and QueryContext class to encapsulate query_object to be built from the client and additional info (e.g. datasource) needed to get the data payload for a given query
- Remove the query_obj_backfill as we'll start building the first query_object on the client so it no longer makes sense to have a short-lived backfill for the matter of days.

* Fixing lint and test errors

* Fixing additional lint error from the previous rebase.

* fixing additional lint error

* addressing additional pr comments

* Make /query accept a list of queries in the query_context object.

* fixing a lint error

* - Move time_shift based calculation and since, until check into util
- Add typing info for get_since_until
- Add new unit tests to verify time_shift calculation and the since until check
2018-11-07 17:23:52 -08:00
Maxime Beauchemin 4ce475f287 Wrap <LoadableRenderer /> with <ErrorBoundary /> (#6294)
* Wrap <LoadableRenderer /> with <ErrorBoundary />

It appears that since the introduction of <SuperChart />, errors in the
visualization javascript (which are somewhat common and expected,
especially as we'll support plugins) were not handled and the whole
page would throw and go missing.

Here I'm introducing a new <ErrorBoundary /> component that elegantly
wraps other
components and handles errors. It's inspired by:
https://reactjs.org/docs/error-boundaries.html

The default behavior of the component is to simply surface the error
as an <Alert bsStyle="danger" /> and exposes the React stacktrace
when clicking on the error.

It's also possible to use component and pass an onError handler and not
show the default message.

This also fixes some minor bugs in TimeTable.

* Addressing comments
2018-11-07 17:11:52 -08:00
Beto Dealmeida a57603adb4 Geoviz state management fix (#6260)
* Fix deckgl getPoints

* Fix CSS

* Fix zoom

* Fix CategoricalDeckGLContainer

* Fix cypress
2018-11-07 16:51:22 -08:00
Jeffrey Wang 0584e3629f Add separate limit setting for SqlLab (#4941)
* Add separate limit setting for SqlLab

Use separate param for wrap sql

Get query limit from config

unit tests for limit control rendering in sql editor

py unit test

pg tests

Add max rows limit

Remove concept of infinity, always require defined limits

consistency

Assert on validation errors instead of tooltip

fix unit tests

attempt persist state

pr comments and linting

* load configs in via common param

* default to 1k
2018-11-07 15:57:44 -08:00
Maxime Beauchemin aed774e18b [bugfix] handle Loading spinner properly (#6292)
Addressing post-merge comments in
https://github.com/apache/incubator-superset/pull/6283
2018-11-07 13:04:17 -08:00
Grace Guo 69e8df404d sql lab localStorage config (#6257) 2018-11-06 23:12:32 -08:00
Maxime Beauchemin 1a4199af7a [bugfix] deckgl scatter CategoricalDeckGLContainer (#6288) 2018-11-06 17:13:55 -08:00
michellethomas cd05d44340 Avoid clearing metric when saving from datasource editor (#6277) 2018-11-06 13:23:55 -08:00
Maxime Beauchemin a1d867cf2f [dashboard] fix spinners disapear too early (#6283)
Recently I noticed that loading spinners on dashboards would disappear
too early.
2018-11-06 08:51:36 -08:00
Maxime Beauchemin c653ab1e9b Fix Infinity css warning (#6280) 2018-11-05 22:39:42 -08:00
Krist Wongsuphasawat 124c55c117 rename @superset-ui/core to @superset-ui/connection (#6274) 2018-11-05 18:28:38 -08:00
michellethomas c7f8abc6c5 Adding backwards compatable check to add ago to since if it doesn't exist (#6269) 2018-11-05 16:30:04 -08:00
Chris Williams 7fe8e8aff2 [superset-client] getClientErrorObject for everyone (#6276) 2018-11-05 14:26:22 -08:00
Krist Wongsuphasawat 7373be7163 Add chart names translation (#6273)
* add translation for chart names

* add translation for all chart names

* add missing translation
2018-11-05 12:47:32 -08:00
Jeffrey Wang a1e408a299 Fix typo in druid granularity (#6229) 2018-11-05 11:47:18 -08:00
Maxime Beauchemin 08cdb09714 [explore] raise attention to row_limit being reached (#6252)
* [explore] raise attention to row_limit being reached

* fix test
2018-11-05 08:31:44 -08:00
达斯特兰斯 fb13218472 Dockerfile change because error: E: The method driver /usr/lib/apt/methods/https… (#6258)
* change because error: E: The method driver /usr/lib/apt/methods/https could not be found.
 要提交的变更:
	修改:     contrib/docker/Dockerfile

* 	修改:     contrib/docker/Dockerfile
2018-11-02 18:10:45 -07:00
Joe Bordes c041b6673e i18n(es) (#6270) 2018-11-02 18:00:49 -07:00
Joe Bordes 8dbc20b60a I18n es002 (#6208)
* i18n(es) gtranslator formatting

* i18n(es)

* i18n(es) changes suggested by gettext lint tools
2018-11-02 08:23:34 -07:00
mlboy 3115eec892 Externally Visible Server (#6264)
* Externally Visible Server

Usually, app in docker need to be tested in host

* Update docker-entrypoint.sh
2018-11-02 08:21:57 -07:00
Krist Wongsuphasawat da24b0e0d7 Remove label and showOnExplore. Specific import validators (#6261) 2018-11-01 14:08:15 -07:00
Grace Guo 7d8e3219fc [Fix] merge since,until request parameter with time_range (#6251) 2018-11-01 12:40:56 -07:00
Krist Wongsuphasawat 02f0616025 Make VizTypeControl use metadata from plugin (#6235)
* Render vis type item using information from registry

* adjust style

* fix unit test

* Remove large thumbnails

* Update addSlice
2018-11-01 11:39:24 -07:00
Beto Dealmeida d1cbb0d000 Update CONTRIBUTING.md (#6259) 2018-11-01 11:19:35 -07:00
michellethomas 2fd18eede7 Setting line chart row_limit to 50000 (#6244)
Setting default row_limit to 50K for line chart
2018-11-01 11:01:13 -07:00
michellethomas d34217ef97 Dashboard filter box default (#6236)
* Setting default FilterBox date filter to No Filter

* Adding test for FilterBox
2018-11-01 09:43:04 -07:00
Junda Yang 59109f62b4 revert the change in config.py (#6255) 2018-10-31 17:56:59 -07:00
Maxime Beauchemin e46ab4db52 Bump Flask, bleach and sync pip-compile (#6239)
* sync pip-compile

* Support Flask >= 1.0.0

* pylint

* Trying something else to fix pylint
2018-10-31 16:58:50 -07:00
Maxime Beauchemin 7b3095d6ff Fix examples charts/dashboards and refactor (#5881)
* Fix examples charts/dashboards and refactor

* pylinting

* Fix pylint

* Lint the refactor

* Rebased
2018-10-31 15:29:04 -07:00
Rakshit Kumar 9710369d52 Fixed grammatical errors. (#6246)
* Fixed grammatical errors.

* Update druid.rst
2018-10-31 13:32:25 -07:00
Rakshit Kumar bfec5916ed Fixed grammatical errors. (#6245) 2018-10-31 13:31:48 -07:00
Rakshit Kumar 6d0069230c Fixed grammatical errors (#6247) 2018-10-31 13:31:35 -07:00
Rakshit Kumar bc8c8a2168 Fixed typos and grammatical errors (#6248) 2018-10-31 13:31:11 -07:00
Rakshit Kumar db93dca947 fixed grammatical errors and typos (#6249) 2018-10-31 13:30:15 -07:00
Rakshit Kumar 0a701d6115 Corrected name of an area and fixed major grammatical errors (#6250) 2018-10-31 13:29:36 -07:00
Junda Yang c552c125d7 Move metadata cache one layer up (#6153)
* Update wording

* nit update for api endpoint url

* move metadata cache one layer up

* refactor cache

* fix flake8 and DatabaseTablesAsync

* nit

* remove logging for cache

* only fetch for all tables that allows cross schema fetch

* default allow_multi_schema_metadata_fetch to False

* address comments

* remove unused defaultdict

* flake 8
2018-10-31 13:23:26 -07:00
Maxime Beauchemin af38d254f0 [bugfix] cannot add options to FilterBox (#6231)
* [bugfix] cannot add options to FilterBox

* addressing comments
2018-10-30 21:59:57 -07:00
Maxime Beauchemin 2ad8e2ee2b [sql lab] improve placeholder strings for query search form (#6228) 2018-10-30 21:29:43 -07:00
mlboy 2d4a1ab68a fix misstake (#6237) 2018-10-30 21:28:50 -07:00
John Bodley 1190ebb1a8 [datasource] Ensure SQL Lab link opens in a new tab (#6195) 2018-10-30 17:06:27 -07:00
Krist Wongsuphasawat 1473e2cced Integrate translation module @superset-ui/translation (#6222)
* add translation modules

* Update package.json

* Update instructions in CONTRIBUTING

* Remove old files

* Add new entry point "translation"

* Change imports

* move setupTranslation code

* remove translation from entry

* Update python template

* Refactor utils into smaller, independent files

* Define preamble

* working state

* combine toggleCheckbox with setupApp

* move code block out of document.ready

* move setupClient to preamble

* fix unit tests

* update package version

* delete deletion code
2018-10-30 14:51:44 -07:00
michellethomas 1c4b3e999b Fix time range filter dropdown (#6223)
* Fix date filter control dropdown default state

* Keep track of selected tab
2018-10-30 14:22:40 -07:00
Grace Guo 1fbdd24820 [fix] typo until (#6233) 2018-10-30 14:22:03 -07:00
达斯特兰斯 e1a3a680f4 fix bug : docker build error with no permission with this floder (#6226)
要提交的变更:
	修改:     contrib/docker/Dockerfile
2018-10-30 10:29:38 -07:00
Maxime Beauchemin 0f6b39a6f7 A few setup.py improvements, removing future lib (#6219) 2018-10-29 21:22:25 -07:00
Grace Guo 7d6a4291e1 [fix][Annotation] Fix override since/until for annotation (#6221) 2018-10-29 15:43:01 -07:00
Sumedh Sakdeo 71d6ff40d0 partition and clustering bigquery keys (#6212)
* partition and clustering bigquery keys

* flake8
2018-10-29 11:23:21 -07:00
Maxime Beauchemin acb44165b4 [deck] allow an array of dynamic of aggregations (#6198)
* [deck] allow an array of dynamic of aggregations

* Adding quantiles

* lint & tests
2018-10-29 11:08:22 -07:00
Maxime Beauchemin 7db11d95b0 [setup.py] allow for range on boto library (#6071) 2018-10-29 11:05:35 -07:00
Maxime Beauchemin 81fc3dfbee [build] fix pip install issues on OSX High Sierra (#6201)
* [build] fix pip install issues on OSX High Sierra

I think requirements.txt was out-of-sync as well.

Also had to:
export
  LDFLAGS="-L/usr/local/opt/openssl/lib"
export
  CPPFLAGS="-I/usr/local/opt/openssl/include"
export
  PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

* Fix click
2018-10-29 10:33:51 -07:00
Maxime Beauchemin 5403f31007 [explore] Include "Autocomplete Query Predicate" field to Table Editor (#6171)
* Improvements around filters

* Adding simple test
2018-10-29 10:33:03 -07:00
Joe Bordes d6908eef49 i18n(App) syntax errors detected by Grammarly while translating (#6209) 2018-10-29 09:42:42 -07:00
superkd37 735499cb53 Update ISSUE_TEMPLATE.md (#6210) 2018-10-29 09:41:32 -07:00
Grace Guo 87161a6d5d [fix] hide annotation layer (#6204) 2018-10-26 17:12:30 -07:00
Grace Guo dcf048c52e [fix] should set chartUpdateEndTime when chart fetch failed or stopped (#6205) 2018-10-26 15:00:03 -07:00
Krist Wongsuphasawat 5c02e3199b Implement SuperChart and enable the chart plugins (#6154)
* setup plugin and add SuperChart

* Integrate SuperChart into Chart.jsx

* Add vizType as class name

* Remove .slice_container

* add snakeCase to sanitize class name

* Remove old code to load charts

* Fix supportedAnnotationTypes

* Update AnnotationTypes, remove unnecessary imports and dependency from VIZ_TYPES

* remove index.js and update unit test

* resolve tree map issue

* fix issue with annotation types

* fix proptypes

* add )

* address a few comments

* create bound functions

* bound more functions

* add reselect

* use reselect for chartprops

* improve performance with reselect

* remove unused props

* Remove getFilters() and update table test

* Remove unused code

* Delete adaptors

* switch to react-loadable

* Rewrite with reloadable

* Add timeout back

* remove loading

* update table unit test

* remove pastDelay
2018-10-26 11:38:30 -07:00
Max Goodridge 9580103c22 Fix typo in load-examples command (#6193) 2018-10-25 20:47:43 -07:00
Nocturne d57614f8ad Update docker-init.sh (#6167)
Fix typo of
```bash
superset load-examples
```
2018-10-25 20:20:05 -07:00
John Bodley 71db0736be [external-metadata] Fix unknown column types (#6196) 2018-10-25 18:56:24 -07:00
Junda Yang a0479d57b2 fix sql lab permission issue (#6194) 2018-10-25 16:35:43 -07:00
John Bodley bfbd83bdab [datasource-editor] Correcting tooltip (#6191) 2018-10-25 14:29:39 -07:00
Grace Guo 9c5fc42fee add error details into log (#6169) 2018-10-25 13:52:47 -07:00
Mike Rötgers e21e6a7600 add get_data method to IFrameViz (#6185) 2018-10-25 12:03:33 -07:00
Chris Williams e7e8e9d00d [dashboard][bugfix][save as] re-direct to copied dashboard upon saveas (#6189)
* [dashboard][bugfix][save as] re-direct to copied dashboard upon saveas

* [dashboard][save modal] safer destructuring

* [dashboard][save as] simplify Promise resolution

* [dashboard] simply fetch slices error
2018-10-25 11:44:05 -07:00
Krist Wongsuphasawat ef8429cbf5 pass width and height (#6183) 2018-10-25 09:59:25 -07:00
Chris Williams 90809f6d39 [sqllab] more robust copy to clipboard (#6180)
* [sqllab] implement more robust share query button

* [sqllab] fix Hotkeys react warnings

* [CopyToClipboard] don't bind in render functions

* [explorer] fix short url button position

* [sqllab] remove share query item in tab dropdown menu

* [sqllab] reference new ShareSqlLabQuery component

* [sqllab][share query robustness] clean up

* [sqllab] fix tests

* [sqllab][share query] add unit tests
2018-10-24 19:41:32 -07:00
Beto Dealmeida f1089c40a4 Improvements to the polygon spatial viz (#6178)
* WIP

* WIP

* WIP

* WIP

* Fix color bucketing

* Fixed colors

* Fix no num categories selected

* Colors working

* Fix no metric selected

* Visual cues for selection

* Add unit tests

* Remove jest from deps

* Rename category to bucket

* Small fixes

* Fix lint

* Fix unit tests

* Remove duplicate hexToRGB

* Fix import

* Change order of arguments in getBuckets

* Refactor function signature
2018-10-24 18:40:57 -07:00
Grace Guo ca5be1c1e2 [fix] should allow force refresh when having charts under tab (#6181) 2018-10-24 15:34:36 -07:00
Maxime Beauchemin 9cb2dceeb5 Update CHANGELOG from 0.26 to 0.28.1 (#6139) 2018-10-24 14:38:11 -07:00
Chris Williams 60796da38c [superset-client][bugfix] fix stop query (#6179) 2018-10-24 14:03:43 -07:00
Grace Guo 6ec9e1a4e9 [Ready][Dashboard] disable force refresh when chart is still loading (#6034)
* [Dashboard] disable force refresh when chart is still loading

- disable force refresh for chart, when chart is still loading
- disable force refresh for dashboard, when any one of chart is loading

* remove css change (introduced by mistake)

* add integration tests for disable/enable force refresh
2018-10-24 10:21:23 -07:00
Abid Famasya 47b1a081ab Add TrustMedis to the userlist (#6117) 2018-10-23 22:49:51 -07:00
Christine Chambers 5f1eaa49f2 [SIP-9] Introduce TypeScript (#6120)
* [SIP-9] Introduce TypeScript

- Introduce TypeScript and co to both source and tests
- Define alias for src directory in both webpack config and jest config so we can avoid using long relative paths like ../../src in both source and tests
- Type check feature flags system to prevent typos of flag names
- Change the feature flags system and the flags on window instead of populating them through the state tree. When introducing the first SCOPED_FILTER feature flag, it became too difficult to pipe the flags through the state initializers and layers of components and containers (the resulting code is hard to read and has a handful of methods taking an additional feature flag map parameter). Given that feature flags don't change throughout the life time of the app, it is better to leave them on window for easy access than piping them through the global state tree, which is meant to store the state of the app which changes frequently.
- Add a barebone filter panel that only shows when the SCOPED_FILTER feature flag is on

* Remove unnecessary dev-dependency on gl

* - Adding linting for TypeScript files via tslint.
- Fixing linting for Javascript files importing Typscript files
- Also fix linting for Javascript files that now leverage the webpack alias for the src directory

- up Typescript and type def versions

* Rename src directory's webpack alias from @ to src to be more explicit.
2018-10-23 22:33:51 -07:00
Maxime Beauchemin 9e6b171ee9 Bump FAB to 1.12.1 (#6138) 2018-10-23 15:02:29 -07:00
Krist Wongsuphasawat 9595adb452 [bugfix] Fix language switch (#6166)
* Extract SupersetClient setup into a separate file and fix translation link

* sort'
2018-10-23 09:11:34 -07:00
Chris Williams d8d50a168d [superset-client] use getClientErrorObject for client error handling (#6163)
* [superset-client] use getClientErrorObject for client error handling

* fix getClientErrorObject json parsing

* fix getClientErrorObject test typos

* kick build
2018-10-22 22:42:56 -07:00
Chris Williams 8573fdec12 [superset-client][logger] replace ajax with SupersetClient (#6133)
* [superset-client][logger] replace ajax with SupersetClient

* [superset-client][logger] don't parse log response
2018-10-22 22:42:23 -07:00
timifasubaa fc3b68e234 [Sqllab] Add offline state to sqllab (#6013)
* add timeout and refresh for failed backend

* show offline state instead of refreshing

* add southpane tests
2018-10-22 18:36:07 -07:00
Krist Wongsuphasawat b9257b2a09 [Refactor] Extend color scheme management to sequential schemes (#6150)
* refactor color scheme

* Update data structure

* Update color scheme files

* wip

* convert all sequential schemes

* Update how color schemes are managed. Extend it for sequential schemes

* extract color setup into separate file

* Update imports

* update imports

* Add new functions to Registry

* Update ColorSchemeManager to extends Registry and update unit tests

* Add test for Registry

* Rename ColorSchemeManager to ColorSchemeRegistry

* Fix unit tests

* Update API

* Fix imports

* Add label field

* Fix reference to colors

* update SequentialScheme contructor

* Fix controls

* rename manager to registry

* Split sequential schemes into multiple files

* update sequential color labels

* add values and valuesAsPromise()

* use .values()
2018-10-22 16:17:14 -07:00
Chris Williams a71e6eb0a3 [superset-client] replace misc ajax calls (#6135)
* [superset-client][misc] replace ajax calls in DashboardTable, TableLoader, utils, common

* [superset-client][misc] replace ajax calls in AsyncSelect, HeaderActions, Deck.gl

* [superset-client][misc] fix tests

* [superset-client] remove unneeded functional setState calls

* [superset-client] make welcome a redux app for toasts

* [superset-client] make Profile a redux app for toasts

* [superset-client] TableLoader don't pass toast props to dom nodes

* tweak deckgl Multi syntax
2018-10-19 11:41:42 -07:00
Chris Williams 96228adda9 [superset-client][datasource editor] replace ajax with SupersetClient (#6134)
* [superset-client][datasource editor] replace ajax with SupersetClient

* [superset-client][datasource control] replace ajax with SupersetClient

* [superset-client][datasource editor] remove unused funcs in DatasourceControl

* [superset-client][data source control] lint, remove toasts

* [superset-client] fix DatasourceControl_spec

* [superset-client] remove unneeded functional setState calls
2018-10-19 11:41:11 -07:00
Krist Wongsuphasawat 546d150b91 Define chart presets (#6144)
* define chart presets

* remove dual line
2018-10-19 11:40:21 -07:00
Chris Williams bc3a2efa0e [superset-client] pass csrfToken as configuration (#6148) 2018-10-18 20:11:43 -07:00
Krist Wongsuphasawat fc3422eaeb add build query as part of plugin (#6146) 2018-10-18 18:39:34 -07:00
Krist Wongsuphasawat bc4dfad6c8 fix bar chart value overlap with legend (#6145) 2018-10-18 18:00:42 -07:00
Krist Wongsuphasawat 04e5e87114 remove reactable from Hotkeys.jsx (#6143) 2018-10-18 18:00:03 -07:00
Krist Wongsuphasawat 9d01af201e Add annotation information to ChartMetadata (#6136)
* add annotations information to ChartMetadata

* rename fields
2018-10-18 17:59:30 -07:00
Krist Wongsuphasawat d662e36442 [Ready] Define ChartProps data structure (#6125)
* rename basicChartInput to chartProps

* replace BasicChartInput with ChartProps class

* Add transformProps to deck.gl plugins

* Add space

* delete BasicChartInput

* add width and height as part of ChartProps and update transformProps

* remove width and height

* remove adaptors from deck.gl components

* remove deck.gl creataAdaptor
2018-10-18 15:44:21 -07:00
Krist Wongsuphasawat 4e2341a131 downgrade reactable and remove fastdom (#6142)
* downgrade reactable and remove fastdom

* remove caret
2018-10-18 14:09:01 -07:00
michellethomas 7d0a17aef5 Turning off flaky link tests (#6141) 2018-10-18 12:02:59 -07:00
Krist Wongsuphasawat 0aa6d90429 Remove isNumeric util function and use Number.isFinite instead (#6106)
* remove isNumeric util function and use lodash isFinite instead

* use native Number.isFinite
2018-10-18 11:24:43 -07:00
Krist Wongsuphasawat 58be31af3f change viewport dimension (#6123) 2018-10-18 11:22:43 -07:00
Chris Williams e163dfe744 [SIP-4] replace SQL Lab ajax calls with SupersetClient (#5896)
* [superset-client] replace sqllab ajax calls with SupersetClient

* [superset-client][sqllab] replace more misc ajax calls

* [superset-client][tests] call setupSupersetClient() in test shim

* [superset-client] replace more sqllab ajax calls and fix tests

* [superset-client][tests] remove commented lines

* [sqllab][superset-client] fix eslint and tests, add better error handling tests.

* [superset-client] fix tests from rebase

* [cypress][sqllab][superset-client] fix

* [superset-client] use Promises not callbacks in getShortUrl calls

* [superset-client][short-url] don't stringify POST

* [superset-client][short-url][cypress] add data-test attribute for more reliable test

* [cypress] remove .only() call
2018-10-18 10:40:30 -07:00
Krist Wongsuphasawat 273991fd4e Use @vx/responsive to provide Chart width on Explore page (#6104)
* use parent size to compute width

* simplify this.width() and this.height()

* remove unnecessary jquery

* fix indent and import

* adjust headerheight from 100 to 80

* fix test
2018-10-16 22:18:35 -07:00
Maxime Beauchemin bbfd69a138 [utils.py] gathering/refactoring into a "utils/" folder (#6095)
* [utils] gathering/refactoring into a "utils/" folder

Moving current utils.py into utils/core.py and moving other *util*
modules under this new "utils/" as well.

Following steps include eroding at "utils/core.py" and breaking it down
into smaller modules.

* Improve tests

* Make loading examples in scope for tests

* Remove test class attrs examples_loaded and requires_examples
2018-10-16 17:59:34 -07:00
Chris Williams af0ffa44ab [SIP-4] replace explorer ajax calls with SupersetClient (#5869)
* [superset-client] initialize SupersetClient in app setup

* [core] replace explore ajax calls with SupersetClient

* [core] fix SupersetClient explore tests

* [core] remove _packages mistake directory

* remove unused files

* add yarn.lock

* always render modal

* [superset-client][jest] fix SaveModal_spec

* [lint] remove unnecessary AbortController global

* yarn.lock
2018-10-16 14:54:31 -07:00
Krist Wongsuphasawat dcfbae1ab9 [SIP-5&6] Refactor line_multi (#6058)
* Rewrite line_multi

* move dir

* add chartplugin for line_multi

* rename var
2018-10-16 14:54:01 -07:00
Chris Williams 462c58ee67 [SIP-4] replace dashboard ajax calls with SupersetClient (#5854)
* [core] replace dashboard ajax calls with SupersetClient

* [core] fix SupersetClient dashboard tests

* [dashboard][superset-client] don't error by parsing save dashboard response as json
2018-10-16 13:42:22 -07:00
Junda Yang 177bed3bb6 allow cache and force refresh on table list (#6078)
* allow cache and force refresh on table list

* wording

* flake8

* javascript test

* address comments

* nit
2018-10-16 13:14:45 -07:00
michellethomas 7d49255926 This control test is flaky and affecting travis runs, turning it off for now (#6121) 2018-10-16 12:20:07 -07:00
Beto Dealmeida b4a1983303 Fixes to the CategoricalDeckGLContainer and filter box (#6038)
* WIP

* WIP

* Fix time grain

* Fix autoformatting

* Fix more autoformatting

* Fix even more autoformatting

* Fix manual move of play slider

* Fix state management

* Revert change

* Fix screengrid

* Remove autozoom on render

* Remove unneeded code

* Zoom when mounted

* Fix lint
2018-10-16 12:08:37 -07:00
Junda Yang 91792a564a send username in sync request (#6113)
* send username in sync request

* nit
2018-10-15 20:33:59 -07:00
Chris Williams 316fdcb4d0 [SIP-4] replace chart ajax calls with SupersetClient (#5875)
* [deps] add @superset-ui/core

* [superset-client] initialize SupersetClient in app setup

* [superset-client] add abortcontroller-polyfill

* [superset-client] replace all chart ajax calls with SupersetClient

* [tests] add fetch-mock dep and helpers/setupSupersetClient.js

* [superset client][charts][tests] fix and improve chartActions_spec

* [deps] @superset-ui/core@^0.0.4

* [common] add better SupersetClient initialization error

* [cypress] add readResponseBlob helper, fix broken fetch-based tests

* [cypress] fix tests from rebase

* [deps] @superset-ui/core@^0.0.5

* [cypress][fetch] fix controls test for fetch

* [cypress][dashboard][fetch] fix filter test for fetch

* [superset-client] configure protocol on init

* yarn.lock

* undo Chart.jsx revert

* yarn again

* [superset-client] fix chartAction unit tests
2018-10-15 16:52:19 -07:00
Christine Chambers 9029701f24 [refactor] Migrate from Mocha+Chai to Jest (#6079)
* [refactor] Migrate from Mocha+Chai to Jest

This change migrates all the existing unit tests
- to Jest's global expect and matchers from chai's imported expect, asserts and matchers.
- to Jest's describe/test from mocha's describe/it

The majority of the mechanical changes to tests are achieved through running jest-codemods. The only two note-worthy manual tweaks:
1. Setting a testURL of http://localhost in jest config and adjusting a few tests to leverage this value instead of relying on about:blank.
2. Re-enabling ExploreChartPanel_spec which was previously commented out as we cannot have empty tests with nothing in it with Jest. :)

This change also removes dependencies to Mocha and Chai.

* Remove the test:one command as it now does the same thing as test.

* Fixing lint errors. The diff looks large but is large done through `yarn run lint --fix`

The only noteworthy change is the one in eslintrc for tests. The env has been updated from mocha to jest.

* Adding eslint-plugin-jest and further modify tests.

- One small fix in sqllab's Timer Spec for a test that is not using the spy it created for testing.
- Deletion of a duplicated test caught by eslint-plugin-jest.

* - Make istanbul coverage work with Jest.

- Remove dependency on stand-alone istanbul and babel-istanbul as they're built-into jest. Yes!

* Attempt to fix dynamic imports in tests.

* run sequentially and log heap usage

* - tweaking maxworkers for travis and specifying coverageDirectory for codecov

- remove dynamic import in shim.js now that it is set in babelrc for tests only.
2018-10-15 13:10:18 -07:00
timifasubaa 46c86672c8 remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
Chen Chen 68ff4e5b72 fix dependency issue #6086 (#6102) 2018-10-15 09:28:39 -07:00
Krist Wongsuphasawat dc7b6f2bae Rename onTooltip to setTooltip (#6103)
* rename onTooltip to setTooltip

* fix typo
2018-10-15 09:26:59 -07:00
Krist Wongsuphasawat 3df98e5b4c make BigNumber PureComponent (#6105) 2018-10-15 09:25:48 -07:00
Adam Dobrawy 12ce1b20bd Fix link formating in README.md (#6097) 2018-10-13 18:19:32 -07:00
Krist Wongsuphasawat 2fc07435ca move countries directory under CountryMap (#6088) 2018-10-13 10:12:45 -07:00
timifasubaa dd9eeda03e remove future (#6065) 2018-10-13 09:39:04 -07:00
timifasubaa 047c8b0943 remove six dependency (#6091) 2018-10-13 09:38:46 -07:00
Krist Wongsuphasawat e1e8778554 Add ChartPlugin and metadata for deck.gl vis (#6090) 2018-10-12 14:01:32 -07:00
Krist Wongsuphasawat 8e88d0233a Add ChartPlugin and metadata for nvd3 and BigNumber vis (#6085)
* add nvd3 thumbnails

* add ChartPlugin and metadata files

* add BigNumber thumbnails

* Add bignumber ChartPlugin
2018-10-12 12:09:40 -07:00
Chris Williams 1d2b1aa465 [cypress][sqllab] increase timeout for sqllab results (#6089) 2018-10-12 11:21:06 -07:00
Krist Wongsuphasawat 2a7b64fef5 [SIP-5] Remove references to slice from all deck.gl components. (#6039)
* start removing slice.

* migrate arc

* refactor arc

* refactor path

* refactor deck polygon

* remove commented code

* refactor factory function

* refactor grid

* refactor hex

* refactor polygon

* refactor scatter

* refactor geojson

* refactor screengrid

* remove unnecessary nesting

* add proptypes

* add proptypes

* refactor deck.gl Multi

* fix lint

* Use export syntax instead of module.exports
2018-10-11 20:56:36 -07:00
Krist Wongsuphasawat 5282f39026 Create chart plugins and metadata (#6072)
* add credit field

* change image size limit for url-loader

* create chord ChartPlugin

* Update config to include original file name in the output

* add calendar

* add country map

* add eventflow

* add thumbnails

* add eventflow, filterbox, force-directed and heatmap

* Add histogram, horizon, mapbox, paired t-test, parallel coordinates

* Create plugins for the rest one-off charts

* ignore chartplugin files from istanbul
2018-10-11 20:55:40 -07:00
timifasubaa e37b83a21a remove future imports from db migrations (#6063) 2018-10-11 14:22:56 -07:00
michellethomas b7d555420d Cypress tests for controls and explore links (#6069)
* Adding tests for controls

* Adding tests for explore links
2018-10-11 14:13:04 -07:00
Krist Wongsuphasawat 64383ce96e Rename color constants and move util function into separate file (#6074)
* rename constant colors to UPPERCASE

* Move isDefined into its own file and add unit test
2018-10-11 14:05:34 -07:00
Narcissus7 c0f685b640 Fix the horizon title only show the first key (#5998) 2018-10-11 13:08:26 -07:00
timifasubaa 5c5be825d9 remove future imports (#6050) 2018-10-11 09:46:25 -07:00
Beto Dealmeida 247a85b916 Fix top groups with user defined metrics (#6073) 2018-10-11 09:14:41 -07:00
Chris Williams 9b4cf856dd [cypress] add SQL lab tests (#5974)
* [cypress] add sqllab/sourcePanel integration tests

* [cypress] add tests for SQL Lab query panel

* [cypress] add selectors/

* [cypress] add tests for SQL Lab tabs

* [cypress][sqllab] remove nested assertions where possible, update to single test index file

* [cypress][sqllab] try force click

* [cypress][sqllab] wait for saved query to load

* [cypress][sqllab] unnest, use visit for href

* [cypress][sqllab] try 1s wait :O

* [cypress][sqllab] wait for savedquery api response

* [cypress][sqllab] fix wait syntax

* [cypress][sqllab] add route wait in sourcepanel for flakiness

* [cypress] use *.test.js pattern for tests

* [cypress] fix paths

* [cypress][sqllab] actually try running lint

* [cypress][dashboards] use *.test.js pattern for tests

* [cypress][sqllab] combine tests, remove nesting

* [cypress][sqllab] explicitly wait for query results
2018-10-09 14:28:11 -07:00
Arpit ee472af14d feat: import/export dashboards via cli (#6061)
* feat: import/export dashboards via cli

* style: fixed lint error

* test: added test for import and export util

* test: removing import test as it is causing integrity issues

Import is a wrapper around exist functionality so we can go ahead without a test or mock the actual db operation using https://docs.python.org/3/library/unittest.mock.html

And validate the wrapper operations only.

* test: remove test data file

* test: removed usage of reserved keyword id

* Fix: remove test that is causing unintended impact
2018-10-09 13:59:46 -07:00
John Bodley 238ffb4dee [setup] Using pip-tools to create requirements.txt (#6054) 2018-10-09 13:45:43 -07:00
Beto Dealmeida 3cc6fb61ab Add increment back arrow to time player (#6062)
* Working on CSS

* Will fix CSS later

* Simplify PR
2018-10-09 11:47:59 -07:00
Krist Wongsuphasawat cd2c46a5ed Add data structures for chart plugin system (#6028)
* add unit tests

* add test structure

* add unit tests for Registry

* add LoaderRegistry unit test

* add unit test for makeSingleton

* add type check

* add plugin data structures

* simplify API

* add preset tests

* update test message

* fix lint

* update makeSingleton

* update Plugin, Preset and unit test

* revise Registry code

* update unit test, add remove function

* update test

* update unit test

* update plugin unit test

* add .keys(), .entries() and .entriesAsPromise()

* update test description
2018-10-09 11:47:16 -07:00
Grace Guo 395359f5ad [cypress] add integration tests for dashboard (#6002) 2018-10-09 10:03:50 -07:00
Grace Guo 361f588b71 [Dashboard] Fix margin issue in dashboard modal (#6037) 2018-10-08 22:48:27 -07:00
Junda Yang f50ed17655 check db extra and metadata params preemptively (#6004)
* check db extra and metadata params preemptively

* flake8

* make use of inspect
2018-10-08 20:26:26 -07:00
Junda Yang 712c1aa767 Allow user to force refresh metadata (#5933)
* Allow user to force refresh metadata

* fix javascript test error

* nit

* fix styling

* allow custom cache timeout configuration on any database

* minor improvement

* nit

* fix test

* nit

* preserve the old endpoint
2018-10-08 20:25:40 -07:00
John Bodley 1ee08fc216 [select-star] Adding optional schema to view (#6051) 2018-10-08 10:32:40 -07:00
Joshua Carp 9dcf8e101a Upgrade flask-appbuilder to latest. (#6030)
* Upgrade flask-appbuilder to latest.

* Skip constraint deletes if not exist.

* Document breaking change in flask-login.
2018-10-08 12:40:52 -04:00
Teemu Heikkilä 6282edd033 Revert old precision formatters (#6056)
Revert commit https://github.com/apache/incubator-superset/commit/66fcf9b687bdd6cc8a6039f002ed87193a16b365#diff-366fb3d6e52b5fb2b9c306763adbc983
It caused sunburst to became confusing.
2018-10-08 09:41:59 -04:00
Beto Dealmeida 96952d0daf Search queries when enter is pressed (#6043)
* Search queries when enter is pressed

* Add unit test

* Remove line

* Improve test
2018-10-07 12:48:06 -07:00
Yuguang Zhang 06e029f9d3 fix for annotation layer bug (#6047) 2018-10-07 12:35:36 -07:00
timifasubaa 93fe453970 remove redundant mysql (#6049) 2018-10-05 20:27:20 -07:00
John Bodley adfe9e3f2b [tablemodelview] Fixing JSON api/read serializable issue (#6023) 2018-10-05 14:04:48 -07:00
Maxime Beauchemin 160e47720c Deprecate support for Python < 3.6 (#5985)
* Deprecate support for Python < 3.6

This is a first step, beyond this we can:
* remove all from future imports
* remove 'six' lib as a dependency
* start using f-strings
* enjoy ourselves

* fix tox

* Rebasing

* fix
2018-10-05 13:44:45 -04:00
Krist Wongsuphasawat 8fe6f12622 refer to default color scheme in colorpickercontrol instead of pointing to specific scheme (#6031) 2018-10-04 18:10:22 -07:00
Beto Dealmeida df341ffd26 Sorting tables by "modified" is broken (#6027)
* Fix sorting by modified

* Fix column name in decorator
2018-10-04 20:16:19 -04:00
Krist Wongsuphasawat 50c701c0e8 [ci] Update ci config to reduce javascript test time and some of cypress. (#6016)
* try travis config

* try more complex config

* fix config

* add cache and stages

* separate cache

* swap order

* fix redis

* remove env

* add cypress

* adjust caching

* reduce cache

* change order of execution

* change order again

* change node version

* install yarn via curl

* update cypress command

* update cypress command

* adjust cache and node version

* do not install yarn

* add npm cache

* remove export

* remove commented code

* change order of jobs

* fix indent
2018-10-04 14:54:44 -07:00
Krist Wongsuphasawat f889798688 use world map only bundle (#6029) 2018-10-04 14:46:08 -07:00
Krist Wongsuphasawat 9f028ccc7b [SIP-6] Migrate visualizations to new directory structure (part 2) (#5997)
* migrate MapBox

* migrate bignumber

* migrate timeseries table

* migrate EventFlow

* add default null

* fix linting

* use shortid instead of passing containerId
2018-10-04 14:45:49 -07:00
Grace Guo a9ef0aeaf5 Revert #5991 (#6035) 2018-10-04 13:43:01 -07:00
timifasubaa e12d00ae71 log query fetch time (#6033) 2018-10-04 11:13:32 -07:00
yamyamyuo ab5c910801 [bugfix] Fix Tableviz metrics column disorder (#5566)
* fix metrics disorder

* add tableviz metric order tests

* lint code

* use OrderedDict to avoid metrics disorder

* fix unit test
2018-10-04 08:53:26 -07:00
Krist Wongsuphasawat df64ecaa18 [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number, bubble, box_plot, treemap (#5924)
* Add integration test for world map

* add pie chart

* add area

* use should for assertion

* update area test

* update it message

* remove null params

* add pivot tests

* remove urlparams

* add dual_line

* add sunburst test

* add big number

* add sankey

* add bubble

* add box plot

* add treemap tests

* combine all vis under single test
2018-10-03 11:44:38 -07:00
Krist Wongsuphasawat 5c2a7880cc [SIP-6] Migrate visualizations to new directory structure (part 3 - nvd3) (#6006)
* migrate nvd3

* update basicchartinput
2018-10-03 10:18:04 -07:00
Krist Wongsuphasawat f9344f13df [cypress] Combine multiple tests under visualizations into single test to save running time (#6019)
* add histogram test

* add compare test

* merge all vis tests under single test
2018-10-02 11:31:29 -07:00
Arpit 73882945bf feat: import/export dashboards via cli (#5991)
* feat: import/export dashboards via cli

* style: fixed lint error

* test: added test for import and export util

* test: removing import test as it is causing integrity issues

Import is a wrapper around exist functionality so we can go ahead without a test or mock the actual db operation using https://docs.python.org/3/library/unittest.mock.html

And validate the wrapper operations only.

* test: remove test data file

* test: removed usage of reserved keyword id
2018-10-01 14:02:16 -07:00
Christine Chambers 604524b671 [feat] Feature flag system via config (#5960)
* [feat] Feature flag system via config

Adding a feature flag system that is driven by superset_config.py. This change includes:
- Server side changes to specify a dedicated FEATURE_FLAG dictionary for listing feature flags. E.g.
```
FEATURE_FLAGS = { 'SCOPED_FILTER': true }
```
- Pass the new feature flags to client via bootstrap-data
- Client side changes to inject feature flags into the redux state tree for dashboard, explore view and SqlLab
- Client side refactor/clean up so the feature flags can be properly tested. Also avoid modifying incoming bootstrap data when creating initial state for the redux state tree
- Re-enable tests that were previously disabled for ExploreViewContainer

* Fix lint errors.

* Remove the partial attempt to get reference to src working in tests (so we don't have to write ../../../src and such in tests). This will in a separate PR.
2018-10-01 11:47:06 -07:00
michellethomas 414a4bfc6f Removing the key from cypress build and removing parallel flag (#6005) 2018-09-28 17:24:48 -07:00
Krist Wongsuphasawat 36e2ddd8bf disable dashboard test (#6008) 2018-09-28 16:57:52 -07:00
Krist Wongsuphasawat 4868c00d6d wait and verify one-by-one (#5995) 2018-09-27 14:46:52 -07:00
Krist Wongsuphasawat 2cd9407a50 [SIP-6] Migrate visualizations to new directory structure. (#5949)
* Migrate Chord, Calendar

* Migrate CountryMap

* Add display name and rename Chord.jsx to Chord.js

* migrate Histogram

* add force-directed

* migrate Heatmap

* add horizon

* migrate parallel coordinates

* migrate partition

* migrate pivot table

* migrate rose

* remove react-dom

* migrate Sankey

* migrate sunburst

* migrate table

* migrate treemap

* migrate filterbox

* migrate wordcloud

* add paired t-test

* fix unit test

* remove renaming

* rename fields
2018-09-27 14:39:56 -07:00
Krist Wongsuphasawat bf9a102d1a Update webpack bundle configuration (#5983)
* add configuration for optimizing webpack

* resolve webpack cli issue

* Update outdated packages

* extract brace as its own chunk

* update comments

* add list of libs to skip parsing

* remove some libs from list

* remove noParse
2018-09-27 12:49:05 -07:00
Krist Wongsuphasawat 0cc0996e92 [cypress] Update dashboard test to remove 10s timeout (#5957)
* Fix dashboard test instead of using fixed 10s timeout

* resolve lint issues
2018-09-27 11:04:55 -07:00
Mạnh Tài 458b2b5970 Explicit set markdown version to >= 3.0 (#5959)
* Explicit set markdown version to >= 3.0

* Pinning
2018-09-26 23:48:13 -07:00
Krist Wongsuphasawat 4c21c65824 Remove lodash.throttle and replace underscore calls with lodash (#5946)
* remove lodash.throttle from dependency

* add babel-plugin-lodash'

* use lodash instead of underscore for isFunction

* switch underscore to lodash

* switch from underscore to lodash flatten

* Remove slugify and use kebabCase from lodash instead
2018-09-26 23:28:57 -07:00
michellethomas 52033cbf2a Pinning a version of click to fix travis (#5975) 2018-09-26 10:04:43 -07:00
Renkai 569f221d9b Add fordeal to superset user list (#5970) 2018-09-25 11:20:29 -07:00
Victor Noël 5811a26101 Constrain the max version of markdown (#5967)
Closes #5958
2018-09-24 11:41:16 -07:00
Krist Wongsuphasawat 6b89b7f8b5 Deprecate getColorFromSchem (#5937) 2018-09-23 12:47:32 -07:00
Junda Yang 4c62494dff fix sqllab querysearch typeahead permission error (#5906) 2018-09-21 13:48:41 -07:00
Krist Wongsuphasawat 0886870cd6 ensure npm run build is in production mode (#5934) 2018-09-21 13:30:16 -07:00
Maxime Beauchemin 70c095b1c0 [deck_polyline] show metric in geohash (#5952)
Also improved security a bit by calling `dompurify.sanitize` down the
stack.
2018-09-21 11:23:21 -07:00
Maxime Beauchemin a1fa4bc606 [deck_polygon] implement null locations flag (#5948)
* [deck_polygon] implement null locations flag

* Fix unrelated JS test issue
2018-09-20 22:02:28 -07:00
Maxime Beauchemin f94bda01b4 [bugfix] metrics issue in 'Periodicity Pivot' (#5931) 2018-09-20 21:42:40 -07:00
Maxime Beauchemin 73d1e4596d [explore] add "View samples" modal to action buttons (#5770)
* [explore] add "View samples" modal to action buttons

Also broke down the `View query` and `View results` as different
request so that viewing the query does not require fetching the results
anymore

* fix js tests

* lint
2018-09-20 13:51:39 -07:00
Maxime Beauchemin 896c2608aa [docs] iterating to get to ASF compliance on project site (#5923)
* [docs] iterating to get to ASF compliance on project site

https://whimsy.apache.org/pods/project/superset is a place to check on
whether we match the ASF's requirements

* Minor adjustments
2018-09-20 13:51:06 -07:00
Chris Williams 4e788034df [eslint] add no-only-tests (#5945) 2018-09-20 12:30:39 -07:00
michellethomas 15b10373b9 Adding configuration to cypress to enable dashboard (#5926) 2018-09-20 11:27:28 -07:00
Junda Yang b6d7d57c40 Add schema level access control on csv upload (#5787)
* Add schema level access control on csv upload

* add db migrate merge point

* fix flake 8

* fix test

* remove unnecessary db migration

* fix flake

* nit

* fix test for test_schemas_access_for_csv_upload_endpoint

* fix test_csv_import test

* use security_manager to check whether schema is allowed to be accessed

* bring security manager to the party

* flake8 & repush to retrigger test

* address comments

* remove trailing comma
2018-09-20 11:21:11 -07:00
Junda Yang a0e7c176e9 fix sqlab progress bar and status inconsistency (#5848) 2018-09-20 11:20:36 -07:00
Krist Wongsuphasawat 8c83b72ce2 remove .only (#5943) 2018-09-20 10:42:22 -07:00
timifasubaa 00c4c7ec4b fix csv upload bugs (#5940) 2018-09-20 10:34:15 -05:00
Krist Wongsuphasawat 1e5a02a42d use es6 import (#5938) 2018-09-20 08:12:29 -07:00
Maxime Beauchemin 5b97fe5c0c Some linting (#5790) 2018-09-20 08:11:43 -07:00
Beto Dealmeida 71f014e9b6 Allow removing legend (#5932) 2018-09-19 13:32:07 -07:00
Maxime Beauchemin b9e3159f7c Fix regression around low row limit for CSV exports (#5866)
* Fix regression around low row limit for CSV exports

* fix tests

* Still trying to fix tests
2018-09-19 13:30:25 -07:00
Alek Storm 549328f8f0 Clean up CONTRIBUTING.md: (#5911)
- Reorganize sections for better navigability
- Add table of contents
- Rework frontend assets section for clarity and DRY
- Rework translating section for clarity, add "Add Translations" contribution type
- Move release docs only useful for maintainers to RELEASING.md
- Other miscellaneous improvements
2018-09-19 10:01:51 -07:00
Krist Wongsuphasawat 8fff0d9e8f [SIP-6] Add reactify function and convert world map to new directory structure. (#5893)
* reactify world map

* add createAdaptor

* fix typo

* add schema

* move directory

* remove unnecessary lines

* make setRef a function

* convert keys to camelcase

* add unit test

* update formatting

* add check for displayName

* pass width and height as separate inputs
2018-09-18 23:35:36 -07:00
Maxime Beauchemin 75bc501146 [explore flow] handling duplicated column aliases (#5778)
* [explore flow] handling duplicated column aliases

closes #5739

* lint
2018-09-18 23:17:38 -07:00
Maxime Beauchemin 7448d07e54 [bugfix] ignore history.pushState errors (#5905)
Ignoring history.pushState handling errors as they are impredictable and
crash the application hard.

I'm thinking this may be because the payload object is too big and the
browser is unhappy about it. I'm not sure if the payload/state is ever
used (when hitting back?). The error seem to stop when replacing payload
by an empty object.
2018-09-18 21:52:30 -07:00
Krist Wongsuphasawat 325e7c03b8 [bugfix] De-dup <script> tags. #5883 (#5890)
* Fix adding duplicate script tags.

* add more empty lines

* rename function
2018-09-18 17:50:30 -07:00
michellethomas 8cb734d7e0 Table and dist bar tests (#5901)
* Creating commands to verify codes and slices

* Creating tests for table and dist bar
2018-09-18 16:27:45 -07:00
Chris Williams 42ab1754db [contributing.md] swap cypress command order (#5921) 2018-09-18 14:37:44 -07:00
Christine Chambers 24be6922fd [refactor] Remove dependency on personal fork of supercluster from mapbox visualizations (#5902)
* [refactor] Remove dependency to personal fork of supercluster from mapbox visualizations

- Update dependency to reference the vanilla supercluster
- Clean up backend api call for mapbox vizzes to ensure a boolean is sent to indicate whether the viz includes custom metric for clustering
- Refactor of mapbox and its cluster overlay components to use vanilla supercluster and its recommeded way for handling clustering based on custom aggregations.
- Allow reclustering within the initial bounds on render in mapbox visualizations (stay true to old behaviors).
- Remove the median aggregation from available cluster label aggregators as there is no memory efficient way to implement this and it is unknown how often this feature is used
- Updating doc to mention the backward incompatible change re median

* Perform the check for has_custom_metric through `not None` to produce a boolean and rename the field reflect it is a boolean.
2018-09-18 12:38:17 -07:00
Krist Wongsuphasawat 19a3319acf [bugfix] Fix percent metric display and check for string columns in table (#5917)
* fix percent metric display

* add empty line

* address string or number check
2018-09-18 10:30:47 -07:00
Krist Wongsuphasawat f2d64492ef Remove unused functions and jquery dependency (#5868)
* remove unused functions and jquery dependency

* rebase and remove more obsolete functions
2018-09-18 09:52:49 -07:00
Krist Wongsuphasawat 14de28a4f2 [bugfix] Fix color scheme picker (#5891)
* Fix color scheme picker

* fix .value
2018-09-18 09:50:14 -07:00
Christine Chambers 74940e6a16 Fixing linting error in macro_tests (#5918) 2018-09-17 20:29:14 -07:00
Krist Wongsuphasawat 39ef77abc5 Remove jquery usage to highlight sql lab menu (#5907)
* Remove jquery hack

* change filter to find
2018-09-17 11:05:22 -07:00
Manuel Silva 041fe52028 Adds a new macro to allow getting filter values easily (#5547)
* Adds new macro to get filter values from "filters" and "extra_filters"

Adds test for filter_values macro

Adds doco for filter_values

Changes filter_values return type to be a list rather than string

* Makes return value type consistent
- filter_values always return a list
2018-09-17 09:36:47 -07:00
Krist Wongsuphasawat 0e93a94ae4 [SIP-5] Refactor nvd3 (#5838)
* move into folder and scaffold adaptor

* extract width and height

* remove jquery

* extract showBrush

* extract lineInterpolation

* extract xAxisFormat and yAxisFormat

* extract annotationData

* extract xTicksLayout and colorScheme

* extract showXXX

* extract x and y axis labels

* extract showminmax

* extract pie chart props

* extract area chart props

* extract logscale and yAxisBounds

* extract margin

* extract bubble props x,y,size

* extract contribution, comparisonType and color_picker

* remove the last fd.xxx

* remove unnecessary variables

* remove slice.container

* fix unit test reference

* Rewrite logic to compute max label lengths to use only d3, not jquery.

* extract annotationLayers and no more slice.xxx in nvd3vis

* rename x, y, size to xField, yField, sizeField

* use arrow function

* move tooltip function

* extract helper functions into utils

* remove unused argument

* fix height calculation and show bar labels

* rename function

* update unit test

* organize tooltip generator

* update line_multi

* Add proptypes for data

* list proptypes for data

* extract tooltip function for bubble chart

* rename variables

* remove console.log

* enumerate vizTypes and pieLabelType

* parse maxBubble

* use new color scale

* fix import"

* remove line
2018-09-16 20:38:30 -07:00
Maxime Beauchemin 9c486a3b3d [react16] fix React type checking (#5903)
Somehow checking the type of a JSX-defined React component is not
straightforward and changes through versions of React.

Using the `name` attr addresses the issue for now.
2018-09-16 11:48:32 -07:00
Krist Wongsuphasawat b68766d373 Add cypress artifacts directory (videos/screenshots) to gitignore and sort items in gitignore (#5900)
* Add cypress artifacts to gitignore and sort items in gitignore

* update sort
2018-09-14 15:38:14 -07:00
Maxime Beauchemin acf1a1b2d3 [treemap] add row_limit control (#5811) 2018-09-14 11:40:22 -07:00
Junda Yang fdd44ace27 remove duplicated utils (#5851) 2018-09-13 15:24:08 -07:00
Chris Williams b453cd2bf2 [lint] turn no-undef back on, set browser, cypress, and mocha env's (#5879)
* [lint] turn no-undef back on, set browser, cypress, and mocha env's, and fix issues

* [lint] fix undefined var in TimeTable.jsx
2018-09-13 14:45:24 -07:00
Krist Wongsuphasawat 7098ada8c5 [SIP-5] Refactor Time Series Table (#5775)
* Break TimeTable into smaller pieces

* extract function to compute color

* Handle height and scrollbar

* sort out isGroupBy

* Set default values

* Specify proptypes for data

* rename fields and update proptypes

* Add default props

* remove commented line

* swap import
2018-09-13 10:40:46 -07:00
livinm 057c749471 Addded documentation for Teradata DB (#5885)
Documentation extension for PR5870
2018-09-13 08:01:37 -07:00
livinm 83fa7af42a Enable Teradata (#5870)
* Enable Teradata 

New DB engine spec for Teradata:
- LimitMethod should be WRAP_SQL since Teradata does not supporting "LIMIT" clause  (TOP)
- Timegrains for Teradata is added

* Update formatting to pass flake8 tests
2018-09-13 08:01:25 -07:00
Conglei 85692612d6 [bug fix] Fixed adhoc metric is not working for WordCloud (#5877)
* fixed adhoc metric

* change rotate default to flat
2018-09-12 23:12:04 -07:00
Conglei 10836ce53c fixed modal close issue (#5865)
* fixed modal close issue

* change Children array to Fragment
2018-09-12 21:28:45 -07:00
Conglei ee89a3eb5e [SIP-6] removed get_data for BigNumber (#5861)
* removed get_data for BigNumber

* removed duplicated condition

* fixed typo
2018-09-12 18:34:21 -07:00
Maxime Beauchemin 80faa8df80 Fix CSS theme flickering on FAB pages (#5880)
Since the recent PRs around webpack 4 and reloading, FAB pages have been
flickering on load, where a themeless Superset is shown for a fraction
of a second until the bootstrap theme gets loaded up.

This addresses it by moving the theme JS to the head section of the html
page.
2018-09-12 17:21:24 -07:00
Krist Wongsuphasawat 620beed867 remove getColorFromScheme in favor of CategoricalColorNamespace.getScale() for histogram (#5878) 2018-09-12 15:39:38 -07:00
Arpit 4121d57d32 fix: Pivot table not sorting formatted numeric column properly (#5709)
* fix: Pivot table not sorting formatted numeric column properly

* refactor(lint): fixed lint error
2018-09-12 15:07:44 -07:00
Krist Wongsuphasawat f482a6cf99 Improve categorical color management (#5815)
* Create new classes for handling categorical colors

* verify to pass existing unit tests

* separate logic for forcing color and getting color

* replace getColorFromScheme with CategoricalColorManager

* organize static functions

* migrate to new function

* Remove ALL_COLOR_SCHEMES

* move sequential colors to another file

* extract categorical colors to separate file

* move airbnb and lyft colors to separate files

* fix missing toFunction()

* Rewrite to support local and global force items, plus namespacing.

* fix references

* revert nvd3

* update namespace api

* Update the visualizations

* update usage with static functions

* update unit test

* add unit test

* rename default namespace

* add unit test for color namespace

* add unit test for namespace

* start unit test for colorschememanager

* add unit tests for color scheme manager

* check returns for chaining

* complete unit test for the new classes

* fix color tests

* update unit tests

* update unit tests

* move color scheme registration to common

* update unit test

* rename sharedForcedColors to parentForcedColors

* remove import
2018-09-12 14:10:26 -07:00
Chris Williams bec0b4cc37 [tests] fix sqllab/TableElement_spec (#5874) 2018-09-12 12:32:46 -07:00
Maxime Beauchemin 367dcdaa7d [time table] fix sorting on missing values (#5863) 2018-09-12 11:21:48 -07:00
Hugh A. Miles II 1e35030a90 [Docs] Running DB migration (#5748)
* Add doc to add new columns

* spelling

* spelling
2018-09-12 07:16:58 -10:00
Krist Wongsuphasawat 166058d95f correctly compute slice width in dashboard (#5867) 2018-09-12 10:05:39 -07:00
michellethomas 657993d609 Moving get_main_db out of tests and into superset utils (#5864) 2018-09-11 22:50:14 -07:00
timifasubaa c82cea3c8d fix sqllab logging (#5862) 2018-09-11 17:23:44 -07:00
Krist Wongsuphasawat 962eb0860c fix Object.assign try to write to read-only option.style (#5860) 2018-09-11 16:57:11 -07:00
timifasubaa 01212c3755 make access request open new tab (#5859)
* make access request open new tab

* trigger build
2018-09-11 16:18:14 -07:00
Christine Chambers 6df720d873 [bugfix] mapbox pan on filter (#5858)
* Pan mapbox map on query

- Modify the backend to send back the bounds of the points to cluster
- Clean up of mapbox component to derive lat, lon and zoom from the mercator that fitsbounds based on the bounds passed from the backend. This and the computation of clusters are now only done on initial load b/c we are not making queries to the backend on pan/zoom
- A minor clean up of unused props and also making the visual properties panel open by default

* Remove default latitude, longitude and zoom props which are unnecessary for computing the viewport now that it is driven by the bounds from the backend.

* a few small tweaks (rename vars to be sneak case and avoid two extra hash lookups)
2018-09-11 13:33:54 -07:00
michellethomas 6ae285b6f7 Adding line and big number total integration tests (#5846)
* Adding line and big number total integration tests

* Breakout visualization tests into multiple files
2018-09-11 11:03:46 -07:00
Chris Williams 1f6e8b31d2 [dev] fix redux devtools (#5855) 2018-09-11 10:35:52 -07:00
Grace Guo 965c838fbb update dashboard sidepane title (#5850) 2018-09-11 10:27:46 -07:00
timifasubaa 9a4bba485a [sqllab]More granular sqllab logging (#5736)
* quote hive column names (#5368)

* create db migration

* use stats_logger timing

* trigger build
2018-09-11 08:52:37 -07:00
Krist Wongsuphasawat ce362f0ad6 [bugfix] fix rows not showing on welcome page (retry) (#5849)
* fix rows not showing on welcome page

* remove test code

* bring filter back

* remove empty line

* remove another empty line

* remove comment
2018-09-11 08:06:18 -07:00
Maxime Beauchemin 73cfcccf05 [bugfix] 'No numeric types to aggregate' in NVD3 chart (#5853) 2018-09-10 23:01:34 -07:00
Maxime Beauchemin 039e7c56d8 [sql lab] handle large ints, prevent overflow (#5829)
* [sql lab] handle large ints, prevent overflow

* Fix tests
2018-09-10 22:16:18 -07:00
Maxime Beauchemin 73db918fbe Upgrade to React==16.4.1 & Enzyme==3.3.0 (#5359)
* Bumping react==16.4.1 &  enzyme==3.3.0

The upgrade was pretty smooth except for a cryptic message coming
out of react-select around running multiple copies of React. It turns
out the `common` bundle had React and was conflicting with explore and
dashboard apps, only in 16.x. This somehow wasn't a problem in 15.x
outside of the wasted resources.

Running 16.4 should bring in all sorts of perf improvements and features
we've all been waiting for.

https://reactjs.org/blog/2017/09/26/react-v16.0.html

TODO: react-bootstrap-datetimepicker isn't compatible with React 16

* Trying to deprecate react-bootstrap-datetime

* Moving forward

* Reintroducing tests
2018-09-10 14:48:06 -07:00
timifasubaa e35bfba308 add timing to stats logger (#5844) 2018-09-10 10:31:58 -07:00
Beto Dealmeida f740974bf7 Handle "ambiguous durations" (#5785)
* WIP

* Update interface

* Fix truncate

* Improve unit tests

* Improve code

* Use moment.js to parse ISO durations

* Fix typo and React props
2018-09-10 10:28:17 -07:00
Beto Dealmeida 6c9be9d67b Update time filter to use react-datetime (#5819)
* Update time filter to use react-datetime

* Clean up code

* Many small fixes and improvements

* Fix small things
2018-09-10 10:27:16 -07:00
Krist Wongsuphasawat 6d573724aa Enable hot module replacement for React via react-hot-loader (#5841)
* Install react-hot-loader

* enable react-hot-reload for Explore, Dashboard, Profile and Sqllab

* enable hmr for welcome page

* enable hmr for welcome page

* enable react hot module replacement for addSlice

* fix lint

* fix Welcome test

* remove eslint comment
2018-09-10 10:15:32 -07:00
Maxime Beauchemin 517fea33b6 [docs] suggest using python3.6 in installation docs (#5834) 2018-09-10 08:48:03 -07:00
Beto Dealmeida 299e20a23f Fix cache for multiple time comparisons (#5828)
* Fix cache for multiple time comparisons

* Remove simple cache

* Improve docstring
2018-09-07 15:45:28 -07:00
Maxime Beauchemin 4a62ef3ae0 Get 'Test Connection' button to take 'engine_params' into account (#5830) 2018-09-07 14:47:01 -07:00
michellethomas 9f4d67b49b Adding instructions on how to run Cypress in Contributing.md (#5840) 2018-09-07 10:26:51 -07:00
Krist Wongsuphasawat 3f8b970a88 [bugfix] Fix bignumber overflow in dashboard (#5839)
* Move BigNumber to directory.

* fix chart margin in dashboard

* Fix margin and be more conservative about width.
2018-09-06 21:48:41 -07:00
Krist Wongsuphasawat 68e7794daf [SIP-5] Refactor Paired t-test (#5762)
* extract TTestTable into another file.

* Move into directory.

* update proptypes
2018-09-06 16:14:27 -07:00
Krist Wongsuphasawat b284788fd8 [SIP-5] Refactor filterbox (#5789)
* reorganize variables

* bring back datasource

* refactor filter box

* rename constants to all caps and update prop types

* bind this.changeFilter

* update event handler
2018-09-06 16:13:50 -07:00
michellethomas d40ded0be8 Adding simple Cypress tests (#5693)
* Adding simple Cypress tests

* Changing visitChart into multiple commands

* Adding Cypress to tox
2018-09-06 14:55:48 -07:00
Grace Guo 0c98ecb6d1 [dashboard] Add alert on user delete root level tab (#5771) 2018-09-06 10:23:56 -07:00
Maxime Beauchemin 5616d7bdd7 [sql_json] allow not specifying client_id (#5730)
* [sql_json] allow not specifying client_id

We're opening the sql_json endpoint at Lyft to other apps leveraging
Superset as a data-access layer that enforces authentication and our data
access policy.

Currently sql_json requires the client to pass a `client_id` parameter
that uniquely identifies the query, that can then be used for polling
when in async mode. This PR makes it such that you don't have to define
a client_id anymore. It just gets generated when not passed.

* adressing comments
2018-09-05 22:34:24 -07:00
Yongjie Zhao f9977afd83 Update Readme that support Apache Kylin (#5818) 2018-09-05 22:33:03 -07:00
Maxime Beauchemin 98d9fb1e7e Adding 'Resources' section to the docs (#5823)
* Adding 'Resources' section to the docs

* Join slack entry
2018-09-05 22:30:56 -07:00
Krist Wongsuphasawat 8c2dbad803 fix bug with react-syntax-highlighter import (#5826) 2018-09-05 20:48:34 -07:00
Krist Wongsuphasawat 5eff7a8d6c [SIP-5] Refactor pivot table (#5705)
* extract slice and formData

* rename variables

* update proptypes and add comments
2018-09-05 14:14:12 -07:00
Krist Wongsuphasawat a9952bb449 [SIP-5] Remove unused function #easy-review (#5825)
* remove unused function

* remove comment
2018-09-05 13:46:04 -07:00
Krist Wongsuphasawat dafe0b9961 [SIP-5] Refactor parallel coordinates (#5761)
* Extract slice and formData

* organize imports
2018-09-05 12:59:23 -07:00
Krist Wongsuphasawat bebbdb85d2 [SIP-5] Refactor MapBox (#5783)
* Break MapBox into smaller pieces

* Replace React.createElement with regular jsx

* detach setControlValue

* enable render trigger

* Pass explicit props rather than pass all that exists in payload.data. Also use formData when possible.

* Rename sliceWidth, sliceHeight to width, height. Use deconstructor. Extract function.

* use arrow function

* fix linting and remove css
2018-09-05 12:12:30 -07:00
Krist Wongsuphasawat b461287290 [SIP-5] Refactor and improve histogram (#5758)
* Extract slice and formData

* indent

* update data proptype

* enable theme

* remove legacy code

* rename file

* Add legend

* Implement WithLegend

* align legend items to the right for bottom position

* add line at end of file

* fix linting issues
2018-09-05 12:11:37 -07:00
Krist Wongsuphasawat 2811498ec9 [SIP-5] Refactor calendar chart (#5760)
* remove stroke

* update style and annotate data type

* update prop type

* bring back utc code

* add comments
2018-09-05 10:34:44 -07:00
Krist Wongsuphasawat 0c33f80c1d Enable CSS Hot Module Replacement and optimize css output for production (#5813)
* Enable HMR for css. Use style-loader for development

* optimize css output

* remove mini-css-extract when dev

* change double-quote to single-quote
2018-09-05 09:17:18 -07:00
Christine Chambers a411516ff5 bug: don't show query overlay when panning mapbox maps (#5814)
* bug: don't show query overlay when panning mapbox maps

Since we don't want to prompt user to rerun query every time they pan a map, prevent the query overlay from showing by setting dontRefreshOnChange for viewport_latitude and viewport_longitude controls.

* Prevent query overlay on viewport zoom also.
2018-09-04 18:08:00 -07:00
John Bodley cf12ea0f03 [celery] setting default (#5812) 2018-09-04 17:32:01 -07:00
Krist Wongsuphasawat eb41756e5e Configure webpack-dev-server (#5786)
* setup devserver with correct proxy

* dev server wroking with written manifest

* add comments

* Change webpack to default port 9000 and minor js formatting

* Use hash in development.

* write to disk = true

* Take ports as argument for dev-server

* update instructions

* update instructions

* add devtools

* use mode instead of NODE_ENV

* use minicssextract for prod (like before)

* remove empty line
2018-09-04 10:39:05 -07:00
hitdemo d43813ff09 make some text in [druid,CRUD,datasource] localizable (#5796) 2018-09-03 23:04:31 -07:00
Ville Brofeldt 77fe9ef130 Force quoted column aliases for Oracle-like databases (#5686)
* Replace dataframe label override logic with table column override

* Add mutation to any_date_col

* Linting

* Add mutation to oracle and redshift

* Fine tune how and which labels are mutated

* Implement alias quoting logic for oracle-like databases

* Fix and align column and metric sqla_col methods

* Clean up typos and redundant logic

* Move new attribute to old location

* Linting

* Replace old sqla_col property references with function calls

* Remove redundant calls to mutate_column_label

* Move duplicated logic to common function

* Add db_engine_specs to all sqla_col calls

* Add missing mydb

* Add note about snowflake-sqlalchemy regression

* Make db_engine_spec mandatory in sqla_col

* Small refactoring and cleanup

* Remove db_engine_spec from get_from_clause call

* Make db_engine_spec mandatory in adhoc_metric_to_sa

* Remove redundant mutate_expression_label call

* Add missing db_engine_specs to adhoc_metric_to_sa

* Rename arg label_name to label in get_column_label()

* Rename label function and add docstring

* Remove redundant db_engine_spec args

* Rename col_label to label

* Remove get_column_name wrapper and make direct calls to db_engine_spec

* Remove unneeded db_engine_specs

* Rename sa_ vars to sqla_
2018-09-03 22:49:58 -07:00
Krist Wongsuphasawat 8a4b1b7c25 [SIP-5] Refactor table (#5707)
* update indent

* extract formData and data.

* take filter

* remove dependencies

* remove removeFilter

* add comment

* remove columnFormats and verboseMap from props. clarify a few more props

* fix linting issue

* minor syntax

* syntax fix

* Move check to adaptor

* update unit test

* remove code related to .widget

* rename variables for clarity

* move Option fix to browser.js
2018-08-31 15:42:44 -07:00
Hugh A. Miles II 5e3f8332c4 Update annotation model to have JSON Metadata field (#5745)
* add column to annotation model

* update migration file

* change to Text

* remove old migration file

* add migration file

* remove JSON

* add new column to view

* add comma back

* linting

* lint some more

* missing comma

* rename columns

* add degrade and new migration file

* update version

* fixe changed name

* remove json from list columns
2018-08-31 10:06:27 -07:00
Hugh A. Miles II e12f4fb66d update thumbnail (#5782) 2018-08-30 23:32:01 -07:00
Krist Wongsuphasawat f72cdc38df [SIP-5] Repair and refactor CountryMap (#5721)
* Extract slice and formData

* update css indent

* remove no-effect call

* improve text label

* adjust text size

* fix bound calculation

* use string literal

* make path constant
2018-08-30 14:43:40 -07:00
Conglei 9f2b502eb6 remove backend logic for wordcloud (#5753) 2018-08-30 12:59:05 -07:00
Beto Dealmeida 8af3e1f3a1 Fix redirect to SQL Lab (#5777) 2018-08-30 11:17:15 -07:00
Eli Sebastian Brumbaugh ada8b92d21 New branding images (#5776) 2018-08-29 17:48:43 -07:00
Junda Yang 5437efa590 Fix multilayer geoviz and color picker error (#5767)
* Fix multilayer goeviz and color picker error

* fix lint

* remove props.data and improve merging list

* nit
2018-08-29 15:37:39 -07:00
Krist Wongsuphasawat 00f2771f23 [SIP-5] Refactor and repair partition (#5718)
* Extract slice and formData

* reorder functions

* fix tooltip

* remove commented code

* remove commented code and rename variables

* remove verboseMap

* rename kx, ky to zoomX, zoomY
2018-08-29 15:21:04 -07:00
Krist Wongsuphasawat 86f99b0e1e [SIP-5] Refactor rose (#5763)
* refactor rose

* update proptypes
2018-08-29 14:56:28 -07:00
Krist Wongsuphasawat 00cc6e981e [SIP-5] Refactor World Map (#5719)
* extract slice and formData

* update proptypes of data
2018-08-29 12:36:48 -07:00
Grace Guo 772ae77ab0 [dashboard] Update font style for markdown component (#5722) 2018-08-29 12:01:41 -07:00
timifasubaa d5d592788c fix sqlparse bug and refactor (#5768) 2018-08-29 08:30:49 -07:00
Maxime Beauchemin 135539c109 [bugfix] 'DruidCluster' object has no attribute 'db_engine_spec' (#5765)
* [bugfix] 'DruidCluster' object has no attribute 'db_engine_spec'

* Fix tests
2018-08-28 21:04:06 -07:00
Beto Dealmeida 2da5db9fcd [Table view] Handle empty arrays in fd.timeseries_limit_metric (#5715)
* Handle empty arrays

* Remove test code

* Adding unit test

* Fix unit tests

* Remove logging
2018-08-28 18:42:48 -07:00
Christine Chambers ae3fb04036 Bug: fixing async syntax for python 3.7 (#5759)
* Bug: fixing async syntax for python 3.7

Rename async to async_ so superset installs for python 3.7.

* Addressing PR comments. Use kwargs instead of explicitly specifying async_ so downstream engines (e.g. PyHive) that supports async can choose to use the async_ in pythonwq3.7 and async in <=python3.6

* addressing additional pr comments
2018-08-28 17:40:45 -07:00
Beto Dealmeida 48d220c03a Disable input when IS (NOT) NULL selected in filters (#5766) 2018-08-28 17:05:44 -07:00
Maxime Beauchemin 6c6ea3730b [bugfix] IS NOT NULL filter triggers KeyError: 'val' (#5764) 2018-08-28 15:26:41 -07:00
Viksit Gaur ba4b8a033b Add Myra Labs to user list in README (#5756) 2018-08-28 15:14:42 -07:00
Maxime Beauchemin 60ecd72aac [deck polygon] add support for geohash (#5712)
* [deck polygon] add support for geohash

+ improvements:
* added autozoom support
* support for metric & aggregations (only aggregates if metric is picked)
* fixed stroke
* fixed opacity
* introduced a SliderControl

* addressing comments, fixing build

* Addressing comments
2018-08-28 11:09:10 -07:00
Maxime Beauchemin f0beb3ab80 Silence error on migration 4736ec66ce19 constraint drop (#5729)
* Silence error on migration 4736ec66ce19 constraint drop

* typo + lint
2018-08-28 11:08:47 -07:00
Maxime Beauchemin 6cc52c614c Prevent deleting databases that have attached tables (#5749)
* Prevent deleting databases that have attached tables

Similar to logic preventing deleting tables that have charts attached.

* Addressing comments
2018-08-28 11:08:12 -07:00
Beto Dealmeida bd1f36d345 Merge pull request #5750 from mistercrunch/updating_0_28
UPDATING.md entry about dashboard v2 forced migration in 0.28
2018-08-28 10:50:43 -07:00
Beto Dealmeida 1a95fbc88c Merge pull request #5732 from mistercrunch/build_docs
[docs] note as to how to build and view the docs
2018-08-28 10:48:14 -07:00
Beto Dealmeida 24a9a39e2d Merge pull request #5731 from mistercrunch/faq_db_engines
[docs] FAQ entry 'Does Superset work with [database engine]?'
2018-08-28 10:47:55 -07:00
Krist Wongsuphasawat 506cfd1450 [SIP-5] Refactor sankey (#5701)
* extract slice and formdata from sankey

* use arrow function

* reorganize imports
2018-08-27 21:50:08 -07:00
Krist Wongsuphasawat fcf2c756c0 [SIP-5] Refactor and update heatmap (#5704)
* Extract slice and formData

* Define data shape

* update style

* organize imports

* fix heatmap axis labels

* add new line

* adjust indent
2018-08-27 21:49:54 -07:00
Maxime Beauchemin 13e48e8c8e typo-delipo 2018-08-27 21:28:04 -07:00
Beto Dealmeida 4ae08c2c64 Merge pull request #5725 from mistercrunch/label_verbose_name
[table editor] better table header for Metrics tab
2018-08-27 18:33:31 -07:00
Maxime Beauchemin ceda3092e3 UPDATING.md entry about dashboard v2 forced migration in 0.28 2018-08-27 18:01:20 -07:00
Hugh A. Miles II 46a048b300 update webpack (#5744) 2018-08-27 16:59:05 -07:00
Beto Dealmeida 1e6a3b0401 Merge pull request #5706 from mistercrunch/color_arcs
[deck arcs] add JS hooks for sourceColor & targetColor
2018-08-27 16:33:54 -07:00
Beto Dealmeida 0d6201de67 Merge pull request #5724 from mistercrunch/css_editable_input
[css] show border around editable input while editing
2018-08-27 16:24:17 -07:00
Beto Dealmeida 19062ed50e Merge pull request #5723 from mistercrunch/fix_autocomplete_filters
[table editor] fix 'Autocomplete filters' checkbox doesn't stick
2018-08-27 16:22:33 -07:00
Krist Wongsuphasawat 0781cf2cfb [bugfix] BigNumber crash, Horizon indent and Myanmar geojson (#5746)
* fix myanmar geojson

* fix indent of horizon in dashboard

* Fix bignumber crash when color_picker is undefined
2018-08-27 15:46:52 -07:00
Krist Wongsuphasawat 8d01c84c54 [SIP-5] Refactor sunburst (#5699)
* extract slice and formData

* fix small issues

* Update visual

* update css
2018-08-27 10:43:04 -07:00
Krist Wongsuphasawat d7f06cbc26 [SIP-5] Repair and refactor Horizon Chart (#5690)
* Migrate horizon chart to react

* remove unused code

* rename files

* update props

* enable renderTrigger

* fix canvas transform issue

* Address Chris' comment
2018-08-27 10:42:42 -07:00
Hugh A. Miles II f5cc98351e remove unneeded console.log (#5738) 2018-08-26 21:01:05 -07:00
John Bodley 52b99dff78 [celery] Using preferred configuration proceedure (#5726) 2018-08-26 20:04:33 -07:00
Maxime Beauchemin 09d46a7864 Fix tests 2018-08-26 17:14:15 -07:00
Beto Dealmeida f83ea233c7 Autofocus aggregation in metric control (#5717)
* Focus button

* Move autofocus to aggregation
2018-08-26 16:36:09 -07:00
hitdemo 9a6595d0e9 make some text localizable, mainly in explore, query (#5735) 2018-08-26 11:02:56 -07:00
Maxime Beauchemin 12cc2fbe15 [docs] note as to how to build and view the docs 2018-08-25 16:31:03 -07:00
Maxime Beauchemin bddc9522e8 [docs] FAQ entry 'Does Superset work with [database engine]?' 2018-08-25 16:18:19 -07:00
Beto Dealmeida cae070467b Fix FAQ on filters (#5720) 2018-08-24 21:54:16 -07:00
Maxime Beauchemin e964d83b45 [table editor] better table header for Metrics tab 2018-08-24 18:14:59 -07:00
Maxime Beauchemin c447a970de [css] show border around editable input while editing 2018-08-24 17:57:51 -07:00
Maxime Beauchemin ba329440bc [table editor] fix 'Autocomplete filters' checkbox doesn't stick 2018-08-24 17:33:42 -07:00
Krist Wongsuphasawat 54ae215d11 [SIP-5] Refactor treemap (#5670)
* refactor treemap

* refactor treemap code

* Add proptypes

* add proptypes for tree

* Add margin prop
2018-08-24 14:15:43 -07:00
Maxime Beauchemin 14930bbddb [bugfix] add item is missing on table editor metrics tab (#5714) 2018-08-24 11:44:40 -07:00
Beto Dealmeida 2abc941801 Merge pull request #5716 from lyft/DPTOOLS-976
Return 403 on no authorization
2018-08-24 09:28:50 -07:00
Beto Dealmeida c567a89ee7 Use 403 2018-08-23 18:40:20 -07:00
Beto Dealmeida 9827925015 Return 401 on no authorization 2018-08-23 18:32:04 -07:00
Joshua Brooks 5e6efae155 Geojson property names (#5708)
* Add geojson for Myanmar

* Adds 'myanmar.geojson' file

* Adds "iso-3166" codes

* Uppercase ISO fieldname in TL, MY geodata
2018-08-23 15:48:26 -07:00
Krist Wongsuphasawat 0448db3b8d remove console.log and change wording (#5702) 2018-08-23 15:46:32 -07:00
Krist Wongsuphasawat 9fb28b5f4e Revise markup.js and iframe.js (#5672)
* Do not call slice.xxx

* remove iframe id

* remove old code

* use import instead of require

* update iframe.js
2018-08-23 15:45:45 -07:00
timifasubaa 5c49514e2f [sqlparse] fix sqlparse bug (#5703)
* fix sqlparse bug

* add one more test case
2018-08-23 11:20:25 -07:00
Maxime Beauchemin 71866f6a12 [deck arcs] add JS hooks for sourceColor & targetColor 2018-08-22 20:28:19 -07:00
John Bodley 89927558e8 [security] Moving set/merge perm to security manager (#5684) 2018-08-22 11:15:22 -07:00
Beto Dealmeida 54c9ceb78d Merge pull request #5623 from mistercrunch/fix_templates
Fix menu on 'import dashboards' page
2018-08-22 10:31:04 -07:00
Hugh A. Miles II b92e73084b Allow users to select color for big number (#5694)
* allow user to choose color

* add color control

* remove rgbToHex reference

* change to color picker control

* add d3-color

* remove module

* use d3-colors

* add semicolon
2018-08-22 10:27:19 -07:00
Joshua Brooks 0e057d50f1 Adds geodata for Myanmar (#5697)
* Add geojson for Myanmar

* Adds 'myanmar.geojson' file

* Adds "iso-3166" codes
2018-08-22 09:26:15 -07:00
Joshua Brooks 1c85192c6b adds TimorLeste geodata (#5698) 2018-08-22 09:25:57 -07:00
Maxime Beauchemin b42f8a23b1 [bugfix] geohash lat/long is reversed (#5695)
* [bugfix] geohash lat/long is reversed

This allows support for reversing geohashes. Note that the default option
was the wrong way.

* addressing comments

* make reverse_geohash_decode a staticmethod
2018-08-21 22:58:47 -07:00
Beto Dealmeida 2a8cd43881 Make brush send events (#5663)
* Make brush send events

* Make sure object is date

* Send event only on brushend
2018-08-21 21:40:26 -07:00
Maxime Beauchemin 6e8c7f7b20 [viz flow] detect TIMESTAMP, transition to line chart (#5634)
* [viz flow] detect TIMESTAMP, transition to line chart

* Refactor is_date
2018-08-21 21:33:34 -07:00
Beto Dealmeida 6959b70c1c Add categories and time slider to arc deck.gl viz (#5638)
* Fix legend position

* Add categories and play slider to arc viz

* New functionality to arc viz
2018-08-21 21:31:03 -07:00
Beto Dealmeida bcc0954bb9 Fixes to the play slider (#5675)
* Fixes to the play slider

* Address comments

* Make CSS rules more strict

* Fix CSS and improve code
2018-08-21 21:01:44 -07:00
Beto Dealmeida 359b31ebab Increase pylint jobs (#5646) 2018-08-21 20:50:53 -07:00
Krist Wongsuphasawat 0a4014937a Repair and refactor Word Cloud (#5669)
* create reactize function

* update function signature

* adjust word cloud controls

* Fix broken word cloud logic

* Repair and refactor word cloud

* remove file

* Add PropTypes

* change module.exports to export default

* change order

* update proptypes
2018-08-21 20:50:01 -07:00
Krist Wongsuphasawat 3929f0f79d Refactor force-directed graph (#5691)
* Refactor and add props to Force Directed Graph

* update label and enable renderTrigger
2018-08-21 20:48:58 -07:00
Yongjie Zhao ebe585df3d [bugfix] Encode unicode error message response (#5687)
* Fix unicode error message response

* Update
2018-08-21 20:47:40 -07:00
Sumedh Sakdeo 80e777823b Field names in big query can contain only alphanumeric and underscore (#5641)
* Field names in big query can contain only alphanumeric and underscore

* bad quote

* better place for mutating labels

* lint

* bug fix thanks to mistercrunch

* lint

* lint again
2018-08-21 13:45:42 -07:00
Maxime Beauchemin 71e0c07904 [bugfix] making secondary_metric optional (#5682)
I noticed that `secondary_metric` was required in the chart that users
it, namely sunburst, parallel coordinates, and world_map.

I set the control as allowing null, and found related bugs in the
process:
* parallel coordinates did not have support for the new MetricControl
* added color scheme support for parallel coordinates
* added option to set row_limit on these viz types
* sunburst to support numeric columns (number would show as blank)
2018-08-21 11:31:33 -07:00
Emily Littleworth 8dfa565c22 Upgrade mysqlclient to 1.3.13 (#5665) 2018-08-21 11:29:48 -07:00
Beto Dealmeida 14b5c6b8b1 Fix CSS (#5640) 2018-08-21 11:24:39 -07:00
Krist Wongsuphasawat fdb8001e0b change title from hotkeys to keyboard shortcuts (#5688) 2018-08-21 11:16:06 -07:00
Maxime Beauchemin 50042af25d [bug] 'an error has ooccured' when saving datasource (#5683)
The check_ownership was failing when Alpha user was saving a datasource
from the datasource editor.
2018-08-21 10:10:44 -07:00
hitdemo 5e5360fc11 make some text localizable, mainly in dashboard, explore, datasource editor, webpage title (#5685) 2018-08-21 10:10:09 -07:00
Sumedh Sakdeo 0fbda33c68 Handling bigquery dialect when previewing data (#5655)
* Handling bigquery dialect when previewing data

* review comments

* lint
2018-08-20 22:04:22 -07:00
Maxime Beauchemin 2d23ae1065 [bugfix] df is None breaks df.empty check (#5657) 2018-08-20 17:01:03 -07:00
Krist Wongsuphasawat 683edc377e Refactor Chord vis (#5671)
* refactor Chord vis

* Add PropTypes

* change module.exports to export default
2018-08-20 17:00:25 -07:00
Beto Dealmeida fef39a7878 Fix time filter in cache (#5681) 2018-08-20 16:37:19 -07:00
Krist Wongsuphasawat cdd348ab94 Minor improvements to SQL Lab UI (#5662)
* Remove "for"

* add space

* Separate control to select table from database and schema.

* Adjust schema displays

* Fix caret and arrow position in Select and Tab

* Reduce space after caret in tab header

* Use translator

* Align icons in the pop-up menu in Sql Lab

* Add new table in front of the list (so it will appear on top)

* shorten message

* reduce line
2018-08-19 22:43:00 -07:00
Beto Dealmeida 4c5142d969 Filter out null locations by default (#5642)
* Filter out null locations by default

* Move exception to better place

* Add unit test

* Return columns in order for test and readibility
2018-08-19 16:04:01 -07:00
Hugh A. Miles II dd5e0ba70b Update CONTRIBUTING.md (#5668) 2018-08-19 15:42:09 -07:00
Chris Williams 3d15d910af [sqllab] call out transient state of tabs to users (#5652) 2018-08-17 17:44:56 -07:00
Maxime Beauchemin 0a1aa6dd50 [bugfix] TypeError: adhocMetric.comparator.join is not a function (#5661)
Somehow we have a "IN" filter where the filter is a string, not an
array. While this may need to get fixed upstream as well, this prevents
the explore view from completely crashing.

Side note: this function looked somewhat brittle, I'm assuming it's used to keep
the free form SQL tab in sync and not used to generate the actual SQL
being executed.
2018-08-17 15:53:04 -07:00
Yongjie Zhao 5a4b70dad7 Fix checkbox is fails When disable Druid datasource (#5645) 2018-08-16 23:54:27 -07:00
Junda Yang 97acfc7f17 fix multilayer viz backend error (#5649) 2018-08-16 23:52:39 -07:00
Sumedh Sakdeo cc9324ae8b handle exception and set dtype value to JSON, when column type JSON (#5644)
* handle exception and set dtype value to JSON, when column type JSON

* review comment

* only when we handle exception
2018-08-16 20:04:08 -07:00
timifasubaa 4ff5686e0c make filters use security manager (#5567)
* make filters use security manager

* remove the superset short-circuit
2018-08-16 14:17:41 -07:00
michellethomas 32b3d00825 Updating yarn.lock for the vx upgrade (#5648) 2018-08-16 13:16:52 -07:00
michellethomas 2e0418034f Upgrading vx responsive to fix ResizeObserver issue (#5647) 2018-08-16 11:17:22 -07:00
michellethomas 492ad6c49a use_slice_data in slice_json calls (#5643) 2018-08-16 09:35:34 -07:00
Sumedh Sakdeo 5966a674e5 Explore View Perf Fix (#5637) 2018-08-15 12:27:08 -07:00
michellethomas bf0afef7a9 Fix form data issue switching viz types (#5100)
* Fixing issue with extra params in formData

* Pass in param use_slice_data to decide whether to use slice data

* Fixing core_tests to not use explore_json overrides
2018-08-15 11:25:06 -07:00
John Bodley 4e3b2e7cbc [title] Fix issue with non-string names in series title (#5433) 2018-08-15 09:35:44 -07:00
Sumedh Sakdeo c9bd5a6167 Fetch a batch of rows from bigquery (#5632)
* Fetch a batch of rows from bigquery

* unused const

* review comments
2018-08-14 21:44:04 -07:00
John Bodley 46f89f4516 [bubble] Fixing ad-hoc metric labels (#5630) 2018-08-14 17:11:40 -07:00
Maxime Beauchemin d601ff4747 Tackling late-arriving comments from #5186 (#5626) 2018-08-14 16:30:50 -07:00
Maxime Beauchemin be04c98cd3 [sql lab] always use NullPool (#5612)
I think that the only place where we want db connection pooling would be
to talk to the metadata database. SQL Lab should close its connections
and never pool them.
Given that each Gunicorn worker will create its own pool that can lead
to way too many connections opened.

closes https://github.com/apache/incubator-superset/issues/4666
2018-08-14 16:27:13 -07:00
Conglei 2171ffb630 [bug fix] Fixed forced percentage format on tooltips and bubble chart tooltips format. (#5631)
* fixed forced percentage format on tooltip and correct reflection on bubble chart tooltip format

* re-trigger build
2018-08-14 16:04:24 -07:00
Maxime Beauchemin 4c2be71e83 [bugfix] TIMESTAMP not detected as date (#5629)
* [bugfix] TIMESTAMP not detected as date

* minor tweak
2018-08-14 13:01:28 -07:00
Hugh A. Miles II 85a6da19ee Fix annotation_json endpoint (#5621)
* fix annotation_json endpoint

* add time back

* set db to None

* change if condition

* remove prop

* add guard for to_dttm

* linting
2018-08-14 11:40:14 -07:00
Grace Guo 9f6ac0898e [Dashobard]Fix bad merge (#5624) 2018-08-14 10:56:45 -07:00
Krist Wongsuphasawat 1d7f4f282e [bugfix] line_multi chart crashed on chosen (#5568) (#5572)
* Fix bug for line_multi

* refactor forEach to map

* reorder fields

* fix issue with datasource
2018-08-14 10:48:21 -07:00
Jillian Rowe a39dfb9ff9 Add additional heatmap schemas (#5549)
* got skeleton started

* added d3-scale-chromatic to package.json

* got hex values instead of calling from a function

* got rid of d3-scale-chromatic - no longer needed

* added schemas to controls

* damn editor broken some line spacing

* commit

* fix style issues

* whyyyyy won't this build

* whyyyyy won't this build

* damn typo

* hahaha got editor to deal with style configs

* no i guess i didn't

* gotta get them all

* again

* trying to get docker build ot work

* updated installation docs with some osx instructions

* restoring yarn.lock not sure why it changed

* trying to fix indent

* trying again

* CODE STYLE CHANGES WORK

* removing some colors that are too close to white

* human readable labels for names

* human readable labels for names
2018-08-13 23:37:17 -07:00
Beto Dealmeida 763eeca75a No exception on no data (#5597)
* No exception on no data

* Remove unreachable exception
2018-08-13 22:33:29 -07:00
Maxime Beauchemin d04d714fe5 Fix menu on 'import dashboards' page
closes https://github.com/apache/incubator-superset/issues/5576
2018-08-13 22:31:51 -07:00
Beto Dealmeida 5c1d906976 Add option to run query with ctrl+enter (#5622) 2018-08-13 21:43:57 -07:00
Krist Wongsuphasawat 536478e96d [feature] Allow min/max value for the sparkline in time series table (#5603)
* Allow min/max value for the sparkline in time series table

* show bound lines

* User can choose to show y-axis bounds

* show label for the bounds

* compute necessary padding for the bound label

* extract sparkline code to another component

* can show y-axis in sparkline without setting bounds

* reorder option rows
2018-08-13 16:19:19 -07:00
John Bodley e0c02be14e [dashboards] Increasing position_json to MEDIUMTEXT for MySQL (#5618) 2018-08-13 14:52:59 -07:00
John Bodley 2685ab4f1f [fix] Enforcing main dttm column (#5584) 2018-08-13 13:54:55 -07:00
hitdemo 50981dbc69 make some text localizable (#5611) 2018-08-12 20:47:55 -07:00
Narcissus7 7d61eea604 fix cal_heatmap tips location error (#5480) (#5587)
* fix cal_heatmap tips location error

* fix graph-legend
2018-08-12 20:44:54 -07:00
John Bodley d1ef81f102 [ad-hoc filters] Fixing legacy conversion (#5589) 2018-08-10 10:22:06 -07:00
Maxime Beauchemin 682ca3874e [sql lab - explore flow] make sure groupby is empty (#5596) 2018-08-09 14:48:36 -07:00
Grace Guo 21bf8d9f8f [bug]Fix load_examples dashboard version key name (#5592) 2018-08-09 13:09:14 -07:00
Maxime Beauchemin f4b45f07c3 [sql lab] visualization flow to detect unaliased columns (#5579)
* [sql lab] visualization flow to detect unaliased columns

* Addressing comments
2018-08-09 13:04:09 -07:00
Maxime Beauchemin a8f4849911 [table editor] disable 'Sync table metadata' button for Superset views (#5580)
This was a bit tricky since there's a bug in react-bootstrap that make
it tricky to show a tooltip on a disabled button.
2018-08-09 10:53:25 -07:00
Beto Dealmeida 222b79df7e Template dashboard (#5550)
* Template dashboard

* Fix MySQL test

* Model for user attributes

* Redirect to welcome dash

* Fix lint

* Add missing file

* Add migration script

* Fix lint

* Fix more lint
2018-08-07 17:39:15 -07:00
Octavian 39ff9deb57 update python3 version for testing to 3.6 (#5562)
* update python version for testing to 3.6

* CONTRIBUTING.md states pull requests should work on py27, py36+

* CONTRIBUTING.md states pull requests should work on py27 and py36
2018-08-07 13:22:19 -07:00
Conglei ad469c72ad Fixed the wrong icon for Source -> Table (#5574) 2018-08-06 17:27:48 -07:00
Krist Wongsuphasawat 39acd9ff7d remove deep-equal and use _.isEqual instead (#5573) 2018-08-06 17:26:06 -07:00
Maxime Beauchemin 68ba63fcd9 Implement a React-based table editor (#5186)
* A React table editor

* addressing comments

* Fix SelectAsyncControl error on clear

* fix tests

* more corrections

* Removed <strong>
2018-08-06 15:30:13 -07:00
Krist Wongsuphasawat aa14bac5c7 Add option for BigNumber to not start y-axis at 0 (#5552)
* Add option to not start y-axis at 0

* Update language to positive.
2018-08-06 14:32:29 -07:00
Maxime Beauchemin b7f9dabc44 A collection of small bug fixes on master (#5561) 2018-08-06 08:36:06 -07:00
hitdemo f5ad661441 remove uneccessary comma (#5564) 2018-08-04 09:20:01 -07:00
Maxime Beauchemin 89b7ca0623 Remove function since_until_to_time_range (#5560)
It's taken care of earlier in the pipeline with legacy.update_time_range
2018-08-03 15:34:03 -07:00
Maxime Beauchemin 9331cf79b5 [sql lab] allow EXPlAIN queries (#5558)
* [sql lab] allow EXPlAIN queries

closes https://github.com/andialbrecht/sqlparse/issues/421

* typo
2018-08-03 15:33:33 -07:00
Grace Guo faf35b0daa convert position to v2 for Superset load_examples (#5515) 2018-08-03 15:28:12 -07:00
Maxime Beauchemin 51bd17d6f6 Improve URLs for Chart and Dashboard ModelViews (#5544)
* Improve URLs for Chart and Dashboard ModelViews

Prior to this, the ModelView for Chart and Dashboard would be
at `/slicemodelview/list/` and `/dashboardmodelview/list/`.

Now we have cleaner URLs at `/chart/list/` and `/dashboard/list/`

* Fix unrelated js lint

* addressing comments
2018-08-03 12:46:48 -07:00
timifasubaa 1e155663a7 permissions bug fixes (#5559) 2018-08-03 12:08:00 -07:00
Maxime Beauchemin 8014709b1a [bugfix] time filter on dashboard view (#5546)
Charts using the old since/until time filtering form_data format would
only work in the Explore view, not on the dashboard view. This fixes
that.
2018-08-03 11:29:34 -07:00
Grace Guo 2e2c9806b2 Reduce dashboard position_json data size (#5543) 2018-08-03 10:55:08 -07:00
Ville Brofeldt e1f4db8e24 Match viz dataframe column case to form_data fields for Snowflake, Oracle and Redshift (#5487)
* Add function to fix dataframe column case

* Fix broken handle_nulls method

* Add case sensitivity option to dedup

* Refactor function definition and call location

* Remove added blank line

* Move df column rename logit to db_engine_spec

* Remove redundant variable

* Update comments in db_engine_specs

* Tie df adjustment to db_engine_spec class attribute

* Fix dedup error

* Linting

* Check for db_engine_spec attribute prior to adjustment

* Rename case sensitivity flag

* Linting

* Remove function that was moved to db_engine_specs

* Get metrics names from utils

* Remove double import and rename dedup variable
2018-08-03 09:53:56 -07:00
Jay Lindquist aa9b30cf55 Re-add dashboard short links (#5398)
* Re-add dashboard short links

* Make the short link available to all users
* Include filters in the short link for dashboards

* Remove duplicate key causing linter error

* Change URL Short link button into a menu item with Modal

* Split out tests, bind URL short link in constructor
2018-08-03 09:22:39 -07:00
ekasitk 0aff8659d8 Add Thailand country map (#5554) 2018-08-03 08:15:38 -07:00
Krist Wongsuphasawat 9d95c4cc32 remove js packages that are not referenced in js code (#5514) 2018-08-02 11:45:58 -07:00
Nuno Beires 0786913fa6 Portuguese translation (#4874)
* Create message.po

* Add files via upload

* Update config.py

* Update config.py

* portuguese translation - messages.json

po2json

* Update message.po

* Add files via upload

* Add files via upload
2018-08-02 11:00:31 -07:00
Maxime Beauchemin fe6846b8db [sql lab] simplify the visualize flow (#5523)
* [sql lab] simplify the visualize flow

The "visualize flow" linking SQL Lab to the "explore view" has never
worked so great for people, here's a list of issues:

* it's not really clear to users that their query is wrapped as a
subquery, and the explore view runs queries on top of it

* lint + fix tests

* Addressing comments
2018-08-02 10:52:38 -07:00
Krist Wongsuphasawat 1b9e5d4174 Update BigNumber design (#5469)
support toggling trend line

experiment using svg to measure size instead of canvas

refactor BigNumber with chart sticked to the bottom

made header line stick to bottom and css adjustment

remove commented code

fix svg text size estimation

remove unused code and round dimensions

handle missing getbbox

remove vx/text from dependency

ensure svg deletion after measurement

add comment to css file.

Add `positive` and `negative` class based on diff.

Add default props.

rename variable

accept container as argument and remove redundant font family

refactor visutils for consistent api

update xy-chart

update xy-chart to alpha1.0

fix pointseries

remove points

update yarn.lock

[4c9c01d7] update xy-chart version

remove unused import
2018-08-02 10:34:36 -07:00
Ville Brofeldt 906dcd84a9 Replace metadata refresh stacktrace with danger flash (#5536)
* Replace stacktrace with danger flash

* Group successful and failed refreshes and fix typos

* Fix linting
2018-08-01 23:10:47 -07:00
timifasubaa 4bf69a7260 fix superset error message flow (#5540) 2018-08-01 15:36:58 -07:00
Jeffrey Wang 1a9c4592dc Include README in MANIFEST (#5531) 2018-08-01 15:07:53 -07:00
JamshedRahman 9831730351 Annotation Styles for Time Series Annotations (#5437) 2018-08-01 11:54:03 -07:00
michellethomas b564aa43dc Stop pretty printing dashboard json (#5538) 2018-08-01 11:26:02 -07:00
John Bodley e52518c3cd [ad-hoc filters] Remove legacy split in /explore (#5533) 2018-08-01 09:21:15 -07:00
John Bodley e7d05127d1 [get_df] Updating multi-statement logic (#5517) 2018-07-31 14:52:03 -07:00
michellethomas 8c822f1e9b Adding 364 days to time compare option (#5521) 2018-07-31 14:49:13 -07:00
John Bodley 47e3c41f5e [ad-hoc filters] Fixing issue with legacy filters (#5525) 2018-07-31 13:52:20 -07:00
Beto Dealmeida 2d8101b05f Fix time shift (#5529)
* Fix freeform multi select control

* Improve old code

* Fix lint
2018-07-31 13:26:06 -07:00
Ville Brofeldt c1e6c68a3e Add time grain blacklist and addons to config.py (#5380)
* Add interim grains

* Refactor and add blacklist

* Change PT30M to PT0.5H

* Linting

* Linting

* Add time grain addons to config.py and refactor engine spec logic

* Remove redundant import and clean up config.py

* Fix bad rebase

* Implement changes proposed by @betodealmeida

* Revert removal of name from Grain

* Linting
2018-07-30 23:44:30 -07:00
The Alchemist 37c9b0b119 added clickhouse as supported db (#5522)
I believe clickhouse is supported now since #1844 was merged
2018-07-30 23:34:43 -07:00
timifasubaa 9e67445c68 hotfix - pass link not error message (#5512)
* hotfix - pass link not error message

* nit
2018-07-30 15:29:36 -07:00
Jeffrey Wang b77d6e9cb1 Set max width for tooltips (#5504) 2018-07-30 11:03:42 -07:00
Vishal Jagtap 8fd8d73613 Fixed the issue of Zambia country map. (#5516)
- Previously after selecting option, got error "Uncaught TypeError: Cannot read property 'length' of undefined"
- Updated the appropriate geojson.
2018-07-30 09:15:32 -07:00
timifasubaa 3b6cafc82f allow security manager provide error message (#5500) 2018-07-27 14:39:25 -07:00
Grace Guo daf21169ca set default layout for new added charts (#5425) 2018-07-27 11:59:32 -07:00
Vishal Jagtap d373178451 Added India in country map visualizaion. (#5459)
- Added option to select "India".
- Added india.geojson upto state level.
2018-07-27 09:50:02 -07:00
mmuru 213fb649e6 Fix 5479 - unicode columns issue. (#5508) 2018-07-27 09:49:08 -07:00
Maxime Beauchemin cd55998d63 Improve hive/pyhive error message regex (#5502) 2018-07-27 08:31:37 -07:00
Grace Guo 723bbe46e2 Remove dashboard transition related config (#5505) 2018-07-26 22:30:29 -07:00
Maxime Beauchemin 6f87552bc2 [sqllab] fix unexpected keyword argument 'ignore_nan' (#5490) 2018-07-26 15:20:48 -07:00
Maxime Beauchemin 94cb20cf96 Apply SQL_QUERY_MUTATOR to explore & dashboard (#5493)
* Apply SQL_QUERY_MUTATOR kn explore & dashboard

* Add unit test
2018-07-26 15:20:23 -07:00
Maxime Beauchemin e22fcb9abf [sql lab] fix Hive 'Transport' not open issue (#5494) 2018-07-26 15:18:49 -07:00
Maxime Beauchemin 41286b7545 [sql lab] extract Hive error messages (#5495)
* [sql lab] extract Hive error messages

So pyhive returns an exception object with a stringified thrift error
object. This PR uses a regex to extract the errorMessage portion of that
string.

* Unit test
2018-07-26 15:17:55 -07:00
JamshedRahman 54fba0f39c Visualization Unicode bug fix (#5387)
* Visualization Unicode bug fix

* Fix the build (#5403)

The travis build has been failing for 2 reasons recently
* pylint takes > 10 minutes without outputing
* bad merge confict auto resolve in controls.jsx

* Visualization Unicode bug fix
2018-07-26 13:18:35 -07:00
Grace Guo 7ff02c0050 [migration] bug fix in dashboard migration (bebcf3fed1fe_) (#5497)
fix a bug in handle empty rows
2018-07-26 13:15:09 -07:00
Yoon 3df82d9da6 Modify Athena connection description (#5492) 2018-07-25 23:12:14 -07:00
Beto Dealmeida dfb6147715 Remove is-react dep (#5478) 2018-07-25 11:02:50 -07:00
Grace Guo 3f2fc8f413 retire dashboard v1 (js and python) (#5418) 2018-07-24 15:23:30 -07:00
Grace Guo fd2d4b0e58 Migrate dashboard positions data from v1 to v2 format (#5463)
* Migrate dashboard positions data from v1 to v2 format

* UPDATING.md

* rebase onto master
2018-07-24 15:14:11 -07:00
John Bodley bfcc3a633b [migration] Fix migration 3dda56f1c (#5471) 2018-07-24 14:05:00 -07:00
timifasubaa bea0a0aa15 fix migration 3dda56f1c (#5468)
* fix migration 3dda56f1c

* add isodate to setup.py:
2018-07-23 16:27:41 -07:00
Maxime Beauchemin fee5023269 Move flake8-related packages deps to reqs-dev.txt (#5460)
* Move flake8-related packages deps to reqs-dev.txt

My VIM which is integrated with flake8 wouldn't match the output from
travis and would often miss things related to the flake8 plugins
installed using Tox.

By moving this to requirements-dev.txt, we can expect developers would
have the proper configuration locally and get matching results with
Travis when running flake8 or in their IDEs if its integrated with
flake8..

* merging migratinos

* sorting packages

* Specify folder for flake8 processing

* pin pycodestyle==2.3.1

* merge db migrations
2018-07-23 12:29:21 -07:00
Maxime Beauchemin a11e47f694 Add row_limit control to line chart (#5426)
Somehow it's not possible to set the row_limit for a line chart,
resulting to a 10k cap in our environment. In some cases the user may
want more than that.
2018-07-23 11:54:12 -07:00
Ville Brofeldt a165aec822 Fix broken dedup and remove redundant db_spec logic (#5467)
* Fix broken dedup and remove redundant db_spec logic

* Add test case
2018-07-23 10:41:38 -07:00
Maxime Beauchemin 971e9f0993 Fix the build by merging both db migrations heads (#5464) 2018-07-23 09:43:09 -07:00
John Bodley 7fcc2af68f [sql] Correct SQL parameter formatting (#5178) 2018-07-21 12:01:26 -07:00
Maxime Beauchemin 6e7b5879be Clarify title when importing a table (#5454)
The flow to import a table definition in Superset is confusing, user may
think they are creating a table or what not. This makes the flow a bit
more clear.
2018-07-21 10:39:41 -07:00
George 0d5443e392 Add week granularity for Clickhouse (#5455) 2018-07-21 09:53:21 -07:00
Andre Lesa c545fdf589 Added Zambia geojson up to district level. (#5436) 2018-07-20 15:46:41 -07:00
gbates101 90decbc5db Migrated to click (#5410)
* Migrate flask_script to the Flask built-in click.

Flask 0.11 is the built-in integration of the click command line interface.
Flask-Migrate support for the new Flask CLI based on Click after Release 2.0.0.

* Resolved merge conflicts.

* Fixed issue introduced from bad merge.

* Fixed flake8 errors, added build to excluded flake8 stuff.

* * Moved the FlaskGroup declaration to the driver script.
* Moved shell context definition to cli.py
* Switched shell context definition to use decorator.
* Moved create_app definition to cli.py
* Fixed InvocationError with a wrapped function

* Added extra newlines between functions

* Removed flask-script dependency.
2018-07-20 15:26:33 -07:00
Ville Brofeldt 670b145b1e Add Snowflake connection string instructions (#5443) 2018-07-20 15:19:18 -07:00
Beto Dealmeida 83e1e2c0fe Time filter fixes (#5448)
* Fixes for the new time filter

* Fix dashboard

* Trigger tests
2018-07-20 15:15:33 -07:00
timifasubaa 41447e8b3b remove limiting at the display level (#5413) 2018-07-19 17:36:03 -07:00
Vishal Jagtap 6441f69271 Typo fixes in viz.py and CONTRIBUTING.md (#5432) 2018-07-19 16:45:56 -07:00
Maxime Beauchemin 99ce7b79fa Add pylint back as a tox env (#5416) 2018-07-18 15:55:01 -07:00
Maxime Beauchemin 5be0e69d1b Avoid expensive select_star on dashboard bootstrap data (#5424)
The dashboard page bootstrap data currently attempts to generate the
`SELECT` statement with column name details for each table represented
in the dash. This means it calls the database(s) and waits for column
details prior to returning any HTML.

This makes the default select_star property generate a simple
`SELECT *` with no column details instead, which doesn't require
interogating the DBs.
2018-07-18 15:54:47 -07:00
Vishal Jagtap b0b04b319b Fixed typos in currently modified files (#5419) 2018-07-18 08:32:47 -07:00
timifasubaa 7f8eaee18d allow selection of dbs where csv can be uploaded to (#5393) 2018-07-17 15:38:16 -07:00
Maxime Beauchemin 73ec526913 Fix db migration 3dda56f1c4c6 (#5415) 2018-07-17 15:30:18 -07:00
Chris Williams 8b7aaec19d [webpack 4] third time's the charm ;) (#5370)
* [perf] add webpack 4 + SplitChunks + lazy load visualizations (#5240)

* [webpack] setup lazy loading for all visualizations

* [lazy-load] push renderVis function to <Chart /> state

* no mapbox token

* [lazy loading] use native webpack import func to fix chunk names, add babel-plugin-syntax-dynamic-import, fix rebase bug.

* fix geojson import, undefined t, and fix async css bug

* [lazy load] actually add babel-plugin-syntax-dynamic-import

* [webpack] working dev version of webpack v4

* [webpack 4] fix url issues, use mini-css-extract-plugin and webpack-assets-manifest plugins

* [webpack 4] use splitchunks for all files, update templates to multi-file entrypoints

* [webpack 4] multiple theme entry files for markup vis css, don't uglify mapbox

* [webpack 4] lint python manifest changes, update yarn lock.

* [webpack 4] fix tests with babel-plugin-dynamic-import-node

* [webpack 4] only use 'dynamic-import-node' plugin in tests, update <Chart /> vis promise when vis type changes

* [webpack 4] clean up package.json and yarn.lock after rebase

* [webpack 4] lint?

* [webpack 4] lint for real

* [webpack 4][istanbul] ignore visualizations/index.js

* [webpack 4] fix rebase bug, update dashboard/deprecated/chart/Chart.jsx to use vis promises.

* [webpack 4] lint and test

* [webpack 4] yarn.lock
2018-07-17 13:55:03 -07:00
Beto Dealmeida 75cf5e198f Fix time filter in dashboard v2 (#5412) 2018-07-17 13:38:33 -07:00
Chris Williams 7670e0c565 allow 7 tabs, remove 'slice_' prefix in logs (#5411) 2018-07-17 13:20:19 -07:00
Beto Dealmeida 7b4e6c7455 Time shift difference (#5177)
* Allow different comparisons when using time shift

* Remove test code

* Remove lead/trail NaN and improve code

* Add headers/subheader

* Update yarn

* Migration script

* Fix migration

* Small fixes

* Trigger tests

* Fix lint

* Fix javascript
2018-07-16 16:30:11 -07:00
timifasubaa f8a6e09220 [sqllab] Fix sqllab limit regex issue with sqlparse (#5295)
* include items after limit to the modified query

* use sqlparse
2018-07-16 15:27:30 -07:00
Beto Dealmeida c445ef8c43 Explore to SQL Lab (#5101)
* WIP

* Working version

* Clean code

* Fix lint

* Fix unit test; show only for sqla

* Working on UX

* Dropdown working 66%

* Working but needs CSS

* Fixed table

* Fix lint

* Fix unit test

* Fix languages path

* Fixes

* Fix Javascript lint
2018-07-16 15:00:48 -07:00
Maxime Beauchemin 48317fd8f9 [big_number] tooltip shows in the wrong place (#5404) 2018-07-16 14:59:14 -07:00
Beto Dealmeida 4fa416347d Make time filter more usable (#4981)
* Initial work

* WIP

* WIP

* Working

* WIP

* Still WIP

* Frontend done

* Working version

* Migration working

* Migration working

* Fix freeform rerender

* Remove jquery

* Fix filter

* Unit tests and lint

* Fix py.test

* Improve unit tests

* Ensure freeform is computed at init

* Fix lint

* Trying to fix pyfreeze error

* Remove freezegun

* Address comments

* Use tabs instead of pills

* Regroup options

* WIP

* Change type when clicking calendar

* Fix CSS

* Fix JS lint
2018-07-16 14:27:40 -07:00
Grace Guo 0d10cc569d [Table Viz] columns not match with group_by control (#5329) 2018-07-16 14:06:29 -07:00
Maxime Beauchemin 709f056445 [bugfix] make MetricsControl work with DECK visualizations (#5376)
* [bugfix] make MetricsControl work with DECK visualizations

* Add unit tests
2018-07-16 13:42:07 -07:00
Hugh A. Miles II e79bb92a40 Add IS NOT NULL and IS NULL as filter options (#5375)
* wip

* disable value selector on IS NOT NULL or NOT NULL

* remove this
2018-07-16 13:29:55 -07:00
Maxime Beauchemin 996304aba9 Make Pypi upload support markdown (#5352)
Moving to using Twine to upload to pypi and fixing up the markdown
support so that the page on Pypi looks like the README on Github.

This has been tested on the 0.26 branch starting 0.26.3
2018-07-16 12:27:57 -07:00
Ville Brofeldt bd475879a4 Fix display limit in sql lab (#5392)
* Fix display limit in sql lab

* Add redundant variable from config.py

* Fix test config

* Change to SQL_MAX_ROW

* Remove last remaining occurence of DISPLAY_SQL_MAX_ROW
2018-07-16 11:58:21 -07:00
Maxime Beauchemin 2eeff2ae0b Fix the build (#5403)
The travis build has been failing for 2 reasons recently
* pylint takes > 10 minutes without outputing
* bad merge confict auto resolve in controls.jsx
2018-07-16 11:46:13 -07:00
timifasubaa 22b7c2db62 quote hive column names (#5368) 2018-07-13 15:51:16 -07:00
Chris Williams 19ac6e1231 get rid of global notify (#5355)
* [toasts] get rid of notify globals, refactor messageToasts for use by entire app

* [remove notify] use arrow func in ajax call

* fix lint + tests

* actually fix tests from messageToast refactor

* add 'test:one' npm script

* debugger

* [toasts] convert bootstrap flash messages to toasts in explore + sqllab

* [toasts][tests] import from right file
2018-07-12 11:50:25 -07:00
Maxime Beauchemin f9352af80e [pie] improvements to pie charts (#5236)
Pie chart was using `limit` instead of `row_limit` which didn't work.

Also set a lower default limit to 25 to prevent the chart from getting
super crowded.

Unrelated drive-by fix of setting "percentage metric" to default to `[]`
2018-07-12 10:33:11 -04:00
Maxime Beauchemin 0ca426a6fa Set control 'percent_metrics's default to [] (#5357) 2018-07-12 10:32:00 -04:00
JamshedRahman cafde1536f Adding Druid Time Granularities (#5379)
* Adding Druid Time Granularities

* fixed a linter error
2018-07-12 10:19:50 -04:00
Hugh A. Miles II cd2414b19e Set ignore NaN as true for TableViz (#5371)
* set ignore NaN as true for TableViz

* linting
2018-07-11 11:20:45 -04:00
Grace Guo 6b15592dd0 [dashboard] should use forceV2Edit property name (#5362) 2018-07-08 22:11:24 -07:00
Grace Guo a17f7141b7 [dashboard] Fix save issue at Force_V2_Edit mode (#5360) 2018-07-06 20:52:56 -07:00
Maxime Beauchemin 7222c6f0f2 CHANGELOG entry for 0.25.0 to 0.26.0 (#5334) 2018-07-06 21:49:49 -04:00
timifasubaa 28ba5a9ddb use schema form field in upload csv (#5303) 2018-07-06 09:46:53 -07:00
John Bodley c1187e0eaa [cache] Adding description for a zero cache timeout (#5354) 2018-07-06 09:24:21 -07:00
Yu Xiao 7158fb1e9d added a 'no_trend_line' option (#5356)
* added a 'no_trend_line' option

* added missing comma
2018-07-06 10:09:25 -04:00
aaronbannin 252cba20de impala support for epoch timestamps (#5349) 2018-07-04 19:25:58 -04:00
EvelynTurner ad9103f5ba [Bug fix] Divide by 1000.000 in epoch_ms_to_dttm() to not lose precision in Presto (#5211)
* Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* Fixed indentation

* Fix the key string value in case series.key is a string

* Fix the key string value in case series.key is a string

* [Bug fix] Divide by 1000.000 in epoch_ms_to_dttm() to not lose precision in Presto

* [Bug fix] Divide by 1000.000 in epoch_ms_to_dttm() to not lose precision in Presto
2018-07-04 19:19:57 -04:00
Ville Brofeldt 6fee0587ee Implement rolling api introduced in pandas 0.18 (#5328)
* Implement new rolling api introduced in pandas 0.18

* Bump pandas to 0.23.1

* Add 0.18 requirement in setup.py

* Require >=0.18.0, not just 0.18
2018-07-04 18:04:57 -04:00
Minh Mai 059b64dad7 normalize column names for Redshift (#5337) 2018-07-04 17:30:37 -04:00
Riccardo Magliocchetti 81bd5cc4c3 A couple of setup.py fixes (#5338)
* setup: fix long description read in python2

* setup: fix git_get_sha in python3

Fix #5317
2018-07-04 17:04:39 -04:00
Zachary Friedman 976e815a6e RST formatting fix for Installation docs (#5346) 2018-07-04 17:03:41 -04:00
Zachary Friedman 6f4a2e3505 Fix typo in Start with Docker (#5348) 2018-07-04 17:02:03 -04:00
John Bodley 72d815c0f9 [cache] Allowing zero cache-timeout (#5315) 2018-07-02 15:32:21 -07:00
Maxime Beauchemin 16d26336c4 Fix flaky unit test - remove 'Markup' object in data (#5313)
example of the failed test
https://travis-ci.org/apache/incubator-superset/jobs/397891630
2018-07-01 20:13:37 -07:00
Maxime Beauchemin 885d7791a0 [bugfix] README encoding-related UnicodeDecodeError on setup.py (#5309)
Seeing UnicodeDecodeError on our build system running py3.6, though I
couldn't reproduce on my local 3.6. This fix addresses the issue.
2018-07-01 08:57:14 -07:00
fly-high-bj bfa9ffff3c Update core.py (#5320)
With Python 3.7.0, 'async' and 'await' become reserved words, which cause invalid syntax error when running core.py. Renamed 'async' var to 'async_'
2018-07-01 08:49:56 -07:00
Grace Guo ad05700b6b [dashboard fix]Fix copy_dash unit test (#5323) 2018-07-01 08:47:57 -07:00
Hugh A. Miles II 089037f1aa [DeckGL] Raise error with null values (#5302)
* raise errors with null values

* linting

* linting some more

* use get

* change ordering

* linting
2018-06-30 16:07:23 -07:00
Kshira Saagar df5ce50e80 Adding THE ICONIC to the list (#5305)
Adding THE ICONIC to list of companies using Superset. Big fans of Superset and use it for all our operational reporting!
2018-06-28 09:58:56 -07:00
Maxime Beauchemin 777d876a52 Improve database type inference (#4724)
* Improve database type inference

Python's DBAPI isn't super clear and homogeneous on the
cursor.description specification, and this PR attempts to improve
inferring the datatypes returned in the cursor.

This work started around Presto's TIMESTAMP type being mishandled as
string as the database driver (pyhive) returns it as a string. The work
here fixes this bug and does a better job at inferring MySQL and Presto types.
It also creates a new method in db_engine_specs allowing for other
databases engines to implement and become more precise on type-inference
as needed.

* Fixing tests

* Adressing comments

* Using infer_objects

* Removing faulty line

* Addressing PrestoSpec redundant method comment

* Fix rebase issue

* Fix tests
2018-06-27 21:35:12 -07:00
Chris Williams 04fc1d1089 [dashboard v2] add MissingChart component in the case that chart component has no slice definition, add tests. (#5296) 2018-06-27 11:20:10 -07:00
Grace Guo 17b4298401 [dashobard fix]: fix validation check for default_filters (#5297) 2018-06-27 11:00:50 -07:00
John Bodley 117507cf31 [get_df] Fix datetime conversion (#5274) 2018-06-27 09:09:42 -07:00
Jeffrey Wang fb988fee2e Pin boto3 to 1.4.7 (#5290) 2018-06-27 08:55:47 -07:00
Grace Guo 4ee984c6de [dashboard fix] force refresh charts under tabs (#5291) 2018-06-26 17:46:28 -07:00
Chris Williams 05a39b395a fix sqllab <Loading /> css, fix double AddSliceCard margin and drag border (#5293)
* fix sqllab <Loading /> css, fix double AddSliceCard margin and drag border

* [dashboard v2] improve cached visual indicator, add last fetched messaging

* [dashboard v2] fix ctrl + cmd + z + UndoRedoKeylisteners
2018-06-26 16:47:41 -07:00
timifasubaa b0eee129e9 add more precise types to hive table from csv (#5267) 2018-06-25 16:12:01 -07:00
timifasubaa bd24f854c9 specify hve namespace for tables (#5268) 2018-06-25 12:04:27 -07:00
Chris Williams c065319508 [wip] dashboard builder v2 (#4528)
* [dashboard builder] Add dir structure for dashboard/v2, simplified Header, split pane, Draggable side panel

[grid] add <DashboardGrid />, <ResizableContainer />, and initial grid components.

[grid] gridComponents/ directory, add fixtures/ directory and test layout, add <Column />

[grid] working grid with gutters

[grid] design tweaks and polish, add <Tabs />

[header] add gradient header logo and favicon

[dnd] begin adding dnd functionality

[dnd] add util/isValidChild.js

[react-beautiful-dnd] iterate on dnd until blocked

[dnd] refactor to use react-dnd

[react-dnd] refactor to use composable <DashboardComponent /> structure

[dnd] factor out DashboardComponent, let components render dropInidcator and set draggableRef, add draggable tabs

[dnd] refactor to use redux, add DashboardComponent and DashboardGrid containers

[dragdroppable] rename horizontal/vertical => row/column

[builder] refactor into HoverMenu, add WithPopoverMenu

[builder] add editable header and disableDragDrop prop for Dragdroppable's

[builder] make tabs editable

[builder] add generic popover dropdown and header row style editability

[builder] add hover rowStyle dropdown, make row styles editable

[builder] add some new component icons, add popover with delete to charts

[builder] add preview icons, add popover menu to rows.

[builder] add IconButton and RowStyleDropdown

[resizable] use ResizableContainer instead of DimensionProvider, fix resize and delete bugs

[builder] fix bug with spacer

[builder] clean up, header.size => header.headerSize

[builder] support more drag/drop combinations by wrapping some components in rows upon drop. fix within list drop index. refactor some utils.

[builder][tabs] fix broken add tab button

[dashboard builder] don't pass dashboard layout to all dashboard components, improve drop indicator logic, fix delete component pure component bug

[dnd] refactor drop position logic

* fix rebase error, clean up css organization and use @less vars

* [dashboard-builder] add top-level tabs + undo-redo (#4626)

* [top-level-tabs] initial working version of top-level tabs

* [top-level-tabs] simplify redux and disable ability to displace top-level tabs with other tabs

* [top-level-tabs] improve tab drag and drop css

* [undo-redo] add redux undo redo

* [dnd] clean up dropResult shape, add new component source id + type, use css for drop indicator instead of styles and fix tab indicators.

* [top-level-tabs] add 'Collapse tab content' to delete tabs button

* [dnd] add depth validation to drag and drop logic

* [dashboard-builder] add resize action, enforce minimum width of columns, column children inherit column size when necessary, meta.rowStyle => meta.background, add background to columns

* [dashboard-builder] make sure getChildWidth returns a number

* [dashboard builder] static layout + toasts (#4763)

* [dashboard-builder] remove spacer component

* [dashboard-builder] better transparent indicator, better grid gutter logic, no dragging top-level tabs, headers are multiples of grid unit, fix row height granularity, update redux state key dashboard => dashboardLayout

* [dashboard-builder] don't blast column child dimensions on resize

* [dashboard-builder] ResizableContainer min size can't be smaller than size, fix row style, role=none on WithPopoverMenu container

* [edit mode] add edit mode to redux and propogate to all <DashboardComponent />s

* [toasts] add Toast component, ToastPresenter container and component, and toast redux actions + reducers

* [dashboard-builder] add info toast when dropResult overflows parent

* [dashboard builder] git mv to src/ post-rebase

* Dashboard builder rebased + linted (#4849)

* define dashboard redux state

* update dashboard state reducer

* dashboard layout converter + grid render

* builder pane + slice adder

* Dashboard header + slice header controls

* fix linting

* 2nd code review comments

* [dashboard builder] improve perf (#4855)

* address major perf + css issues

[dashboard builder] fix dashboard filters and some css

[dashboard builder] use VIZ_TYPES, move stricter .eslintrc to dashboard/, more css fixes

[builder] delete GridCell and GridLayout, remove some unused css. fix broken tabs.

* [builder] fix errors post-rebase

* [builder] add support for custom DragDroppable drag layer and add AddSliceDragPreview

* [AddSliceDragPreview] fix type check

* [dashboard builder] add prettier and update all files

* [dashboard builder] merge v2/ directory int dashboard/

* [dashboard builder] move component/*Container => containers/*

* add sticky tabs + sidepane, better tabs perf, better container hierarchy, better chart header (#4893)

* dashboard header, slice header UI improvement

* add slider and sticky

* dashboard header, slice header UI improvement

* make builder pane floating

* [dashboard builder] add sticky top-level tabs, refactor for performant tabs

* [dashboard builder] visually distinct containers, icons for undo-redo, fix some isValidChild bugs

* [dashboard builder] better undo redo <> save changes state, notify upon reaching undo limit

* [dashboard builder] hook up edit + create component actions to saved-state pop.

* [dashboard builder] visual refinement, refactor Dashboard header content and updates into layout for undo-redo, refactor save dashboard modal to use toasts instead of notify.

* [dashboard builder] refactor chart name update logic to use layout for undo redo, save slice name changes on dashboard save

* add slider and sticky

* [dashboard builder] fix layout converter slice_id + chartId type casting, don't change grid size upon edit (perf)

* [dashboard builder] don't set version key in getInitialState

* [dashboard builder] make top level tabs addition/removal undoable, fix double sticky tabs + side panel.

* [dashboard builder] fix sticky tabs offset bug

* [dashboard builder] fix drag preview width, css polish, fix rebase issue

* [dashboard builder] fix side pane labels and hove z-index

* Markdown for dashboard (#4962)

* fix dashboard server-side unit tests (#5009)

* Dashboard save button (#4979)

* save button

* fix slices list height

* save custom css

* merge save-dash changes from dashboard v1
https://github.com/apache/incubator-superset/pull/4900
https://github.com/apache/incubator-superset/pull/5051

* [dashboard v2] check for default_filters before json_loads-ing them (#5064)

[dashboard v2] check for default_filters before json-loads-ing them

* [dashboard v2] fix bugs from rebase

* [dashboard v2] tests! (#5066)

* [dashboard v2][tests] add tests for newComponentFactory, isValidChild, dropOverflowsParent, and dnd-reorder

* [dashboard v2][tests] add tests for componentIsResizable, findParentId, getChartIdsFromLayout, newEntitiesFromDrop, and getDropPosition

* [dashboard v2][tests] add mockStore, mockState, and tests for DragDroppable, DashboardBuilder, DashboardGrid, ToastPresenter, and Toast

* [dashboard builder][tests] separate files for state tree fixtures, add ChartHolder, Chart, Divider, Header, Row tests and WithDragDropContext helper

* [dashboard v2][tests] fix dragdrop context with util/getDragDropManager, add test for menu/* and resizable/*, and new components

* [dashboard v2][tests] fix and re-write Dashboard tests, add getFormDataWithExtraFilters_spec

* [dashboard v2][tests] add reducer tests, fix lint error

* [dashboard-v2][tests] add actions/dashboardLayout_spec

* [dashboard v2] fix some prop bugs, open side pane on edit, fix slice name bug

* [dashboard v2] fix slice name save bug

* [dashboard v2] fix lint errors

* [dashboard v2] fix filters bug and add test

* [dashboard v2] fix getFormDataWithExtraFilters_spec

* [dashboard v2] logging updates (#5087)

* [dashboard v2] initial logging refactor

* [dashboard v2] clean up logger

* [logger] update explore with new log events, add refresh dashboard + refresh dashboard chart actions

* [logging] add logger_spec.js, fix reducers/dashboardState_spec + gridComponents/Chart_spec

* [dashboard v2][logging] refactor for bulk logging in python

* [logging] tweak python, fix and remove dup start_offset entries

* [dashboard v2][logging] add dashboard_first_load event

* [dashboard v2][logging] add slice_ids to dashboard pane load event

* [tests] fix npm test script

* Fix: update slices list when add/remove multiple slices (#5138)

* [dashboard v2] add v1 switch (#5126)

* [dashboard] copy all dashboard v1 into working v1 switch

* [dashboard] add functional v1 <> v2 switch with messaging

* [dashboard] add v2 logging to v1 dashboard, add read-v2-changes link, add client logging to track v1 <> v2 switches

* [dashboard] Remove default values for feedback url + v2 auto convert date

* [dashboard v2] fix misc UI/UX issues

* [dashboard v2] fix Markdown persistance issues and css, fix copy dash title, don't enforce shallow hovering with drop indicator

* [dashboard v2] improve non-shallow drop target UX, fix Markdown drop indicator, clarify slice adder filter/sort

* [dashboard v2] delete empty rows on drag or delete events that leave them without children, add test

* [dashboard v2] improve v1<>v2 switch modals, add convert to v2 badge in v1, fix unsaved changes issue in preview mode, don't auto convert column child widths for now

* [dashboard v2][dnd] add drop position cache to fix non-shallow drops

* [dashboard] fix test script with glob instead of recurse, fix tests, add temp fix for tab nesting, ignore v1 lint errors

* [dashboard] v2 badge style tweaks, add back v1 _set_dash_metadata for v1 editing

* [dashboard] fix python linting and tests

* [dashboard] lint tests

* add slice from explore view (#5141)

* Fix dashboard position row data (#5131)

* add slice_name to markdown

(cherry picked from commit 14b01f1)

* set min grid width be 1 column

* remove empty column

* check total columns count <= 12

* scan position data and fix rows

* fix dashboard url with default_filters

* [dashboard v2]  better grid drop ux, fix tab bugs 🐛 (#5151)

* [dashboard v2] add empty droptarget to dashboard grid for better ux and update test

* [dashboard] reset tab index upon top-level tab deletion, fix findparentid bug

* [dashboard] update v1<>v2 modal link for tracking

* Fix: Should pass slice_can_edit flag down (#5159)

* [dash builder fix] combine markdown and slice name, slice picker height (#5165)

* combine markdown code and markdown slice name

* allow dynamic height for slice picker cell

* add word break for long datasource name

* [fix] new dashboard state (#5213)

* [dashboard v2] ui + ux fixes (#5208)

* [dashboard v2] use <Loading /> throughout, small loading gif, improve row/column visual hierarchy, add cached data pop

* [dashboard v2] lots of polish

* [dashboard v2] remove markdown padding on edit, more opaque slice drag preview, unsavedChanges=true upon moving a component, fix initial load logging.

* [dashboard v2] gray loading.gif, sticky header, undo/redo keyboard shortcuts, fix move component saved changes update, v0 double scrollbar fix

* [dashboard v2] move UndoRedoKeylisteners into Header, render only in edit mode, show visual feedback for keyboard shortcut, hide hover menu in top-level tabs

* [dashboard v2] fix grid + sidepane height issues

* [dashboard v2] add auto-resize functionality, update tests. cache findParentId results.

* [dashboard v2][tests] add getDetailedComponentWidth_spec.js

* [dashboard v2] fix lint

* [fix] layout converter fix (#5218)

* [fix] layout converter fix

* add changed_on into initial sliceEntity data

* add unit tests for SliceAdder component

* remove old fixtures file

* [dashboard v2] remove webpack-cli, fresh yarn.lock post-rebase

* [dashboard v2] lint javascript

* [dashboard v2] fix python tests

* [Fix] import/export dash in V2 (#5273)

* [dashboard v2] add markdown tests (#5275)

* [dashboard v2] add Markdown tests

* [dashboard v2][mocks] fix markdown mock
2018-06-25 09:17:22 -07:00
John Bodley ca5cc672ca [metric] Fixing ad-hoc metric for dual-line chart (#5271) 2018-06-22 14:31:43 -07:00
John Bodley 7de50238a4 [druid] Adding verbose_name to editable columns (#5249) 2018-06-21 22:15:06 -07:00
Hugh A. Miles II d4672dbfb7 make sure there is a val to be set for existing filters (#5257) 2018-06-21 22:00:50 -07:00
Maxime Beauchemin e1618ddddb Fix edge case around NaN values (#4964) 2018-06-21 18:10:04 -07:00
Maxime Beauchemin b344056932 [bugfix] add support for numeric nodes in Sankey (#5154)
* [bugfix] add support for numeric nodes in Sankey

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

* lint
2018-06-21 18:09:08 -07:00
Maxime Beauchemin 5a716e9925 [bugfix] get word_cloud to support complex metrics (#5248) 2018-06-21 18:04:56 -07:00
Gabe Lyons 2f274328ed fixing regex displaying as undefined in the pill (#5266) 2018-06-21 18:01:31 -07:00
Maxime Beauchemin 73295f25a3 Bump pydruid to 0.4.4 (#5262) 2018-06-21 17:42:44 -07:00
timifasubaa 0e5293b9be Update db_engine_specs.py (#5264) 2018-06-21 16:01:34 -07:00
Chris Williams 15c8e5bfa9 [timeseries table] use verbose date in tooltip by default (#5263) 2018-06-21 13:34:49 -07:00
michellethomas eb676519ba Moving homogenize_types to after no data exception (#5214) 2018-06-20 17:31:23 -07:00
Grace Guo 13cbf80fb3 [Explore] Handle empty metrics control data (#5241) 2018-06-20 12:41:48 -07:00
Maxime Beauchemin 409ac6824a [sql lab] Fix issue around VARBINARY type in Presto (#5121)
When receiving a VARBINARY field out of Presto, it shows up as type
`bytes` out of the pyhive driver. Then the pre 3.15 version of
simplejson attempts to convert it to utf8 by default and it craps out.

I bumped to simplejson>=3.25.0 and set `encoding=None` as documented
here
https://simplejson.readthedocs.io/en/latest/#basic-usage so that we can
handle bytes on our own.
2018-06-20 12:16:59 -07:00
Jeffrey Wang 2a3d297950 Allow users to view dashboards they own (#4520)
* Allow owners to view their own dashboards

* Update docstring

* update sm variable

* Add unit test

* misc linter
2018-06-20 12:08:16 -07:00
John Bodley 62427c8b8d Revert "[perf] add webpack 4 + SplitChunks + lazy load visualizations" (#5253)
* Revert "[sqllab] Fix sql lab resolution link (#5216)"

This reverts commit 93cdf60920.

* Revert "Pin botocore version (#5184)"

This reverts commit 70679d4c93.

* Revert "Describe the use of custom OAuth2 authorization servers (#5220)"

This reverts commit a84f4304de.

* Revert "[bubble-chart] Fixing issue w/ metric names (#5237)"

This reverts commit 5c106b9a20.

* Revert "[adhoc-filters] Adding adhoc-filters to all viz types (#5206)"

This reverts commit d483ed121c.

* Revert "[perf] add webpack 4 + SplitChunks + lazy load visualizations (#5240)"

This reverts commit 1fc4ee0d3c.
2018-06-20 12:07:42 -07:00
timifasubaa 93cdf60920 [sqllab] Fix sql lab resolution link (#5216)
* pass link

* update frontend to show link differently

* nits
2018-06-19 20:33:24 -07:00
Louis-Etienne 70679d4c93 Pin botocore version (#5184)
* Pin botocore version

* Version range for botocore
2018-06-19 08:49:51 -07:00
Ricardo Peironcely a84f4304de Describe the use of custom OAuth2 authorization servers (#5220)
As Superset extends flask SecurityManager with its own implementation, it's not obvious how to connect Superset with OAuth2 authorization servers that are not covered under flask.
2018-06-19 08:48:48 -07:00
John Bodley 5c106b9a20 [bubble-chart] Fixing issue w/ metric names (#5237) 2018-06-18 15:50:49 -07:00
John Bodley d483ed121c [adhoc-filters] Adding adhoc-filters to all viz types (#5206) 2018-06-18 15:43:18 -07:00
Chris Williams 1fc4ee0d3c [perf] add webpack 4 + SplitChunks + lazy load visualizations (#5240)
* [webpack] setup lazy loading for all visualizations

* [lazy-load] push renderVis function to <Chart /> state

* no mapbox token

* [lazy loading] use native webpack import func to fix chunk names, add babel-plugin-syntax-dynamic-import, fix rebase bug.

* fix geojson import, undefined t, and fix async css bug

* [lazy load] actually add babel-plugin-syntax-dynamic-import

* [webpack] working dev version of webpack v4

* [webpack 4] fix url issues, use mini-css-extract-plugin and webpack-assets-manifest plugins

* [webpack 4] use splitchunks for all files, update templates to multi-file entrypoints

* [webpack 4] multiple theme entry files for markup vis css, don't uglify mapbox

* [webpack 4] lint python manifest changes, update yarn lock.

* [webpack 4] fix tests with babel-plugin-dynamic-import-node

* [webpack 4] only use 'dynamic-import-node' plugin in tests, update <Chart /> vis promise when vis type changes

* [webpack 4] clean up package.json and yarn.lock after rebase

* [webpack 4] lint?

* [webpack 4] lint for real

* [webpack 4][istanbul] ignore visualizations/index.js
2018-06-18 15:28:13 -07:00
Grace Guo 480ddfc7ad [CRUD] disable user change slices from dashboardmodelview (#5217) 2018-06-18 15:08:03 -07:00
John Bodley d7d5327ef7 [CRUD] Improving performance by disabling editing Associated Chart] (#5238) 2018-06-18 14:33:13 -07:00
Grace Guo 0509d7aefd [Explore] Enable Rich tooltip by default (#5215) 2018-06-18 10:45:31 -07:00
Riccardo Magliocchetti c670621012 setup: improve description (#5226)
* setup: improve description

* setup: use README.md as long_description

As pypy.io now should render markdown.
2018-06-18 08:42:48 -07:00
Maxime Beauchemin c89933d870 [sql lab] quote schema and table name (#5195)
fixes https://github.com/apache/incubator-superset/issues/4595
2018-06-18 08:42:08 -07:00
Ville Brofeldt ccf211036d Bump Celery to 4.2.0 (#5222)
* Downgrade celery and kombu

* Remove kombu from requirements.txt

* Pin kombu at 4.1.0

* Bump celery to 4.2.0
2018-06-18 08:19:07 -07:00
Riccardo Magliocchetti 00fad1cbf9 README: update Maieutical Labs url (#5227) 2018-06-18 08:14:12 -07:00
Chris Williams 7b49b6c2de Revert "[webpack] setup lazy loading for all visualizations" (#5219)
* Revert "[explore] fix autocomplete on verbose names (#5204)"

This reverts commit d5ebc430c2.

* Revert "[webpack] setup lazy loading for all visualizations (#4727)"

This reverts commit de0aaf42ed.
2018-06-15 17:23:57 -07:00
Maxime Beauchemin d5ebc430c2 [explore] fix autocomplete on verbose names (#5204)
* [explore] fix autocomplete on verbose names

Currently when searching for metrics or groupbys, the autocomplete
search functionality only matches based on the metric_name, though in
some cases the verbose_name is displayed and disregarded for search
purposes.

Also another issue is that not all pre-defined metrics show up in the
drop down which is confusing. Users may have simple metrics for which
they setup a nice verbose name and/or description and expect to see
those in the dropdown.

This PR addresses it for metric and column-related dropdowns.

* Add unit test
2018-06-15 15:56:05 -07:00
Chris Williams de0aaf42ed [webpack] setup lazy loading for all visualizations (#4727)
* [webpack] setup lazy loading for all visualizations

* [lazy-load] push renderVis function to <Chart /> state

* no mapbox token

* [lazy loading] use native webpack import func to fix chunk names, add babel-plugin-syntax-dynamic-import, fix rebase bug.

* fix geojson import, undefined t, and fix async css bug

* [lazy load] actually add babel-plugin-syntax-dynamic-import

* [webpack] working dev version of webpack v4

* [webpack 4] fix url issues, use mini-css-extract-plugin and webpack-assets-manifest plugins

* [webpack 4] use splitchunks for all files, update templates to multi-file entrypoints

* [webpack 4] multiple theme entry files for markup vis css, don't uglify mapbox

* [webpack 4] lint python manifest changes, update yarn lock.

* [webpack 4] fix tests with babel-plugin-dynamic-import-node

* [webpack 4] only use 'dynamic-import-node' plugin in tests, update <Chart /> vis promise when vis type changes

* [webpack 4] clean up package.json and yarn.lock after rebase

* [webpack 4] lint?

* [webpack 4] lint for real
2018-06-14 18:29:05 -07:00
John Bodley 8cdc9cad9c [pie-chart] Restricting query to single metric (#5203) 2018-06-14 18:14:13 -07:00
michellethomas b60ac5f160 Fixing issue with table viz for table with no metrics (#5205) 2018-06-14 17:15:00 -07:00
timifasubaa 4b7a14de77 Merge pull request #5194 from timifasubaa/pass_error_link_separately
pass error message separately
2018-06-14 12:01:45 -07:00
Timi Fasubaa 7fa5559a66 remove resolution link prop 2018-06-14 11:32:50 -07:00
timifasubaa 66ffcb665a Merge pull request #5118 from michellethomas/add_metrics_control_sort_by
Adding the MetricsControl to the timeseries_limit_metric field
2018-06-14 10:38:32 -07:00
Grace Guo 585dbe6638 fix Formula type annotation, it doesn't show up since #4630 (#5181) 2018-06-14 10:12:29 -07:00
Maxime Beauchemin a1095437bc Introduce class attr BaseViz.enforce_numerical_metrics (#5176) 2018-06-13 22:45:03 -07:00
Maxime Beauchemin 30111bf3fd Repoint .istambul.yml to the right location (#5187)
Never did this when I renamed the folder. `npm run cover` currently
doesn't generate a proper coverage report, this fixes it
2018-06-13 22:22:39 -07:00
Timi Fasubaa 7a107fac62 pass_error_message_separately 2018-06-13 21:43:48 -07:00
timifasubaa 6e37d3f882 Merge pull request #5190 from timifasubaa/fix_null_metrics
[bugfix] form_data - fix empty metrics
2018-06-13 17:53:42 -07:00
Michelle Thomas b380a57c91 Fixing sortby adhoc metrics for table viz 2018-06-13 17:51:17 -07:00
Timi Fasubaa 95bb1753ab fix empty metrics 2018-06-13 14:13:05 -07:00
michellethomas d6846d96ff Adding column only if it doesn't already exist (#5179) 2018-06-13 11:49:43 -07:00
Yuance.Li 7f30b48955 fetch datasources from broker endpoint when refresh new datasources (#5183)
* fetch datasources from broker endpoint when refresh new datasources

* remove get_base_coordinator_url as out of use

* add broker_endpoint in get_test_cluster_obj
2018-06-13 08:10:58 -07:00
John Bodley 502b617310 [migrations] Cleaning up migration logic (#5167) 2018-06-12 12:10:53 -07:00
John Bodley 52a933ffb8 [migrations] Cleanup recent migrations (#5155) 2018-06-12 12:10:41 -07:00
michellethomas 280200f834 Fixing tooltip displaying metrics in heatmap (#5055) 2018-06-11 17:14:02 -07:00
Tresdon Jones 3de79b69d0 Fix bullet chart rendering (#5108)
* Fix bullet chart rendering

* Fix code style errors
2018-06-11 16:40:29 -07:00
Maxime Beauchemin a3477abf7e Pin FAB and bump a bunch of JS libs (#5122) 2018-06-10 21:43:37 -07:00
Xiao Hanyu 0a276ff75d Init docker for local development environment. (#4193)
This commit will try to dockerize superset in local development
environment.

The basic design is:
- Enable superset, redis and postgres service instead of using sqlite,
  just want to simulate production environment settings
- Use environment variables to config various app settings. It's easy to
  run and config superset to any environment if we use environment than
  traditional config files
- For local development environment, we just expose postgres and redis
  to local host machine thus you can connect local port via `psql` or
  `redis-cli`
- Wrap start up command in a standard `docker-entrypoint.sh`, and use
  `tail -f /dev/null` combined with manually `superset runserver -d` to
  make sure that code error didn't cause the container to fail.
- Use volumes to share code between host and container, thus you can use
  your favourite tools to modify code and your code will run in
  containerized environment
- Use volumes to persistent postgres and redis data, and also
  `node_modules` data.
  - If we don't cache `node_modules` in docker volume, then every time
    run docker build, the `node_modules` directory, will is about 500 MB
    large, will be sent to docker daemon, and make the build quite slow.
- Wrap initialization commands to a single script `docker-init.sh`

After this dockerize setup, any developers who want to contribute to
superset, just follow three easy steps:

```
git clone https://github.com/apache/incubator-superset/
cd incubator-superset
cp contrib/docker/{docker-build.sh,docker-compose.yml,docker-entrypoint.sh,docker-init.sh,Dockerfile} .
cp contrib/docker/superset_config.py superset/
bash -x docker-build.sh
docker-compose up -d
docker-compose exec superset bash
bash docker-init.sh
```
2018-06-09 21:26:41 -07:00
John Bodley 7d1c035658 [druid] Fixing Druid version check (#5028) 2018-06-08 16:55:15 -07:00
Maxime Beauchemin 915e6e9d40 Restore translations as of 459cb701fb (#5156) 2018-06-08 14:05:50 -07:00
Gabe Lyons b53b240710 [Explore][Adhoc Metrics/ Filters] disabled message for custom sql tab in druid (#5162)
* added disabled message for custom sql tab on druid datasources

* Update AdhocFilterEditPopover.jsx

Fixing indentation.

* Update AdhocMetricEditPopover.jsx

Fixing indent.

* Update AdhocFilterEditPopover.jsx

Fixing indentation.

* Update AdhocMetricEditPopover.jsx

Fixing indentation.
2018-06-07 16:16:46 -07:00
John Bodley 1b4406db3f [migration] Adding migration to remove empty in/not-in filters (#5161) 2018-06-07 15:48:53 -07:00
Gabe Lyons 5b35f75cbf empty lists are invalid comparators (#5160) 2018-06-07 15:02:43 -07:00
Beto Dealmeida 57e125688f Improve time shift (#5140)
* Improve time shift color and pattern

* Revert change

* Fix js unit test

* Move code to better place, add unit test

* Move classed code to backend

* Remove console.log

* Remove 1 hour time compare

* Remove unused import
2018-06-06 20:40:55 -07:00
John Bodley 0545d11a22 [migrations] Fix time grain SQLA (#5135) 2018-06-06 16:56:39 -07:00
timifasubaa 0abbc98630 pin kombu dependency (#5150) 2018-06-06 14:29:08 -07:00
John Bodley f102eab33c [crud] Improving performance (#5136) 2018-06-05 17:24:19 -07:00
Xiao Hanyu b71f551493 Optimize presto SQL Lab query performance. (#5132)
By stop polling when presto query already finished.

When user make queries to Presto via SQL Lab, presto will run the query
and then it can return all data back to superset in one shot.

However, the default implementation of superset has enabled a default
polling for presto to:

- Get the fancy progress bar
- Get the data back when the query finished.

However, the polling implementation of superset is not right.

I've done a profiling with a table of 1 billion rows, here're some data:

- Total number of rows: 1.02 Billion
- SQL Lab query limit: 1 million
- Output Data: 1.5 GB
- Superset memory consumed: about 10-20 GB
- Time: 7 minutes to finish in Presto, takes additional 15 minutes for
  superset to get and store data.

The problems with default issue is, even if presto has finished the
query (7 minutes with above profiling), superset still do lots of wasted
polling, in above profiling, superset sent about 540 polling in total,
and at half of the polling is not necessary.

Part of the simplied polling response:

```
{
  "infoUri": "http://10.65.204.39:8000/query.html?20180525_042715_03742_nza9u",
  "id": "20180525_042715_03742_nza9u",
  "nextUri": "http://10.65.204.39:8000/v1/statement/20180525_042715_03742_nza9u/11",
  "stats": {
    "state": "FINISHED",
    "queuedSplits": 21701,
    "progressPercentage": 35.98264191882267,
    "elapsedTimeMillis": 1029,
    "nodes": 116,
    "completedSplits": 15257,
    "scheduled": true,
    "wallTimeMillis": 2571904,
    "peakMemoryBytes": 0,
    "processedBytes": 40825519532,
    "processedRows": 47734066,
    "queuedTimeMillis": 0,
    "queued": false,
    "cpuTimeMillis": 849228,
    "rootStage": {
      "state": "FINISHED",
      "queuedSplits": 0,
      "nodes": 1,
      "totalSplits": 17,
      "processedBytes": 16829644,
      "processedRows": 11495,
      "completedSplits": 17,
      "stageId": "0",
      "done": true,
      "cpuTimeMillis": 69,
      "subStages": [
        {
          "state": "CANCELED",
          "queuedSplits": 21701,
          "nodes": 116,
          "totalSplits": 42384,
          "processedBytes": 40825519532,
          "processedRows": 47734066,
          "completedSplits": 15240,
          "stageId": "1",
          "done": true,
          "cpuTimeMillis": 849159,
          "subStages": [],
          "wallTimeMillis": 2570374,
          "userTimeMillis": 730020,
          "runningSplits": 5443
        }
      ],
      "wallTimeMillis": 1530,
      "userTimeMillis": 50,
      "runningSplits": 0
    },
    "totalSplits": 42401,
    "userTimeMillis": 730070,
    "runningSplits": 5443
  }
  }
}
```

Superset will terminate the polling when it finds that `nextUri`
becomes none, but actually, when `["stats"]["state"] == "FINISHED"`,
it means that presto has already finished the query and superset can stop
polling and get the data back.

After this simple optimization, we get a 2-5x performance boost for
Presto SQL Lab queries.
2018-06-05 08:56:18 -07:00
Maxime Beauchemin d2bc4ece3e Bump celery to 4.1.1 (#5134)
* Bump celery to 4.1.1

Docs reference `celery worker --app=superset.sql_lab:celery_app
--pool=gevent -Ofair` command which seems only to work with Celery 4.1.1

* Add UPDATING.md message
2018-06-04 14:54:36 -07:00
Maxime Beauchemin ffd65ce623 Pin FAB to 1.10.0 (#5133)
Related to
https://github.com/apache/incubator-superset/issues/5088#issuecomment-394064133
2018-06-04 09:03:30 -07:00
Tamika Tannis dc21e0dd78 URL shortner for dashboards (#4760)
* Added support for URLShortLinkButton to work for the dashboard case

* Fix lint errors and test

* Change references to 'slice' to 'chart'.

* Add unit tests to improve coverage

* Fixing lint errors

* Refactor to make URLShortLink more generic. Remove history modification code, redirect should be handling this.

* Remove history modification code, redirect should be handling this

* Generate a shorter link without the directory, and delegate default linked to the contents of window.location

* Fix lint errors

* Fix test_shortner test to check for new pattern

* Remove usage of addHistory to manipulate explore shortlink redirection

* Address build failure and using better practices for shortlink defaults

* Fixing alphabetical order

* More syntax mistakes

* Revert explore view history changes

* Fix use of component props, & rebase
2018-06-02 11:08:43 -07:00
Michelle Thomas 47768284d0 Adding tests for adhoc metric as timeseries_limit_metric 2018-05-31 23:48:12 -07:00
Gabe Lyons cc0942ac98 updating adhoc metric filtering (#5105) 2018-05-31 23:34:48 -07:00
Ky-Anh Huynh 556ef44fac docs: Add new Athena URI scheme awsathena+rest:// (#5112)
See also some discussions on https://github.com/laughingman7743/PyAthenaJDBC/pull/62
2018-05-31 22:19:07 -07:00
Beto Dealmeida 1d3e96bce0 Allow multiple time shifts (#5067)
* Allow multiple time shifts

* Handle old form data
2018-05-31 21:18:36 -07:00
Gabe Lyons 40fadfcb4f adding null checks to adhoc filter popover (#5111) 2018-05-31 21:00:20 -07:00
Maxime Beauchemin 28611108d7 Refactor NULL handling into method, disable for DECK.gl vizes (#5106) 2018-05-31 16:01:49 -07:00
michellethomas ff4b103025 Fixing time table viz for adhoc metrics (#5117) 2018-05-31 13:53:26 -07:00
Michelle Thomas 6f05b48385 Adding the MetricsControl to the timeseries_limit_metric field 2018-05-31 12:52:00 -07:00
Maxime Beauchemin 4ecd95a318 [bugfix] deck.gl on druid always shows animation (#5107) 2018-05-31 11:57:53 -07:00
Gabe Lyons f3778c3c81 fixing LIKE constant name (#5110) 2018-05-31 11:34:51 -07:00
timifasubaa cefc206a36 Merge pull request #5023 from timifasubaa/fix_sqllab_commit
[sqllab] force limit queries only when there is no existing limit
2018-05-31 11:12:46 -07:00
Beto Dealmeida 875d0b5ad2 Override time grain in annotations (#5084) 2018-05-30 15:29:48 -07:00
timifasubaa e8b25988e2 Merge pull request #5109 from cxmcc/patch-1
Add Lime to Superset user list.
2018-05-30 15:17:16 -07:00
Xiuming Chen 21967f40e7 Add Lime to Superset user list.
Add Lime to Superset user list.
2018-05-30 14:24:03 -07:00
Timi Fasubaa a9d7fafd9f add tests 2018-05-30 12:50:27 -07:00
Maxime Beauchemin f6117973e9 Bump dep on pydruid to 0.4.3 (#5098) 2018-05-30 09:15:10 -07:00
John Bodley 0511d1f38d [get_df] Adding support for multi-statement SQL (#5086) 2018-05-29 14:20:17 -07:00
谢邵虎 7dbb45e5fb add CnOvit to Superset users list (#5094) 2018-05-29 13:59:49 -07:00
Beto Dealmeida 6c3e469154 Add more time grains (#5083)
* Add more time grains

* Use FLOOR

* Fix quotes for lint
2018-05-29 12:43:48 -07:00
Maciej Bryński ae50845843 Proper error handling in Hive Queries (#4428)
* Proper error handling in Hive Queries

* Change quotes

* Trigger checks

* Adding call to parent class

* Small fix

* Fix in method call
2018-05-29 12:42:45 -07:00
zjj 459267785f Fix python2 str() in visualization (#5093) 2018-05-29 10:33:22 -07:00
Timi Fasubaa d38315a307 reuse_regex_logic 2018-05-25 15:07:27 -07:00
Timi Fasubaa 1aced9b562 force limit only when there is no existing limit 2018-05-25 14:54:11 -07:00
Yongjie Zhao c18ef89034 [bugfix] fix visualization with adhocMetric (#5080)
* fix visualization with adhocMetric

* update
2018-05-25 09:48:18 -07:00
Alexander Ko e30215c3d8 Add 24 hours refresh for dashboard (#5068)
* adding 24 hours refresh

* adding additional hours
2018-05-24 17:44:24 -07:00
Maxime Beauchemin 42d0597b90 Use a dummy version number on master (#5000)
Currently we assign release version number in release branches and
master was still pointing to some old version number from when the
process was different. We need a dummy version number that both setuptools
and npm are ok with.
2018-05-24 17:42:46 -07:00
John Bodley 3207116535 Revert "[get_df] Adding support for multi-statement SQL" (#5078) 2018-05-24 14:59:34 -07:00
michellethomas 1aaa73b548 Translate string to array for multi fields in getControlsState (#5057)
* Translate string to array for multi fields in getControlsState

* Updating format to fit on one line
2018-05-23 22:30:44 -07:00
Maxime Beauchemin 05061a73ce Fix time shift color assignements (#5065)
closes https://github.com/apache/incubator-superset/pull/4765
2018-05-23 21:30:03 -07:00
John Bodley d322e48c57 [markup] Enable allow-forms (#5062) 2018-05-23 13:30:02 -07:00
Gabe Lyons fa3e4e23b3 integrating dashboard filters with adhoc filters (#5056) 2018-05-23 11:46:00 -07:00
John Bodley 17d6464aa9 [get_df] Adding support for multi-statement SQL (#5060) 2018-05-23 11:40:25 -07:00
Grace Guo 4c44223234 [Dashboard] Allow Superset Alpha, Gamma users to save dashboard as a copy (#5051) 2018-05-22 15:31:37 -07:00
michellethomas b8aeb1a825 Allow MetricsControl to aggregate on a column with an expression (#5021)
* Allow MetricsControl to aggregate on a column with an expression

* Adding test case for metrics based on columns
2018-05-22 09:58:38 -07:00
Hua Jigang b312cdad2f fix metrics type error in pivot table viz (#5025)
transfer metrics dict label to list of string
2018-05-21 21:13:10 -07:00
Beto Dealmeida 973c661501 Rename "slice" to "chart" and update translations (#5008)
* Rename slice to chart and update translations

* Fix unit tests
2018-05-21 17:49:02 -07:00
Beto Dealmeida 459cb701fb Visualization for multiple line charts (#4819)
* Initial test

* Save

* Working version

* Use since/until from payload

* Option to prefix metric name

* Rename LineMultiLayer to MultiLineViz

* Add more styles

* Explicit nulls

* Add more x controls

* Refactor to reuse nvd3_vis

* Fix x ticks

* Fix spacing

* Fix for druid datasource

* Rename file

* Small fixes and cleanup

* Fix margins

* Add proper thumbnails

* Align yaxis1 and yaxis2 ticks

* Improve code

* Trigger tests

* Move file

* Small fixes plus example

* Fix unit test

* Remove SQL and Filter sections
2018-05-21 17:47:21 -07:00
Gabe Lyons a746fce383 expanding simple tab (#5032) 2018-05-21 16:22:40 -07:00
Gabe Lyons 0e1fb62db2 forcing ace editor to refresh when it is shown (#5038) 2018-05-21 16:20:46 -07:00
Maxime Beauchemin ce0011e5fc Add missing dep on contextlib2 (#5027) 2018-05-21 13:19:07 -07:00
Gabe Lyons 1c9474b4ff treating floats like doubles for druid versions lower than 11.0.0 (#5030) 2018-05-21 11:50:04 -07:00
Yongjie Zhao 9f66dae328 [bugfix] Fix ZeroDivisionError and get metrics label with percent metrics (#5026)
* Fix percent_metrics ZeroDivisionError and can not get metrics with label issue

* convert iterator to list

* get percentage metrics with get_metric_label method

* Adding tests case for expression type metrics

* Simplify expression
2018-05-20 11:10:57 -05:00
timifasubaa 5505c116ba Merge pull request #5019 from timifasubaa/fix_error_message_for_missing_datasource
fix missing datasource error message
2018-05-18 01:13:47 -07:00
timifasubaa 63115fbb87 nit 2018-05-17 23:34:12 -07:00
Timi Fasubaa f52f7aa7cf raise exception early 2018-05-17 17:39:59 -07:00
timifasubaa 5a64b3f577 Merge pull request #5022 from mistercrunch/flask_sub_1
Fix flask<1.0.0
2018-05-16 18:26:27 -07:00
Maxime Beauchemin 2ba929ac9e Fix flask<1.0.0
Made a mistake originally, meant to flask<1.0.0
2018-05-16 18:37:14 -05:00
Arup Malakar 2bf53dad98 Make port number optional in superset for druid (#5020)
* Make port number optional in superset for druid

It appears that urllib throws error with ssl if port number is provided

```
    url = "https://example.com:443/druid/v2"

    req = urllib.request.Request(url, druid_query_str, headers)
    res = urllib.request.urlopen(req)

```

The above call fails with the following error:
```
urllib2.HTTPError: HTTP Error 404: Not Found
```

If url is set to https://example.com/druid/v2 it works, this change
makes the port number optional.

* Rewrite if/else in concisely python way
2018-05-16 17:38:00 -04:00
Timi Fasubaa cf374efb3f fix missing datasource error message 2018-05-16 12:32:31 -07:00
Maxime Beauchemin e72c9cded3 Fix EncryptedType error (#5007)
fixes https://github.com/apache/incubator-superset/issues/5005
2018-05-16 13:24:51 -05:00
michellethomas c2eae96327 Fix AdhocFilterControl for single metric options (#5012) 2018-05-15 16:41:23 -07:00
Maxime Beauchemin 7b427d7ee0 Make MetricsControl the standard across visualizations (#4914)
* [WiP] make MetricsControl the standard across visualizations

This spreads MetricsControl across visualizations.

* Addressing comments

* Fix deepcopy issue using shallow copy

* Fix tests
2018-05-15 12:37:34 -05:00
Maxime Beauchemin b839608c32 [sql lab] a better approach at limiting queries (#4947)
* [sql lab] a better approach at limiting queries

Currently there are two mechanisms that we use to enforce the row
limiting constraints, depending on the database engine:
1. use dbapi's `cursor.fetchmany()`
2. wrap the SQL into a limiting subquery

Method 1 isn't great as it can result in the database server storing
larger than required result sets in memory expecting another fetch
command while we know we don't need that.

Method 2 has a positive side of working with all database engines,
whether they use LIMIT, ROWNUM, TOP or whatever else since sqlalchemy
does the work as specified for the dialect. On the downside though
the query optimizer might not be able to optimize this as much as an
approach that doesn't use a subquery.

Since most modern DBs use the LIMIT syntax, this adds a regex approach
to modify the query and force a LIMIT clause without using a subquery
for the database that support this syntax and uses method 2 for all
others.

* Fixing build

* Fix lint

* Added more tests

* Fix tests
2018-05-14 14:44:05 -05:00
Yongjie Zhao 7a4a89b195 Update Apache Kylin dbengine with supported week/quarter grains (#4965) 2018-05-14 14:11:59 -05:00
Gabe Lyons ce710f8c8f cleaning up the table fab view since we hide these autogenerated metrics anyway (#4992) 2018-05-14 14:09:12 -05:00
Ville Brofeldt b391676544 Force lowercase column names for Snowflake and Oracle (#4994)
* Force lowercase column names for Snowflake and Oracle

* Force lowercase column names for Snowflake and Oracle

* Remove lowercasing of DB2 columns

* Remove DB2 lowercasing

* Fix test cases
2018-05-14 13:43:13 -05:00
timifasubaa 071c6a6c03 Merge pull request #4991 from michellethomas/fix_filter_blank_custom_sql
[Bugfix] Allowing sqlExpression to be blank
2018-05-14 11:26:08 -07:00
Maxime Beauchemin 2c5200affd [deps] force flask<=1.0.0 (#4959)
flask 1.0 came out and has backwards incompatible changes. People
are reporting that fresh install doesn't work anymore.

fixes https://github.com/apache/incubator-superset/issues/4953

We should ship a 0.25.1 with this in
2018-05-13 11:16:09 -07:00
Michelle Thomas ad4912d601 Allowing sqlExpression to be blank 2018-05-11 16:03:17 -07:00
Gabe Lyons 7d5195aae3 expanding regex for automated columns (#4990) 2018-05-11 15:43:52 -07:00
timifasubaa b75942daa5 Merge pull request #4977 from timifasubaa/bump_pyhive_version
bump pyhive version
2018-05-10 11:50:14 -07:00
Timi Fasubaa 6720255868 bump pyhive version 2018-05-10 11:13:44 -07:00
Gabe Lyons a8514b267b [Explore] Adding Adhoc Filters (#4909)
* adding custom expressions to adhoc metrics

* adjusted transitions and made the box expandable

* adding adhoc filters

* adjusted based on feedback
2018-05-10 10:41:10 -07:00
grafke 8591319bde [sql lab] Use context manager for sqllab sessions (#4927)
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering
2018-05-10 10:32:31 -07:00
Ville Brofeldt af4dd59661 Fix templating in sqla datasource (#4971)
Fix templating in sqla datasource [has migration]
2018-05-10 10:28:56 -07:00
Nicole Dominguez 94249ed20c superset/import_dashboards.html: Update title, clean up html (#4972)
* Changes "Import the dashboards." to "Import dashboards"
* Cleans up the HTML to add quotes, self close tags, etc.
* Adds a class to the `<submit>` button to utilize bootstrap style
* Remove the `<title>` tag in body as it's not vaild HTML and redundant with `{% block %}`
2018-05-09 20:42:17 -07:00
Maxime Beauchemin 918399d4e2 [bugfix] handling UTF8 in Druid dimensions (#4943) 2018-05-08 22:04:05 -07:00
jasnovak e29beba023 Add extraction function support for Druid queries (#4740)
* add extraction fn support for Druid queries

* bump pydruid version to get extraction fn commits

* update and add tests for druid for filters with extraction fns

* conform to flake8 rules

* fix flake8 issues

* bump pyruid version for extraction function features
2018-05-08 22:00:06 -07:00
Maxime Beauchemin 75df3d0f8e CHANGELOG for 0.25.0 (#4948) 2018-05-08 08:24:54 -07:00
Yuance.Li 18e67f93de add 30 minutes support under time granularity (#4954) 2018-05-08 08:24:18 -07:00
Yuance.Li 65c4499bef Support hours in relative time range selection (#4950) 2018-05-07 23:19:08 -07:00
Maxime Beauchemin 45ffed9976 Move from deprecated flask-cache to flask-caching (#4944)
It appears the officially maintained fork of flask-cache is
flask-caching https://github.com/sh4nks/flask-caching . It is fully
compatible with flask-cache.
2018-05-07 23:18:46 -07:00
Hugh A. Miles II 374482bcde Fix naming for geojson (#4946) 2018-05-07 22:48:35 -07:00
Maxime Beauchemin f21ba1aba7 [docs] add entry for Hive in installation.rst (#4942) 2018-05-07 15:26:19 -07:00
Maxime Beauchemin 415d1c092b [sql lab] handle query stop race condition (#4928)
fixes https://github.com/apache/incubator-superset/issues/4926

In rare cases where the query is stopped before it is started, SQL Lab
returns an unexpected string payload instead of a normal dictionary.

This aligns the process to handle the error in a homogeneous fashion.
2018-05-07 13:49:42 -07:00
Vihar Kurama a60d577b7d Update installation.rst (#4930) 2018-05-07 13:48:41 -07:00
timifasubaa d87504cb42 Merge pull request #4833 from timifasubaa/help_sqllab_forget_the_past
[sqllab] Help sqllab forget query history
2018-05-07 10:56:39 -07:00
Timi Fasubaa ab958c67e6 make queries older than 6 hours timeout 2018-05-07 10:14:37 -07:00
João Marques Gomes 89333657d8 Add Portugal to country_map visualization (#4939)
* Add files via upload

* Add files via upload
2018-05-07 10:01:09 -07:00
Antoine Galataud f5b63679e0 add Airboxlab to Superset users list (#4938) 2018-05-07 09:59:35 -07:00
Octavian 58a02bba43 Add Windsor.ai to the list of organizations (#4940) 2018-05-07 09:59:02 -07:00
Hugh A. Miles II 52a6bd1c7e rm-slices (#4899) 2018-05-05 00:05:49 +02:00
John Bodley 440fb77df5 [druid] Updating Druid refresh metadata tests (#4887) 2018-05-03 18:14:40 -07:00
jasnovak e2d5c33638 Hide restricted ui elements, remove <br> from error message (#4900)
* hide forbidden ui elements, remove <br> from message

* add comma for flake8

* add commma for flake8

* change js variables from snake to camel case
2018-05-03 17:36:30 -07:00
Casper CY Chiang 976e43e681 Install superset in Kubernetes with helm chart (#4923)
* Add helm chart to install superset in kubernetes

* set resources into unlimited

* Add descriptions to Chart.yaml

* add an entry in docs/installation.rst
2018-05-03 17:35:38 -07:00
Yongjie Zhao 5d6e59aa8a Support Apache Kylin in EngineSpec (#4925)
* Support Apache Kylin in EngineSpec

* Fix flake8
2018-05-03 08:42:43 -07:00
Maxime Beauchemin e213ccd438 [bufix] filtered column was removed (#4921)
if a filter is created on a chart, and the column is removed from the
dataset, you get a "&#39;NoneType&#39; object has no attribute
&#39;is_num&#39;" or something to that
effect. This fix disregards the filter.

Also error messages were HTML escaped which React does already anyways
so that's not necessary [anymore] here.
2018-05-02 15:24:44 -07:00
Maxime Beauchemin fa4acb1bda Add doc entry for BigQuery support (#4917)
closes https://github.com/apache/incubator-superset/issues/945
2018-05-01 21:28:27 -07:00
Maxime Beauchemin 5f6a1cea47 Fix typos from linting (#4918)
Caused by https://github.com/apache/incubator-superset/pull/3847

Fixes https://github.com/apache/incubator-superset/issues/4915
2018-05-01 13:34:10 -07:00
Beto Dealmeida 13da5a8742 Fix for week_start_sunday and week_ending_saturday (#4911)
* Handle locked weeks

* Fix spelling

* Fix druid

* Clean unit tests
2018-05-01 13:27:56 -07:00
Beto Dealmeida 9c53323c93 Replace NaN/Infinity with null (#4908) 2018-05-01 11:18:19 -07:00
Maxime Beauchemin 8c94e1f710 Fix country_map visualization URL (#4913)
When moving the visualizations/ folder to src/ I missed this reference.
2018-05-01 08:50:47 -07:00
Maxime Beauchemin e1d2150391 Add note about 0.25.0 upgrade in UPDATING.md (#4883) 2018-04-30 09:47:48 -07:00
Maxime Beauchemin 3c7feb770a Heatmap improvements (#4897)
* allow option to normalize the color distribution
* make bounds work client side (instantaneous)
* make more controls instantaneous
2018-04-30 09:36:24 -07:00
Riccardo Magliocchetti 709a71b89a requirements: bump gunicorn to 19.8.0 (#4906)
Fixes #3002
2018-04-30 08:58:02 -07:00
Riccardo Magliocchetti 31f426664c translations: rename pt_BR gettext files (#4907)
To messages.{mo,po} like for the other languages.
2018-04-30 08:57:26 -07:00
John Bodley d533ce0967 [pylint] prepping for enabling pylint for non-errors (#4884) 2018-04-28 20:08:09 -07:00
Maxime Beauchemin caa72675a5 Fix 'Uncaught TypeError: pe.clamp is not a function' (#4901) 2018-04-27 16:15:43 -07:00
Maxime Beauchemin 0a953714ac [sql lab] allow stoping 'pending' queries (#4896) 2018-04-27 16:10:29 -07:00
Jules 510ae84b3b remove hard code http scheme of short url #4656 (#4886)
* remove hard code http scheme of short url #4656

* remove space

* add space

* remove temp var
2018-04-27 08:41:54 -07:00
Maxime Beauchemin f3d756016e Allow limiting rows on Pivot Table (#4891) 2018-04-27 08:35:12 -07:00
Maxime Beauchemin 3f48c005df [bugfix] temporal columns with expression fail (#4890)
* [bugfix] temporal columns with expression fail

error msg: "local variable 'literal' referenced before assignment"

Error occurs [only] when using temporal column defined as a SQL
expression.

Also noticed that examples were using `granularity` instead of using
`granularity_sqla` as they should. Fixed that here.

* Add tests
2018-04-26 21:13:52 -07:00
Ville Brofeldt fa3da8c888 Implement Snowflake engine with supported time grains (#4882)
* Implement Snowflake engine with supported time grains

* Fix typo in second grain
2018-04-25 14:44:24 -07:00
Maxime Beauchemin 17ae9ec3a8 Move a few JS files (#4841)
* Moving JS files

* Moving pointers

* lint
2018-04-24 13:35:55 -07:00
david watson 7139f1e863 Remove spurious "has" from README (#4872)
This changes "has ships" to "ships" so it's grammatically correct. Sorry for the pedantic PR.
2018-04-24 09:44:42 -07:00
Chris Hua 7193a4719d remove DISTINCT ON statement (#4869)
unbreaks for redshift tables and output is identical
2018-04-23 17:04:36 -07:00
Conglei 2cd016f11c [axis formatting] Override the valueformat to be percentage when contribution is selected (#4866)
* force the valueformat to be percentage when contribution is selected

* remove extra empty lines

* simplied the logic by reusing some existing code
2018-04-23 10:05:29 -07:00
Hugh A. Miles II 5927e7dfe6 Refactoring on exploreReducer.js (#4836)
* refactoring on exploreReducser

* fix building json
2018-04-23 08:29:01 -07:00
Maxime Beauchemin 590e3462d6 Fix 'pip install .' (#4856)
* Fix 'pip install .'

Fix error :
> flask-appbuilder 1.10.0 has requirement Flask-SQLAlchemy==2.1,
> but you'll have flask-sqlalchemy 2.3.2 which is incompatible.
> botocore 1.10.5 has requirement python-dateutil<2.7.0,>=2.1, but you'll
> have python-dateutil 2.7.2 which is incompatible.

* remove flask-sqlalchemy==2.1 from reqs.txt
2018-04-23 08:16:22 -07:00
michellethomas 370d8a2bbe Safely passing data to d3.html (#4842) 2018-04-22 21:00:37 -07:00
Ry Walker 937a5bc85c Add Astronomer to list of organizations using Apache Superset (#4867) 2018-04-22 20:51:45 -07:00
Chris Williams 66fcf9b687 [formats] add better defaults for time + number formatting (#4843)
* [formats] add better defaults for time + number formatting

* [formatDate] add tests for concise formatDate

* [nvd3] use verbose time format in tooltips

* [number format] improve number format description

* [formats] revert to .3s defaults, tweak number format preview

* [formats] default number vis to .3s
2018-04-20 15:55:25 -07:00
John Bodley 89347172d2 [sql] Using read_sql_query instead of read_sql (#4853) 2018-04-20 14:36:20 -07:00
Peter Lubell-Doughtie c92b56e2f6 correct config language key to pt_BR (#4854) 2018-04-19 20:43:56 -07:00
Maxime Beauchemin e88b0b6c4c Remove obsolete TODO.md (#4850) 2018-04-19 15:52:26 -07:00
Kengo Seki 860a4d9123 [docs] minor file name and format fix for the setup document (#4844) 2018-04-19 11:34:23 -07:00
Maxime Beauchemin a98c3cfdef Fix time granularity-related issues (#4821)
* Fixing time grain

* Add tests
2018-04-18 16:17:28 -07:00
timifasubaa a14dc26042 ensure directory exists before saving csv file (#4829) 2018-04-18 15:01:40 -07:00
Timi Fasubaa e47d8a59a4 help sqllab forget the past 2018-04-18 14:09:33 -07:00
Maxime Beauchemin eac97ce9f2 [explore] proper filtering of NULLs and '' (#4651)
* [WiP] [explore] proper filtering of NULLs and ''

TODO: handling of Druid equivalents

* Unit tests

* Some refactoring

* [druid] fix 'Unorderable types' when col has nuls

Error "unorderable types: str() < int()" occurs when grouping by a
numerical Druid colummn that contains null values.

* druid/pydruid returns strings in the datafram with NAs for nulls
* Superset has custom logic around get_fillna_for_col that fills in the
NULLs based on declared column type (FLOAT here), so now we have a mixed
bag of type in the series
* pandas chokes on pivot_table or groupby operations as it cannot sorts
mixed types

The approach here is to stringify and fillna('<NULL>') to get a
consistent series.

* typo

* Fix druid_func tests

* Addressing more comments

* last touches
2018-04-17 22:26:21 -07:00
John Bodley 44c2d5bdab [setup] Dropping 3.4 and adding 3.6 (#4835)
* [setup] Dropping 3.4 and 3.6

* Update tox.ini

* Update .travis.yml
2018-04-17 21:30:12 -07:00
Maxime Beauchemin c0db6dbb57 Moving some JS folders (#4820)
* Moving folders

* Pointing to new locations
2018-04-17 21:05:01 -07:00
John Bodley 2900ca345d [travis] Fixing environments (#4828) 2018-04-15 16:21:33 -07:00
Riccardo Magliocchetti 3b18fbf9e3 db_engine_specs: use correct sqlite week time grain (#4831)
We want the week of year %W and not the day of week %w
when using week as time grain.

Reference:
https://www.sqlite.org/lang_datefunc.html
2018-04-15 16:15:31 -07:00
Maxime Beauchemin 23a3365cd1 Update README with fresher screenshots (#4825)
* Improve screenshots in README.md

* Add border to images

* Add visualizations.png
2018-04-14 15:32:26 -07:00
Gabe Lyons 8669874ec6 [Explore] Adding custom expressions to adhoc metrics (#4736)
* adding custom expressions to adhoc metrics

* adjusted transitions and made the box expandable
2018-04-13 11:20:53 -07:00
Maxime Beauchemin 4c268ec678 [docs] many improvements to the documentation / cleanup (#4817)
* fixed RSTs so images will show up on github
* fresh screenshots on main page
* removing irrelevant portions
* moved a set of sections under 'Misc'
* rebuilt the Gallery with all screenshots
2018-04-13 10:23:27 -07:00
Riccardo Magliocchetti daf9a3bfb5 docs: use proper dialect for redshift (#4823)
Use redshift+psycopg2 instead of the postgresql one.
2018-04-13 09:13:33 -07:00
Beto Dealmeida fd84fd89ce RFC: add logger that logs into browser console (#4702)
* Option for logging into browser console

* Move import

* Add lint req

* Add docs, use Flask logger
2018-04-12 21:48:17 -07:00
Hugh A. Miles II 2f5cff7d9f [DeckGL] Added fixtures and Deck test (#4798)
* added fixtures and deck test

* linting

* linting

* add os.path

* remove para

* fix reference
2018-04-12 17:20:39 -07:00
Maxime Beauchemin 6fd4ff45ea Improve the calendar heatmap (#4800)
* Improve xAxis ticks, thinner bottom margin (#4756)

* Improve xAxis ticks, thinner bottom margin

* Moving utils folder

* Add isTruthy

* Addressing comments

* Set cell_padding to 0

* merging db migrations
2018-04-12 17:16:45 -07:00
Maxime Beauchemin b04359003e Filtering out SQLLab views out of table list view by default (#4746)
* Filtering out SQLLab views out of table list view by default

This adds a `is_sqllab_view` flag in the "tables" table, and makes the
filters those out in the Tables list view.

The filter showing on top may be a bit confusing, but certainly less
than seeing lots of user generated views.

* flake

* Addressing comments
2018-04-12 13:52:47 -07:00
John Bodley 2a95d203ad [migrations] Fixing issue #4810 (#4815) 2018-04-12 10:41:36 -07:00
Maxime Beauchemin 683fb6c251 Make the bottom margin a bit taller (#4807) 2018-04-11 15:15:59 -07:00
Maxime Beauchemin 07a5f47c75 [bugfix] dedup groupby columns in Deck visualizations (#4801)
When specifying the same column twice as a `Extra Data for JS` and
`Categorical Color`, an error is issued. This addresses this issue.
2018-04-11 15:15:36 -07:00
Maxime Beauchemin ae7e114621 [explore] set working default for MetricsControl (#4803)
The default setting which would look for either `count` first and then
any metric stopped working when we landed MetricsControl. This mimics
the previous behavior
2018-04-11 15:11:11 -07:00
John Bodley dadc0574b8 [tests] cleaning up test configuration (#4806) 2018-04-11 14:09:20 -07:00
michellethomas 725b8f94c9 Adding tests for the time table viz (#4659) 2018-04-11 13:24:51 -07:00
hidetoshiito e96590744f BugFix(#3658) (#4133)
* BugFix(#3658)

rollback to old version

* Update views.py
2018-04-11 13:21:54 -07:00
timifasubaa 20f46eede5 call next() the right way (#4804) 2018-04-11 13:20:14 -07:00
Hugh A. Miles II 3c29ca79ae filter recently viewed to just have explore and dashboard types (#4808) 2018-04-11 13:19:20 -07:00
Ariel Shemtov adf9ec0bb1 adding option for multiple metrics, group by, opacity, legends (#4525) 2018-04-10 21:21:24 -07:00
John Bodley 7f1d7543d0 [logs] Dropping dt column (#4587) 2018-04-10 18:34:32 -07:00
Grace Guo 02a9e37f04 [homepage] Fix Favorites chart list (#4802) 2018-04-10 17:07:28 -07:00
John Bodley 1627fd096b [travis/tox] Restructuring configuration (#4552) 2018-04-10 15:59:44 -07:00
Maxime Beauchemin 14bf45da7c [bugfix] when num_period_compare is not set (#4799)
Fixing issues where y_axis_format is set and not num_period_compare
2018-04-10 14:49:22 -07:00
Maxime Beauchemin 1e7a294c1f Improve xAxis ticks, thinner bottom margin (#4756)
* Improve xAxis ticks, thinner bottom margin

* Moving utils folder

* Add isTruthy
2018-04-10 13:37:34 -07:00
David Hassan 64459efebd Add Ascendica Development in organizations list who use Superset (#4792)
Add Ascendica Development in organizations list who use Superset
2018-04-09 22:07:52 -07:00
Maxime Beauchemin 9bbe50f2f6 [explore] forcing .1% number format when using 'Period Ratio' (#4774) 2018-04-09 14:02:43 -07:00
Beto Dealmeida 47c085fd00 Add play slider to screengrid (#4647)
* Improved granularity parsing

* Add unit tests

* Explicit cast to int

* Screengrid play slider

* Clean code

* Refactor common code
2018-04-09 14:02:20 -07:00
John Bodley 41c158edac Rename UPDATING.MD to UPDATING.md (#4781) 2018-04-07 19:01:02 -07:00
Maxime Beauchemin 17e673ec87 [line] fix verbose names in time shift (#4765)
* [line] fix verbose names in time shift

* Addressing comments
2018-04-07 15:19:58 -07:00
Maxime Beauchemin ee15fc8aa8 [doc] module header for controls.jsx and visTypes.jsx (#4777)
* Provide much needed module header for the controls.jsx module

* Typos
2018-04-07 12:56:29 -07:00
Maxime Beauchemin 627bdb2eb3 [dashboard] open in edit mode when adding a chart (#4772)
* [dashboard] open in edit mode when adding a chart

* Move dashboard unit tests to their own file

* fix tests

* Better URL management
2018-04-07 12:55:05 -07:00
EvelynTurner bd2cb9aada [Bug fix] Resolving key conflicts in Timeseries Annotation Layer when key is a string (#4768)
* Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* Fixed indentation

* Fix the key string value in case series.key is a string

* Fix the key string value in case series.key is a string
2018-04-06 16:22:20 -07:00
Maxime Beauchemin 4f2c2069f1 Improve controls layout for Table visualization (#4767) 2018-04-06 16:19:37 -07:00
Beto Dealmeida 426c34ee86 Pass granularity from backend to frontend as ISO duration (#4755)
* Add ISO duration to time grains

* Use ISO duration

* Remove debugging code

* Add module to yarn.lock

* Remove autolint

* Druid granularity as ISO

* Remove dangling comma
2018-04-06 16:19:17 -07:00
Beto Dealmeida 1a26485da4 Fix brush with annotations (#4773)
* Make annotation work with brush

* Add dispatch for events

* Fix lint

* Use xScale.clamp
2018-04-06 16:18:49 -07:00
Tamika Tannis 91366799d3 Add notes to contrib file about testing and code coverage (#4778) 2018-04-06 16:14:14 -07:00
Maxime Beauchemin 59cabe7d8f [explore] set control default for *showminmax = false (#4766)
Let's make the defaults less crowded on the axes by not showing the min
and max values on the axes (bounds)
2018-04-06 15:46:38 -07:00
DAOReady 92230b8535 Add context to templates / respect slice timeout (#4673)
* added context to templates to be able to use filters in SQL

* respect slice timeout in favor of others

* added trailing comma
2018-04-05 09:58:11 -07:00
John Bodley df4ff05441 [druid] Excluding refreshing verbose name (#4761) 2018-04-04 17:16:53 -07:00
Maxime Beauchemin 68999b1407 [deck_multi] fixing issues with deck_multi (#4754)
* [deck_multi] fixing issues with deck_multi

* removing eslint comment
2018-04-04 16:52:14 -07:00
Maxime Beauchemin adda30bf66 Set longer CSRF token duration (one week) (#4741)
Default is one hour (3600), also this entry makes the setting a bit more
discoverable
http://flask-wtf.readthedocs.io/en/stable/config.html?highlight=csrf
2018-04-04 15:55:32 -07:00
Maxime Beauchemin 3b7e0a951a [sql lab] preserve schema through visualize flow (#4742)
* [sql lab] preserve schema through visualize flow

https://github.com/apache/incubator-superset/pull/4696 got tangled
into refactoring views out of views/core.py and onto views/sql_lab.py

This is the same PR without the refactoring.

* Fix lint
2018-04-04 13:38:37 -07:00
fabianmenges 9a79d33e0d [BUGFIX]: JavaScripts max int is 2^53 - 1, longs are bigger (#4005)
* [BUGFIX]: Java scripts max int is 2^53 - 1 longs are bigger and frequently used as IDs this is a hacky fix.

* Keep tuple as tuple
2018-04-04 00:36:23 -07:00
Prashant 7a497e2f6b [sql_lab]Disabled run query button if sql query editor is empty (#4728)
* Disabled run query button if sql query editor is empty

* Removing unnecessary white space

* Fix failing test for sql props

* Adding sql variable into propTypes and defaultProps
2018-04-03 14:58:23 -07:00
Maxime Beauchemin f6fe11f76e [bugfix] convert metrics to numeric in dataframe (#4726)
* [bugfix] convert metrics to numeric in dataframe

It appears sometimes the dbapi driver and pandas's read_sql fail at
returning the proper numeric types for metrics and they show up as
`object` in the dataframe. This results in "No numeric types to
aggregate" errors when trying to perform aggregations or pivoting in
pandas.

This PR looks for metrics in dataframes that are typed as "object"
and uses pandas' to_numeric to convert.

* Fix tests

* Remove all iteritems
2018-04-02 21:48:14 -07:00
Kuisong Tong aa4173dc81 Pass timezone to Druid Query granularity (#4648)
superset appends DRUID_TZ info to intervals but not to granularity which causes one day's data return as 2 days. This fix is also pass DRUID_TZ to granularity.
2018-04-02 21:38:46 -07:00
Jeffrey Wang 8be0bde683 [BugFix] Allowing limit ordering by post-aggregation metrics (#4646)
* Allowing limit ordering by post-aggregation metrics

* don't overwrite og dictionaries

* update tests

* python3 compat

* code review comments, add tests, implement it in groupby as well

* python 3 compat for unittest

* more self

* Throw exception when get aggregations is called with postaggs

* Treat adhoc metrics as another aggregation
2018-04-02 21:37:00 -07:00
John Bodley 68bfcefb27 [flask-appbuilder] Bumping version to 1.10.0 (#4603) 2018-04-02 21:35:10 -07:00
Maxime Beauchemin 969ff0ce39 Fix deep equality logic (#4730)
* Fix deepequality logic

Zeroed-in on this while a Deck Scatter Plot chart was prompting for
refresh on-load.

I'm pretty sure using JSON.stringify as a proxy for deep equality is
wrong.

Not sure how to handle yarn.lock changes here. The changes on yarn.lock
are the result of "only" running `yarn add deep-equal`

* Adressing comments
2018-04-02 20:54:57 -07:00
Beto Dealmeida ab7ba20009 Expose metrics to JS (#4654) 2018-04-02 17:48:56 -07:00
Gabe Lyons 1ef856e57a including auto generated avg metrics in druid (#4718) 2018-04-02 16:08:25 -07:00
Gabe Lyons e0f541f486 easier tab closing in sqllab (#4738) 2018-04-02 14:59:08 -07:00
Maxime Beauchemin 11c9e67ebb [explore] don't prompt to 'Run Query' on viewport change (#4729) 2018-04-02 13:35:51 -07:00
Maxime Beauchemin 221b35f36d Add '.1%' to number format options (#4720) 2018-04-01 21:13:07 -07:00
Maxime Beauchemin 069d61c53f [sqllab] fix data grid's instant search function (#4717)
* [sqllab] fix data grid's instant search function

It looks like any non-string type would break the search feature.
of `FilterableTable`

* Addressing comments
2018-03-30 10:22:10 -07:00
John Bodley b3442a7b53 [cli] Deprecating gunicorn/flower dependencies (#4451) 2018-03-30 09:28:16 -07:00
timifasubaa e25535c693 Remove redundant has_access definition in superset (#4689)
* update has_access to has_method_access

* move has_access to sm and rename to has_method_access
2018-03-29 17:54:11 -07:00
John Bodley d49a0e7958 [sqllab] Using app context for Celery task (#4669) 2018-03-29 16:11:23 -07:00
Maxime Beauchemin 29678680ee Use 3 letters month prefix in default date format (#4693) 2018-03-29 14:41:22 -07:00
Maxime Beauchemin ed9a56b4ab [sql lab] ctrl-r hotkey should run latest SQL (#4719)
Turns out the SQL would only be committed to the redux store `onBlur`
event to avoid the laggy typing. The delay come from the localStorage
binding that add enough millisecs of delay to feel odd while typing.

I now store the most recent SQL in the local and use that instead.
2018-03-29 14:32:03 -07:00
Maxime Beauchemin 9ee78d16d4 Add missing perms to sql_lab role (#4714)
The SQL Lab related role that is created programmatically is missing
permissions that make SQL Lab functional.
2018-03-29 14:24:11 -07:00
Alagappan f952ec2f06 Remove trailing '/' from Mailing list link in README file (#4709) 2018-03-29 11:12:36 -07:00
Gabe Lyons 68dec24542 [Explore] Streamlined metric definitions for SQLA and Druid (#4663)
* adding streamlined metric editing

* addressing lint issues on new metrics control

* enabling druid
2018-03-28 17:41:29 -07:00
Beto Dealmeida 7e1b6b7363 Rename no_reload (#4703) 2018-03-28 14:44:01 -07:00
michellethomas 485b0c275e Fixing label issue when columnType is null (#4700) 2018-03-27 17:54:24 -07:00
Joe Bordes d8d860facc i18n(es_es) (#4687) 2018-03-27 17:48:42 -07:00
timifasubaa 8dd052de4b [security] Refactor security code into SupersetSecurityManager (#4565)
* move access permissions methods to security manager

* consolidate all security methods into SupersetSecurityManager

* update security method calls

* update calls from tests

* move get_or_create_main_db to utils

* raise if supersetsecuritymanager is not extended

* rename sm to security_manager
2018-03-27 16:46:02 -07:00
Maxime Beauchemin f510956da2 Hotkeys in SQL Lab (#4680)
* Hotkeys

* Making it work in AceEditor

* Addressing comments
2018-03-27 15:54:54 -07:00
Maxime Beauchemin deb211154d Docs on how to package a release + CHANGELOG for 0.24.0 (#4697)
* Docs on how to package a release + CHANGELOG for 0.24.0

* Addressing comments

* Add pypi perm info
2018-03-27 15:48:57 -07:00
John Bodley f9d85bd2e1 [druid] Updating refresh logic (#4655) 2018-03-26 18:35:43 -07:00
michellethomas 52b925fee8 Fix bug with sorting columns in group by using time shift (#4683) 2018-03-26 10:55:43 -07:00
Maxime Beauchemin 336a1064d6 CRUD hints around SQL expressions (#4645)
* CRUD hints around SQL expressions

* Addressing comment
2018-03-26 09:44:37 -07:00
Ville Brofeldt 4ec82582c6 Preprocess SQL Lab query prior to checking syntax (#4686)
Syntax checking doesn't work if jinja templates haven't been prerendered.
Also remove unreachable return statement. Fixes #4288.
2018-03-26 09:42:33 -07:00
Maxime Beauchemin 097a37a1a1 Fix up the Lyft color scheme (#4684)
Previous color scheme had too few colors, some with light tones
and wasn't hooked up to the array.
2018-03-26 09:33:45 -07:00
Hugh A. Miles II 9abc5c724f Add lyftColor to the game 💯 (#4682)
* add lyftColor to the game 💯

* fix json
2018-03-23 18:02:29 -07:00
timifasubaa 00cab7e107 add yarn lock info to contributing.md (#4679) 2018-03-23 15:31:47 -07:00
Riccardo Magliocchetti 76394d3f8f forms: make csv import parse dates accepts a list of columns (#4639)
Instead of a boolean which has way less chances to work. While
at it add a proper label for the "con" field.

Fixes #4637
2018-03-23 14:16:02 -07:00
timifasubaa f11cde9eb8 add yarn.lock (#4674) 2018-03-23 14:14:00 -07:00
Maxime Beauchemin b24a6fd4b5 Fix setup.py, comma makes download_url a tuple (#4676) 2018-03-23 11:21:19 -07:00
EvelynTurner 73f7f817d3 [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data (#4630)
* Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* [Bug fix] Fixed/Refactored annotation layer code so that non-timeseries annotations are applied based on the updated chart object after adding all data

* Fixed indentation
2018-03-22 23:10:40 -07:00
Alexander T d427f6a322 Update messages.po (#4670) 2018-03-22 17:47:15 -07:00
yanyu b9965230df fix: epoch_s and epoch_ms to date time (#4664) 2018-03-22 08:13:38 -07:00
Beto Dealmeida ec069676fd Better default for MAPBOX_API_KEY (#4660) 2018-03-21 17:13:09 -07:00
Jeffrey Wang 33aa976e3d Cache the query string (#4633)
* Cache the query string

* misc linter
2018-03-21 13:13:36 -07:00
Maxime Beauchemin fc47729233 [sql lab] search to use fist&last name instead of username (#4628)
In our environment username are not readable coming out of oauth, so
we'd rather use first&last when available.
2018-03-19 22:16:17 -07:00
Maxime Beauchemin 1435840e38 Set filter_select_enabled default to True for Druid (#4608) 2018-03-19 22:15:43 -07:00
Maxime Beauchemin 8942436ece [examples] let's not use 'date' as a col name (#4555)
'date' is a reserved word in most database
2018-03-19 22:15:19 -07:00
Maxime Beauchemin ed9867c0cc Use 'count' as the default metric when available (#4606)
* Use 'count' as the default metric when available

Count is a much better default than the current behavior which is to use
whatever the first metric in the list happens to be.

* Addressing nits
2018-03-19 21:51:51 -07:00
michellethomas 5c98f5642b Fix sqllab numpy array (#4629)
* Fixing error with sqllab numpy array

* Adding tests for failing sqllab data type
2018-03-19 11:43:04 -07:00
Beto Dealmeida ba9379b949 Only show overlay if container is set (#4601)
* Pass width in props

* Only load overlay if container is set
2018-03-19 11:23:19 -07:00
Maxime Beauchemin 83f8f98ae3 [cosmetic] removing table border in ModelView list (#4638) 2018-03-19 11:02:40 -07:00
Hugh A. Miles II e9b5b1a305 part1 (#4641) 2018-03-19 11:02:03 -07:00
michellethomas 97afcd5809 Adding to list of generated-members to fix pylint errors (#4632)
* Adding to list of generated-members

* Updating to ignore-classes sqlalchemy scoped_session
2018-03-16 16:20:25 -07:00
michellethomas 3f1dfb3173 Adding column type label to dropdowns (#4566)
* Adding column type label to dropdowns

* Changing the style of column type label

* Adding tests for ColumnTypeLabel

* Adding tests for time and fixing if statement order

* Changing location of ColumnTypeLabel tests

* Updating ColumnTypeLabel structure
2018-03-16 14:19:09 -07:00
John Bodley 6875868cf6 Merge pull request #4627 from mistercrunch/fix_run_extra
Move run_extra_queries outsize of BaseViz init
2018-03-16 13:21:57 -07:00
Maxime Beauchemin b906fece68 Move run_extra_queries outsize of BaseViz init 2018-03-16 10:05:15 -07:00
Maxime Beauchemin 93ec76f757 [sql lab] reduce the number of metadata calls when loading a table (#4593) 2018-03-15 17:53:34 -07:00
Beto Dealmeida da842f113a Fix function name (#4620) 2018-03-15 17:52:30 -07:00
Beto Dealmeida 7da164d386 Remove group by from deck.gl viz (#4622) 2018-03-15 17:48:18 -07:00
Maxime Beauchemin 1e0bcba568 Allowing config flag to turn off flask-compress (#4617) 2018-03-15 17:17:04 -07:00
Chris Williams e2bd40c89f [bug fixes] annotations <> x domains, zeros in text (#4194)
* [bugs] account for annotations in nvd3 x scale domain, fix dynamic width explore charts, allow 0 in text control

* tweak TextControl casting

* [annotations] filter separately from finding data extent
2018-03-15 15:13:24 -07:00
Grace Guo 7c5bc8d90c fix mapbox viz (#4621) 2018-03-15 15:06:41 -07:00
John Bodley 36fa6cd7df [contributing] Removing obsolete code climate reference (#4616) 2018-03-14 16:50:25 -07:00
Beto Dealmeida 7089344623 Legend for deck.gl scatterplot (#4572)
* Initial work

* Working version

* Specify legend position

* Max height with scroll

* Fix lint

* Better compatibility with nvd3

* Fix object.keys polyfill version

* Fix lint
2018-03-14 16:40:14 -07:00
Beto Dealmeida 86a03d1dc8 Show "Range Filter" by default (#4604)
* Show Range Filter by default

* Auto show brush

* Backwards compat

* Small fix
2018-03-14 16:38:47 -07:00
Gabe Lyons 3371c8bd5c overriding annotation and layers' control tab (#4609) 2018-03-14 00:05:06 -07:00
Chris Williams 95a9b046f8 [slice_json] pass slice id to get_form_data() (#4607) 2018-03-13 14:49:06 -07:00
John Bodley 4250e239a2 Merge pull request #4590 from michellethomas/fixing_double_escape_presto
Removing escape_sql so we dont double escape
2018-03-13 12:19:44 -07:00
John Bodley 4e494b264b Merge pull request #4579 from michellethomas/removing_title_label
Removing [dashboard] and [slice] titles to show name
2018-03-13 12:00:11 -07:00
John Bodley de4409835e Merge pull request #4573 from john-bodley/john-bodley-cache-fix-datasource-uid
[cache] Ensuring that the datasource UID is defined
2018-03-13 10:55:40 -07:00
John Bodley 037c04102f Merge pull request #4602 from john-bodley/john-bodley-druid-sync-fix-filter
[druid] Adding cluster filter for refresh
2018-03-13 10:53:36 -07:00
michellethomas 1d0ec9fe6e timeseries_limit should not be required for phase 2 (#4581) 2018-03-13 09:25:14 -07:00
Michelle Thomas 882921825c Changing the title for explore pages 2018-03-12 17:59:49 -07:00
John Bodley 9604e1dd14 [druid] Adding cluster filter for refresh 2018-03-12 16:23:08 -07:00
oxydash 8951990d6e [BugFix] Resizing widgets problem #4596 (#4597) 2018-03-12 14:27:02 -07:00
John Bodley 26257d94f5 [cache] Ensuring that the datasource UID is defined 2018-03-12 09:49:32 -07:00
Hugh A. Miles II 2bc089ef8d Added new exception class and start of better exception/error handling (#4514)
* rebase and linting

* change back

* wip

* fixed broken test

* fix flake8

* fix test
2018-03-11 22:07:51 -07:00
oxydash ff41f40721 Add ignore git @eaDir Synology directory (#4599) 2018-03-11 21:54:49 -07:00
Ville Brofeldt ee073eee23 Add Aktia Bank in organizations list who use Superset (#4591)
PRs and #4413 and #4448 contributed while implementing Superset at Aktia.
2018-03-11 11:45:47 -07:00
Riccardo Magliocchetti 1d27fb30ff docs: fixup code blocks rendering (#4594) 2018-03-11 11:34:58 -07:00
Michelle Thomas e1af421f0c Removing escape_sql so we dont double escape 2018-03-09 15:37:17 -08:00
Riccardo Magliocchetti f9881101ee histograms: fixup left margin assigment (#4532) 2018-03-09 15:31:34 -08:00
Beto Dealmeida 1647004486 Return __time in Druid scan (#4504)
* Return __time in Druid scan

* use constant instead of __timestamp

* Fix lint
2018-03-09 15:28:11 -08:00
Hugh A. Miles II c6af4882cd [sqllab] Added share button to bottom menu (#4584)
* added sharebtn

* address comments
2018-03-09 15:10:36 -08:00
Maxime Beauchemin d522292b01 [sql lab] option to disable cross schema search (#4551)
* [sql lab] disable cross schema search

This is killing our metastore as people type it emits large
all-table-dump as they hit the keystroke. It never returns as it times
out and hammers the poor metastore.

Also some improvements around the disabling the table select on the left
panel and having the table name not be sticky.

* typo
2018-03-09 14:54:39 -08:00
Maxime Beauchemin 34a081b926 [sql lab] comment injection hook (#4585) 2018-03-09 11:27:36 -08:00
oxydash 4ffc56f1c9 [Translate] Added Full Russian Translation (#4586) 2018-03-09 11:13:37 -08:00
John Bodley c85eea3037 Merge pull request #4582 from john-bodley/john-bodley-javascript-codecov
[code-climate] Deprecating Code Climate from JavaScript tests
2018-03-09 09:02:14 -08:00
John Bodley 3fbadd68a4 [code-climate] Deprecating Code Climate from JavaScript tests 2018-03-08 22:40:08 -08:00
Pithawat Vachiramon b512da8002 Adding option to visualize negative values in Table view (#4570)
* Adding option to visualize negative values in Table view

* Adding option for highlighting and right aligning

* Fixed typo

* Fixed case and condition

* Formatting

* Aligning left and default changes

* Changing default
2018-03-08 18:07:49 -08:00
Michelle Thomas 402c7ddb26 Removing [dashboard] and [slice] titles to show name 2018-03-08 13:55:00 -08:00
Grace Guo 9edbd64c5d [Explore] Save custom url parameters when user save slices (#4578)
* [Explore] Save url parameters when user save slices

* remove print

(cherry picked from commit bd9ecbe)

* add unit test

(cherry picked from commit 0f350ad)

* wrapping all request params into url_params

(cherry picked from commit 17197c1)
2018-03-08 13:19:41 -08:00
EvelynTurner 42ebcaad40 Evelynturner/annotation timezone fix2 (#4550)
* Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC

* Fix how the Interval annotation layer interpretes the timestamp string without timezone info; use it as UTC
2018-03-08 10:19:36 -08:00
André Neidert 9ad50c9d55 Basic Portuguese Brazilian Translation (#4472)
* Basic Portuguese Brazilian Translation

* removing incorrect indentation

* Correct language name

* Improving language description

* Improving flag description
2018-03-07 17:43:55 -08:00
Kyle Travis 31a995714d [bug] Fix CSV upload feature for DB with password (#4562)
* Use sqlalchemy_uri_decrypted in create_engine calls

* Update tox mysql uri

* Include mysql charset=utf8 for py2.7 in tox.ini
2018-03-07 17:42:52 -08:00
John Bodley d494c82930 [landscape.io] Deprecating .landscape.yml (#4563) 2018-03-07 17:40:23 -08:00
John Bodley 0dfa3b99dd [requires.io] Removing obsolete requires.io link (#4564) 2018-03-07 17:39:51 -08:00
John Bodley 826d0631e0 Merge pull request #4567 from john-bodley/john-bodley-payload-error-status-code
[payload] Set status code on error rather than query status
2018-03-07 13:53:06 -08:00
John Bodley 1e8cd0e61e [payload] Set status code on error rather than query status 2018-03-07 13:26:20 -08:00
Grace Guo 369f652bfc [bug] fix shortener url (#4560)
[bug] fix shared explore url
2018-03-07 10:57:33 -08:00
Maxime Beauchemin b63dc91cd1 Expose hook to inject database connection logic on the fly (#4505)
* Expose hook to inject database connection logic on the fly

This environment configuration setting hook allows administrators to
alter the database connection parameters on the fly based on user
information. This can be use for a variety of purposes:

* rewire a subset of users to use different database user accounts
* pass user related information to the database for logging or QoS
purposes
* ...

* Fixes
2018-03-06 22:35:46 -08:00
Maxime Beauchemin d817b8ddbb Setting up compression using flask-compress (#4543) 2018-03-06 21:19:29 -08:00
John Bodley ef4e5ecedf [bugfix] Fixing regression from #4500 (#4549) 2018-03-06 21:19:13 -08:00
John Bodley 01e0a2f071 [landing] Making Dashboards the first/default tab (#4553) 2018-03-06 18:49:17 -08:00
Maxime Beauchemin 2e780e4034 Removing files from MANIFEST.in (#4542) 2018-03-06 09:39:31 -08:00
John Bodley 71d7196137 Merge pull request #4533 from john-bodley/john-bodley-replace-coveralls-with-codecov
[coverage] Replacing coveralls with codecov
2018-03-06 08:00:16 -08:00
John Bodley 150768ee30 [presto] Removing patched presto (#4530) 2018-03-05 23:16:02 -08:00
John Bodley 06c5077691 [dump.rdb] Removing rouge file (#4536) 2018-03-05 23:11:40 -08:00
Luciano Arango 2c5adb6dc3 Add ScopeAI (#4541) 2018-03-05 23:11:01 -08:00
John Bodley 6e0ece76a0 Merge pull request #4534 from john-bodley/john-bodley-setup-url
[setup] Fixing repo URLs
2018-03-05 18:03:04 -08:00
John Bodley 48430a1918 Merge pull request #4500 from john-bodley/john-bodley-fix-pr-4396
[bugfix] Fixing regression introduced in #4396
2018-03-05 16:51:09 -08:00
John Bodley b01a9bba1f [setup] Fixing URLs 2018-03-05 13:06:08 -08:00
Riku Pelkonen 007ad351cf Pass datasource as form_data param (#4538)
* Pass datasource as form_data param

* add comma after datasource

* change test to match new addSlice
2018-03-05 11:43:59 -08:00
John Bodley 4f7258aaca [coverage] Replacing coveralls with codecov 2018-03-04 13:27:26 -08:00
Ariel Shemtov 413585448e Superset issue #4512: fixing histogram (#4513)
* fixing histogram axes and colors, adding normalized and x-axis label options

* adding y-axis label option
2018-03-02 13:45:46 -08:00
EvelynTurner 41defdceaa Fix how the annotation layer interpretes the timestamp string without timezone info; use it as UTC (#4511) 2018-03-01 21:02:04 -08:00
Grace Guo 2637d3d5e2 [dashboard] (#4515) 2018-03-01 15:48:04 -08:00
Gabe Lyons 79bb54a173 chart style options get their own tab (#4482) 2018-03-01 14:24:09 -08:00
Jeffrey Wang 3a58dc7ecf Make margin width based on container width instead of slice width (#4487)
* Make width based on container width instead of slice width

* fix const var name and add comment

* Actually 30 looks good too
2018-02-28 15:48:15 -08:00
John Bodley 7440d34936 [payload] Fixing regression introducted in ##4396 2018-02-28 14:23:20 -08:00
Gabe Lyons 764a92cd10 [Explore] applying refresh chart overlay when chart is stale (#4486)
* adding refresh chart overlay when chart is out of sync with control panel

* fading the visualization when stale

* addressing comments from team on layout of UI
2018-02-28 14:19:06 -08:00
Maxime Beauchemin 849a2cecee Add https support for Druid (#4480)
* Add https support for Druid

* addressing comment
2018-02-28 10:12:17 -08:00
Maxime Beauchemin 264822b1ee Introduce an onInit method for when a new viz_type is selected (#4491)
* Introduce an onInit method for when a new viz_type is selected

This allows for clearing certain controls where/when needed. For
instance here, when loading deck_scatter, even if there was a time
granularity picked for the previous viz_type, we want to unselect it.

* making it functional
2018-02-27 22:36:52 -08:00
timifasubaa 404e2d552a fixes to csv - hive upload (#4488) 2018-02-27 22:13:06 -08:00
timifasubaa 8626793655 check for access before requesting access (#4469) 2018-02-27 17:43:37 -08:00
Maxime Beauchemin c2b42c49c6 Change limit form 50k to 10k (#4496) 2018-02-27 16:44:02 -08:00
Maxime Beauchemin 83524f97d7 [WiP] Cleanup & fix URL scheme for the explore view (#4490)
* Improve URLs

* Fix js tests
2018-02-27 15:08:06 -08:00
Grace Guo bcca1717f2 [dashboard] Fix JS error when position_json data is empty (#4485) 2018-02-27 10:18:32 -08:00
Hugh A. Miles II 11ea83ecf1 New Landing Page v1.0 (#4463)
* Updated welcome landing page

* fixed test and linting

* linting

* addressing comments

* fix test

* fix test

* remove unneeded var

* add magic comments
2018-02-26 17:02:41 -08:00
Gabe Lyons 56f65158a2 [Explore] highlighting run query when chart is stale on explore view (#4459)
* highlighting run query when chart is stale on explore view

* refactoring control changed code
2018-02-26 10:57:20 -08:00
Maxime Beauchemin 2932585c65 [geo] add controls for minRadiusPixels and maxRadiusPixels in deck_scatter (#4467) 2018-02-26 10:56:19 -08:00
John Bodley d57a37e341 [flake8] Adding flake8-coding (#4477) 2018-02-25 15:06:11 -08:00
Jinyang Zhou ff685db4d9 add organization (#4478) 2018-02-25 15:00:10 -08:00
Raffaele Spangaro 094eb71f86 [FilterBox] Make filterbox localizable (#4466)
* Make filterbox i18n

* Change double-quote to single-quote in localization function t() to pass
lint test

* Updated .po file with italian translation. New strings generated and translated via babel-extract
2018-02-25 14:58:14 -08:00
John Bodley e112e4417c [flake8] Adding future-import check (#4476) 2018-02-23 16:42:09 -08:00
John Bodley 8aac63e74c [flake8] Fixing additional flake8 issue w/ the presence of ignore (#4474) 2018-02-23 14:46:26 -08:00
Hugh A. Miles II cacf53c92e Pass param of limit for recent activity (#4475) 2018-02-23 14:18:06 -08:00
timifasubaa 5830846060 [hotfix] resolve utf-8 encoding issue in db migration (#4461)
* [hotfix] resolve utf-8 encoding issue in db migration

* make python string unicode

* Update e866bd2d4976_smaller_grid.py

* Update e866bd2d4976_smaller_grid.py

* rearrange the debug message

* Update e866bd2d4976_smaller_grid.py
2018-02-21 17:45:28 -08:00
Maxime Beauchemin 0eecec10cd [explore] allow URL shortner even if no slice exist (#4457)
recent regression perhaps from the PR that moved to using POST .
2018-02-21 10:35:38 -08:00
Maxime Beauchemin a373db24f0 Allowing config flag to turn off javascript controls (#4400)
* Allowing config flag to turn off javascript controls

* lint

* one line, avoiding mutation

* Setting JS fields as readOnly
2018-02-21 08:31:07 -08:00
Beto Dealmeida c3176579e0 Make instant controls store state in URL (#4449)
* Add to history on instant control change

* Update latestQueryFormData on render triggered

* Add new message type

* Update latestQueryFormData in UPDATE_QUERY_FORM_DATA
2018-02-20 17:08:07 -08:00
Maxime Beauchemin d4a2f4ef36 Make npm run dev-fast the default (#4454) 2018-02-20 17:07:33 -08:00
Gabe Lyons b60965b8fa [gitignore] Adding venv to .gitignore (#4456)
* fixing spacing issue on internationalization dropdown

* adding venv to gitignore
2018-02-20 17:07:16 -08:00
Maxime Beauchemin 5c35a2d210 A collection of bug fixes (#4444) 2018-02-20 14:41:35 -08:00
Gabe Lyons c336fe5707 fixing spacing issue on internationalization dropdown (#4455) 2018-02-20 14:13:46 -08:00
Maxime Beauchemin 177d7c07e6 [bugfix] address issue 4206 (#4452)
closes 4206
2018-02-19 09:56:25 -08:00
Grace Guo 5768a1fe5e for 48 columns layout, adjust default size and layout for newly added slices (#4446) 2018-02-19 00:05:57 -08:00
Ville Brofeldt d6c197f8ac Remove comments from queries in SQL Lab that break Explore view (#4413)
* Remove comments from queries in SQL Lab that break Explore view

This fixes an issue where comments on the last line of the source query comment out the closing parenthesis of the subquery.

* Add test case for SqlaTable with query with comment

This test ensures that comments in the query are removed when calling SqlaTable.get_from_clause().

* Add missing blank line class definition (PEP8)
2018-02-18 16:30:11 -08:00
m4neda f46bb533cb fix typo. "グルプ分け可能" => "グループ分け可能" (#4450) 2018-02-17 09:25:17 -08:00
Grace Guo 15aa0c5cdd remove html tag in timeout error message (#4447) 2018-02-16 19:44:29 -08:00
Maxime Beauchemin 88e91e6d8f Improve default placeholder text on SelectControl (#4442) 2018-02-16 15:16:55 -08:00
Ville Brofeldt dc48673647 Removed double call to ConnectorRegistry.sources (#4448)
Removing the double call didn't cause any adverse effects upon removal. If required, a comment motivating the double call should be added.
2018-02-16 15:16:25 -08:00
timifasubaa 7e082968dd Add link on how to get permission to permission error (#4408)
* add flag to config

* add troubleshooting link if there is a link

* nits
2018-02-15 20:28:03 -08:00
Hugh A. Miles II 9478291bf6 Added Example snippet for setting up Redis cache (#4434)
* Added Example snippet for setting up Redis cache

* Update installation.rst

* Update installation.rst
2018-02-15 20:27:03 -08:00
Beto Dealmeida 4ee0833b27 Play scrubber (#4336)
* Initial working prototype

* Small fixes

* Refactoring dekgl

* Show all data when no time grain is selected

* Refactor layers

* Standardize function name

* Fix exports

* Fix require

* Initial working prototype

* Small fixes

* Show all data when no time grain is selected

* Moving play bar to correct location

* Split component

* Working on CSS

* Remove control

* Positioning the play slider

* Fix refresh of slider state

* Fix lint

* Small fixes

* Smoother animation for scans

* Fix versions

* Play/pause with spacebar.

* Small fixes

* Clean stuff that went to other PRs

* Address issues

* Refactor scatter animation
2018-02-15 17:55:11 -08:00
Maxime Beauchemin 6e1d169d0f Change current thumbnails to smaller ones. (#4430)
* Change current thumbnails to smaller ones.

* More density in the VizTypesControl modal
2018-02-15 17:53:20 -08:00
Jeffrey Wang 7922ccfddc Pass in cache timeout for async queries (#4436)
* Pass in cache timeout for async queries

* Default cache timeout to 0 if default env var is not set

* check for 0 timeout
2018-02-15 17:53:00 -08:00
Jay Lindquist 0c87e23877 Fix separator visualization by propagating header height (#4437) 2018-02-15 17:48:57 -08:00
Jay Lindquist d6f1024d99 Make chart title backgrounds transparent to prevent buttonface color in IE (#4438) 2018-02-15 17:47:40 -08:00
Maxime Beauchemin 680bfc1b43 [dashboard] more granular grid layout (#4416)
Moving to a grid that is 4 times more granular. 48 columns.

Shipping a db migration script which will upgrade the position metadata
to reflect this change.

Also adapting the examples to the new grid parameters.
2018-02-15 17:47:19 -08:00
Hugh A. Miles II 1e99f9eb95 Added check cache key util (#4432)
* added check cache key util

* change docstring

* add has_access_api decorator
2018-02-15 13:43:58 -08:00
Raffaele Spangaro e943c25790 Updated Italian Translation (#4418)
* Updated Italian Translation

* Merging changes suggested by @xrmx

* Improved translation and typo fixed with changes suggest by @xrmx
2018-02-14 16:21:19 -08:00
Raffaele Spangaro 21e495c1ef Add .1s option to D3 Format dropdown (#4431) 2018-02-14 16:20:59 -08:00
timifasubaa fa0aa33767 Disable user access request (#4405)
* add feature flag to config

* wrap check around a feature flag

* add flag to the model view

* remove access request from seurity tests
2018-02-14 14:49:22 -08:00
Riccardo Magliocchetti 22d555b14e Bump dependencies with security issues (#4427)
* assets: bump mathjs to 3.20.2

* assets: bump moment to 2.20.1
2018-02-14 09:44:44 -08:00
Grace Guo 342180b263 [Explore view] Use POST method for charting requests (#3993)
* [Explore view] Use POST method for charting requests

* fix per code review comments

* more code review fixes

* code review fix: remove duplicated calls for getting values from request

* [Explore view] Use POST method for charting requests

* fix per code review comments

* more code review fixes

* code review fix: remove duplicated calls for getting values from request
2018-02-13 17:21:15 -08:00
Maxime Beauchemin d2d973153f Unset 'series limit' default from 50 to null (#4410)
Setting "Series Limit" by default results in a subquery (or 2 phase)
which can be suboptimal / unecessary where low cardinality dims
are used.
2018-02-13 11:17:19 -08:00
Chun-LingChen 5badec38e4 use full path in case of there are query params (#4411) 2018-02-13 11:17:02 -08:00
Maxime Beauchemin e0bbb0c77e [geo] introduce "Auto Zoom" control (#4389)
* [geo] introduce "Auto Zoom" control

On geospatial visualization, checking the "Auto Zoom" control makes it
such that the viewport is fitted to the data upon rendering the chart.

For dashboards with region filters, the map should jump to the right
position.

Eventually we should enhance this to fly and ease to the position in an
animated way.

* Added TODO notes
2018-02-13 11:10:15 -08:00
Grace Guo db24cef03b [SqlLab] Fix a few UI issues (#4401)
1. tab alignment css
2. if tabs are more than 1 row, need to calculate content area height
3. clean up height calculation.
2018-02-13 10:18:09 -08:00
mxmzdlv 4a6adb2f27 Check class name string instead of checking the instance (#4404)
This fixes an issue with the newer Google's DBAPI library, which moved Row from google.cloud.bigquery._helper.Row to google.cloud.bigquery.Row, causing ImportError
2018-02-12 21:16:42 -08:00
Maxime Beauchemin d85cd5a972 [error handling] 'Time Comparison' query returns no data (#4380) 2018-02-12 11:48:14 -08:00
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
https://github.com/apache/incubator-superset/commit/a7a6678d5ca535e29e6e021b7404c2e5c3599fdb

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
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
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
Nic e79d05fd77 #4058 Fix Oracle timestamps (Oracle "ORA-00907: missing right parenthesis" error) (#4065) 2017-12-15 21:31:09 -08:00
Maxime Beauchemin fc85756c20 [geo] turn off renderTrigger on viewport control (#4066)
For context, the viewport gets updated dynamically from the user
actions on the map. This is done on a timer every second or so to keep
the form data updated with the viewport settings.

With renderTrigger=true on that control that generates re-renders which
introduces glitches while zooming/panning. So turning it off as we don't
really expect users to input viewport info directly in the control
anyways.
2017-12-15 14:59:54 -08:00
John Bodley 6081f7161a [health] Adding DB check to /health (#4062) 2017-12-15 14:59:41 -08:00
Maxime Beauchemin c21513fb8c Adding rowcount label to explore view header (#4059) 2017-12-15 11:47:44 -08:00
Maxime Beauchemin ec752b1378 [geo] provide more flexible Spatial controls (#4032)
Before this PR the only way to query lat/long is in the shape of 2
columns that contains lat and long.

Now we're adding 2 more options:
* a single column that has lat and long with a delimiter in between
* support for geohashes - geohashes are cool
2017-12-15 11:47:27 -08:00
Maxime Beauchemin cf1d9ce1e6 Add db_engine_spec for Druid (#4063)
The `druiddb` pypi package provides a dbapi and sqlalchemy dialect for
Druid. This PR hooks adds some superset-specific conf.
2017-12-15 11:47:00 -08:00
Maxime Beauchemin 6188d60fec Bump dev version on trunk (#4048) 2017-12-12 21:29:19 -08:00
Maxime Beauchemin dfc28f37eb Changelog for 0.21.0 (#4045)
* Changelog for 0.21.0

* more entries
2017-12-12 21:29:01 -08:00
Maxime Beauchemin 23c834f04e Fix the pypi build (#4047) 2017-12-12 18:12:26 -08:00
Hugh A. Miles II c84211ec44 Change reference for slices to chart (#4049)
* change reference for slices to chart

* change profile page reference

* change reference for Associated Slices

* change back to single quotes

* fix other single quotes

* linting

* last one

* fix test
2017-12-12 18:02:17 -08:00
Jeff Niu 7d374428d3 [Bugfix] _add_filters_from_pre_query doesn't handle dim specs (#3974)
* Fixed _add_filters_from_pre_query for dimension specs

* add_filters_from_pre_query ignores extraction functions
2017-12-11 12:35:25 -08:00
John Bodley 3a2974f589 [API] Deprecate /update_role/ API endpoint (#4041) 2017-12-10 21:14:15 -08:00
timifasubaa 3ed8f5fc23 resolve python2 str() issue (#4030)
* make string conversion use utf8

* Update viz.py

* make utf-8 consistent with other usages

* Update viz.py

* Update viz.py
2017-12-09 14:23:24 -08:00
Grace Guo 61755f0b7d apply custom css for dashboard initially load (#4031) 2017-12-07 16:56:40 -08:00
fabianmenges 0a3d2fccd4 [BUGFIX]: Fixing dttm_sql_literal to use python_date_format when specified. (#3891) 2017-12-07 16:38:22 -08:00
Maxime Beauchemin 0b40c8a26f Add fastdom js dependency (#3947)
The nvd3 docs say that it if the fastdom library is present it makes use
of it.

"Including Fastdom in your project can greatly increase the performance
of the line chart (particularly in Firefox and Internet Explorer) by
batching DOM read and write operations to avoid layout thrashing. NVD3
will take advantage of Fastdom if present."
2017-12-07 16:36:46 -08:00
Beto Dealmeida 81df7087db Remove unused callbacks when setting state (#4015) 2017-12-06 21:56:28 -08:00
Jeff Niu cb7c5aa70c Fixed finding postaggregations (#4017) 2017-12-06 21:55:43 -08:00
Maxime Beauchemin 5bc581fd44 New time_pivot visualization (#3941)
* New time_pivot visualization

* Minor tweaks

* Addressing comments
2017-12-06 21:50:33 -08:00
Maxime Beauchemin 5ee70b244b Add type MONEY as numeric type (#3959)
fixes https://github.com/apache/incubator-superset/issues/3953
2017-12-06 21:49:42 -08:00
Maxime Beauchemin a26cf001c4 Add row_limit to heatmap controls (#3969) 2017-12-06 21:49:27 -08:00
Dmitry Goryunov e02d35ed5c Add support of another DatabaseError format (#4019) 2017-12-06 21:49:03 -08:00
rumbin e98a1c3537 asciifying http header for csv download; fixes #3952 (#3975)
* asciifying http header for csv download; fixes #3952

* fixed order of imports and added unidecode to requirements in setup.py
2017-12-05 12:04:58 -08:00
timifasubaa 4404751a1d Add has_access to import_dashboard (#4001)
* Add has_access to import_dashboard

* Update core.py

* Update core.py
2017-12-05 12:03:13 -08:00
Maxime Beauchemin defe6789c0 [sql lab] fix position of 'save query' Popover (#3999)
* [sql lab] fix position of 'save query' Popover

The "Save Query" popover renders on the upper left corner as opposed to
where it should (relative to the Save Query button). After a bit of
research, it seems like Popover won't render in the right place when
parents are absolute.

I'm guessing this stopped working properly when I added the resizable
panes.

Anyhow, the solution here is to use a modal instead.

* Fixing tests
2017-12-05 11:37:13 -08:00
Beto Dealmeida 823f306f24 Call props.onChange only when closing filter (#4003) 2017-12-05 11:17:12 -08:00
fabianmenges 72627b1761 Adding YAML Import-Export for Datasources to CLI (#3978)
* Adding import and export for databases

* Linting
2017-12-05 11:14:52 -08:00
Alan Cruickshank 1702b020be Rollback bulk-delete of table columns (#4009)
Fix likely required upstream in FAB before we can properly enable this.
2017-12-05 11:14:21 -08:00
Grace Guo 89f6ccc1c6 Add Datasource Name filter under slice list view (#4000) 2017-12-04 13:45:36 -08:00
Maxime Beauchemin eff5952641 Alternate PR to #3970 (#3997) 2017-12-04 08:19:51 -08:00
rumbin f10395b2f7 [doc] added setting X-Forwarded-Proto to https behind reverse proxy with ssl encryption; fixes #3655 (#3976) 2017-12-03 22:00:58 -08:00
Maxime Beauchemin b2647567c0 Create CODE_OF_CONDUCT.md (#3991) 2017-12-02 14:57:54 -08:00
Grace Guo 028456572b [Dashboard] fix a filter refresh bug and add Test (#3967) 2017-12-01 10:58:55 -08:00
Maxime Beauchemin 84a7730f47 [docs] making it clear sqlite shouldn't be used in a cluster (#3965) 2017-11-30 22:06:16 -08:00
Chris Williams 76a2f95231 [time series table] visual improvements (#3957)
* [time series table] visual improvements

* [time series table] don't set cell color if text color isn't set
2017-11-30 20:48:17 -08:00
michellethomas 9904593dc3 Improving speed of dashboard import (#3958)
* Improve dashboard import

* Updating tests for Slice.import_obj
2017-11-30 20:47:22 -08:00
Jeff Niu 8f00e9e30b [Bugfix] Druid run_query dimensions part 3 + Unit tests (#3949)
* Fixed and added tests for druid run query

* Fixes style and python3
2017-11-30 20:32:53 -08:00
Maxime Beauchemin 16ab696d7c [country_map] use Albers USA projection (#3946)
* [country_map] use Albers USA projection

* Minor touchups

* Adding color scheme
2017-11-30 14:09:53 -08:00
Maxime Beauchemin 1ce14df43d fix 'superset db history' (#3948)
* fix 'superset db history'

Related Error msg when running `superset db history`:
"NameError: Can't invoke function 'get_bind', as the proxy object has not
yet been established for the Alembic 'Operations' class.  Try placing
this code inside a callable."

* Lint
2017-11-29 20:52:56 -08:00
michellethomas 34d6618b2e Allow underscores in slugs (#3951)
* Allow underscores in slugs

* Switching regex to use shorter \w
2017-11-29 14:55:13 -08:00
Riccardo Magliocchetti abdd1d537f config: bring back sqlite default database (#3955)
That became postgres in 268edcf

Fix #3954
2017-11-29 10:03:01 -08:00
Maxime Beauchemin d9fda346cb Add an "Edit Mode" to Dashboard view (#3940)
* Add a togglable edit mode to dashboard

* Submenu for controls

* Allowing 'Save as' outside of editMode

* Set editMode to false as default
2017-11-28 09:10:21 -08:00
Jeff Niu 6cbe0e6096 Fixed branching condition with dimension spec (#3920) 2017-11-27 21:12:20 -08:00
timifasubaa 268edcfedd Import CSV (#3643)
* add upload csv button to sources dropdown

* upload csv to non-hive datasources

* upload csv to hive datasource

* update FAQ page

* add tests

* fix linting errors and merge conflicts

* Update .travis.yml

* Update tox.ini
2017-11-27 21:07:12 -08:00
Maxime Beauchemin c5ddf57124 Fix call in Chart (#3945) 2017-11-27 21:06:47 -08:00
kkalyan f9202ba179 minor filter select enhancements (#3933)
* `values_for_column` configurable row limit

* `FilterControl` cancels active ajax request if any
2017-11-27 21:05:53 -08:00
Alan Cruickshank 17635e1a2b Make Table Columns & Metrics Bulk-deletable (#3929) 2017-11-25 23:05:51 -08:00
John Bodley 285197926e [travis] Standardizing before_install (#3922) 2017-11-21 22:10:17 -08:00
Jeff Niu 5466fab2a0 Switched to span instead of textarea for copytoclipboard (#3923) 2017-11-21 22:09:41 -08:00
Jeff Niu ed85032277 Moved percent metrics to its own row (#3924) 2017-11-21 22:08:15 -08:00
Maxime Beauchemin 680e1cbb42 Revert "Filter out unavailable databases (#3875)" (#3918)
This reverts commit ae2205aeb5.
2017-11-21 12:58:47 -08:00
Maxime Beauchemin 2d37dec5ff [bugfix] remove quotes from Postgres time grains (#3913) 2017-11-21 11:24:17 -08:00
Maxime Beauchemin 3f4c306bd6 Fix left padding in dashboard widgets (#3915) 2017-11-21 10:24:28 -08:00
Maxime Beauchemin ac432495d7 [cosmetic] remove border from table viz (#3916) 2017-11-21 10:23:48 -08:00
michellethomas 12fb7c1a62 When checking if you should renderTriggered make sure key exists in controls (#3912) 2017-11-21 10:22:55 -08:00
Yu Xiao feb15a30a2 fix the schema-fetching problem for impala in sql_lab (#3906)
* fix the schema-fetching problem for impala in sql_lab

* delete redundant print

* remove blank lines...

* minior corrections
2017-11-21 09:28:31 -08:00
Alan Cruickshank eb0f3970cf Add UK Metropolitan Districts and Isle of Man (#3911) 2017-11-20 18:06:58 -08:00
Maxime Beauchemin b82d15af76 Bumping webpack related deps (#3904) 2017-11-20 15:27:02 -08:00
Maxime Beauchemin 32b38ee2d6 [bugfix] allow limiting word cloud (#3902) 2017-11-20 10:32:14 -08:00
Maxime Beauchemin 1d702f2142 Fixes default hanlding in Altered slice tag (#3903) 2017-11-20 08:43:38 -08:00
bolkedebruin 4ae77ba8af Workaround pandas bug in datetimes with time zones (#3910)
A bug in to_dict(orient="records") in pandas/core/frame.py prevents
datetimes with time zones to be worked with. This works around the
issue in superset by re-implementing the logic of pandas in the
correct way. Until pandas fixes the issue this code should stay.

https://github.com/pandas-dev/pandas/issues/18372

This closes #1929
2017-11-20 08:33:18 -08:00
John Bodley 3c72e1f8fb [3541] Augmenting datasources uniqueness constraints (#3583) 2017-11-19 20:09:18 -08:00
John Bodley 4bfe08d7c3 [druid] Fixing issue 3894 multi-processing w/ Gunicorn (#3895) 2017-11-18 21:40:40 -08:00
John Bodley 3a7ed8d194 [druid] Catch IOError when fetching Druid datasource time boundary (#3897) 2017-11-17 20:20:47 -08:00
John Bodley 4d204b3b36 [druid] Renaming refresh_async method (#3899) 2017-11-17 20:11:44 -08:00
Alan Cruickshank 39ee33aeff Add datasource to the SliceAddView modal (#3884) (#3900) 2017-11-17 20:11:23 -08:00
Grace Guo 831cd21737 [dashboard bug]Instant control should take effect instantly (#3890)
in explore view, controls like color cheme, legend, rich tooltip, etc., change these controls should see effect instantly, without click Run Query.
2017-11-17 16:34:53 -08:00
Maxime Beauchemin a82bb588f4 Allow users to specify label->color mapping (#3879)
Users can define `label_colors` in a dashboard's JSON metadata that
enforces a label to color mapping.

This also makes the function that maps labels to colors case insensitive.
2017-11-17 15:56:04 -08:00
michellethomas a84bd5225c Only refreshing non instant filters on apply (#3893) 2017-11-17 12:52:48 -08:00
John Bodley f0acc11249 [druid] Fix datasource column enumeration (#3896) 2017-11-16 22:41:54 -08:00
Grace Guo fa35d7d2f4 fix input height to match with react-select (#3852) 2017-11-16 11:50:32 -08:00
Maxime Beauchemin e65aba3c46 Fixing the build's linting errors (#3887)
master has new linting rules, PRs got merged with lint that was ok at
branching but not ok in masert anymore
2017-11-16 11:18:33 -08:00
Maxime Beauchemin fab7b1083b A better looking favicon (#3851) 2017-11-16 10:14:54 -08:00
Maxime Beauchemin d9161fb76a Fix slug function (#3876) 2017-11-16 09:47:00 -08:00
Maxime Beauchemin 85b18ff5e7 [table] show 'Time' column header instead of '__timestamp' (#3880) 2017-11-16 09:33:42 -08:00
Maxime Beauchemin 3a8af5d0b0 DECKGL integration - Phase 1 (#3771)
* DECKGL integration

Adding a new set of geospatial visualizations building on top of the
awesome deck.gl library. https://github.com/uber/deck.gl

While the end goal it to expose all types of layers and let users bind
their data to control most props exposed by the deck.gl API, this
PR focusses on a first set of visualizations and props:

* ScatterLayer
* HexagonLayer
* GridLayer
* ScreenGridLayer

* Addressing comments

* lint

* Linting

* Addressing chri's comments
2017-11-16 00:30:02 -08:00
Maxime Beauchemin 1c545d3a2d Further refactoring around dashboards (#3843)
I was wondering what was left to do in order to remove Dashboard.jsx
and superset.js, and it looks like they can just be pulled out.

I am so happy to get rid of what used to be the messiest JS files in the
whole repo.

Thanks @graceguo!
2017-11-16 00:27:15 -08:00
Grace Guo 120a5d08f9 [dashboard bug] Fix standalone slice (#3877) 2017-11-15 12:38:07 -08:00
Riccardo Magliocchetti b586cb0ba7 Add mailing list and move screenshot at the end of README (#3872)
* README: add the mailing list

And mark the google group as deprecated

* README: move the screenshots at the end

So hopefully it'll be easier to find the resources
2017-11-15 08:40:18 -08:00
Dmitry Goryunov ae2205aeb5 Filter out unavailable databases (#3875) 2017-11-15 08:39:43 -08:00
John Bodley 2e25fc4161 [issue] Resolving issue 2530 (#3865) 2017-11-14 21:13:00 -08:00
John Bodley ba89b2d091 [cache] Fixing cache key w/ merged extra filters (#3809) 2017-11-14 21:12:26 -08:00
michellethomas aee8438924 Fixing an issue with stripping filter values (#3869) 2017-11-14 19:22:03 -08:00
John Bodley a6ba841e57 [flake8] Updaing CONTRIBUTING.md (#3862) 2017-11-14 18:17:53 -08:00
Grace Guo 8643228b51 [Dashboard bug] Fix merged filter param name (#3866)
front-end merge time filter params, and update query with param name 'extra_filters'
2017-11-14 12:28:55 -08:00
Grace Guo de869973c7 Fix cachedDttm prop type (#3858) 2017-11-14 08:14:59 -08:00
John Bodley ac57780607 [flake8] Resolving Q??? errors (#3847) 2017-11-13 21:06:51 -08:00
Mike Schiller 630604bc6b adding support for getting list of foreign tables for PostgreSQL (#3856)
* adding support for getting list of foreign tables for PostgreSQL

* need extra newline to pass lint
2017-11-13 21:05:22 -08:00
Grace Guo eb5d220b5e [Dashboard bug] Slice doesn't show loading icon when loading (#3834) 2017-11-13 16:07:15 -08:00
Grace Guo 3f076b00cd [Dashboard bug]Fix userId prop in Explore view Save_Modal (#3857)
For userId, the attribute name in bootstrap data is user_id
2017-11-13 16:06:45 -08:00
Maxime Beauchemin 514f9452f3 [sql lab] minor cosmetic touchups on Run / Save buttons (#3850) 2017-11-13 12:39:28 -08:00
Maxime Beauchemin 068c343be0 [sqllab] fix wrong error msg (#3849)
I was getting some "Could not connect to server" when there was
a proper json payload with an `error` key, the change here makes sure to
prioritize those messages over the generic one.
2017-11-12 21:24:20 -08:00
Maxime Beauchemin 500455fc72 Add CHANGELOG.md entries for 0.20.0 to 0.20.5 (#3842) 2017-11-12 11:28:37 -08:00
John Bodley 1b4f128f55 [flake8] Resolving F5?? errors (#3846) 2017-11-12 11:09:22 -08:00
Grace Guo 1a3a8daf49 [Dashboard bug] should reset chartAlert when start new query (#3841) 2017-11-11 22:38:40 -08:00
王洁玉 7fce8eab3a Update setup.py (#3510) 2017-11-11 21:51:53 -08:00
Grace Guo b4c9402737 [Dashboard bug] Fix Cache status and dttm information display for each slice (#3833) 2017-11-11 21:51:25 -08:00
Grace Guo 8459347bdc [Dashboard bug] should reset chartAlert when start new query (#3837) 2017-11-11 21:45:29 -08:00
Riccardo Magliocchetti f7bf17290c run_tests.sh: call coveralls only on CI (#3836) 2017-11-11 21:44:55 -08:00
John Bodley d908e48d61 [slice] Removing deprecated argument (#3838) 2017-11-11 21:44:24 -08:00
John Bodley a3a4687ebf [viz] Fix payload force logic (#3839) 2017-11-11 21:43:55 -08:00
Jeff Niu 4d48d5d854 [Explore] Altered Slice Tag (#3668)
* Added altered tag to explore slice view and fixes #3616

* unit tests

* Moved getDiffs logic into AlteredSliceTag

* code style fixs
2017-11-10 21:33:31 -08:00
Maxime Beauchemin 83e6807fa0 [docs] add StatsD setup instructions (#3813) 2017-11-10 17:54:56 -08:00
John Bodley ba96984048 [flake8] Resolving E3?? errors (#3814) 2017-11-10 17:52:34 -08:00
Maxime Beauchemin 591e5ec32e Bump celery to 4.1.0 (#3831)
* Bump celery to 4.1.0

* Also bumping boto3 to allow for celery 4 on SQS
2017-11-10 16:28:56 -08:00
John Bodley 690de862e8 [flake8] Resolve E1?? errors (#3805) 2017-11-10 12:06:22 -08:00
John Bodley 35810ce2bf [docstring] Refining warm_up_cache comment (#3815) 2017-11-10 08:05:20 -08:00
Grace Guo 6c52f2ff72 First time fetching chart should not force refresh. (#3822) 2017-11-09 21:48:05 -08:00
Alan Cruickshank d663bea5e6 Basic German Translation (#3740)
Not complete but most of the core interface
2017-11-09 20:45:37 -08:00
John Bodley 1ea4521d0c [flake8] Resolving E7?? errors (#3816) 2017-11-09 20:23:59 -08:00
John Bodley c4153c0bbe [flake8] Resolving E4?? errors (#3817) 2017-11-09 20:23:47 -08:00
Hugh A. Miles II ae8b249dc2 Added /healthcheck endpoint for integrations with envoy (#3819)
* fixed mergeconflicts

* fixed mergeconflicts forreal this time

* added healthcheck test
2017-11-09 20:23:28 -08:00
Prasanna Swaminathan 9500f0aae3 Fix typo in installation.rst (#3818)
`superser runserver` should be `superset runserver`
2017-11-09 20:22:45 -08:00
Maxime Beauchemin be3da6396f Fix misleading SQL Lab timeout error message (#3825) 2017-11-09 19:09:16 -08:00
Grace Guo 330926c167 fix error message format when long query timeout (#3823) 2017-11-09 19:07:49 -08:00
michellethomas cbcc00c929 Make overflow important to allow scrolling on dashboard (#3810) 2017-11-08 20:35:45 -08:00
John Bodley d03b74f754 [flake8] Resolving F4?? errors (#3811) 2017-11-08 20:34:33 -08:00
John Bodley ec21d5af21 [flake8] Resolving E2?? errors (#3812) 2017-11-08 20:34:23 -08:00
michellethomas 70c7315ae0 Making time table viz scrollable (#3808) 2017-11-08 16:18:59 -08:00
Grace Guo 4fa1f0ab17 Dashboard refactory (#3581)
Create Chart component for all chart fetching and rendering, and apply redux architecture in dashboard view.
2017-11-08 10:46:21 -08:00
Maxime Beauchemin 39e502faae Stamping version to 0.21.0dev (#3801)
Making it clear that master has a `dev`-suffixed version. Proper release
number will be created in release branches.

There are constraints as to what npm and setuptools will accept as a
proper version number and N.N.Ndev seems to work so I'm rolling with it

Open to suggestion as to how to tag `master`
2017-11-08 09:47:41 -08:00
Ishpreet Singh 0280bc52e0 Allowing Leading and Trailing spaces in connection (#3433) 2017-11-07 22:13:18 -08:00
Jeff Niu dee47864c4 Fixed single extraction dimension error (#3796) 2017-11-07 21:35:56 -08:00
John Bodley 17623f71d4 [flake8] Resolving C??? errors (#3787) 2017-11-07 21:32:45 -08:00
Magicansk 7453131858 Update messages.json (#3716)
* Update messages.json

* Update messages.json
2017-11-07 20:28:47 -08:00
John Bodley e822fb50d8 [flake8] Resolving W??? errors (#3784) 2017-11-07 20:25:10 -08:00
John Bodley e2bca47421 [flake8] Resolve I??? errors (#3797) 2017-11-07 20:23:40 -08:00
Maxime Beauchemin 7987cb794b Add Lyft and Twitter to list of companies (#3789) 2017-11-07 17:07:14 -08:00
Chris Williams 7483e2c942 [time table] use sparkData values in tooltip (#3794) 2017-11-07 15:52:51 -08:00
michellethomas e6129eb492 Adding back iso and correctly filtering iso from contrib total (#3793) 2017-11-07 13:34:31 -08:00
michellethomas b10aca2de1 Removing iso from data (#3788) 2017-11-06 23:29:02 -08:00
John Bodley 02cbad59de [flake8] Resolving F8?? errors (#3778) 2017-11-06 21:15:36 -08:00
Stephanie Rivera ccb87d337c Rename files to allow RPM build (#3785)
I was having issues getting an RPM to build. My error was

Processing files: superset-0.20.1-1.noarch
error: File must begin with "/": Lockup
error: File must begin with "/": With
error: File must begin with "/": Text.svg
error: File must begin with "/": Lockup
error: File must begin with "/": With
error: File must begin with "/": Text@2x.png
error: File must begin with "/": Lockup
error: File must begin with "/": Without
error: File must begin with "/": Text@1x.svg
error: File must begin with "/": Lockup
error: File must begin with "/": Without
error: File must begin with "/": Text@2x.png
error: File must begin with "/": Mark.png
error: File must begin with "/": Mark@1x.svg

for ref https://github.com/pypa/setuptools/issues/767
File renaming fixes this issue
2017-11-06 17:13:53 -08:00
John Bodley 63a49983eb [falke8] Resolving F6?? errors (#3783) 2017-11-06 16:56:03 -08:00
Maxime Beauchemin 81dd622fdb [explore] using verbose_name in 'Time Column' control (#3529) 2017-11-06 15:21:34 -08:00
Jeff Niu 9a49b1c41d [Performance] VirtualizedSelect for SelectControl and FilterBox (#3654)
* Added virtualized select to SelectControl, allow onPaste to create new options

* Added unit tests

* Added virtualized/paste select to filterbox
2017-11-06 15:20:13 -08:00
Alejandro Fernandez b059506afa DI-1113. ADDENDUM. Authentication: Enable user impersonation for Superset to HiveServer2 using hive.server2.proxy.user (a.fernandez) (#3697) 2017-11-06 10:20:38 -08:00
John Bodley 13c17e1526 [flake8] Enabling flake8 linting (#3776) 2017-11-04 22:50:42 -07:00
John Bodley 8e3217a921 [sql-lab] Fixing Run Query tooltip (#3774) 2017-11-04 00:10:47 -07:00
michellethomas aed7c7436a Fix dashboard export download (#3773) 2017-11-04 00:10:02 -07:00
Chris Williams 7f3edad119 [time table] add tooltip to sparkline (#3767)
* [time table] add tooltip to sparkline

* [time table] open link in new tab

* [time table] add back Mustache
2017-11-03 12:37:15 -07:00
Stephanie Rivera 7fd9c82ae8 Update to reflect new version of cryptography (#3748)
update to 1.9

I have built and pip installed with latest cryptography.
2017-11-02 13:51:17 -07:00
Riccardo Magliocchetti f3c7052f30 docs: reword the FAQ regarding table changes (#3763)
So we stop confusing people that thinks we do DDL.

Fix #3761
2017-11-02 13:50:11 -07:00
Dmitry Goryunov 326d90a5e4 add stackoverflow tag (#3764) 2017-11-02 13:49:47 -07:00
Maxime Beauchemin cccc47311b Add dummy file to fix symlink (#3759)
In `assets/static` we have a symlink pointing to `docs/_build/html`
which is .gitignored and missing in the repo since we don't want the
html-generated docs in the repo, meaning the symlink is broken

Having the symlink broken creates issues with pip-compile somehow.

Adding a dummy file here addresses that
2017-11-02 10:17:28 -07:00
Grace Guo 5c03167948 fix https://github.com/apache/incubator-superset/pull/3726 (#3751) 2017-11-01 21:07:44 -07:00
Alan Cruickshank 87b6d76c32 Consolidate all translation config (#3750)
Move all translation config to superset/translations
2017-11-01 20:13:22 -07:00
Maxime Beauchemin abfa03474c Bumping react-select to rc10 (#3726) 2017-10-31 22:03:18 -07:00
mxmzdlv 5bc734b2e5 Fix has_table method (#3741)
Dialect's has_table method requires connection as the first argument, not engine (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/interfaces.py#L454). Instead, we can use engine's has_table method that handles the connection for us (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/base.py#L2141). Alternatively, we could call engine.dialect.has_table(engine.connect(), ...).
2017-10-30 21:04:23 -07:00
Ryan Harmuth 814b70ffd8 Escape columns names for time grains - postgres (#3736) 2017-10-30 21:02:46 -07:00
Baldo Alessandro 1e18bfdea4 Fix 3657 (#3739)
* Reorders MANIFEST.in

* Includes the translations dir in MANIFEST
2017-10-30 11:26:42 -07:00
michellethomas 200b66d088 Using indexOf instead of includes for isXAxisString (#3733) 2017-10-27 16:00:44 -07:00
Grace Guo cbd01074ba bump react-bootstrap version (#3723)
1. avoid exports is not defined error
2. per jordan's suggestion, update .babelrc only use airbnb presets
2017-10-26 23:10:00 -07:00
Maxime Beauchemin 1582fa1964 Add CRUD action to refresh table metadata (#3721)
A shortcut to make it easy to refresh a table's schema
2017-10-26 16:17:56 -07:00
Maxime Beauchemin a9b6d11ade Validate JSON in slice's params on save (#3720)
fixes https://github.com/apache/incubator-superset/issues/3507

This prevents malformed JSON from getting saved in a slice's params. It
also prevents the issue described in #3507 from happening though as a
result malformed slices will render using default control values.
2017-10-26 16:16:21 -07:00
Maxime Beauchemin c4b6324e74 Fix box_plot NaN issue (#3722)
fixes https://github.com/apache/incubator-superset/issues/3712
2017-10-26 12:00:22 -07:00
Magicansk 9432ea80be Update messages.po (#3715)
[Chinese Translation]
2017-10-25 23:26:38 +00:00
Rogan f412b4c158 Missing the data of one province and two regions of China (#3686) 2017-10-25 22:27:18 +00:00
Rogan 547a3bf4e7 Fix the ISO code description of region/province/department (#3685)
* Fix the ISO code description of region/province/department

*  Missing the data of one province and two regions of China

* Revert " Missing the data of one province and two regions of China"

This reverts commit abff4555cd.
2017-10-25 00:58:54 +00:00
Maxime Beauchemin e97dc9d3cb Set logging level to debug for DummyStatsLogger (#3662) 2017-10-25 00:50:15 +00:00
Jeff Niu efae14592e fixes for bugs in #3689 (#3692) 2017-10-24 21:58:15 +00:00
Angus Ma 1d06495629 add VIPKID to the orgs. (#3703) 2017-10-24 21:30:54 +00:00
Jeff Niu ffdfdb94ab changed metric heading from h1 to h3 (#3696) 2017-10-24 21:30:31 +00:00
Yu Xiao 8d7e97a26e [translation] added japanese support (#3713)
* [translation] added japanese support

* fix
2017-10-24 21:29:00 +00:00
Maxime Beauchemin f8b8f6a343 [minor] fix label showing description in time_table's URL (#3663) 2017-10-24 21:27:53 +00:00
Grace Guo 4967342362 fix the slice permission issue after user click-edit new slice title (#3711) 2017-10-24 11:19:51 -07:00
John Bodley 9893847991 [form-data] Quoting form data (#3701) 2017-10-24 10:08:08 -07:00
Grace Guo 18e9640d99 fixing the datasource inconsistence but in visualize flow (#3698)
datasource in landing explore view is not the datasource created in sal lab.
2017-10-23 20:29:49 -07:00
Maxime Beauchemin 58ea736ed6 [cleanup] removing print() artefacts (#3683) 2017-10-23 15:48:47 -07:00
Jay Lindquist b4bdc45a6b Add support for IE 11 for markup slices (#3702)
* Add srcdoc-polyfill tosupport Internet Explorer iframes in markup slices. Add allow-top-navigation and allow-popups to support links within iframes

* Remove jquery from markup.js
2017-10-23 15:35:15 -07:00
michellethomas fa07b8d51b defaultSort should be false when no sort is necessary (#3693) 2017-10-23 11:17:28 -07:00
Jeff Niu e121a8585e [Feature] Percentage columns in Table Viz (#3586)
* Added percent metric options to table viz

* Added unit tests for TableViz

* fixed code for python3

* bump travis
2017-10-16 20:16:20 -07:00
Alejandro Fernandez adef519583 DI-1113. Authentication: Enable user impersonation for Superset to HiveServer2 using hive.server2.proxy.user (a.fernandez) (#3652) 2017-10-16 20:15:16 -07:00
Maxime Beauchemin 08f09b4761 [minor] fix padding in Time Table (#3664)
When in dashboard view, the Time Table needs some paddding
2017-10-16 17:01:35 -07:00
Jeff Niu 2a89c90e0b unit tests for OptionDescription component (#3678) 2017-10-16 16:31:43 -07:00
michellethomas ce5fa379ec Avoid dividing by zero for sparkline in time table viz (#3679) 2017-10-16 16:31:07 -07:00
timifasubaa d4d4a9b1f1 Sqllab error troubleshooting (#3680)
* provide troubleshooting link

* add option to append error troubleshooting link beneath sqllab error
2017-10-16 16:30:08 -07:00
Maxime Beauchemin d0b5b449b2 Add a ColorPickerControl (#3653)
* Add a ColorPickerControl

* Tests
2017-10-15 23:38:38 -07:00
Jeff Niu bad6938d1a [New Viz] Partition Diagram (#3642)
* Added Partition Visualization

* added unit tests
2017-10-12 21:54:59 -07:00
timifasubaa 48e28eff9b Add description for running specific test (#3665) 2017-10-12 20:53:37 -07:00
michellethomas f87163413b Making the sort order for metrics pull from fd for time table viz (#3661) 2017-10-12 17:51:26 -07:00
Ali Cirik 52a9f2742b Make columns that return an exception on click unsortable. (#3417) 2017-10-11 22:36:12 -07:00
michellethomas 7f07fbefbc Adding sort time table (#3651)
* Updating time_table component to sort

* Removing old sort
2017-10-11 21:25:17 -07:00
Ganesh Krishnan 93660c6838 added aihello as superset user. (#3647) 2017-10-11 21:17:54 -07:00
Maxime Beauchemin 3ebadbcda9 Fix #3612 - reverse sign in difference calculation (#3646) 2017-10-11 21:14:39 -07:00
Denny Biasiolli 3df3e0d681 Fixing some warnings during tests (#3648)
* ColorSchemeControl: fixing bad use of PropTypes

Accessing PropTypes via the main React package is deprecated, and will be
removed in React v16.0. Use the latest available v15.* prop-types package from
npm instead. For info on usage, compatibility, migration and more, see
https://fb.me/prop-types-docs

* Control: adding PropTypes.func in types allowed inside `value` prop

This removes a warning during yarn tests

Fix #3589

* tests(QueryStateLabel): removing missing prop warning

```
Warning: Failed prop type: The prop `query` is marked as required in
`QueryStateLabel`, but its value is `undefined`.
    in QueryStateLabel
```

* SaveQuery: removing invalid prop `target` supplied to `Overlay`.

This removes a warning during yarn tests:

```
Warning: Failed prop type: Invalid prop `target` supplied to `Overlay`.
```

* RunQueryActionButton: removing `isRequired` from queryState props

This removes a warning during yarn tests:
```
Warning: Failed prop type: The prop `queryState` is marked as required in
`RunQueryActionButton`, but its value is `null`.
```
2017-10-11 21:07:52 -07:00
Jeff Niu 4a3c09187a [Translations] Restored lost French translations (#3645)
* Added some missing translations

squash

* Restored previous French translations
2017-10-10 17:52:39 -07:00
Maxime Beauchemin 76f8d33d81 [sql lab] fix impersonation + template issue (#3644)
When the database impersonation flag is on, a query using a template
fails. It has to do with templating using a database connection without
a username being specified by the caller, along with the fact that the
work is taking place on a worker, outside a web request, where
referencing g.user raises this exception.
2017-10-10 17:52:22 -07:00
Maxime Beauchemin 6cc6637454 Pin moment.js library since 2.19.0 creates problem (#3641)
The 2.19.0 released today (2017-10-10) creates issues with the
DateFilterControl somehow. Pining lib to latest known version.
2017-10-10 15:53:03 -07:00
Maxime Beauchemin d7f8a7fde3 [time_table] adding support for URLs / links (#3600)
Using Mustache templating and providing {{ metric }} as well as
{{ ...formData }} as context.
2017-10-10 11:54:21 -07:00
michellethomas 80eb9c2c64 Set tooltip to show extent of sparkData (#3626)
* Set tooltip to show extent of sparkData

* Using d3format instead of round
2017-10-10 11:53:53 -07:00
Grace Guo bd45e3b19a add explicit message display for 'Fetching Annotation Layer' error (#3631) 2017-10-10 11:49:53 -07:00
Maxime Beauchemin b866b33dee [bugfix] Template rendering failed: '_AppCtxGlobals' object has no attribute 'user' (#3637)
Somehow the nature of `g` in Flask has changed where `g.user` used to
be provided outside the web request scope and its not anymore.

The fix here should address that.
2017-10-10 11:46:28 -07:00
Grace Guo 8994bdacbd fix long title text wrapping in editable-title component (#3638)
fix https://github.com/apache/incubator-superset/issues/3628
2017-10-10 11:45:48 -07:00
Maxime Beauchemin f3b403d346 [minor] proper tooltip on ControlHeader's instant re-render trigger (#3625) 2017-10-09 23:28:14 -07:00
Yu Xiao 5ad4167512 add annotation option and a linear color map for heatmap viz. (#3634)
* add annotation option and a linear color map for heatmap viz.

* error fixes.

* fixes for requested changes
2017-10-09 23:17:51 -07:00
Maxime Beauchemin ca67a7a4e9 [bugfix] empty From date filter NoneType error (#3633)
Error "AttributeError: 'NoneType' object has no attribute 'split'" is
fired.
2017-10-09 20:59:11 -07:00
Riccardo Magliocchetti 64ef8b14b4 remove unused imports (#3621)
* superset: remove unused imports

Spotted by pyflakes

* superset: removed unused get_session
2017-10-08 21:04:09 -07:00
Jeff Niu 912c6f6231 fixing date/time filter keys (#3611) 2017-10-07 13:07:23 -07:00
Maxime Beauchemin 6f1351fbbb [bugfix] #3593 'Chart Options' panel is missing (#3606) 2017-10-06 00:43:55 -07:00
Maxime Beauchemin f75dc0271d Removing git artifact (#3601) 2017-10-05 09:25:05 -07:00
Maxime Beauchemin 1fb8716231 [hotfix] fixing issues around new time_table viz (#3599) 2017-10-04 16:22:11 -07:00
Maxime Beauchemin ed212440b5 [hofix] work around circular deps (#3598)
* [hofix] work around circular deps

* lint
2017-10-04 14:48:32 -07:00
Maxime Beauchemin 1528288b59 [time table] fix reversed ratio (#3597) 2017-10-04 13:11:02 -07:00
Jeff Niu 7c936e7f60 [Feature/Bugfix] Datepicker and time granularity options to dashboard filters (#3508)
* Feature: added datepicker and time granularity options to dashboard filter

* Added option for Druid datasource time filters

* added more checkbox control over dashboard time filters
2017-10-04 12:43:29 -07:00
Denny Biasiolli ff268a7526 updating react-alert dependency to v2.3.0 (#3596)
it was downgraded in commit 7045018d86.
The old version used React.PropTypes and it was deprecated.
This version is compatible with React 15+.

Fix #3588
2017-10-04 12:08:06 -07:00
Maxime Beauchemin e9804aedff [translations] generating missing strings (#3577) 2017-10-04 12:07:46 -07:00
Jeff Niu e95132ddc3 [Bugfix/Feature] Fixed slice render staggering on dashboard first load (#3478)
* Feature: disable dashboard refresh staggering

* Removed refresh staggering everywhere except during periodic render
2017-10-04 10:23:17 -07:00
Maxime Beauchemin bb0f69d074 New "Time Series - Table" visualization (#3543)
* [WiP] adding a new "Time Series - Table" viz

* Adding drag-n-drop to collection

* Using keys in arrays

* tests
2017-10-04 10:17:33 -07:00
Maxime Beauchemin 645de384e3 [sql lab] fix numeric sort in data table (#3587)
Currently numerical values sort as alpha, this addresses the issue.
2017-10-04 10:17:01 -07:00
fabianmenges 15ecdeb3ba Fxing bug in label generation for multiple groupbys (#3594) 2017-10-04 09:40:30 -07:00
Naoya Kanai 04ea3addc4 update immutable.js to v3.8.2 (MIT license) (#3591) 2017-10-04 09:07:12 -07:00
Jeff Niu 7e64f2e988 [Feature] Copy-to-clipboard button in View Query (#3571)
* added copy-to-clipboard button to explore/view query

* modified CopyToClipboard to deselect current before copying
2017-10-03 22:34:40 -07:00
Jeff Niu 40fbf1c761 Allow users to see query string when query returns no data (#3585) 2017-10-03 22:32:17 -07:00
fabianmenges a85968eadb [Bugfix]: Explore view does not respect custom timeout. (#3582) 2017-10-03 22:20:32 -07:00
Jeff Niu efc63669a6 Fixed creating new filter options in FilterBox (#3584) 2017-10-03 22:20:10 -07:00
Jeff Niu 076f9cd095 Added custom pasteSelect to handle paste events (#3562) 2017-10-03 15:58:18 -07:00
Maxime Beauchemin fdbc936dc9 Bumping React to 15.6.2 (MIT license) (#3569)
I think that leaves only immutable.js with the ASF-incompatible PATENTS clause

I asked for a 3.8.x MIT release of the immutable lib here:
https://github.com/facebook/immutable-js/issues/1309
2017-10-03 15:57:42 -07:00
Maxime Beauchemin 18e459e19e v0.20.1 (#3576) 2017-10-03 00:04:43 -07:00
michellethomas 064363df78 After saving slice fixing redirect (#3572) 2017-10-02 18:19:52 -07:00
Jeff Niu f8cc05b54e Added label+percent and label+value display options to pie chart (#3565) 2017-10-02 15:53:11 -07:00
Denny Biasiolli 9baca6758d Removing yarn warnings during install (#3567)
* removing deprecated babel-preset-es2015 in favor of babel-preset-env

This removes this yarn warning during install:

```
warning babel-preset-es2015@6.24.1:
Thanks for using Babel: we recommend using babel-preset-env now:
please read babeljs.io/env to update!
```

* updating sinon to 4.0.0

This removes wrench from its dependencies and this yarn warning during install:

```
warning wrench@1.3.9: wrench.js is deprecated!
You should check out fs-extra (https://github.com/jprichardson/node-fs-extra)
for any operations you were using wrench for.
Thanks for all the usage over the years.
```
2017-10-02 15:25:37 -07:00
Maxime Beauchemin b39d165913 [nvd3] fix single metric showing up in legend (#3563) 2017-10-02 10:42:16 -07:00
Kan Ouivirach bc3ad64619 Add Pronto Tools to user list (#3558) 2017-10-02 08:41:04 -07:00
Gábor Hermann 0bd2ac5353 Minor documentation fix (#3553) 2017-09-29 16:47:18 -07:00
Maxime Beauchemin 03e2af8bd9 CHANGELOG for 0.20.0 (#3545) 2017-09-28 14:42:57 -07:00
timifasubaa 82b85d1d6c Explore update button labels (#3534)
* resolve ui ambiguity

* resolve button name ambiguity

* update test
2017-09-28 14:40:11 -07:00
Maxime Beauchemin 17c7ca239a Fixing missing messages.json file (#3547) 2017-09-28 12:24:00 -07:00
Grace Guo ef59b6b650 try to fix problem that chrome window not opening after ajax requrest (#3528) 2017-09-27 21:22:22 -07:00
Grace Guo d1a7a7b85c Time Series Annotation Layers (#3521)
* Adding annotations to backend

* Auto fetching Annotations on the backend

* Closing the loop

* Adding missing files

* annotation layers UI

for https://github.com/apache/incubator-superset/issues/3502

* a few fixes per code review.

- add annotation input sanity check before add and before update.
- make SelectAsyncControl component statelesis, and generic
- add annotation description in d3 tool tip
- use less variable to replace hard-coded color
2017-09-27 20:40:07 -07:00
Maxime Beauchemin 3d72eb475a [explore] fix cached tooltip (#3526) 2017-09-27 20:39:29 -07:00
Maxime Beauchemin b50489eb96 v0.20.0 (#3544) 2017-09-27 20:38:50 -07:00
Riccardo Magliocchetti 8773e32cd6 setup: bump pandas to 0.20.3 (#3506) 2017-09-27 19:50:06 -07:00
Riccardo Magliocchetti f438ccbcb1 Add support for column specific fillna to viz (#3066)
Fix #3029
2017-09-27 17:51:04 -07:00
Riccardo Magliocchetti f829b486d1 docs: QUERY_TIMEOUT_THRESHOLD is gone (#3537) 2017-09-27 08:20:59 -07:00
Maxime Beauchemin 06e52e600e [style] no bold on dashboard widget headers (#3531) 2017-09-26 16:04:09 -07:00
michellethomas f0636b8748 Break word on InfoTooltip (#3532)
* Break word on InfoTooltip

* Moving style object to separate const
2017-09-26 16:03:39 -07:00
Jeff Niu c629282ec4 Feature: Paired t-test table visualization (#3473)
* Feature: paired t-test table viz

* Added unit tests for viz
2017-09-26 15:11:35 -07:00
Jeff Niu 7d934e7246 Feature: query string API endpoint (#3513)
* exposed API endpoint to get querystring for a slice

* Added unit tests for endpoint

* fixed test case for python3

* moved get querystring logic into its own func

* renamed query string endpoint
2017-09-26 09:03:03 -07:00
fabianmenges 8efcaeb768 Feature: Display the verbose name for metrics within Charts and legend. (#3504) 2017-09-25 20:21:44 -07:00
Jeff Niu cf0b670932 Druid refresh metadata performance improvements (#3527)
* parallelized refresh druid metadata

* fixed code style errors

* fixed code for python3

* added option to only scan for new druid datasources

* Increased code coverage
2017-09-25 18:00:46 -07:00
Grace Guo 3949d39478 Allow user update slice title in visualize flow (#3466)
* 1. after user make sql query and visualize, allow user click title to update slice title, and create a new slice at the same time.
2. don't save new title if it is empty. Will still show old title.

* change saveSlice call response and update explore view
2017-09-25 11:38:29 -07:00
Grace Guo 5718d6bbaf allow user update slice name in dashboard view (#3467)
- if current user is allowed to edit dashboard, we will allow this user to edit slice name.
- show different tooltip given allowed/not-allowed to update slice name.
- user will click slice name and update.
- after user submit edit, if he doesn't have right to alter slice, server-side will return error message to client-side. Slice name will not be changed or saved.
- will show notification after save slice name.
2017-09-25 11:37:12 -07:00
Jeff Niu f3146ef6f9 Add Table performance improvements (#3509)
* Improved performance of 'Add table' function

* got rid of pvt function call

* changes metric obj to key on metric_name
2017-09-25 11:35:09 -07:00
michellethomas 255ea69977 Add metric warning (#3499)
* Adding warning text to metrics

* Adding javascript tests

* Fixing downgrade script for warning_text

* Adding merge migration
2017-09-22 09:49:13 -07:00
Grace Guo 9af34ba51c js translation -- performance improvment (#3390)
* Chinese page

* Using react-intl-universal to improve multi language in react page

* Using react-intl-universal to improve multi language in react page

* react_intl_universal

* change

* change

* change

* change

* change

* change

* change

* merge

* multiple page in js

* merge

* merge

* merge

* merge

* Js Translations

* JS Translation

* JS Translations

* Js translation

* JS translations

* JS translations

* Js translaion

* JS en Translation

* JS Translation

* upgrade document

Fixing the damn build (#3179)

* Fixing the build

* Going deeper

[bugfix] only filterable columns should show up in FilterBox list (#3105)

* [bugfix] only filterable columns should show up in FilterBox list

* Touchups

Datasource cannot be empty (#3035)

add title description to model view (#3045)

* add title description to model view

* add missing import

Add 'show/hide totals' option to pivot table vis (#3101)

[bugfix] numeric value for date fields in table viz (#3036)

Bug was present only when using the NOT GROUPED BY option

fixes https://github.com/ApacheInfra/superset/issues/3027

fix hive.fetch_logs (#2968)

add Zalando to the list of organizations (#3171)

docs: fixup installation examples code indentation (#3169)

[bugfix] fix bar order (#3180)

[bugfix] visualize flow error: 'Metric x is not valid' (#3181)

The metric name in the frontend doesn't match the one generated on the
backend. It turns out the explore view will default to the first
metric so specifying one isn't needed.

Fix the segment interval for pulling metadata (#3174)

The end of the interval would be on the truncated today date, which
means that you will exclude today. If your realtime ingestion job
runs shorter than a day, the metadata cannot be pulled from the
druid cluster.

Bump cryptography to 1.9 (#3065)

As 1.7.2 doesn't compile here with openssl 1.1.0f

Escaping the user's SQL in the explore view (#3186)

* Escaping the user's SQL in the explore view

When executing SQL from SQL Lab, we use a lower level API to the
database which doesn't require escaping the SQL. When going through
the explore view, the stack chain leading to the same method may need
escaping depending on how the DBAPI driver is written, and that is the
case for Presto (and perhaps other drivers).

* Using regex to avoid doubling doubles

[sqllab] improve Hive support (#3187)

* [sqllab] improve Hive support

* Fix "Transport not open" bug
* Getting progress bar to show
* Bump pyhive to 0.4.0
* Getting [Track Job] button to show

* Fix testzz

Add BigQuery engine specifications (#3193)

As contributed by @mxmzdlv on issue #945

[bugfix] fix merge conflict that broke Hive support (#3196)

Adding 'apache' to docs (#3194)

[druid] Allow custom druid postaggregators (#3146)

* [druid] Allow custom druid postaggregators

Also, fix the postaggregation for approxHistogram quantiles so it adds
the dependent field and that can show up in the graphs/tables.

In general, postAggregators add significant power, we should probably
support including custom postAggregators. Plywood has standard
postAggregators here, and a customAggregator escape hatch that allows
you to define custom postAggregators.

This commit adds a similar capability for Superset and a additional
field/fields/fieldName breakdown of the typical naming for dependent
aggregations, which should make it significantly easier to develop
approxHistogram and custom postAggregation-required dashboards.

* [druid] Minor style cleanup in tests file.

* [druid] Apply code review suggestions

* break out CustomPostAggregator into separate class. This just cleans
  up the creation of the postaggregator a little bit.
* minor style issues.
* move the function around so the git diff is more readable

add combine config for metrics in pivot table (#3086)

* add combine config for metrics in pivot table

* change method to stack/unstack

* update backendSync

Autofocus search input in VizTypeControl modal onEnter (#2929)

Speed up JS build time (#3203)

Also bumping a few related libs

JS Translation

JS translations

js translation

fix issue 3204 (#3205)

[bugfix] capture Hive job_id pre-url transformation (#3213)

js translation

fix issue 3204 (#3205)

[bugfix] capture Hive job_id pre-url transformation (#3213)

[docs] update url in CONTRIBUTING.md (#3212)

[sqllab/cosmetics] add margin-top for labels in query history (#3222)

[explore] nvd3 sort values in rich tooltip (#3197)

[sqllab] fix UI shows 'The query returned no results' momentarily (#3214)

this is visible when running async queries between the fetching and
success state as the rows are getting cached in the component

[explore] DatasourceControl to pick datasource in modal (#3210)

* [explore] DatasourceControl to pick datasource in modal

Makes it easier to change datasource, also makes it such that the list
of all datasources doesn't need to be loaded upfront.

* Adding more metadata

* Js translation

* js tran

* js trans

* js trans

* js tran

* js trans

* js trans

* js tran

* js translation

* js trans

* js translation

* try load language pack async

* Backend translations things

* create language pack inside common data

* performance improvement for js i18n.

- js bundle should not contain localized content
- we populate translation content from server-side, in boostrap.common.language_pack
- in client-side, use promise to wrap around translation content. text will be translated after translation content arrived/parsed.
- fix linting

* fix Timer unit test

* 1. add global hook for all tests, to make translation pack avaialble before each test starts.
2. fix unit test for Timer component
3. remove noused method get_locale, and modules
4. fix page reload after user change page language

* parse and build i18n dictionary as a module

* fix sync-backend task, which should run without DOM
2017-09-20 12:37:33 -07:00
timifasubaa 1cf634afa2 Remove repeated line (#3491)
* add lanscape?

* Revert "add lanscape?"

This reverts commit b3d6e80af4.

* remove unused line
2017-09-19 21:30:48 -07:00
timifasubaa d7fc364ff4 Fix idna requirement (#3497)
There is often conflicting versions of idna. This fixes is to 2.5.
2017-09-19 21:30:18 -07:00
timifasubaa aebd089ca5 update contributing.md (#3495)
Uses pip instead to setup superset.
2017-09-19 21:30:01 -07:00
Maxime Beauchemin ae7f163372 Removing super() call from refactor (#3500) 2017-09-19 16:41:09 -07:00
Maxime Beauchemin ed9f56448f Adding missing future imports (#3493) 2017-09-19 11:20:22 -07:00
Maxime Beauchemin ccd5fd44cf Removing dependency on pythrifthiveapi (#3494)
Since the latest pyhive, we don't need pythrifthiveapi as they ship with
the latest version.

There's actually a conflict between the new pyhive and pythrifthiveapi
and this fixes it.
2017-09-19 11:19:49 -07:00
Maxime Beauchemin c5252d0f43 [heatmap] account for bounds = 0 (#3474)
* [heatmap] account for bounds = 0

* Fix sorting

* linting
2017-09-18 21:32:39 -07:00
timifasubaa ede1432936 Improve code quality (#3480)
* add lanscape?

* add code climate badges

* pylint first pass

* Try out yapf

* merge

* merge

* lint

* more yapf

* removed unnecessary corrections
2017-09-18 20:40:27 -07:00
fabianmenges c3c9ceb1cc Feature/Fix: Get a full times_series for your filter instead of Topn for each point in time (#3434) 2017-09-18 10:48:05 -07:00
datinho 6fe93e18c7 Getting datatype with its dialect (#3486) 2017-09-18 09:55:41 -07:00
Dmitry Goryunov c988080990 Feature: "Impersonate user" setting on Datasource (#3404)
* Add "Impersonate user" setting to Datasource

* Add tests

* Use g.user.username for all the sync cases

* use uri.username instead of uri.user

* Small refactoring
2017-09-18 09:52:29 -07:00
JulieRossi a26e65f418 Create CsvResponse to manage csv exports encoding (#3484) 2017-09-18 09:51:13 -07:00
Maxime Beauchemin e66f68d36c Better installation docs (#3469) 2017-09-18 09:49:48 -07:00
Riccardo Magliocchetti cb4d934ba5 viz: fix reversed stats_logger label (#3475) 2017-09-18 09:45:49 -07:00
Riccardo Magliocchetti 6962c76412 docs: athena can be installed from pypi (#3477)
As sqlalchemy support has been merged and available in a release
since a few.
2017-09-18 09:45:00 -07:00
Riccardo Magliocchetti b0d25a154a Miscvizcleanups (#3476)
* viz: remove unused countries import

* viz: simplify code in BaseViz.query_obj
2017-09-18 09:44:19 -07:00
fabianmenges e22aecb0d1 Adding hook for CSRF exempting flask views. (#3435) 2017-09-14 20:54:18 -07:00
Jeff Carey 32bd827b25 bugfix/3321 Ensure text appears on buttons inside tables (#3409) 2017-09-14 20:28:01 -07:00
Stephanie Rivera e399a8c613 Simple grammar and update to link (#3415) 2017-09-14 17:41:01 -07:00
JulieRossi b90d8e32f1 config: allow changing default options for writting csv (#3441) 2017-09-14 17:40:15 -07:00
Xiao Hanyu c81026ddb1 Add shopee to user list. (#3425)
Shopee (https://shopee.sg) use superset for data analytics, visualisation and reporting.
2017-09-14 17:12:54 -07:00
Jeff Niu dd72048320 Fixed filter removal bug (#3458)
* Fixed bugs when removing filter, switching operators, and switching columns

* Fixed lint errors for code style

* Added more unit tests for FilterControl

* Code format changes to meet standards
2017-09-14 17:10:38 -07:00
Grace Guo ad604aed09 fix encoding error in sql lab logging (#3424) 2017-09-14 11:18:34 -07:00
timifasubaa 31b7b9a6a0 Sqllab dont send empty queries to db (#3459)
* add lanscape?

* prevent empty queries from being sent to db

* Revert "add lanscape?"

This reverts commit b3d6e80af4.

* improve code style

* nit

* unnit

* renit
2017-09-14 09:50:06 -07:00
Jeff Niu 745784fc97 Fixed dashboard filters carrying over to explore slice (#3461) 2017-09-14 09:44:00 -07:00
fabianmenges fdee06bbf2 Adding hook for external password store for databases (#3436) 2017-09-13 20:59:03 -07:00
Maxime Beauchemin 816c517f0f Allow specifying sort criteria on Table viz (#3460)
* Allow to specify sort criteria on table viz

* Better handling of ordering
2017-09-13 20:18:47 -07:00
Maxime Beauchemin 49f24d128b [heatmap] numerous improvements (#3456)
* [heatmap] numerous improvements

* flexibility as to how to sort X and Y axis (alpha/value, desc/asc)
* option to show a legend
* fixed margins, maximize real estate
* allowed users to define bounds

* Tunning
2017-09-13 16:13:45 -07:00
Grace Guo 8223729e1e fix https://github.com/apache/incubator-superset/issues/3430 (#3431) 2017-09-12 12:06:38 -07:00
Grace Guo 2d6b9422c6 fix https://github.com/apache/incubator-superset/issues/3422 (#3440) 2017-09-12 12:06:22 -07:00
fabianmenges 3c0e85e2c0 Adding order_desc flag to explore endpoint (#3439) 2017-09-12 09:48:43 -07:00
fabianmenges 490c707eb6 Handling pandas ExtensionDtypes (#2937) 2017-09-12 09:36:28 -07:00
Maxime Beauchemin 7c1b56f3a9 [postgres] adding support to serialized timedelta (#3444) 2017-09-12 09:06:53 -07:00
Maxime Beauchemin 3e9f797949 [explore] show validation error on control panel header (#3453)
* [explore] show validation error on control panel header

* Linting
2017-09-12 09:06:29 -07:00
Maxime Beauchemin f3de758363 [heatmap] fix default sorting (#3450)
Currently the heatmap axis are sorted randomly, this PR makes it such
that it's properly sorted.

Also allowing for specifying the left and bottom margins
2017-09-12 09:06:03 -07:00
Maxime Beauchemin 90e46cb39c Fix off-by-one error with linear color scales (#3452)
* Fix off-by-one error with linear color scales

* linting
2017-09-12 09:05:26 -07:00
Maxime Beauchemin fe77534c03 [explore] checkbox control won't uncheck (#3454) 2017-09-12 09:05:07 -07:00
fabianmenges 1f135e41cd Ignore intellij files (#3446) 2017-09-12 09:04:48 -07:00
Maxime Beauchemin 147c12dddf Fixing the build (#3445)
* Bumping npm

* Fixing the build

This addresses long standing issues and hacks around react-map-gl
that have been creating all sorts of build issues over time.

It appears that recent changes broke things further.

This PR upgrades to the latest `react-map-gl` and removes related hacks.
2017-09-11 16:30:39 -07:00
Riccardo Magliocchetti 3dfdde130a setup: Bump sqlalchemy-utils to 0.32.16 (#3405)
Now sqlalchemy-utils will make explicit that we are trying
decoding the secret with the wrong key instead of a generic
UnicodeDecodeError.

Fix #2600
2017-09-01 08:30:48 -07:00
Maxime Beauchemin 255a36c280 [hotfix] user dashboard says '150 weeks' (#3403) 2017-08-31 15:00:21 -07:00
Maxime Beauchemin 66f646ac66 [hotfix] fix slices where since/until = None (#3401) 2017-08-30 20:26:58 -07:00
Maxime Beauchemin e53f3032bb [dashboard] adding an option to duplicate slices when "Saving AS" (#3391)
* [dashboard] adding an option to duplicate slices when "Saving AS"

* Fix tests
2017-08-30 14:09:29 -07:00
Maxime Beauchemin 3b4cd812ae Fix copypasta control label error 'Until' -> 'Since' (#3399) 2017-08-30 14:05:21 -07:00
Maxime Beauchemin ac5da46fb2 [line chart] add 'min_periods' control related to rolling windows (#3397)
* [line chart] add 'min_periods' control related to rolling windows

* Linting js
2017-08-30 13:32:07 -07:00
Maxime Beauchemin 497a6f1df9 [hive] fix date casting in explore view (#3394) 2017-08-30 11:56:43 -07:00
Maxime Beauchemin 1fd08a5912 [hotfix] backward compatibility on date expressions (#3396)
Previously all 'since' date expression evaluated in the future like
`30 days` would be reassigned to the past (now - `30 days`). It would
extend to fixed dates which is a bad thing and was removed.

Now we have reports and dashboards in the wild that use things like `30
days` and we'd like to not break those as we roll out the next version.

This fix should allow for that.
2017-08-30 11:18:23 -07:00
Patryk 9676f02497 Add Capital Service to organizations list (#3395) 2017-08-30 09:36:54 -07:00
mxmzdlv 42dd64e413 Fix datatable scroll height when using filter or pagination (#3377) 2017-08-29 21:10:48 -07:00
Grace Guo c3ab796734 fix date picker Select alignment (#3392) 2017-08-29 19:08:54 -07:00
Maxime Beauchemin a782d623f0 Build optimizations (#3378)
Bumping some version, removing unused libs, ...
2017-08-28 16:16:52 -07:00
Maxime Beauchemin 48b88e5241 [dashboard] load list of slices at modal enter time (#3379) 2017-08-28 14:31:43 -07:00
Maxime Beauchemin a47a512808 [explore] Improved time filters controls (#3371)
* Improved time filters controls

* lint

* Fix coverage

* Allow empty dates
2017-08-28 09:16:23 -07:00
Maxime Beauchemin aff7a82664 [sql lab] using react-split-pane (#3363)
* [sql lab] using react-split-pane

* padding
2017-08-27 15:01:24 -07:00
Maxime Beauchemin 2d237fe2ef v1.9.1 (#3376) 2017-08-26 15:07:17 -07:00
mxmzdlv c944c61747 Apply advanced analytics processing to comparison time series (#3373) 2017-08-25 11:08:15 -07:00
Maxime Beauchemin 0c8b24378d [webpack] add a 'npm run dev-fast' command that is much faster (#3362)
The tradeoff is that the sourcemap isn't as reliable.
2017-08-24 19:23:23 -07:00
Boris Hajduk 90ba6ee6a0 bugfix for addTotalValues with negative values (#3366) 2017-08-24 15:37:58 -07:00
timifasubaa 8d877e8a35 [explore] Fix and test slice id logging issue (#3339)
* [explore] fixed padding bug on filter section

* fix slice_id logging issue

* [superset-sqllab] fix slice_id population in appropriate column

* [explore-logging] test the slice_id logging fix

* fix travis errors

* fix nits pointed out in PR comments

* cleanup tests

* made python more beautiful

* made python even more beautiful

* made python even more more beautiful

* made python even more more more beautiful

* fix lint error

* make exception handling more specific

* fixed silly error

* fixed argument indentation
2017-08-24 09:11:41 -07:00
Maxime Beauchemin c5b1eb7f5b Bump fab to 1.9.4 (#3364)
Important bug/security fixes detailed here:
https://github.com/dpgaspar/Flask-AppBuilder/blob/master/docs/versions.rst
2017-08-24 08:08:29 -07:00
Maxime Beauchemin 46d60880eb Revert "[sql lab] Make sql editor resizable (#3242)" (#3360)
This reverts commit 75e69f02e8.
2017-08-23 14:40:08 -07:00
Maxime Beauchemin 0c36827368 [dist_bar] break down control groups (#3357) 2017-08-22 21:11:48 -07:00
timifasubaa 2b1bb35c5c delete unused csv file (#3356) 2017-08-22 21:11:26 -07:00
Maxime Beauchemin d3824bbb38 [hotfix] react-select dropdown autocomplete are invisible (#3358) 2017-08-22 20:56:25 -07:00
Maxime Beauchemin 670ba5d32e Collapsible Control sections (#3354)
The left panel of the explore view has become crowded and overwhelming
overtime. This PR adds functionality to collapse the control sections,
and sets most sections to be collapse by default as the explore view
opens up.

* breakdown `Query` section for most viz
* bring filters to the top, under Query section
* collapse most sections by default
* removed confusing outdated description for Filter section
2017-08-22 16:10:55 -07:00
Maxime Beauchemin 64c91ec9e3 [bugfix] Y bounds in line chart (#3353)
Also fixing tick labels showing NaN in the `dist_bar` viz
2017-08-22 16:10:42 -07:00
Maxime Beauchemin 1fda6f0745 [css] react-select only in theme (#3351) 2017-08-21 17:36:54 -07:00
Grace Guo f8e596b9d8 fix multi-value react select style (#3352) 2017-08-21 17:36:33 -07:00
Maxime Beauchemin 254645773c Better looking checkboxes (#3345)
Also showing icon only on hover on control headers
2017-08-21 13:47:50 -07:00
Maxime Beauchemin e79adbbc5f [hotfix] self-immune filter_box fix (#3338) 2017-08-18 17:43:11 -07:00
Dmitry Goryunov 75e69f02e8 [sql lab] Make sql editor resizable (#3242)
* Update to the version of react-ace with the fixed sizing issues

* Make ace editor resizable

* Use small util method for offset calculation instead of $

* Test ResizableAceEditor

* Make the right pane of the Sql Lab scrollable

* Add default and min height to the ResizableAceEditor

* Implement SplitPane

* Make Splitter fullscreen

* React on resize of the window

* Implement min and max

* Get rid of a magic number + add margin

* Handle resize event with delay + cleanup the code

* Make ResultSet adjustable

* Make QueryHistory adjustable

* Remove ResizableAceEditor

* Make linter happy

* Test SplitPane

* Init sizes properly
2017-08-18 17:15:25 -07:00
Maxime Beauchemin 6fc837db51 [sql lab] improve error messages (#3308)
* [sql lab] improve error messages

Some error messages in non-async mode were showing as JSON or sometimes
as tuples. This fixes that.

* linting
2017-08-18 15:50:07 -07:00
Maxime Beauchemin 2923a125db Syncing the timeout param from backend (#3329)
* Syncing the timeout param from backend

* Linting
2017-08-18 15:49:47 -07:00
Maxime Beauchemin 527572c3eb [dashboard] re-enabling cascading filters (#3335)
* [dashboard] re-enabling cascading filters

https://github.com/apache/incubator-superset/pull/3183 disabled the
ability of a filterbox to get filtered by another filterbox

* linting
2017-08-18 15:49:29 -07:00
Maxime Beauchemin a7ba6e4a5d [nvd3] fix bubble axis (#3332)
number of issues are addressed here:
* x axis formatting doesn't apply in bubble chart
* adding option to show/hide bounds of x and y axis
* with a flaky 'auto' margin mode, allow user to specify hard values or
  auto
* x label font-size was different than y axis
* show more options and reorg Control panels for Axes in `line` viz
2017-08-18 11:56:34 -07:00
Maxime Beauchemin e31ad22f50 [hotfix] hotfixing the hotfix (#3333) 2017-08-17 23:18:41 -07:00
Rogan 813ed6018d Unnecessary to specify order_columns for DatasourceModelView (#3331) 2017-08-17 22:18:32 -07:00
Grace Guo 0454ef3726 disable immediately re-render for color scheme change (#3328)
for chart type: bubble, area, treemap and country map, color scheme change cannot take effect immediately. So have to disable immediately re-render function and hide lightening icon for these chart type.
2017-08-17 21:38:34 -07:00
Maxime Beauchemin afedcdf0d8 [hotfix] dashboard widget resize is broken (#3330)
blame https://github.com/apache/incubator-superset/pull/3315
2017-08-17 21:20:51 -07:00
Riccardo Magliocchetti 9f3aeb22d9 docs: add references to Flask-Appbuilder Security documentation (#3322)
And a specific link to an oauth example configuration.
2017-08-17 11:48:22 -07:00
Maxime Beauchemin 59268e978a Use react-alert for backend message flashing (#3315) 2017-08-16 23:00:23 -07:00
Grace Guo b9a2fa4015 Allow for multiple color schemes (#3295)
* Allow for multiple color schemes

1. create ColorSchemeControl component
2. using the same new control component for linear colors

* add color spectum for linear color scheme

* remove dup css

* fix controls setting for linear color scheme

* minor fix by code review comment
2017-08-16 22:20:11 -07:00
Invenis 3c8577b853 French translation (#3313) 2017-08-16 20:29:18 -07:00
Maxime Beauchemin 0aa3d2a818 [hive] improve error messages (#3305)
* [hive] improve error messages

* Addressing comments
2017-08-16 17:40:28 -07:00
Maxime Beauchemin fbd0d46e8a Fix styles in Separator widget (#3309)
Style wasn't working right for separator widget since the iframe sandboxing of
the markup widget. This addresses this small issue and also now allows
for html in the separator widget
2017-08-16 17:40:06 -07:00
Maxime Beauchemin c4e056929d [sql lab] run button shortcut tooltip (#3310) 2017-08-16 17:39:48 -07:00
Maxime Beauchemin 84e59a11f1 [bugfix] Presto KeyError 'errorLocation' (#3291) 2017-08-16 13:25:09 -07:00
Maxime Beauchemin 9fcd5d67e4 [sql lab] add pending to the list of searchable statuses (#3292) 2017-08-16 13:24:43 -07:00
Maxime Beauchemin ccf505a480 [mapbox] fix viewport alterations (#3293)
* [mapbox] fix viewport alterations

Since explorev2 it appears that altering the viewport hasn't been
changing the controls as it used to. This PR addresses it.

* lint
2017-08-16 11:23:01 -07:00
Rogan d1d1c49009 Fix raise error when query datasource (#3298)
* Catching the 'NoResultFound' exception when the datasource does't exist

* change one() to first()

* revert modify

* remove import
2017-08-16 10:18:43 -07:00
Maxime Beauchemin 232a5c392e [docs] document how to compile/publish docs (#3296) 2017-08-15 16:37:40 -07:00
Maxime Beauchemin 9c6248f3ba [dashboard] add link to export CSV from dashboard (#3280)
* [dashboard] add link to export CSV from dashboard

fixes #1304

* Fix tests
2017-08-14 18:25:36 -07:00
Maxime Beauchemin 6841697917 FAQ entry for backend support (#3282)
so that I can close:
https://github.com/apache/incubator-superset/pull/1470/files
2017-08-14 17:57:09 -07:00
Maxime Beauchemin 81817309d3 [sql lab] fix sluggish backspace in editor (#3286)
Somehow Ace's "changeSelection" event is triggered when hitting
backspace (and shouldn't!).

changeSelection on our side triggers enough work to make the
holding backspace sluggish and laggy.

This fix ignores selection with a length of 1, avoiding mutating the
state altogether when hitting/holding backspace.
2017-08-14 17:55:30 -07:00
Grace Guo 025ef5a0f1 Fix Chart Error Message Display (#3287) 2017-08-14 12:24:35 -07:00
Maxime Beauchemin 9a4e4d0443 [dashboard] fix standalone mode that hides the navbar (#3284) 2017-08-14 12:24:05 -07:00
Grace Guo c9c6bcaabe Improve superset list view content layout (#3031)
* improve superset list view page layout

- less header spaces and stacks
- move pagination down to bottom
- apply material design style to 'add' action button
- will apply to all superset list view, like slices list, security tab lists etc.

* improve superset list view page layout

- less header spaces and stacks
- move pagination down to bottom
- apply material design style to 'add' action button
- will apply to all superset list view, like slices list, security tab lists etc.

* improve superset list view page layout

- less header spaces and stacks
- move pagination down to bottom
- apply material design style to 'add' action button
- will apply to all superset list view, like slices list, security tab lists etc.

* improve superset list view page layout

- less header spaces and stacks
- move pagination down to bottom
- apply material design style to 'add' action button
- will apply to all superset list view, like slices list, security tab lists etc.

* improve superset list view page layout

- less header spaces and stacks
- move pagination down to bottom
- apply material design style to 'add' action button
- will apply to all superset list view, like slices list, security tab lists etc.

* remove tabs from indentation

* fix merge conflicts

* adjust css after code merge
2017-08-11 15:34:29 -07:00
Maxime Beauchemin 144f516700 [markup] fix CSS, remove scrollbar (#3281) 2017-08-11 08:26:47 -07:00
Emanuele Cesena c17ffc1e9c Fix returned time parse_human_datetime (#2033)
parse_human_datetime parses date-only strings, e.g. "today", returning the correct date but time set at 9am. This is an internal implementation in parsedatetime. This patch resets to midnight. If time is specified and parsed, it is correctly returned.
2017-08-10 23:04:49 -07:00
Rogan 0d4137d21e Add translatable columns in label_columns of the view (#3032)
* add translatable columns in label_columns of the view

* display the verbose_name of columns in list view, just like in the metrics list

* Revert "display the verbose_name of columns in list view, just like in the metrics list"

This reverts commit f815d3b3ed.
2017-08-10 22:28:06 -07:00
Maxime Beauchemin 0c5db55d55 [security] prevent XSS markup viz (#3211)
* Prevent XSS in Markup viz

We protect the browser by sandboxing the user code inside an iframe

* Helvetica
2017-08-10 21:38:33 -07:00
Rogan bd4a4c2753 add _() to Exception messages (#3034)
* add `_()` to Exception messages

* fix error
2017-08-10 20:57:05 -07:00
Rogan f399fcd624 display the verbose_name of columns in list view, just like in the metrics list (#3275) 2017-08-10 20:52:24 -07:00
Rogan 08e40e2d78 add placeholder to Select components (#3274) 2017-08-10 20:51:36 -07:00
Luis Rodriguez 2898f9d379 Added Konfio to 'Who uses Superset' list. (#3277) 2017-08-10 20:50:49 -07:00
Alex Guziel dfea8df7c9 Fix celery worker (#3278) 2017-08-10 20:50:21 -07:00
Rogan a5320a0f37 [add] Save filters to dashboard (#3183)
* [add] Save filters to dashboard

* format code

* fix CI error

* add semicolon  semi

* fix none object

* add test data
optimize the js code
fix the compatibility issue

* fix urllib to urllib.parse

* add space

* update test case

* remove  'return'

* fix error

* update test case
2017-08-10 20:49:49 -07:00
Grace Guo b68084b9ac Explore view save modal spec (#3110)
* split reducer logic for ExploreViewContainer

* fix saveModal component and unit tests

* revert changes in SaveModal_spec.
will make another commit just to improve test coverage for SaveModal component.

* improve test coverage for explore view components:
- SaveModal component
- URLShortLinkButton

* remove comment-out code

* [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254)

* [explore] make edit datasource a basic link (#3244)

* Relying on FAB for font-awesome.min.css (#3261)

* Modernize SQLA pessimistic handling (#3256)

Looks like SQLAlchemy has redefined the best practice around
pessimistic connection handling.

* [webpack] break CSS and JS files while webpackin' (#3262)

* [webpack] break CSS and JS files while webpackin'

* cleaning up some templates

* Fix pylint issue

* import logging (#3264)

* [bugfix] preserve order in groupby (#3268)

Recently in
https://github.com/apache/incubator-superset/commit/4c3313b01cb508ced8519a68f6479db423974929
I introduced an issue where the order of groupby fields might change.

This addresses this issue and will preserve ordering.

* Explicitly add Flask as dependancy (#3252)

* Use sane Celery defaults to prevent tasks from being delayed (#3267)

* Improve the chart type of Visualize in sqllab (#3241)

* Improve the chart type of Visualize in sqllab & Add some css & Fix the link address in the navbar

* add vizTypes filter

* Set default ports Druid (#3266)

For Druid set the default port for the broker and coordinator.

* [explore] Split large reducer logic in ExploreViewContainer (#3088)

* split reducer logic for ExploreViewContainer

* fix saveModal component and unit tests

* revert changes in SaveModal_spec.
will make another commit just to improve test coverage for SaveModal component.

* remove comment-out code

* fix merge confilicts
2017-08-10 17:04:44 -07:00
timifasubaa 3b24d7df83 [explore] fixed padding bug on filter section (#3279) 2017-08-10 16:48:30 -07:00
Grace Guo b3107bb603 [explore] Split large reducer logic in ExploreViewContainer (#3088)
* split reducer logic for ExploreViewContainer

* fix saveModal component and unit tests

* revert changes in SaveModal_spec.
will make another commit just to improve test coverage for SaveModal component.

* remove comment-out code

* fix merge confilicts
2017-08-10 14:21:45 -07:00
Alex Guziel 08b7e891a7 Use sane Celery defaults to prevent tasks from being delayed (#3267) 2017-08-09 22:34:39 -07:00
Maxime Beauchemin 57421d14d0 [bugfix] preserve order in groupby (#3268)
Recently in
https://github.com/apache/incubator-superset/commit/4c3313b01cb508ced8519a68f6479db423974929
I introduced an issue where the order of groupby fields might change.

This addresses this issue and will preserve ordering.
2017-08-09 18:06:18 -07:00
Fokko Driesprong 0cf0860a3d Set default ports Druid (#3266)
For Druid set the default port for the broker and coordinator.
2017-08-09 17:25:00 -07:00
Maxime Beauchemin 327c052456 [webpack] break CSS and JS files while webpackin' (#3262)
* [webpack] break CSS and JS files while webpackin'

* cleaning up some templates

* Fix pylint issue
2017-08-09 09:52:43 -07:00
eeve 033ba2cb66 Improve the chart type of Visualize in sqllab (#3241)
* Improve the chart type of Visualize in sqllab & Add some css & Fix the link address in the navbar

* add vizTypes filter
2017-08-09 09:12:21 -07:00
Maxime Beauchemin cc36428260 Modernize SQLA pessimistic handling (#3256)
Looks like SQLAlchemy has redefined the best practice around
pessimistic connection handling.
2017-08-09 09:10:12 -07:00
Fokko Driesprong 6da68ab271 Explicitly add Flask as dependancy (#3252) 2017-08-09 09:09:02 -07:00
Maxime Beauchemin be01851ef7 Relying on FAB for font-awesome.min.css (#3261) 2017-08-09 09:04:29 -07:00
cclauss 20915457ff import logging (#3264) 2017-08-09 08:18:10 -07:00
Maxime Beauchemin 2385cd445b [explore] make edit datasource a basic link (#3244) 2017-08-08 12:29:24 -07:00
Maxime Beauchemin 0429e842b5 [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254) 2017-08-07 21:47:42 -07:00
Pedro Valentim Silva Leite f68189b54e Fix Yahoo's website link (#3249) 2017-08-07 08:31:49 -07:00
Zeeshan Ahmed dcf83031d1 Fix typo (#3246) 2017-08-06 20:27:54 -07:00
Riccardo Magliocchetti ef7e9dd336 docs: use yarn in making your own build (#3235) 2017-08-04 09:31:36 -07:00
Riccardo Magliocchetti ae0655028f explore: redraw chart on width change too (#3067)
Fix #3028
2017-08-04 09:15:08 -07:00
Maxime Beauchemin 166c576c94 Add basic Impala engine spec (#3225)
From:
https://www.cloudera.com/documentation/enterprise/5-8-x/topics/impala_datetime_functions.html
2017-08-04 09:10:32 -07:00
Rich @ RadICS 7190cf8e77 Treemap vis verbose metric name (#3237)
* Change hardcoded references to 'User' security model to allow custom class override

* verbose metric name in treemap

* Linting
2017-08-04 09:07:03 -07:00
Shao-Yen "Fred" Cheng 2ef9bfed20 [bug fix] Fix to #3137 and #3239 (#3240)
* #3137 add the leftover code from #3138 for fixing issue #3137

* #3239 Use slice id as the key instead of sliceName
2017-08-04 09:05:50 -07:00
Rich @ RadICS 0191fa58c8 SUPERSET_HOME enviroment variable (#3238)
* Change hardcoded references to 'User' security model to allow custom class override

* Add SUPERSET_HOME environment variable
2017-08-04 08:51:40 -07:00
Maxime Beauchemin 4c3313b01c Handle Time at query_obj generation time (#3236)
As opposed to in the within itself
2017-08-03 15:42:26 -07:00
Maxime Beauchemin 5278b53218 [pivot] add support for in Pivot on Druid (#3230) 2017-08-03 00:04:16 -07:00
Maxime Beauchemin 4ea770068b Allowing to integrate time as a groupby value (#3229) 2017-08-02 21:33:27 -07:00
Maxime Beauchemin 91bd38a851 0.19.0 (#3227) 2017-08-02 16:56:46 -07:00
Rich @ RadICS 163f4e359c Allow 'refresh_immune_slices' (#2974)
* Allow 'refresh_immune_slices'

* Changed param name, added note in FAQ

* Linting
2017-08-02 08:46:19 -07:00
Riccardo Magliocchetti 90592d3e3d sql_lab: re-raise exception in get_sql_results (#3111)
As caller expect it to raise an exception instead of returning
None.

Refs #3075
2017-08-01 22:38:52 -07:00
Maxime Beauchemin 62fcdf2a92 [explore] DatasourceControl to pick datasource in modal (#3210)
* [explore] DatasourceControl to pick datasource in modal

Makes it easier to change datasource, also makes it such that the list
of all datasources doesn't need to be loaded upfront.

* Adding more metadata
2017-08-01 12:08:00 -07:00
Maxime Beauchemin 48821b5101 [sqllab] fix UI shows 'The query returned no results' momentarily (#3214)
this is visible when running async queries between the fetching and
success state as the rows are getting cached in the component
2017-08-01 10:26:13 -07:00
Maxime Beauchemin 3b129253a3 [explore] nvd3 sort values in rich tooltip (#3197) 2017-08-01 10:25:52 -07:00
Maxime Beauchemin 48760849ec [sqllab/cosmetics] add margin-top for labels in query history (#3222) 2017-08-01 10:25:13 -07:00
Xingze Zhang 9c1ca07c40 [docs] update url in CONTRIBUTING.md (#3212) 2017-08-01 08:54:35 -07:00
Maxime Beauchemin 774ad45efb [bugfix] capture Hive job_id pre-url transformation (#3213) 2017-07-31 22:22:08 -07:00
Xingze Zhang 299e9ce6b8 fix issue 3204 (#3205) 2017-07-31 12:24:19 -07:00
Maxime Beauchemin 219f33f0d1 Speed up JS build time (#3203)
Also bumping a few related libs
2017-07-28 17:34:09 -07:00
Andrew Pariser 58a704b84c Autofocus search input in VizTypeControl modal onEnter (#2929) 2017-07-28 14:57:24 -07:00
Rogan b58cfbcb91 add combine config for metrics in pivot table (#3086)
* add combine config for metrics in pivot table

* change method to stack/unstack

* update backendSync
2017-07-28 14:16:38 -07:00
Brian Wolfe 1e325d9645 [druid] Allow custom druid postaggregators (#3146)
* [druid] Allow custom druid postaggregators

Also, fix the postaggregation for approxHistogram quantiles so it adds
the dependent field and that can show up in the graphs/tables.

In general, postAggregators add significant power, we should probably
support including custom postAggregators. Plywood has standard
postAggregators here, and a customAggregator escape hatch that allows
you to define custom postAggregators.

This commit adds a similar capability for Superset and a additional
field/fields/fieldName breakdown of the typical naming for dependent
aggregations, which should make it significantly easier to develop
approxHistogram and custom postAggregation-required dashboards.

* [druid] Minor style cleanup in tests file.

* [druid] Apply code review suggestions

* break out CustomPostAggregator into separate class. This just cleans
  up the creation of the postaggregator a little bit.
* minor style issues.
* move the function around so the git diff is more readable
2017-07-28 11:45:59 -07:00
Maxime Beauchemin ad5a4389a2 Adding 'apache' to docs (#3194) 2017-07-28 11:42:01 -07:00
Maxime Beauchemin e4fba0ffb7 [bugfix] fix merge conflict that broke Hive support (#3196) 2017-07-27 21:34:15 -07:00
Maxime Beauchemin e584a9673f Add BigQuery engine specifications (#3193)
As contributed by @mxmzdlv on issue #945
2017-07-27 14:01:13 -07:00
Maxime Beauchemin b888802e05 [sqllab] improve Hive support (#3187)
* [sqllab] improve Hive support

* Fix "Transport not open" bug
* Getting progress bar to show
* Bump pyhive to 0.4.0
* Getting [Track Job] button to show

* Fix testzz
2017-07-27 14:00:19 -07:00
Maxime Beauchemin 25c599d040 Escaping the user's SQL in the explore view (#3186)
* Escaping the user's SQL in the explore view

When executing SQL from SQL Lab, we use a lower level API to the
database which doesn't require escaping the SQL. When going through
the explore view, the stack chain leading to the same method may need
escaping depending on how the DBAPI driver is written, and that is the
case for Presto (and perhaps other drivers).

* Using regex to avoid doubling doubles
2017-07-27 09:47:31 -07:00
Riccardo Magliocchetti fb866a937b Bump cryptography to 1.9 (#3065)
As 1.7.2 doesn't compile here with openssl 1.1.0f
2017-07-26 14:11:11 -07:00
Fokko Driesprong aa95e03eb9 Fix the segment interval for pulling metadata (#3174)
The end of the interval would be on the truncated today date, which
means that you will exclude today. If your realtime ingestion job
runs shorter than a day, the metadata cannot be pulled from the
druid cluster.
2017-07-26 09:28:08 -07:00
Maxime Beauchemin cf1d0f38ad [bugfix] visualize flow error: 'Metric x is not valid' (#3181)
The metric name in the frontend doesn't match the one generated on the
backend. It turns out the explore view will default to the first
metric so specifying one isn't needed.
2017-07-26 09:22:25 -07:00
Maxime Beauchemin fca982c609 [bugfix] fix bar order (#3180) 2017-07-26 09:22:03 -07:00
Riccardo Magliocchetti 747bf80474 docs: fixup installation examples code indentation (#3169) 2017-07-26 09:20:06 -07:00
Dmitry Goryunov 4f7fd65c8b add Zalando to the list of organizations (#3171) 2017-07-26 08:32:06 -07:00
timfeirg 6045063e78 fix hive.fetch_logs (#2968) 2017-07-25 21:43:19 -07:00
Maxime Beauchemin 0ec9cd4ad2 [bugfix] numeric value for date fields in table viz (#3036)
Bug was present only when using the NOT GROUPED BY option

fixes https://github.com/ApacheInfra/superset/issues/3027
2017-07-25 21:30:40 -07:00
Rich @ RadICS 4268513653 Add 'show/hide totals' option to pivot table vis (#3101) 2017-07-25 21:11:38 -07:00
Rogan 7654eef110 add title description to model view (#3045)
* add title description to model view

* add missing import
2017-07-25 21:06:34 -07:00
Rogan b301ba1f57 Datasource cannot be empty (#3035) 2017-07-25 21:05:31 -07:00
Maxime Beauchemin 95509f2000 [bugfix] only filterable columns should show up in FilterBox list (#3105)
* [bugfix] only filterable columns should show up in FilterBox list

* Touchups
2017-07-25 20:50:41 -07:00
Maxime Beauchemin 49ab09101b Fixing the damn build (#3179)
* Fixing the build

* Going deeper
2017-07-25 13:57:29 -07:00
Chris Williams 40d9e15126 Add event-flow visualization (#3102)
* [event-flow] add event flow visualizaton type from @data-ui/event-flow.

* [event-flow] update vis thumbnail

* [event-flow] update row limit label, remove duplicate chart controls

* [dependencies] add @data-ui/event-flow 0.0.2

* [linting] fix multiple imports

* [deps] bump mapbox-gl and react-map-gl to fix build

* [event-flow] bump to 0.0.3 for es2015 + stage-0 babel presets

* [deps] revert mapbox version bumps

* [event-flow] update png, bump to newest version, address reviewer comments, add min event count form.

* [event-flow] pin version

* [event-flow][spec] add test for coveralls

* [event-flow] revert spec
2017-07-21 16:29:25 -07:00
Maxime Beauchemin a141695b2b Prevent people from deleting datasources that have associate slices (#3163) 2017-07-19 16:24:20 -07:00
Maxime Beauchemin d01e67a159 More logging to csv endpoint (#3164) 2017-07-19 15:59:30 -07:00
Maxime Beauchemin c34df3eea4 [bugfix] SQLA instance has been deleted (#3159)
Related Msg:
sqlalchemy.orm.exc.ObjectDeletedError: Instance '<PermissionView at
0x7f10306b0e90>' has been deleted, or its row is otherwise not present.
2017-07-19 01:35:00 -07:00
luc 56bcbb0f8e add douban to the orgs. (#3157) 2017-07-19 01:18:34 -07:00
Maxime Beauchemin 51f1aa3106 [docs] use yarn in CONTRIBUTING.md (#3150)
* [docs] use yarn in CONTRIBUTING.md

* Updating badges
2017-07-19 01:17:56 -07:00
Maxime Beauchemin d7e419127c [bugfix] fails on None view_menu (#3155)
* [bugfix]  fails on None view_menu

* Update coveralls token
2017-07-18 19:42:20 -07:00
Grace Guo 27fab0d54f allow user press Enter key to end editing title (#3112) 2017-07-17 08:58:10 -07:00
Maxime Beauchemin 091e93c831 [minor] change tooltip on 'Edit slice properties' (#3116)
* [minor] change tooltip on 'Edit slice properties'

* Upgrading npm version for travis

* Bumping node version to most recent
2017-07-16 22:29:30 -07:00
Maxime Beauchemin bb6b2da267 Prevent SQLA warning related to SQLALCHEMY_TRACK_MODIFICATION (#3133) 2017-07-16 22:02:22 -07:00
Shao-Yen "Fred" Cheng 7abe2d5eee [#3137] Use state.datasource.type instead of state.datasource_type when rendering ControlPanelsContainer (#3138) 2017-07-16 21:04:34 -07:00
Maxime Beauchemin 7b015faae9 [heatmap] basic non empty validation (#3119) 2017-07-15 20:07:57 -07:00
Ke Zhu e834154030 Fixes #3134 by correct response content-type of /testconn (#3135) 2017-07-15 09:52:37 -07:00
丁桂涛 256a521bf1 [Celery] fix the celery worker concurrency settings (#3126) 2017-07-14 09:44:41 -07:00
Maxime Beauchemin a626f994bf [CLI] Improve the missing perm creation logic (#3118)
I don't think this worked as intended
2017-07-13 15:53:20 -07:00
Maxime Beauchemin 76dda688b1 Using yarn instead of npm install (#3120) 2017-07-13 15:16:39 -07:00
Grace Guo 163a6a20e5 clarify Superset different timeout config (#3044)
* clarify different timeout configuration for superset
2017-06-30 15:47:37 -07:00
Maxime Beauchemin 3d136aa0a4 Update docs links on README 2017-06-28 06:27:51 -07:00
Grace Guo ff3057de5d fix default checkbox alignment (#3042) 2017-06-26 18:06:12 -07:00
Maxime Beauchemin 7045018d86 New chart type : Chord Diagrams (#3013) 2017-06-26 16:44:47 -07:00
Maxime Beauchemin a55f963e52 [bugfix] issue creating separators & markup slices (#3041) 2017-06-26 11:00:21 -07:00
fabianmenges 8dfe2b70b2 Bug fix: Datasource -> Slice relationship (#3011) 2017-06-22 17:30:09 -07:00
Maxime Beauchemin fdbb569c3e 0.18.5 2017-06-22 15:46:09 -07:00
Maxime Beauchemin cc3e63f1de [docs] adding info on how to create new viz 2017-06-22 12:37:42 -07:00
Grace Guo a48e246aa0 add test coverage for sql lab components (#3022) 2017-06-22 10:31:13 -07:00
Maxime Beauchemin 6eba6cac0b [hotfix] xAxis broken on time series viz 2017-06-21 16:35:50 -07:00
Maxime Beauchemin bd706ebbd1 Fixing image sizes for horizon and country_map 2017-06-21 14:34:56 -07:00
Maxime Beauchemin abbf138cfb Bumping SQLLAB_ASYNC_TIME_LIMIT_SEC default config to 6 hours 2017-06-21 14:16:53 -07:00
Grace Guo de346a3eba CONTRIBUTING: add python unittes setup (#3021) 2017-06-21 12:52:04 -07:00
Maxime Beauchemin 99e1de58bc A set of minor fixes (#3014) 2017-06-21 12:09:49 -07:00
Maxime Beauchemin 5344a80535 Bumping flask-appbuilder to 1.9.1 2017-06-21 11:32:41 -07:00
Maxime Beauchemin 0b09a74d37 Downgrading celery to 3.1.25
https://github.com/celery/celery/issues/3932 is a blocker for Airbnb
2017-06-21 11:29:22 -07:00
Riccardo Magliocchetti e21745ac9d CONTRIBUTING: ask to quote python stacktraces (#3017) 2017-06-21 10:12:34 -07:00
Maxime Beauchemin 593861eac6 [bugfix] fix metrics/metric control default (#3009)
We should pick an arbitrary metric by default. This broke when
improving the metrics selector recently.
2017-06-21 09:31:29 -07:00
Maxime Beauchemin 53dead9c29 Revert "Bumping FAB to 1.9.1"
This reverts commit f64e2ba7d5.
2017-06-20 22:25:58 -07:00
Maxime Beauchemin f64e2ba7d5 Bumping FAB to 1.9.1 2017-06-20 21:52:16 -07:00
Benjamin Yolken 80515d2a92 Revert change in npm run build command (#3012) 2017-06-20 21:34:17 -07:00
Maxime Beauchemin 4d72afb54b Adding missing dependency and linting webpack.js (#3008) 2017-06-20 14:04:36 -07:00
Maxime Beauchemin 06fcaa3095 Stabilizing Celery / SQL Lab (#2981)
* upgrade celery to 4.0.2
* using Redis for unit tests (sqla broker not supported in Celery 4)
* Setting Celery's soft_time_limit based on `SQLLAB_ASYNC_TIME_LIMIT_SEC` config
* Better error handling in async tasks
* Better statsd logging in async tasks
* show [pending/running] query status in Results tab
* systematically using sqla NullPool on worker (async) to limit number
  of database connections
2017-06-20 13:55:03 -07:00
Benjamin Yolken de88764e93 Misc. tweaks to improve webpack performance (#2994)
* Misc. tweaks to improve webpack performance

* Fix code climate style issues
2017-06-20 08:40:33 -07:00
Rogan 9051e1f3e2 translations extracted by pybabel (#2990) 2017-06-19 23:58:39 -07:00
Andrew Chen ba93e6a2d1 Fix importing config from env var (#2983) 2017-06-19 23:51:34 -07:00
Maxime Beauchemin 7e5e229f48 Improving TextAreaControl to support code and modal (#2988) 2017-06-19 22:27:16 -07:00
Maxime Beauchemin b9915e7ecf [pivot viz] fix formatting and verbose names (#2957)
* [pivot viz] fix formatting and verbose names

* Fixing tests
2017-06-19 22:10:54 -07:00
Maxime Beauchemin 3e51c61dbf [explore] improve bubble viz (#2927)
* [explore] improve bubble viz

* allow for custom axis formatters
* reorg the control panels

* Addressing comments
2017-06-19 22:09:09 -07:00
Grace Guo 591e512327 add test coverage for SqlEditorLeftBar (#2984) 2017-06-19 11:39:32 -07:00
Grace Guo fc5db474b7 fix is_owner check (#2985) 2017-06-19 10:57:30 -07:00
Maxime Beauchemin c083aec8e8 [FilterBox] use column verbose names (#2970) 2017-06-17 09:46:27 -07:00
Maxime Beauchemin 1ce3b81d01 Imporving the README 2017-06-16 23:35:46 -07:00
Maxime Beauchemin 89cd10b3ce [bufix] superset views not getting from_dttm-to_dttm in template context (#2978) 2017-06-15 22:49:55 -07:00
Maxime Beauchemin 712297480c [CLI] adding 'superset flower' command (flower is a UI for Celery) (#2963)
* [CLI] adding 'superset flower' command (flower is a UI for Celery)

* Addressing comments
2017-06-15 17:02:17 -07:00
Alanna Scott 6ddccaaa9b tests for saveQuery, fetchQueryResults, runQuery, postStopQuery (#2979) 2017-06-15 15:35:31 -07:00
Grace Guo 1dcf2c4326 fix local state 'columns' (#2896)
* fix local state 'columns'
* fix method name per code review
2017-06-15 15:30:13 -07:00
Alanna Scott f0a8ea644b test props on alert wrapper (#2977) 2017-06-15 14:18:34 -07:00
Grace Guo fb6ef26a24 add test coverage for ResultSet component (#2972)
* add test coverage for ResultSet component
2017-06-15 13:51:09 -07:00
Alanna Scott 00b34d7fbd [js-testing] add tests for explore actions (#2976)
* move to explore folder and delete explorev2 folder

* add tests for fetchDatasourceMetadata

* tests for fetchDatasources, fetchDatasourceMetadata

* use $.ajax for fetch dashboards and write test
2017-06-15 12:26:22 -07:00
Grace Guo 8329ea2b9b Edit Dashboard title and Slice title in place (#2940)
* Edit Dashboard title and Slice title in place

Add EditableTitle component into Dashboard and Explore view to support edit title inline.
2017-06-14 12:52:12 -07:00
Alanna Scott da0a87a735 add test for ControlPanelSection (#2961) 2017-06-14 10:12:29 -07:00
Maxime Beauchemin 7aeca39c46 [js] remove unused npm dependencies (#2952) 2017-06-13 22:08:13 -07:00
Alanna Scott e1751c065c add new slice test (#2939)
* sort explicitly on label

* add simple test for /slicemodelview/add endpoint

* make comments and method names more clear

* fix test name

* be more explicit, test status_code
2017-06-13 09:44:26 -07:00
Alanna Scott e5151cb915 [js] version js file names using webpack chunkhash (#2951)
* get compiled js file names

* make manifest available as template var

* use script src directly to avoid flash of unstyled content in the case of csstheme.js

* linting

* attempt to fix tests

* exception

* print the path when no manifest file found

* handle case when manifest.json is not present for some reason, or in the case of tests
2017-06-13 09:44:00 -07:00
Maxime Beauchemin 24e3c7f89a [dashboard] notify instead of modal onSave (#2941)
* [dashboard] notify instead of modal onSave

* Addressing comments
2017-06-12 21:04:46 -07:00
Maxime Beauchemin 987cb9978d [hotfix] bumping pandas version to 0.20.2 2017-06-13 00:03:33 +00:00
Nishant Bangarwa 274d21795f Fix handling of Chunked requests (#1742)
* Fix handling of Chunked requests

Add fix for handling chunk encoding requests.
If ENABLE_CHUNK_ENCODING is set to true, for requests with transfer
encoding set to true. It will set wsgi.input_terminated to true which
tells werkzeug to ignore content-length and read the stream till the
end.

 break comment in multiple lines

* remove debug print logging
2017-06-12 13:46:14 -07:00
Maxime Beauchemin 0d2c2b0681 [table viz] get metrics to right-align (#2943)
Moved the histogram to be rooted on the right side as well

fixes https://github.com/airbnb/superset/issues/2933
2017-06-12 13:35:00 -07:00
Maxime Beauchemin 1eff48facb Bumping some dependencies (#2945)
Most notably Flask AppBuilder to 1.9.0
2017-06-12 13:21:14 -07:00
timfeirg 17bd7512ff remove reference for CSRF_ENABLED, and use WTF_CSRF_ENABLED instead (#2946) 2017-06-12 13:17:59 -07:00
Maxime Beauchemin 16141ecb94 [explore] improve metric(s) and groupby(s) controls (#2921)
* [explore] improve metric(s) and groupby(s) controls

- surface verbose_name, description & expression in controls
- [table viz] surface verbose name in table header

* Fixing tests

* Addressing comments

* Fixing tests (once more)
2017-06-09 11:29:55 -07:00
Alanna Scott 34f381bc25 v 0.18.5-alpha.3 2017-06-08 11:21:07 -07:00
Alanna Scott 24292dbc11 add new slice form improvements (#2928)
* dont set first datasource as default

* not used

* add a disabled class if datasource is not selected

* sort datasources alphabettically

* make btn disabled is no datasource is selected

* fix linting
2017-06-08 10:49:02 -07:00
Maxime Beauchemin 24a2f5b8f0 [big number] various improvements (#2912)
* [big number] various improvements

* dynamic number of X axis ticks based on width to prevent label overlap
* corrected overflow on the x axis
* improved tooltips (precise arrow and visible data point circle on hover)

* Fixing tooltips in heatmap viz
2017-06-08 08:50:30 -07:00
Maxime Beauchemin 0e6f754af9 Fix #2814 - json serialization edge case (#2924) 2017-06-08 08:49:01 -07:00
Alanna Scott fb85f008fa v 0.18.5-alpha.2 2017-06-07 23:12:16 -07:00
Maxime Beauchemin 85fb4a933d [hotfix] only apply SQLAlchemy limit where needed
Observed issue in dev environment where SQL queries were emitted with
`LIMIT 0`. This fix addresses it.
2017-06-07 22:56:56 -07:00
Alanna Scott d3ace6d63f [js-testing] type checking for dates.js (#2893)
* tests for dates.js

* linting

* test fduration output

* ignore warnings in code climate

* use eslint-2 otherwise defaults to eslint-3

* test eslint 1

* remove channel rule

* disable checks

* checks for eslint engine
2017-06-07 22:27:21 -07:00
Alanna Scott 205eed8350 add more tests for Timer (#2889) 2017-06-07 22:12:07 -07:00
Alanna Scott 5bf40e2256 [slices] add simple new slice form (#2800)
* initial structure for add new slice page

* simplify add slice form

* add a test

* fix long line

* use underscore for template name

* fix controls path

* fix vis types select
2017-06-07 22:08:59 -07:00
Denny Biasiolli 7c28e4eace updating react-alert dependency to v2.0.1 (#2923) 2017-06-07 12:07:15 -07:00
Xiao Hanyu a882f7a55f Ignore pyenv files in .gitignore. (#2906)
Some python developers use Python version manager to create and switch Python
enviroments, pyenv (http://github.com/yyuu/pyenv) is one of the version managers.

When you use `pyenv local x.x.x`, `pyenv` will put a `.python-version` file in
project directory, which, in general, should not be commited to git.
2017-06-06 23:44:57 -07:00
Maxime Beauchemin 9aba77db74 0.18.5-alpha.1 2017-06-06 12:22:27 -07:00
Grace Guo c9e5fbb09b [dashboard]Add timeout message on Dashboard view (#2910)
Same as explore view, if query takes > 45 seconds not returned, we will show Query timeout warning message. Otherwise user will see 504 Gateway timeout error.
2017-06-06 12:05:05 -07:00
Maxime Beauchemin 65f25a1e5a [explore] fix IN filter on numeric field (#2908) 2017-06-05 17:41:08 -07:00
Josh Walters e0dd5d9d1d Removed __time column from druid metadata refresh, added long and double schema support (#2911)
* Removed __time column from load, added long/double schema support

* Format fix
2017-06-05 17:40:47 -07:00
Grace Guo 737db25b6e fix visualize modal checkbox alignment (#2897)
in Visualize Modal, table headers are left-aligned. So columns checkboxes should also be left-aligned.
2017-06-05 10:38:42 -07:00
Maurizio Napolitano bea702269c update for the italian translation (#2902)
* italian translation

* update for the italian translation
2017-06-04 18:03:34 -07:00
Maxime Beauchemin d78da8a9bf [docs faq] how do I add new columns to an existing table (#2888) 2017-06-04 18:02:10 -07:00
Riccardo Magliocchetti ed8153ff8b update contributing a bit re contributing code (#2903)
* CONTRIBUTING: document starter_task label

* CONTRIBUTING: PR should work travis python versions

* CONTRIBUTING: move PR guidelines at the top

* CONTRIBUTING: no need to open a new pr after review
2017-06-04 18:00:33 -07:00
Riccardo Magliocchetti f7ce100180 travis: no need to install python3.5 (#2904)
As we are testing on 3.4 and 2.7.
2017-06-04 17:56:43 -07:00
Maxime Beauchemin 72291d65c9 0.18.4 2017-06-04 17:54:31 -07:00
Grace Guo 0d3f57a78d fix a linting error (#2895) 2017-06-02 15:52:39 -07:00
Alanna Scott 04fb0e2c2d fix js error on explore view (#2894)
* fix js error on explore view

* bump version
2017-06-02 14:36:51 -07:00
Maxime Beauchemin 155fec0a6b Updating CHANGELOG.md to 0.18.3 2017-06-02 13:06:21 -07:00
Maxime Beauchemin d90044cd52 0.18.3 2017-06-02 08:27:56 -07:00
fabianmenges 62bd4eb211 Converting filter argument to number if column is number (#2891) 2017-06-02 08:13:46 -07:00
Alanna Scott 677c427b16 delete DataPreviewModal, it doesn't get used anywhere (#2882) 2017-06-01 14:30:15 -07:00
justinr1234 52b0716571 [bugfix] allow database macro to work when CSRF is diabled (#2884) 2017-06-01 09:41:55 -07:00
Xiao Hanyu 04b662ea11 Fix a type error in rst' sub list. (#2881)
Sub list in rst requires a blank line above and below.

Ref:
- http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#bullet-lists
2017-05-31 21:26:17 -07:00
Grace Guo db052b17ea Add visualize advise for long query (#2879)
in SqlLab view, if query takes over 45 seconds, we will show advise to store a summarized data set before user clicks on Visualize button.
This advise will not block Visualize button.

fixes https://github.com/airbnb/superset/issues/2733
2017-05-31 15:50:26 -07:00
Maxime Beauchemin e300273e71 [explore] adding y_axis_bounds to force Y axis bounds (#2878)
* [explore] adding y_axis_bounds to force Y axis

* Handling comments
2017-05-31 14:47:09 -07:00
Maxime Beauchemin c5f2eafc90 [explore] 'Save as' -> 'Save' as it can be used to overwrite (#2875)
* [explore] 'Save as' -> 'Save' as it can be used to overwrite

* Fix tests
2017-05-31 14:31:13 -07:00
Alanna Scott 90e4d6469d [js-testing] more tests for SelectControl (#2877)
* rename spec folder

* remove special handling for viz_type control since it now uses VizTypeControl

* add test for getOptions

* linting

* add test for cwp

* linting
2017-05-31 10:52:02 -07:00
Grace Guo 1e7773eb16 Improve visualize modal test coverage (#2811)
add unit tests for VisualizeModal component
2017-05-30 18:16:22 -07:00
Maxime Beauchemin 3c89c8cc46 0.18.3-alpha.3 2017-05-30 11:24:14 -07:00
Maxime Beauchemin 74086dae2b [bars] fix sort numeric bar on x axis (#2812) 2017-05-30 11:18:25 -07:00
Maxime Beauchemin 66403f1876 [explore] viz type selector as modal (#2787)
* [explore] viz type selector as modal

* Addressing comments

* Adressing comments
2017-05-30 11:05:18 -07:00
Maxime Beauchemin 3a4cd3ae24 Applying specified limit in bubble plot (#2815)
* Applying specified limit in bubble plot

* Keeping bubbles proportinate
2017-05-30 11:04:44 -07:00
Maxime Beauchemin 4ffc1f613e Fix filter values populating for views (#2816) 2017-05-30 10:51:34 -07:00
Maxime Beauchemin dfbba84400 0.18.3-alpha.2 2017-05-30 10:39:17 -07:00
Grace Guo 77864e6cf4 reduce clientside timeout limit (#2820)
it was set to 60 seconds. But it seems gateway will return 504 around 50 seconds.
Will reduce client side timeout limit to 45 seconds.
2017-05-25 16:07:02 -07:00
Maxime Beauchemin 4d12251806 [explore] include ControlHeader as part of Control interface (#2809)
* [explore] include ControlHeader as part of Control interface

* Adressing comments
2017-05-25 11:54:26 -07:00
Alanna Scott 0c9f9b695b [clarity/consistency] rename /explorev2/ -> /explore/ (#2802)
* rename /explorev2/ -> /explore/

* add redirect for existing explorev2 urls

* fix long line

* remove extra line

* fix missed ref in spec
2017-05-24 17:12:28 -07:00
Marek Vavruša a4a2bf7ae9 filter_box: allow creatable entries (#2804)
The reason is that it should be able to create arbitrary filters
over attributes with very high cardinality, where loading all
possible combinations into the filter box is infeasible,
e.g. IPv6 addresses.
2017-05-24 14:41:58 -07:00
Grace Guo d0a04cde49 apply redux for VisualizeModal (#2795)
* redux visualize modal

* redux visualize modal

- apply redux
- add unit test for connect container component
- fix lint error

* redux visualize modal

- apply redux
- add unit test for connect container component
- fix lint error
2017-05-24 11:58:54 -07:00
Maxime Beauchemin 69685b9dcc Fixing country maps (#2801) 2017-05-24 09:27:04 -07:00
ymatagne b308a3eb4e Added Country Map : New Visualization tools (#2708)
* feat(visualization): Create new visualization's tools that display country with geojson file. Currently only  france and Spain are loaded

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by travis for mysql databases

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by codeclimate

* fix(visualization): fix issues

* doc(visualization): Init visualization documentation

* doc(visualization): init visualization documentation for country

* fix(visualization): implement iso 3166-2 for id of country

* fix(visualization): implement iso 3166-2 for id of country

* doc(visualization): init visualization documentation for country

* fix(visualization): implement iso 3166-2 for id of country

* feat(country_map): add ukraine map in component

* fix(visualization): Test dont working and add color based on metrics

* refacto(visualization): fix issues for es6 and color component
2017-05-23 10:43:33 -07:00
yamdraco bfa40bd360 [hotfix] 'filter box from and to date filter #2649' (#2785) 2017-05-22 21:15:10 -07:00
ShengyaoQian b0e2904c24 Updating permission when refreshing druid datasource (#2655)
* Updating permission when refreshing druid datasource

* Adding test

* Fix style

* Deletion view_menu after db, table, cluster, ds deletion

* Update table model

* Linting

* Override _delete instead of post_delete

* fix

* lint

* fix multi delete

* fix

* Refactoring

* Amending
2017-05-22 16:41:32 -07:00
Maxime Beauchemin ce506bdf65 Logging a few more actions (#2783)
* Logging a few more actions

* adding statsd dep
2017-05-19 10:25:58 -07:00
Maxime Beauchemin 922cc037bf 0.18.3-alpha.1 2017-05-18 15:59:28 -07:00
Maxime Beauchemin 8252ada1f9 [docs] more details on how filters are applied (#2778) 2017-05-18 15:56:42 -07:00
Maxime Beauchemin a2d2f8bb8c Enable filter value autocomplete in examples (#2781) 2017-05-18 15:56:24 -07:00
Maxime Beauchemin 7c5f61d6a6 Adding some STATSD logging (#2715) 2017-05-18 15:25:09 -07:00
Maxime Beauchemin 841e18a08c [sql lab] make database ordering alphabetical in left panel (#2769) 2017-05-17 21:31:16 -07:00
Maxime Beauchemin dbc7fef7f5 [sql lab] fix user timestamp is off (#2774) 2017-05-17 15:34:19 -07:00
1441 changed files with 228909 additions and 39517 deletions
-35
View File
@@ -1,35 +0,0 @@
engines:
csslint:
enabled: false
duplication:
enabled: false
eslint:
enabled: true
config:
config: superset/assets/.eslintrc
pep8:
enabled: true
fixme:
enabled: false
radon:
enabled: true
checks:
Complexity:
enabled: false
ratings:
paths:
- "**.py"
- "superset/assets/**.js"
- "superset/assets/**.jsx"
exclude_paths:
- ".*"
- "**.pyc"
- "**.gz"
- "env/"
- "tests/"
- "superset/assets/images/"
- "superset/assets/vendor/"
- "superset/assets/node_modules/"
- "superset/assets/javascripts/dist/"
- "superset/migrations"
- "docs/"
+11
View File
@@ -0,0 +1,11 @@
coverage:
status:
project:
default:
# Commits pushed to master should not make the overall
# project coverage decrease:
target: auto
threshold: 0%
patch:
default:
threshold: 0%
-1
View File
@@ -1 +0,0 @@
repo_token: eESbYiv4An6KEvjpmguDs4L7YkubXbqn1
+39
View File
@@ -0,0 +1,39 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
**/__pycache__/
**/.mypy_cache
**/.pytest_cache
**/.tox
**/.vscode
**/.idea
**/.coverage
**/.DS_Store
**/.eggs
**/.python-version
**/*.egg-info
**/*.bak
**/*.db
**/*.pyc
**/*.sqllite
**/*.swp
tests/
docs/
install/
superset/assets/node_modules/
superset/assets/cypress/
superset/assets/coverage/
+18
View File
@@ -0,0 +1,18 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FLASK_APP=superset:app
FLASK_ENV=development
Executable
+38
View File
@@ -0,0 +1,38 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more
version: 2
cli:
server: https://app.fossa.com
fetcher: custom
analyze:
modules:
- name: assets
type: npm
target: superset/assets
path: superset/assets
- name: docs
type: pip
target: docs
path: docs
- name: .
type: pip
target: .
path: .
+47
View File
@@ -0,0 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
---
A clear and concise description of what the bug is.
### Expected results
what you expected to happen.
### Actual results
what actually happens.
#### Screenshots
If applicable, add screenshots to help explain your problem.
#### How to reproduce the bug
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Environment
(please complete the following information):
- superset version: `superset version`
- python version: `python --version`
- node.js version: `node -v`
- npm version: `npm -v`
### Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
### Additional context
Add any other context about the problem here.
+17
View File
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+31
View File
@@ -0,0 +1,31 @@
---
name: SIP
about: Superset Improvement Proposal
---
## [SIP] Proposal for XXX
### Motivation
Description of the problem to be solved.
### Proposed Change
Describe how the feature will be implemented, or the problem will be solved. If possible, include mocks, screenshots, or screencasts (even if from different tools).
### New or Changed Public Interfaces
Describe any new additions to the model, views or `REST` endpoints. Describe any changes to existing visualizations, dashboards and React components. Describe changes that affect the Superset CLI and how Superset is deployed.
### New dependencies
Describe any `npm`/`PyPI` packages that are required. Are they actively maintained? What are their licenses?
### Migration Plan and Compatibility
Describe any database migrations that are necessary, or updates to stored URLs.
### Rejected Alternatives
Describe alternative approaches that were considered and rejected.
+31
View File
@@ -0,0 +1,31 @@
### CATEGORY
Choose one
- [ ] Bug Fix
- [ ] Enhancement (new features, refinement)
- [ ] Refactor
- [ ] Add tests
- [ ] Build / Development Environment
- [ ] Documentation
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TEST PLAN
<!--- What steps should be taken to verify the changes -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
### REVIEWERS
+15
View File
@@ -0,0 +1,15 @@
# Configuration for request-info - https://github.com/behaviorbot/request-info
# *Required* Comment to reply with
requestInfoReplyComment: >
We would appreciate it if you could provide us with more info about this issue/pr!
Please do not leave the `title` or `description` empty.
# *OPTIONAL* default titles to check against for lack of descriptiveness
# MUST BE ALL LOWERCASE
requestInfoDefaultTitles:
- update readme.md
- updates
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
requestInfoLabelToAdd: "need:more-info"
+5
View File
@@ -0,0 +1,5 @@
# for Issue Label Bot https://github.com/marketplace/issue-label-bot
label-alias:
bug: '#bug'
feature_request: '#enhancement'
question: '#question'
+27
View File
@@ -0,0 +1,27 @@
# Configuration for Move Issues - https://github.com/dessant/move-issues
# Delete the command comment when it contains no other content
deleteCommand: true
# Close the source issue after moving
closeSourceIssue: true
# Lock the source issue after moving
lockSourceIssue: false
# Mention issue and comment authors
mentionAuthors: true
# Preserve mentions in the issue content
keepContentMentions: false
# Move labels that also exist on the target repository
moveLabels: true
# Set custom aliases for targets
# aliases:
# r: repo
# or: owner/repo
# Repository to extend settings from
# _extends: repo
+19
View File
@@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- "#SIP"
- ".pinned"
- ".security"
# Label to use when marking an issue as stale
staleLabel: inactive
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
Thank you for your contributions. For admin, please label this issue `.pinned`
to prevent stale bot from closing the issue.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
+76 -21
View File
@@ -1,34 +1,89 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
*.ipynb
*.bak
*.db
*.pyc
yarn-error.log
_modules
superset/assets/coverage/*
changelog.sh
.DS_Store
*.sqllite
*.swp
.cache-loader
.coverage
.DS_Store
.eggs
.envrc
.idea
.mypy_cache
.python-version
.tox
.vscode
_build
_static
_images
_modules
superset/bin/supersetc
env_py3
.eggs
_static
build
*.db
tmp
superset_config.py
local_config.py
env
dist
superset.egg-info/
app.db
*.bak
.idea
*.sqllite
apache_superset.egg-info/
changelog.sh
dist
dump.rdb
env
venv*
env_py3
envpy3
env36
local_config.py
superset_config.py
superset.egg-info/
superset/bin/supersetc
tmp
# Node.js, webpack artifacts
*.entry.js
*.js.map
node_modules
npm-debug.log
yarn.lock
npm-debug.log*
superset/assets/coverage/*
superset/assets/cypress/screenshots
superset/assets/cypress/videos
superset/assets/version_info.json
yarn-error.log
# IntelliJ
*.iml
venv
@eaDir/
# Docker
./Dockerfile
./docker-build.sh
./docker-compose.yml
./docker-entrypoint.sh
./docker-init.sh
# Test data
celery_results.sqlite
celerybeat-schedule
celerydb.sqlite
celerybeat.pid
geckodriver.log
ghostdriver.log
testCSV.csv
.terser-plugin-cache/
apache-superset-*.tar.gz*
# Translation binaries
messages.mo
-22
View File
@@ -1,22 +0,0 @@
doc-warnings: yes
test-warnings: no
strictness: medium
max-line-length: 90
uses:
- flask
autodetect: yes
pylint:
disable:
- cyclic-import
- invalid-name
- logging-format-interpolation
options:
docstring-min-length: 10
pep8:
full: true
ignore-paths:
- docs
- superset/migrations/env.py
ignore-patterns:
- ^example/doc_.*\.py$
- (^|/)docs(/|$)
+42
View File
@@ -0,0 +1,42 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
repos:
- repo: https://github.com/ambv/black
rev: 19.3b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-added-large-files
- id: check-yaml
- id: debug-statements
-2
View File
@@ -1,2 +0,0 @@
[pycodestyle]
max-line-length = 90
+25 -9
View File
@@ -1,3 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
[MASTER]
# Specify a configuration file.
@@ -23,7 +39,7 @@ persistent=yes
load-plugins=
# Use multiple processes to speed up Pylint.
jobs=1
jobs=2
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
@@ -65,7 +81,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=standarderror-builtin,long-builtin,dict-view-method,intern-builtin,suppressed-message,no-absolute-import,unpacking-in-except,apply-builtin,delslice-method,indexing-exception,old-raise-syntax,print-statement,cmp-builtin,reduce-builtin,useless-suppression,coerce-method,input-builtin,cmp-method,raw_input-builtin,nonzero-method,backtick,basestring-builtin,setslice-method,reload-builtin,oct-method,map-builtin-not-iterating,execfile-builtin,old-octal-literal,zip-builtin-not-iterating,buffer-builtin,getslice-method,metaclass-assignment,xrange-builtin,long-suffix,round-builtin,range-builtin-not-iterating,next-method-called,dict-iter-method,parameter-unpacking,unicode-builtin,unichr-builtin,import-star-module-level,raising-string,filter-builtin-not-iterating,old-ne-operator,using-cmp-argument,coerce-builtin,file-builtin,old-division,hex-method,invalid-unary-operand-type
disable=standarderror-builtin,long-builtin,dict-view-method,intern-builtin,suppressed-message,no-absolute-import,unpacking-in-except,apply-builtin,delslice-method,indexing-exception,old-raise-syntax,print-statement,cmp-builtin,reduce-builtin,useless-suppression,coerce-method,input-builtin,cmp-method,raw_input-builtin,nonzero-method,backtick,basestring-builtin,setslice-method,reload-builtin,oct-method,map-builtin-not-iterating,execfile-builtin,old-octal-literal,zip-builtin-not-iterating,buffer-builtin,getslice-method,metaclass-assignment,xrange-builtin,long-suffix,round-builtin,range-builtin-not-iterating,next-method-called,dict-iter-method,parameter-unpacking,unicode-builtin,unichr-builtin,import-star-module-level,raising-string,filter-builtin-not-iterating,old-ne-operator,using-cmp-argument,coerce-builtin,file-builtin,old-division,hex-method,invalid-unary-operand-type,missing-docstring,too-many-lines,duplicate-code,bad-continuation
[REPORTS]
@@ -99,10 +115,10 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_,d,e,v,o,l,x,ts
good-names=i,j,k,ex,Run,_,d,e,v,o,l,x,ts,f
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
bad-names=foo,bar,baz,toto,tutu,tata,d,fd
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
@@ -193,7 +209,7 @@ max-nested-blocks=5
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=90
max-line-length=88
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
@@ -232,7 +248,7 @@ logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
notes=FIXME,XXX
[SIMILARITIES]
@@ -277,12 +293,12 @@ ignore-mixin-members=yes
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=numpy,pandas,alembic.op,sqlalchemy,alembic.context,flask_appbuilder.security.sqla.PermissionView.role,flask_appbuilder.Model.metadata,flask_appbuilder.Base.metadata
ignored-modules=numpy,pandas,alembic.op,sqlalchemy,alembic.context,flask_appbuilder.security.sqla.PermissionView.role,flask_appbuilder.Model.metadata,flask_appbuilder.Base.metadata,distutils
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local
ignored-classes=contextlib.closing,optparse.Values,thread._local,_thread._local,sqlalchemy.orm.scoping.scoped_session
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
@@ -292,7 +308,7 @@ generated-members=
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
contextmanager-decorators=contextlib.contextmanager,contextlib2.contextmanager
[VARIABLES]
+42
View File
@@ -0,0 +1,42 @@
.gitignore
.gitattributes
.coverage
.coveragerc
.codecov.yml
.eslintrc
.eslintignore
.flake8
.prettierrc
.rat-excludes
.*log
.*pyc
.*lock
.*geojson
DISCLAIMER
licenses/*
node_modules/*
rat-results.txt
babel-node
dist
build
superset.egg-info
apache_superset.egg-info
.idea
.*sql
.*zip
.*lock
# json and csv in general cannot have comments
.*json
.*csv
# Generated doc files
docs/_build/*
_build/*
_static/*
.buildinfo
searchindex.js
# auto generated
requirements.txt
# vendorized
vendor/*
# github configuration
.github/*
+112 -33
View File
@@ -1,38 +1,117 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
jobs:
include:
- language: python
python: 3.6
env:
- TOXENV=fossa
install:
- pip install --upgrade pip
- pip install tox
- language: python
python: 3.6
env:
- TOXENV=license-check
- TRAVIS_CACHE=$HOME/.travis_cache/
addons:
apt:
packages:
- openjdk-8-jdk
install:
- pip install --upgrade pip
- pip install tox
- language: python
python: 3.6
env: TOXENV=cypress-dashboard
services:
- redis-server
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
env: TOXENV=cypress-explore
services:
- redis-server
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
env: TOXENV=cypress-sqllab
services:
- redis-server
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
env: TOXENV=py36-mysql
services:
- mysql
- redis-server
before_script:
- mysql -u root -e "DROP DATABASE IF EXISTS superset; CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
- mysql -u root -e "GRANT ALL ON superset.* TO 'mysqluser'@'localhost';"
- language: python
env: TOXENV=javascript
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
env: TOXENV=black
- language: python
python: 3.6
env: TOXENV=isort
- language: python
python: 3.6
env: TOXENV=mypy
- language: python
python: 3.6
env: TOXENV=py36-sqlite
services:
- redis-server
- language: python
python: 3.6
env: TOXENV=py36-postgres
services:
- postgresql
- redis-server
before_script:
- psql -U postgres -c "CREATE DATABASE superset;"
- psql -U postgres -c "CREATE USER postgresuser WITH PASSWORD 'pguserpassword';"
- language: python
python: 3.6
env: TOXENV=pylint
language: python
addons:
code_climate:
repo_token: 5f3a06c425eef7be4b43627d7d07a3e46c45bdc07155217825ff7c49cb6a470c
apt:
sources:
- deadsnakes
packages:
- python3.5
script:
- tox
after_success:
- codecov
cache:
pip: true
directories:
- $HOME/.wheelhouse/
env:
global:
- TRAVIS_CACHE=$HOME/.travis_cache/
- TRAVIS_NODE_VERSION="6.10.2"
matrix:
- TOX_ENV=javascript
- TOX_ENV=pylint
- TOX_ENV=py34-postgres
- TOX_ENV=py34-sqlite
- TOX_ENV=py27-mysql
- TOX_ENV=py27-sqlite
before_install:
- npm install -g npm@'>=4.5.0'
before_script:
- mysql -e 'drop database if exists superset; create database superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci' -u root
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
- mysql -u root -e "GRANT ALL ON superset.* TO 'mysqluser'@'localhost';"
- psql -c 'create database superset;' -U postgres
- psql -c "CREATE USER postgresuser WITH PASSWORD 'pguserpassword';" -U postgres
- export PATH=${PATH}:/tmp/hive/bin
- ~/.npm
- ~/.cache
- ~/.travis_cache/
- superset/assets/.terser-plugin-cache/
addons:
apt:
packages:
- libgconf-2-4
install:
- pip install --upgrade pip
- pip install tox tox-travis
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
script: tox -e $TOX_ENV
- pip install codecov tox
+2671
View File
File diff suppressed because it is too large Load Diff
+22
View File
@@ -0,0 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Code of Conduct
We follow the
[Apache Software Foundation's Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)
+666 -229
View File
File diff suppressed because it is too large Load Diff
+11
View File
@@ -0,0 +1,11 @@
DISCLAIMER
Apache Superset (incubating) is an effort undergoing incubation at the Apache
Software Foundation (ASF), sponsored by the Apache Incubator PMC.
Incubation is required of all newly accepted projects until a further review
indicates that the infrastructure, communications, and decision making process
have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness or
stability of the code, it does indicate that the project has yet to be fully
endorsed by the ASF.
+23
View File
@@ -0,0 +1,23 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# INSTALL / BUILD instructions for Apache Superset (incubating)
At this time, the docker file at RELEASING/Dockerfile.from_tarball
constitutes the recipe on how to get to a working release from a source
release tarball.
-25
View File
@@ -1,25 +0,0 @@
Please use [pull requests](https://github.com/airbnb/superset/pull/new/master)
to add your organization and/or project to this document!
Organizations
----------
- [Airbnb](https://github.com/airbnb)
- [GfK Data Lab](http://datalab.gfk.com)
- [Maieutical Labs](https://cloudschooling.it)
- [Shopkick](https://www.shopkick.com)
- [Amino](https://amino.com)
- [Faasos](http://faasos.com/)
- [Clark.de](http://clark.de/)
- [Yahoo!](www.yahoo.com)
- [Digit Game Studios](https://www.digitgaming.com/)
- [Brilliant.org](https://brilliant.org/)
- [Qunar](https://www.qunar.com/)
- [Udemy](https://www.udemy.com/)
- [Tooploox](https://www.tooploox.com/)
- [Tobii](http://www.tobii.com/)
- [Endress+Hauser](http://www.endress.com/)
- [Tails.com](https://tails.com)
Projects
----------
- None we know of yet
-19
View File
@@ -1,19 +0,0 @@
Make sure these boxes are checked before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if any
- [ ] I have reproduced the issue with at least the latest released version of superset
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar
### Superset version
### Expected results
### Actual results
### Steps to reproduce
+15
View File
@@ -199,3 +199,18 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
============================================================================
APACHE SUPERSET SUBCOMPONENTS:
The Apache Superset project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for the these
subcomponents is subject to the terms and conditions of the following
licenses.
========================================================================
Third party Apache 2.0 licenses
========================================================================
(Apache 2.0 License) The Roboto family of fonts (https://github.com/google/roboto)
+36 -8
View File
@@ -1,9 +1,37 @@
recursive-include superset/templates *
recursive-include superset/static *
recursive-exclude superset/static/assets/node_modules *
recursive-include superset/static/assets/node_modules/font-awesome *
recursive-exclude superset/static/docs *
recursive-exclude superset/static/spec *
recursive-exclude tests *
recursive-include superset/data *
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include NOTICE
include LICENSE.txt
graft licenses/
include README.md
recursive-include superset/examples *
recursive-include superset/migrations *
include superset/assets/package.json
# Whitelist anything that needs to be added to the static bundle
recursive-exclude superset/static *
recursive-include superset/static/assets/branding *
recursive-include superset/static/assets/dist *
recursive-include superset/static/assets/images *
recursive-exclude superset/static/images/viz_thumbnails_large *
recursive-include superset/static/assets/stylesheets *
include superset/static/assets/version_info.json
recursive-include superset/templates *
recursive-include superset/translations *
recursive-exclude tests *
+5
View File
@@ -0,0 +1,5 @@
Apache Superset (incubating)
Copyright 2016-2019 The Apache Software Foundation
This product includes software developed at The Apache Software
Foundation (http://www.apache.org/).
+153 -82
View File
@@ -1,17 +1,31 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Superset
=========
[![Build Status](https://travis-ci.org/airbnb/superset.svg?branch=master)](https://travis-ci.org/airbnb/superset)
[![PyPI version](https://badge.fury.io/py/superset.svg)](https://badge.fury.io/py/superset)
[![Coverage Status](https://coveralls.io/repos/airbnb/superset/badge.svg?branch=master&service=github)](https://coveralls.io/github/airbnb/superset?branch=master)
[![JS Test Coverage](https://codeclimate.com/github/airbnb/superset/badges/coverage.svg)](https://codeclimate.com/github/airbnb/superset/coverage)
[![Code Health](https://landscape.io/github/airbnb/superset/master/landscape.svg?style=flat)](https://landscape.io/github/airbnb/superset/master)
[![Code Climate](https://codeclimate.com/github/airbnb/superset/badges/gpa.svg)](https://codeclimate.com/github/airbnb/superset)
[![PyPI](https://img.shields.io/pypi/pyversions/superset.svg?maxAge=2592000)](https://pypi.python.org/pypi/superset)
[![Requirements Status](https://requires.io/github/airbnb/superset/requirements.svg?branch=master)](https://requires.io/github/airbnb/superset/requirements/?branch=master)
[![Join the chat at https://gitter.im/airbnb/superset](https://badges.gitter.im/airbnb/superset.svg)](https://gitter.im/airbnb/superset?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Documentation](https://img.shields.io/badge/docs-airbnb.io-blue.svg)](http://airbnb.io/superset/)
[![dependencies Status](https://david-dm.org/airbnb/superset/status.svg?path=superset/assets)](https://david-dm.org/airbnb/superset?path=superset/assets)
[![Build Status](https://travis-ci.org/apache/incubator-superset.svg?branch=master)](https://travis-ci.org/apache/incubator-superset)
[![PyPI version](https://badge.fury.io/py/apache-superset.svg)](https://badge.fury.io/py/apache-superset)
[![Coverage Status](https://codecov.io/github/apache/incubator-superset/coverage.svg?branch=master)](https://codecov.io/github/apache/incubator-superset)
[![PyPI](https://img.shields.io/pypi/pyversions/apache-superset.svg?maxAge=2592000)](https://pypi.python.org/pypi/apache-superset)
[![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LWJmOTcxYjlhZTRhYmEyYTMzOWYxOWEwMjcwZDZiNWRiNDY2NDUwNzcwMDFhNzE1ZmMxZTZlZWY0ZTQ2MzMyNTU)
[![Documentation](https://img.shields.io/badge/docs-apache.org-blue.svg)](https://superset.incubator.apache.org)
[![dependencies Status](https://david-dm.org/apache/incubator-superset/status.svg?path=superset/assets)](https://david-dm.org/apache/incubator-superset?path=superset/assets)
<img
src="https://cloud.githubusercontent.com/assets/130878/20946612/49a8a25c-bbc0-11e6-8314-10bef902af51.png"
@@ -19,8 +33,8 @@ Superset
width="500"
/>
**Superset** is a data exploration platform designed to be visual, intuitive
and interactive.
**Apache Superset** (incubating) is a modern, enterprise-ready
business intelligence web application
[this project used to be named **Caravel**, and **Panoramix** in the past]
@@ -30,46 +44,44 @@ Screenshots & Gifs
**View Dashboards**
![superset-dashboard](https://cloud.githubusercontent.com/assets/130878/20371438/a703a2a0-ac19-11e6-80c4-00a47c2eb644.gif)
<kbd><img title="View Dashboards" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/bank_dash.png"></kbd><br/>
<br/>
**Slice & dice your data**
**View/Edit a Slice**
<kbd><img title="Slice & dice your data" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/explore.png"></kbd><br/>
![superset-explore-slice](https://cloud.githubusercontent.com/assets/130878/20372732/410392f4-ac22-11e6-9c6d-3ef512e81212.gif)
**Query and visualize your data with SQL Lab**
<br/>
<kbd><img title="SQL Lab" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/sqllab.png"></kbd><br/>
**Query and Visualize with SQL Lab**
**Visualize geospatial data with deck.gl**
![superset-sql-lab-visualization](https://cloud.githubusercontent.com/assets/130878/20372911/7c3b3358-ac23-11e6-8f24-923ef1b35715.gif)
<kbd><img title="Geospatial" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/deckgl_dash.png"></kbd><br/>
<br/>
**Choose from a wide array of visualizations**
![superset-dashboard-misc](https://cloud.githubusercontent.com/assets/130878/20234704/0f40778c-a835-11e6-9556-983a62ea061b.png)
<kbd><img title="Visualizations" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/visualizations.png"></kbd><br/>
![superset-edit-table](https://cloud.githubusercontent.com/assets/130878/20234705/0f415c88-a835-11e6-8b03-f7c35d56dd7d.png)
![superset-query-search](https://cloud.githubusercontent.com/assets/130878/20234706/0f430a10-a835-11e6-8a0d-8b26cc2e6bbd.png)
Superset
---------
Superset's main goal is to make it easy to slice, dice and visualize data.
It empowers users to perform **analytics at the speed of thought**.
Apache Superset
---------------
Apache Superset is a data exploration and visualization web application.
Superset provides:
* A quick way to intuitively visualize datasets by allowing users to create
and share interactive dashboards
* A rich set of visualizations to analyze your data, as well as a flexible
way to extend the capabilities
* An intuitive interface to explore and visualize datasets, and
create interactive dashboards.
* A wide array of beautiful visualizations to showcase your data.
* Easy, code-free, user flows to drill down and slice and dice the data
underlying exposed dashboards. The dashboards and charts acts as a starting
point for deeper analysis.
* A state of the art SQL editor/IDE exposing a rich metadata browser, and
an easy workflow to create visualizations out of any result set.
* An extensible, high granularity security model allowing intricate rules
on who can access which features, and integration with major
authentication providers (database, OpenID, LDAP, OAuth & REMOTE_USER
through Flask AppBuilder)
* A simple semantic layer, allowing to control how data sources are
displayed in the UI, by defining which fields should show up in
which dropdown and which aggregation and function (metrics) are
made available to the user
on who can access which product features and datasets.
Integration with major
authentication backends (database, OpenID, LDAP, OAuth, REMOTE_USER, ...)
* A lightweight semantic layer, allowing to control how data sources are
exposed to the user by defining dimensions and metrics
* Out of the box support for most SQL-speaking databases
* Deep integration with Druid allows for Superset to stay blazing fast while
slicing and dicing large, realtime datasets
* Fast loading dashboards with configurable caching
@@ -78,15 +90,24 @@ Superset provides:
Database Support
----------------
Superset was originally designed on top of Druid.io, but quickly broadened
its scope to support other databases through the use of SQLAlchemy, a Python
Superset speaks many SQL dialects through SQLAlchemy, a Python
ORM that is compatible with
[most common databases](http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html).
[most common databases](https://docs.sqlalchemy.org/en/rel_1_2/core/engines.html).
A list of currently supported SQL databases can be found
[here](https://superset.incubator.apache.org/#databases).
What is Druid?
-------------
From their website at http://druid.io
Apache Druid (Incubating)!
------
On top of having the ability to query your relational databases,
Superset ships with deep integration with Druid (a real time distributed
column-store). When querying Druid,
Superset can query humongous amounts of data on top of real time dataset.
Note that Superset does not require Druid in any way to function, it's simply
another database backend that it can query.
Here's a description of Druid from the http://druid.io website:
*Druid is an open-source analytics data store designed for
business intelligence (OLAP) queries on event data. Druid provides low
@@ -99,50 +120,100 @@ power analytic dashboards and applications.*
Installation & Configuration
----------------------------
[See in the documentation](http://airbnb.io/superset/installation.html)
More screenshots
----------------
![superset-security-menu](https://cloud.githubusercontent.com/assets/130878/20234707/0f565886-a835-11e6-9277-b4f5f4aa2fcc.png)
![superset-slice-bubble](https://cloud.githubusercontent.com/assets/130878/20234708/0f57f3d0-a835-11e6-8268-fcefe8f868c8.png)
![superset-slice-map](https://cloud.githubusercontent.com/assets/130878/20234709/0f5a5a44-a835-11e6-987a-1b6f8ac9922b.png)
![superset-slice-multiline](https://cloud.githubusercontent.com/assets/130878/20234710/0f632d68-a835-11e6-98d1-542dcb618193.png)
![superset-slice-sankey](https://cloud.githubusercontent.com/assets/130878/20234711/0f639136-a835-11e6-8721-fe5e48dab8e7.png)
![superset-slice-view](https://cloud.githubusercontent.com/assets/130878/20234712/0f63c4c6-a835-11e6-8595-6091a6428fa9.png)
![superset-sql-lab-2](https://cloud.githubusercontent.com/assets/130878/20234713/0f67b856-a835-11e6-9d50-7a52168f66fd.png)
![superset-sql-lab](https://cloud.githubusercontent.com/assets/130878/20234714/0f68f45a-a835-11e6-9467-f47ad0af7e79.png)
[See in the documentation](https://superset.incubator.apache.org/installation.html)
Resources
-------------
* [Superset Google Group](https://groups.google.com/forum/#!forum/airbnb_superset)
* [Mailing list](https://lists.apache.org/list.html?dev@superset.apache.org)
* [Gitter (live chat) Channel](https://gitter.im/airbnb/superset)
* [Docker image](https://hub.docker.com/r/amancevice/superset/) (community contributed)
* [Slides from Strata (March 2016)](https://drive.google.com/open?id=0B5PVE0gzO81oOVJkdF9aNkJMSmM)
Tip of the Hat
--------------
Superset would not be possible without these great frameworks / libs
* Flask App Builder - Allowing us to focus on building the app quickly while
getting the foundation for free
* The Flask ecosystem - Simply amazing. So much Plug, easy play.
* NVD3 - One of the best charting libraries out there
* Much more, check out the `install_requires` section in the [setup.py](https://github.com/airbnb/superset/blob/master/setup.py) file!
* [Stackoverflow tag](https://stackoverflow.com/questions/tagged/apache-superset)
* [Join our Slack](https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LWJmOTcxYjlhZTRhYmEyYTMzOWYxOWEwMjcwZDZiNWRiNDY2NDUwNzcwMDFhNzE1ZmMxZTZlZWY0ZTQ2MzMyNTU)
* [DEPRECATED Google Group](https://groups.google.com/forum/#!forum/airbnb_superset)
Contributing
------------
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/superset/blob/master/CONTRIBUTING.md)
Interested in contributing? Casual hacking? Check out
[Contributing.MD](https://github.com/airbnb/superset/blob/master/CONTRIBUTING.md)
Who uses Apache Superset (incubating)?
--------------------------------------
Here's a list of organizations who have taken the time to send a PR to let
the world know they are using Superset. Join our growing community!
1. [6play](https://www.6play.fr)
1. [AiHello](https://www.aihello.com)
1. [Airbnb](https://github.com/airbnb)
1. [Airboxlab](https://foobot.io)
1. [Aktia Bank plc](https://www.aktia.com)
1. [American Express](https://www.americanexpress.com)
1. [Amino](https://amino.com)
1. [Apollo GraphQL](https://www.apollographql.com/)
1. [Ascendica Development](http://ascendicadevelopment.com)
1. [Astronomer](https://www.astronomer.io)
1. [Brilliant.org](https://brilliant.org/)
1. [Capital Service S.A.](http://capitalservice.pl)
1. [Clark.de](http://clark.de/)
1. [Cloudsmith](https://cloudsmith.io)
1. [CnOvit](http://www.cnovit.com/)
1. [Deepomatic](https://deepomatic.com/)
1. [Dial Once](https://www.dial-once.com/en/)
1. [Digit Game Studios](https://www.digitgaming.com/)
1. [Douban](https://www.douban.com/)
1. [Endress+Hauser](http://www.endress.com/)
1. [Faasos](http://faasos.com/)
1. [Fanatics](https://www.fanatics.com)
1. [FBK - ICT center](http://ict.fbk.eu)
1. [Fordeal](http://www.fordeal.com)
1. [GFG - Global Fashion Group](https://global-fashion-group.com)
1. [GfK Data Lab](http://datalab.gfk.com)
1. [Grassroot](https://www.grassrootinstitute.org/)
1. [Hostnfly](https://www.hostnfly.com/)
1. [HuiShouBao](http://www.huishoubao.com/)
1. [Intercom](https://www.intercom.com/)
1. [jampp](https://jampp.com/)
1. [komoot](https://www.komoot.com/)
1. [Konfío](http://konfio.mx)
1. [Kuaishou](https://www.kuaishou.com/)
1. [Lime](https://www.limebike.com/)
1. [Living Goods](https://www.livinggoods.org)
1. [Lyft](https://www.lyft.com/)
1. [Maieutical Labs](https://maieuticallabs.it)
1. [Myra Labs](http://www.myralabs.com/)
1. [Now](https://www.now.vn/)
1. [Ona](https://ona.io)
1. [PeopleDoc](https://www.people-doc.com)
1. [Pronto Tools](http://www.prontotools.io)
1. [QPID Health](http://www.qpidhealth.com/ )
1. [Qunar](https://www.qunar.com/)
1. [Safaricom](https://www.safaricom.co.ke/)
1. [Scoot](https://scoot.co/)
1. [ScopeAI](https://www.getscopeai.com)
1. [Shopee](https://shopee.sg)
1. [Shopkick](https://www.shopkick.com)
1. [Showmax](https://tech.showmax.com)
1. [source{d}](https://www.sourced.tech)
1. [Steamroot](https://streamroot.io/)
1. [Tails.com](https://tails.com)
1. [Tenable](https://www.tenable.com)
1. [THE ICONIC](http://theiconic.com.au/)
1. [TME QQMUSIC/WESING](https://www.tencentmusic.com/)
1. [Tobii](http://www.tobii.com/)
1. [Tooploox](https://www.tooploox.com/)
1. [TrustMedis](https://trustmedis.com)
1. [Twitter](https://twitter.com/)
1. [Udemy](https://www.udemy.com/)
1. [VIPKID](https://www.vipkid.com.cn/)
1. [WeSure](https://www.wesure.cn/)
1. [Windsor.ai](https://www.windsor.ai/)
1. [WP-Semantix](https://wpsemantix.com/)
1. [Yahoo!](https://yahoo.com/)
1. [Zaihang](http://www.zaih.com/)
1. [Zalando](https://www.zalando.com)
1. [Zalora](https://www.zalora.com)
+71
View File
@@ -0,0 +1,71 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.6-jessie
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
# Configure environment
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
RUN apt-get update -y
# Install dependencies to fix `curl https support error` and `elaying package configuration warning`
RUN apt-get install -y apt-transport-https apt-utils
# Install superset dependencies
# https://superset.incubator.apache.org/installation.html#os-dependencies
RUN apt-get install -y build-essential libssl-dev \
libffi-dev python3-dev libsasl2-dev libldap2-dev libxi-dev
# Install nodejs for custom build
# https://superset.incubator.apache.org/installation.html#making-your-own-build
# https://nodejs.org/en/download/package-manager/
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs
RUN mkdir -p /home/superset
RUN chown superset /home/superset
WORKDIR /home/superset
ARG VERSION
RUN svn co https://dist.apache.org/repos/dist/dev/incubator/superset/$VERSION ./
RUN tar -xvf *.tar.gz
WORKDIR apache-superset-incubating-$VERSION
RUN cd superset/assets \
&& npm ci \
&& npm run build \
&& rm -rf node_modules
WORKDIR /home/superset/apache-superset-incubating-$VERSION
RUN pip install --upgrade setuptools pip \
&& pip install -r requirements.txt -r requirements-dev.txt \
&& pip install -e . \
&& rm -rf /root/.cache/pip
RUN fabmanager babel-compile --target superset/translations
RUN pip install -e . \
&& rm -rf /root/.cache/pip
ENV PATH=/home/superset/superset/bin:$PATH \
PYTHONPATH=/home/superset/superset/:$PYTHONPATH
COPY from_tarball_entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+19
View File
@@ -0,0 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.6-jessie
COPY make_tarball.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+160
View File
@@ -0,0 +1,160 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Apache Releases
You'll probably want to run these commands manually and understand what
they do prior to doing so.
For coordinating on releases, on more operational topics that require more
synchronous communications, we tend to use the `#apache-releases` channel
on the Superset Slack. People crafting releases and those interested in
partaking in the process should join the channel.
## Release setup
First you need to setup a few things. This is a one-off and doesn't
need to be done at every release.
```bash
# Create PGP Key, and use your @apache.org email address
gpg --gen-key
# Checkout ASF dist repo
svn checkout https://dist.apache.org/repos/dist/dev/incubator/superset/ ~/svn/superset_dev
svn checkout https://dist.apache.org/repos/dist/release/incubator/superset/ ~/svn/superset
cd ~/svn/superset
# Add your GPG pub key to KEYS file. Replace "Maxime Beauchemin" with your name
export FULLNAME="Maxime Beauchemin"
(gpg --list-sigs $FULLNAME && gpg --armor --export $FULLNAME ) >> KEYS
# Commit the changes
svn commit -m "Add PGP keys of new Superset committer"
```
## Crafting tarball and signatures
Now let's craft a source release
```bash
# Assuming these commands are executed from the root of the repo
export REPO_DIR=$(pwd)
# Set VERSION to the release being prepared (rc1 for first vote on version)
export VERSION=0.34.1rc1
export RELEASE=apache-superset-incubating-${VERSION}
export RELEASE_TARBALL=${RELEASE}-source.tar.gz
# Let's create a git tag
git tag -f ${VERSION}
# Create the target folder
mkdir -p ~/svn/superset_dev/${VERSION}/
git archive \
--format=tar.gz ${VERSION} \
--prefix="${RELEASE}/" \
-o ~/svn/superset_dev/${VERSION}/${RELEASE_TARBALL}
cd ~/svn/superset_dev/${VERSION}/
${REPO_DIR}/scripts/sign.sh ${RELEASE}-source.tar.gz
```
## Shipping to SVN
Now let's ship this RC into svn's dev folder
```bash
cd ~/svn/superset_dev/
svn add ${VERSION}
svn commit -m "${VERSION}"
```
Now you're ready to start the VOTE thread.
## Validating a release
https://www.apache.org/info/verification.html
## Publishing a successful release
Upon a successful vote, you'll have to copy the folder into the non-"dev/"
folder.
```bash
cp -r ~/svn/superset_dev/${VERSION}/ ~/svn/superset/${VERSION}/
cd ~/svn/superset/
svn add ${VERSION}
svn commit -m "${VERSION}"
```
Now you can announce the release on the mailing list, make sure to use the
proper template
## Post release
In `UPDATING.md`, a file that contains a list of notifications around
deprecations and upgrading-related topics,
make sure to move the content now under the `Next Version` section under a new
section for the new release.
## Build from source tarball
To make a working build given a tarball
```bash
# Building a docker from a tarball
VERSION=0.33.0rc2 && \
docker build -t apache-superset:$VERSION -f Dockerfile.from_tarball . --build-arg VERSION=$VERSION
# testing the resulting docker
docker run -p 5001:8088 apache-superset:$VERSION
# you should be able to access localhost:5001 on your browser
# login using admin/admin
```
# Refresh documentation website
Every once in a while we want to compile the documentation and publish it.
Here's how to do it.
```bash
# install doc dependencies
pip install -r docs/requirements.txt
# build the docs
python setup.py build_sphinx
# copy html files to temp folder
cp -r docs/_build/html/ /tmp/tmp_superset_docs/
# clone the docs repo
cd ~/
git clone https://git-wip-us.apache.org/repos/asf/incubator-superset-site.git
# copy
cp -r /tmp/tmp_superset_docs/ ~/incubator-superset-site.git/
# commit and push to `asf-site` branch
cd ~/incubator-superset-site.git/
git checkout asf-site
git add .
git commit -a -m "New doc version"
git push origin master
```
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -ex
echo "[WARNING] this entrypoint creates an admin/admin user"
echo "[WARNING] it should only be used for lightweight testing/validation"
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
fabmanager create-admin \
--app superset \
--username admin \
--firstname admin \
--lastname admin \
--email admin@admin.com \
--password admin
# Initialize the database
superset db upgrade
# Loading examples
superset load_examples
# Create default roles and permissions
superset init
FLASK_ENV=development FLASK_APP=superset:app \
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -ex
if [ -z "$VERSION" ]; then
echo "VERSION is required to run this container"
exit 1
fi
echo "version: $VERSION"
cd /tmp
git clone --depth 1 --branch $VERSION https://github.com/apache/incubator-superset.git
mkdir ~/$VERSION
cd incubator-superset && \
git archive \
--format=tar.gz \
--prefix=apache-superset-incubating-$VERSION/ \
HEAD \
-o ~/$VERSION/apache-superset-incubating.tar.gz
gpg --armor --output apache-superset-incubating.tar.gz.asc --detach-sig apache-superset-incubating.tar.gz
gpg --print-md SHA512 apache-superset-incubating.tar.gz > apache-superset-incubating.tar.gz.sha512
-48
View File
@@ -1,48 +0,0 @@
# TODO
List of TODO items for Superset
## Important
* **Getting proper JS testing:** unit tests on the Python side are pretty
solid, but now we need a test suite for the JS part of the site,
testing all the ajax-type calls
* **Viz Plugins:** Allow people to define and share visualization plugins.
ideally one would only need to drop in a set of files in a folder and
Superset would discover and expose the plugins
## Features
* **Dashboard URL filters:** `{dash_url}#fltin__fieldname__value1,value2`
* **Default slice:** choose a default slice for the dataset instead of
default endpoint
* **Widget sets / chart grids:** a way to have all charts support making
a series of charts and putting them in a grid. The same way that you
can groupby for series, you could chart by. The form field set would be
common and use a single field to "grid by", a limit number of chart as
an N * N grid size.
* **Advanced dashboard configuration:** currently you can define which
slices in a dashboard are immune to filtering.
* **Annotations layers:** allow for people to maintain data annotations,
attached to a layer and time range. These layers can be added on top of
some visualizations as annotations. An example of a layer might be
"holidays" or "site outages", ...
* **Slack integration** - TBD
* **Comments:** allow for people to comment on slices and dashes
## Easy-ish fix
* Build matrix to include mysql using tox
* CREATE VIEW button from SQL editor
* Test button for when editing SQL expression
* Slider form element
* [druid] Allow for post aggregations (ratios!)
* in/notin filters autocomplete (druid)
## New viz
* Maps that use geocodes
* Time animated scatter plots
* Horizon charts
* Calendar heatmap
* Chord diagram
* ...
## Community
* Turorial vids
+190
View File
@@ -0,0 +1,190 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Updating Superset
This file documents any backwards-incompatible changes in Superset and
assists people when migrating to a new version.
## Next Version
* [8370](https://github.com/apache/incubator-superset/pull/8370): Deprecates
the `HTTP_HEADERS` variable in favor of `DEFAULT_HTTP_HEADERS` and
`OVERRIDE_HTTP_HEADERS`. To retain the same behavior you should use
`OVERRIDE_HTTP_HEADERS` instead of `HTTP_HEADERS`. `HTTP_HEADERS` will still
work but may be removed in a future update.
* We're deprecating the concept of "restricted metric", this feature
was not fully working anyhow.
* [8117](https://github.com/apache/incubator-superset/pull/8117): If you are
using `ENABLE_PROXY_FIX = True`, review the newly-introducted variable,
`PROXY_FIX_CONFIG`, which changes the proxy behavior in accordance with
[Werkzeug](https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/)
* [8069](https://github.com/apache/incubator-superset/pull/8069): introduces
[MessagePack](https://github.com/msgpack/msgpack-python) and
[PyArrow](https://arrow.apache.org/docs/python/) for async query results
backend serialization. To disable set `RESULTS_BACKEND_USE_MSGPACK = False`
in your configuration.
* [8371](https://github.com/apache/incubator-superset/pull/8371): makes
`tables.table_name`, `dbs.database_name`, `datasources.cluster_name`, and `clusters.cluster_name` non-nullable.
Depending on the integrity of the data, manual intervention may be required.
## 0.34.0
* [7848](https://github.com/apache/incubator-superset/pull/7848): If you are
running redis with celery, celery bump to 4.3.0 requires redis-py upgrade to
3.2.0 or later.
* [7667](https://github.com/apache/incubator-superset/pull/7667): a change to
make all Unix timestamp (which by definition are in UTC) comparisons refer
to a timestamp in UTC as opposed to local time.
* [7653](https://github.com/apache/incubator-superset/pull/7653): a change
which deprecates the table_columns.database_expression column. Expressions
should be handled by the DB engine spec conversion, Python date format, or
custom column expression/type.
* The repo no longer contains translation binaries (`.mo`) files. If you
want translations in your build, you now have to run the command
`babel-compile --target superset/translations` as part of your builds
* [5451](https://github.com/apache/incubator-superset/pull/5451): a change
which adds missing non-nullable fields to the `datasources` table. Depending on
the integrity of the data, manual intervention may be required.
* [5452](https://github.com/apache/incubator-superset/pull/5452): a change
which adds missing non-nullable fields and uniqueness constraints (which may be
case insensitive depending on your database configuration) to the `columns`and
`table_columns` tables. Depending on the integrity of the data, manual
intervention may be required.
* `fabmanager` command line is deprecated since Flask-AppBuilder 2.0.0, use
the new `flask fab <command>` integrated with *Flask cli*.
* `SUPERSET_UPDATE_PERMS` environment variable was replaced by
`FAB_UPDATE_PERMS` config boolean key. To disable automatic
creation of permissions set `FAB_UPDATE_PERMS = False` on config.
* [5453](https://github.com/apache/incubator-superset/pull/5453): a change
which adds missing non-nullable fields and uniqueness constraints (which may be
case insensitive depending on your database configuration) to the metrics
and sql_metrics tables. Depending on the integrity of the data, manual
intervention may be required.
* [7616](https://github.com/apache/incubator-superset/pull/7616): this bug fix
changes time_compare deltas to correctly evaluate to the number of days prior
instead of number of days in the future. It will change the data for advanced
analytics time_compare so `1 year` from 5/1/2019 will be calculated as 365 days
instead of 366 days.
## Superset 0.32.0
* `npm run backend-sync` is deprecated and no longer needed, will fail if called
* [5445](https://github.com/apache/incubator-superset/pull/5445): a change
which prevents encoding of empty string from form data in the database.
This involves a non-schema changing migration which does potentially impact
a large number of records. Scheduled downtime may be advised.
## Superset 0.31.0
* If you use `Hive` or `Presto`, we've moved some dependencies that were
in the main package as optional now. To get these packages,
run `pip install superset[presto]` and/or `pip install superset[hive]` as
required.
* Similarly, if you use Celery's `flower`, `gsheetsdb`, `thrift` or
`thrift-sasl`, those dependencies have now been made optional in our
package, meaning you may have to install them in your environment post
0.31.0
* boto3 / botocore was removed from the dependency list. If you use s3
as a place to store your SQL Lab result set or Hive uploads, you may
have to rely on an alternate requirements.txt file to install those
dependencies.
* From 0.31.0 onwards, we recommend not using the npm package `yarn` in
favor of good old `npm install`. While yarn should still work just fine,
you should probably align to guarantee builds similar to the ones we
use in testing and across the community in general.
## Superset 0.30.0
* 0.30.0 includes a db_migration that removes allow_run_sync. This may
require downtime because during the migration if the db is migrated first,
superset will get 500 errors when the code can't find the field (until
the deploy finishes).
## Superset 0.29.0
* India was removed from the "Country Map" visualization as the geojson
file included in the package was very large
## Superset 0.28.0
* Support for Python 2 is deprecated, we only support >=3.6 from
`0.28.0` onwards
* Superset 0.28 deprecates the previous dashboard layout. While 0.27
offered a migration workflow to users and allowed them to validate and
publish their migrated dashboards individually, 0.28 forces
the migration of all
dashboards through an automated db migration script. We
do recommend that you take a backup prior to this migration.
* Superset 0.28 deprecates the `median` cluster label aggregator for mapbox visualizations. This particular aggregation is not supported on mapbox visualizations going forward.
* Superset 0.28 upgrades `flask-login` to `>=0.3`, which includes a
backwards-incompatible change: `g.user.is_authenticated`,
`g.user.is_anonymous`, and `g.user.is_active` are now properties
instead of methods.
## Superset 0.27.0
* Superset 0.27 start to use nested layout for dashboard builder, which is not
backward-compatible with earlier dashboard grid data. We provide migration script
to automatically convert dashboard grid to nested layout data. To be safe, please
take a database backup prior to this upgrade. It's the only way people could go
back to a previous state.
## Superset 0.26.0
* Superset 0.26.0 deprecates the `superset worker` CLI, which is a simple
wrapper around the `celery worker` command, forcing you into crafting
your own native `celery worker` command. Your command should look something
like `celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair`
## Superset 0.25.0
Superset 0.25.0 contains a backwards incompatible changes.
If you run a production system you should schedule downtime for this
upgrade.
The PRs bellow have more information around the breaking changes:
* [4587](https://github.com/apache/incubator-superset/pull/4587) : a backward
incompatible database migration that requires downtime. Once the
db migration succeeds, the web server needs to be restarted with the
new version. The previous version will fail
* [4565](https://github.com/apache/incubator-superset/pull/4565) : we've
changed the security model a bit where in the past you would have to
define your authentication scheme by inheriting from Flask
App Builder's
`from flask_appbuilder.security.sqla.manager import SecurityManager`,
you now have to derive Superset's
own derivative `superset.security.SupersetSecurityManager`. This
can provide you with more hooks to define your own logic and/or defer
permissions to another system as needed. For all implementation, you
simply have to import and derive `SupersetSecurityManager` in place
of the `SecurityManager`
* [4835](https://github.com/apache/incubator-superset/pull/4835) :
our `setup.py` now only pins versions where required, giving you
more latitude in using versions of libraries as needed. We do now
provide a `requirements.txt` with pinned versions if you want to run
the suggested versions that `Superset` builds and runs tests against.
Simply `pip install -r requirements.txt` in your build pipeline, likely
prior to `pip install superset==0.25.0`
+17
View File
@@ -1,3 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# A generic, single database configuration.
[alembic]
View File
-4
View File
@@ -1,4 +0,0 @@
[ignore: superset/assets/node_modules/**]
[python: superset/**.py]
[jinja2: superset/**/templates/**.html]
encoding = utf-8
-722
View File
@@ -1,722 +0,0 @@
# Translations template for PROJECT.
# Copyright (C) 2017 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2017-04-20 09:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.4.0\n"
#: superset/db_engine_specs.py:191 superset/db_engine_specs.py:222
#: superset/db_engine_specs.py:266 superset/db_engine_specs.py:313
#: superset/db_engine_specs.py:357 superset/db_engine_specs.py:763
#: superset/db_engine_specs.py:799 superset/db_engine_specs.py:831
msgid "Time Column"
msgstr ""
#: superset/db_engine_specs.py:192 superset/db_engine_specs.py:223
#: superset/db_engine_specs.py:314 superset/db_engine_specs.py:358
#: superset/db_engine_specs.py:764 superset/db_engine_specs.py:832
msgid "second"
msgstr ""
#: superset/db_engine_specs.py:193 superset/db_engine_specs.py:226
#: superset/db_engine_specs.py:317 superset/db_engine_specs.py:360
#: superset/db_engine_specs.py:766 superset/db_engine_specs.py:800
#: superset/db_engine_specs.py:834
msgid "minute"
msgstr ""
#: superset/db_engine_specs.py:194 superset/db_engine_specs.py:230
#: superset/db_engine_specs.py:319 superset/db_engine_specs.py:362
#: superset/db_engine_specs.py:772 superset/db_engine_specs.py:802
#: superset/db_engine_specs.py:836
msgid "hour"
msgstr ""
#: superset/db_engine_specs.py:195 superset/db_engine_specs.py:235
#: superset/db_engine_specs.py:267 superset/db_engine_specs.py:321
#: superset/db_engine_specs.py:364 superset/db_engine_specs.py:774
#: superset/db_engine_specs.py:804 superset/db_engine_specs.py:838
msgid "day"
msgstr ""
#: superset/db_engine_specs.py:196 superset/db_engine_specs.py:241
#: superset/db_engine_specs.py:268 superset/db_engine_specs.py:322
#: superset/db_engine_specs.py:366 superset/db_engine_specs.py:776
#: superset/db_engine_specs.py:806 superset/db_engine_specs.py:840
msgid "week"
msgstr ""
#: superset/db_engine_specs.py:197 superset/db_engine_specs.py:243
#: superset/db_engine_specs.py:270 superset/db_engine_specs.py:324
#: superset/db_engine_specs.py:368 superset/db_engine_specs.py:778
#: superset/db_engine_specs.py:808 superset/db_engine_specs.py:842
msgid "month"
msgstr ""
#: superset/db_engine_specs.py:198 superset/db_engine_specs.py:245
#: superset/db_engine_specs.py:326 superset/db_engine_specs.py:370
#: superset/db_engine_specs.py:780 superset/db_engine_specs.py:810
#: superset/db_engine_specs.py:844
msgid "quarter"
msgstr ""
#: superset/db_engine_specs.py:199 superset/db_engine_specs.py:249
#: superset/db_engine_specs.py:328 superset/db_engine_specs.py:782
#: superset/db_engine_specs.py:812
msgid "year"
msgstr ""
#: superset/db_engine_specs.py:330
msgid "week_start_monday"
msgstr ""
#: superset/db_engine_specs.py:372 superset/db_engine_specs.py:846
msgid "week_ending_saturday"
msgstr ""
#: superset/db_engine_specs.py:375 superset/db_engine_specs.py:849
msgid "week_start_sunday"
msgstr ""
#: superset/db_engine_specs.py:768
msgid "5 minute"
msgstr ""
#: superset/db_engine_specs.py:770
msgid "half hour"
msgstr ""
#: superset/viz.py:306
msgid "Table View"
msgstr ""
#: superset/viz.py:359
msgid "Pivot Table"
msgstr ""
#: superset/viz.py:408
msgid "Markup"
msgstr ""
#: superset/viz.py:427
msgid "Separator"
msgstr ""
#: superset/viz.py:443
msgid "Word Cloud"
msgstr ""
#: superset/viz.py:466
msgid "Treemap"
msgstr ""
#: superset/viz.py:492
msgid "Calendar Heatmap"
msgstr ""
#: superset/viz.py:550
msgid "Box Plot"
msgstr ""
#: superset/viz.py:639
msgid "Bubble Chart"
msgstr ""
#: superset/viz.py:687
msgid "Bullet Chart"
msgstr ""
#: superset/viz.py:736
msgid "Big Number with Trendline"
msgstr ""
#: superset/viz.py:765
msgid "Big Number"
msgstr ""
#: superset/viz.py:792
msgid "Time Series - Line Chart"
msgstr ""
#: superset/viz.py:919
msgid "Time Series - Dual Axis Line Chart"
msgstr ""
#: superset/viz.py:994
msgid "Time Series - Bar Chart"
msgstr ""
#: superset/viz.py:1002
msgid "Time Series - Percent Change"
msgstr ""
#: superset/viz.py:1010
msgid "Time Series - Stacked"
msgstr ""
#: superset/viz.py:1019
msgid "Distribution - NVD3 - Pie Chart"
msgstr ""
#: superset/viz.py:1037
msgid "Histogram"
msgstr ""
#: superset/viz.py:1062
msgid "Distribution - Bar Chart"
msgstr ""
#: superset/viz.py:1129
msgid "Sunburst"
msgstr ""
#: superset/viz.py:1162
msgid "Sankey"
msgstr ""
#: superset/viz.py:1211
msgid "Directed Force Layout"
msgstr ""
#: superset/viz.py:1232
msgid "World Map"
msgstr ""
#: superset/viz.py:1282
msgid "Filters"
msgstr ""
#: superset/viz.py:1317
msgid "iFrame"
msgstr ""
#: superset/viz.py:1334
msgid "Parallel Coordinates"
msgstr ""
#: superset/viz.py:1359
msgid "Heatmap"
msgstr ""
#: superset/viz.py:1410
msgid "Horizon Charts"
msgstr ""
#: superset/viz.py:1421
msgid "Mapbox"
msgstr ""
#: superset/connectors/druid/models.py:926
msgid "No data was returned."
msgstr ""
#: superset/connectors/druid/views.py:37 superset/connectors/sqla/views.py:74
msgid "Column"
msgstr ""
#: superset/connectors/druid/views.py:38 superset/connectors/druid/views.py:97
#: superset/connectors/sqla/views.py:120
msgid "Type"
msgstr ""
#: superset/connectors/druid/views.py:39 superset/views/core.py:299
#: superset/views/core.py:345
msgid "Datasource"
msgstr ""
#: superset/connectors/druid/views.py:40 superset/connectors/sqla/views.py:77
msgid "Groupable"
msgstr ""
#: superset/connectors/druid/views.py:41 superset/connectors/sqla/views.py:78
msgid "Filterable"
msgstr ""
#: superset/connectors/druid/views.py:42 superset/connectors/sqla/views.py:80
msgid "Count Distinct"
msgstr ""
#: superset/connectors/druid/views.py:43 superset/connectors/sqla/views.py:81
msgid "Sum"
msgstr ""
#: superset/connectors/druid/views.py:44 superset/connectors/sqla/views.py:82
msgid "Min"
msgstr ""
#: superset/connectors/druid/views.py:45 superset/connectors/sqla/views.py:83
msgid "Max"
msgstr ""
#: superset/connectors/druid/views.py:48 superset/connectors/sqla/views.py:43
msgid ""
"Whether this column is exposed in the `Filters` section of the explore "
"view."
msgstr ""
#: superset/connectors/druid/views.py:88 superset/connectors/sqla/views.py:102
msgid ""
"Whether the access to this metric is restricted to certain roles. Only "
"roles with the permission 'metric access on XXX (the name of this "
"metric)' are allowed to access this metric"
msgstr ""
#: superset/connectors/druid/views.py:94 superset/connectors/sqla/views.py:117
msgid "Metric"
msgstr ""
#: superset/connectors/druid/views.py:95 superset/connectors/druid/views.py:190
#: superset/connectors/sqla/views.py:76 superset/connectors/sqla/views.py:118
#: superset/views/core.py:346
msgid "Description"
msgstr ""
#: superset/connectors/druid/views.py:96 superset/connectors/sqla/views.py:75
#: superset/connectors/sqla/views.py:119
msgid "Verbose Name"
msgstr ""
#: superset/connectors/druid/views.py:98 superset/views/core.py:516
msgid "JSON"
msgstr ""
#: superset/connectors/druid/views.py:99
msgid "Druid Datasource"
msgstr ""
#: superset/connectors/druid/views.py:123
#: superset/connectors/druid/views.py:189
msgid "Cluster"
msgstr ""
#: superset/connectors/druid/views.py:124
msgid "Coordinator Host"
msgstr ""
#: superset/connectors/druid/views.py:125
msgid "Coordinator Port"
msgstr ""
#: superset/connectors/druid/views.py:126
msgid "Coordinator Endpoint"
msgstr ""
#: superset/connectors/druid/views.py:127
msgid "Broker Host"
msgstr ""
#: superset/connectors/druid/views.py:128
msgid "Broker Port"
msgstr ""
#: superset/connectors/druid/views.py:129
msgid "Broker Endpoint"
msgstr ""
#: superset/connectors/druid/views.py:167 superset/connectors/sqla/views.py:153
msgid "Timezone offset (in hours) for this datasource"
msgstr ""
#: superset/connectors/druid/views.py:171
msgid ""
"Time expression to use as a predicate when retrieving distinct values to "
"populate the filter component. Only applies when `Enable Filter Select` "
"is on. If you enter `7 days ago`, the distinct list of values in the "
"filter will be populated based on the distinct value over the past week"
msgstr ""
#: superset/connectors/druid/views.py:178 superset/connectors/sqla/views.py:175
msgid ""
"Whether to populate the filter's dropdown in the explore view's filter "
"section with a list of distinct values fetched from the backend on the "
"fly"
msgstr ""
#: superset/connectors/druid/views.py:182 superset/connectors/sqla/views.py:188
msgid ""
"Redirects to this endpoint when clicking on the datasource from the "
"datasource list"
msgstr ""
#: superset/connectors/druid/views.py:188
msgid "Data Source"
msgstr ""
#: superset/connectors/druid/views.py:191
msgid "Owner"
msgstr ""
#: superset/connectors/druid/views.py:192
msgid "Is Hidden"
msgstr ""
#: superset/connectors/druid/views.py:193 superset/connectors/sqla/views.py:186
msgid "Enable Filter Select"
msgstr ""
#: superset/connectors/druid/views.py:194
msgid "Default Endpoint"
msgstr ""
#: superset/connectors/druid/views.py:195
msgid "Time Offset"
msgstr ""
#: superset/connectors/druid/views.py:196 superset/connectors/sqla/views.py:192
#: superset/views/core.py:237 superset/views/core.py:342
msgid "Cache Timeout"
msgstr ""
#: superset/connectors/sqla/models.py:371
msgid ""
"Datetime column not provided as part table configuration and is required "
"by this type of chart"
msgstr ""
#: superset/connectors/sqla/models.py:376
msgid "Metric '{}' is not valid"
msgstr ""
#: superset/connectors/sqla/views.py:39
msgid ""
"Whether to make this column available as a [Time Granularity] option, "
"column has to be DATETIME or DATETIME-like"
msgstr ""
#: superset/connectors/sqla/views.py:46
msgid ""
"The data type that was inferred by the database. It may be necessary to "
"input a type manually for expression-defined columns in some cases. In "
"most case users should not need to alter this."
msgstr ""
#: superset/connectors/sqla/views.py:79 superset/connectors/sqla/views.py:122
#: superset/connectors/sqla/views.py:182 superset/views/core.py:352
msgid "Table"
msgstr ""
#: superset/connectors/sqla/views.py:84
msgid "Expression"
msgstr ""
#: superset/connectors/sqla/views.py:85
msgid "Is temporal"
msgstr ""
#: superset/connectors/sqla/views.py:86
msgid "Datetime Format"
msgstr ""
#: superset/connectors/sqla/views.py:87
msgid "Database Expression"
msgstr ""
#: superset/connectors/sqla/views.py:121
msgid "SQL Expression"
msgstr ""
#: superset/connectors/sqla/views.py:154
msgid "Name of the table that exists in the source database"
msgstr ""
#: superset/connectors/sqla/views.py:156
msgid "Schema, as used only in some databases like Postgres, Redshift and DB2"
msgstr ""
#: superset/connectors/sqla/views.py:162
msgid ""
"This fields acts a Superset view, meaning that Superset will run a query "
"against this string as a subquery."
msgstr ""
#: superset/connectors/sqla/views.py:166
msgid ""
"Predicate applied when fetching distinct value to populate the filter "
"control component. Supports jinja template syntax. Applies only when "
"`Enable Filter Select` is on."
msgstr ""
#: superset/connectors/sqla/views.py:172
msgid "Redirects to this endpoint when clicking on the table from the table list"
msgstr ""
#: superset/connectors/sqla/views.py:183
msgid "Changed By"
msgstr ""
#: superset/connectors/sqla/views.py:184 superset/views/core.py:233
msgid "Database"
msgstr ""
#: superset/connectors/sqla/views.py:185 superset/views/core.py:235
msgid "Last Changed"
msgstr ""
#: superset/connectors/sqla/views.py:187
msgid "Schema"
msgstr ""
#: superset/connectors/sqla/views.py:191
msgid "Offset"
msgstr ""
#: superset/connectors/sqla/views.py:224
msgid ""
"The table was created. As part of this two phase configuration process, "
"you should now click the edit button by the new table to configure it."
msgstr ""
#: superset/templates/appbuilder/navbar_right.html:41
msgid "Profile"
msgstr ""
#: superset/templates/appbuilder/navbar_right.html:42
msgid "Logout"
msgstr ""
#: superset/templates/appbuilder/navbar_right.html:47
msgid "Login"
msgstr ""
#: superset/templates/superset/import_dashboards.html:11
msgid "Import"
msgstr ""
#: superset/templates/superset/request_access.html:2
msgid "No Access!"
msgstr ""
#: superset/templates/superset/request_access.html:7
#, python-format
msgid "You do not have permissions to access the datasource(s): %(name)s."
msgstr ""
#: superset/templates/superset/request_access.html:13
msgid "Request Permissions"
msgstr ""
#: superset/templates/superset/request_access.html:16
msgid "Cancel"
msgstr ""
#: superset/templates/superset/welcome.html:10
msgid "Welcome!"
msgstr ""
#: superset/templates/superset/welcome.html:20 superset/views/core.py:344
msgid "Dashboards"
msgstr ""
#: superset/templates/superset/models/database/macros.html:4
msgid "Test Connection"
msgstr ""
#: superset/views/core.py:201
msgid "Expose this DB in SQL Lab"
msgstr ""
#: superset/views/core.py:202
msgid ""
"Allow users to run synchronous queries, this is the default and should "
"work well for queries that can be executed within a web request scope "
"(<~1 minute)"
msgstr ""
#: superset/views/core.py:206
msgid ""
"Allow users to run queries, against an async backend. This assumes that "
"you have a Celery worker setup as well as a results backend."
msgstr ""
#: superset/views/core.py:210
msgid "Allow CREATE TABLE AS option in SQL Lab"
msgstr ""
#: superset/views/core.py:211
msgid ""
"Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in"
" SQL Lab"
msgstr ""
#: superset/views/core.py:215
msgid ""
"When allowing CREATE TABLE AS option in SQL Lab, this option forces the "
"table to be created in this schema"
msgstr ""
#: superset/views/core.py:229
msgid "Expose in SQL Lab"
msgstr ""
#: superset/views/core.py:230
msgid "Allow CREATE TABLE AS"
msgstr ""
#: superset/views/core.py:231
msgid "Allow DML"
msgstr ""
#: superset/views/core.py:232
msgid "CTAS Schema"
msgstr ""
#: superset/views/core.py:234 superset/views/core.py:343
#: superset/views/core.py:438 superset/views/core.py:500
msgid "Creator"
msgstr ""
#: superset/views/core.py:236
msgid "SQLAlchemy URI"
msgstr ""
#: superset/views/core.py:238
msgid "Extra"
msgstr ""
#: superset/views/core.py:296 superset/views/core.py:513
msgid "User"
msgstr ""
#: superset/views/core.py:297
msgid "User Roles"
msgstr ""
#: superset/views/core.py:298
msgid "Database URL"
msgstr ""
#: superset/views/core.py:300
msgid "Roles to grant"
msgstr ""
#: superset/views/core.py:301
msgid "Created On"
msgstr ""
#: superset/views/core.py:331
msgid ""
"These parameters are generated dynamically when clicking the save or "
"overwrite button in the explore view. This JSON object is exposed here "
"for reference and for power users who may want to alter specific "
"parameters."
msgstr ""
#: superset/views/core.py:336
msgid "Duration (in seconds) of the caching timeout for this slice."
msgstr ""
#: superset/views/core.py:347
msgid "Last Modified"
msgstr ""
#: superset/views/core.py:348 superset/views/core.py:437
msgid "Owners"
msgstr ""
#: superset/views/core.py:349
msgid "Parameters"
msgstr ""
#: superset/views/core.py:350 superset/views/core.py:386
msgid "Slice"
msgstr ""
#: superset/views/core.py:351
msgid "Name"
msgstr ""
#: superset/views/core.py:353
msgid "Visualization Type"
msgstr ""
#: superset/views/core.py:410
msgid ""
"This json object describes the positioning of the widgets in the "
"dashboard. It is dynamically generated when adjusting the widgets size "
"and positions by using drag & drop in the dashboard view"
msgstr ""
#: superset/views/core.py:415
msgid ""
"The css for individual dashboards can be altered here, or in the "
"dashboard view where changes are immediately visible"
msgstr ""
#: superset/views/core.py:419
msgid "To get a readable URL for your dashboard"
msgstr ""
#: superset/views/core.py:420
msgid ""
"This JSON object is generated dynamically when clicking the save or "
"overwrite button in the dashboard view. It is exposed here for reference "
"and for power users who may want to alter specific parameters."
msgstr ""
#: superset/views/core.py:425
msgid "Owners is a list of users who can alter the dashboard."
msgstr ""
#: superset/views/core.py:433 superset/views/core.py:498
msgid "Dashboard"
msgstr ""
#: superset/views/core.py:434 superset/views/core.py:499
msgid "Title"
msgstr ""
#: superset/views/core.py:435
msgid "Slug"
msgstr ""
#: superset/views/core.py:436
msgid "Slices"
msgstr ""
#: superset/views/core.py:439 superset/views/core.py:501
msgid "Modified"
msgstr ""
#: superset/views/core.py:440
msgid "Position JSON"
msgstr ""
#: superset/views/core.py:441
msgid "CSS"
msgstr ""
#: superset/views/core.py:442
msgid "JSON Metadata"
msgstr ""
#: superset/views/core.py:443
msgid "Underlying Tables"
msgstr ""
#: superset/views/core.py:514
msgid "Action"
msgstr ""
#: superset/views/core.py:515
msgid "dttm"
msgstr ""
#: superset/views/core.py:2241
msgid "SQL Editor"
msgstr ""
#: superset/views/core.py:2250
msgid "Query Search"
msgstr ""
+17
View File
@@ -0,0 +1,17 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
COMPOSE_PROJECT_NAME=superset
+72
View File
@@ -0,0 +1,72 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.6-jessie
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
# Configure environment
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
RUN apt-get update -y
# Install dependencies to fix `curl https support error` and `elaying package configuration warning`
RUN apt-get install -y apt-transport-https apt-utils
# Install superset dependencies
# https://superset.incubator.apache.org/installation.html#os-dependencies
RUN apt-get install -y build-essential libssl-dev \
libffi-dev python3-dev libsasl2-dev libldap2-dev libxi-dev
# Install extra useful tool for development
RUN apt-get install -y vim less postgresql-client redis-tools
# Install nodejs for custom build
# https://superset.incubator.apache.org/installation.html#making-your-own-build
# https://nodejs.org/en/download/package-manager/
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs
WORKDIR /home/superset
COPY requirements.txt .
COPY requirements-dev.txt .
COPY contrib/docker/requirements-extra.txt .
RUN pip install --upgrade setuptools pip \
&& pip install -r requirements.txt -r requirements-dev.txt -r requirements-extra.txt \
&& rm -rf /root/.cache/pip
COPY --chown=superset:superset superset superset
ENV PATH=/home/superset/superset/bin:$PATH \
PYTHONPATH=/home/superset/superset/:$PYTHONPATH
USER superset
RUN cd superset/assets \
&& npm ci \
&& npm run build \
&& rm -rf node_modules
COPY contrib/docker/docker-init.sh .
COPY contrib/docker/docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"]
EXPOSE 8088
+58
View File
@@ -0,0 +1,58 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Getting Started with Superset using Docker
Docker is an easy way to get started with Superset.
## Initializing Database
To initialize the database with a user and example charts, dashboards and datasets run:
```bash
docker-compose run -e SUPERSET_LOAD_EXAMPLES=yes --rm superset ./docker-init.sh
```
This may take a minute.
## Normal Operation
To run the container, simply run:
```bash
docker-compose up
```
After several minutes for superset initialization to finish, you can open a browser and view [`http://localhost:8088`](http://localhost:8088)
to start your journey.
## Developing
While running, the container server will reload on modification of the superset python and javascript source code.
Don't forget to reload the page to take the new frontend into account though.
## Production
It is also possible to run Superset in non-development mode: in the `docker-compose.yml` file remove
the volumes needed for development and change the variable `SUPERSET_ENV` to `production`.
## Resource Constraints
If you are attempting to build on a Mac and it exits with 137 you need to increase your docker resources.
OSX instructions: https://docs.docker.com/docker-for-mac/#advanced (Search for memory)
+71
View File
@@ -0,0 +1,71 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: '2'
services:
redis:
image: redis:3.2
restart: unless-stopped
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis:/data
postgres:
image: postgres:10
restart: unless-stopped
environment:
POSTGRES_DB: superset
POSTGRES_PASSWORD: superset
POSTGRES_USER: superset
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
superset:
build:
context: ../../
dockerfile: contrib/docker/Dockerfile
restart: unless-stopped
environment:
POSTGRES_DB: superset
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
REDIS_HOST: redis
REDIS_PORT: 6379
# If using production, comment development volume below
#SUPERSET_ENV: production
SUPERSET_ENV: development
user: root:root
ports:
- 8088:8088
depends_on:
- postgres
- redis
volumes:
# this is needed to communicate with the postgres and redis services
- ./superset_config.py:/home/superset/superset/superset_config.py
# this is needed for development, remove with SUPERSET_ENV=production
- ../../superset:/home/superset/superset
volumes:
postgres:
external: false
redis:
external: false
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -ex
if [ "$#" -ne 0 ]; then
exec "$@"
elif [ "$SUPERSET_ENV" = "development" ]; then
celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
# needed by superset runserver
(cd superset/assets/ && npm ci)
(cd superset/assets/ && npm run dev) &
FLASK_ENV=development FLASK_APP=superset:app flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
elif [ "$SUPERSET_ENV" = "production" ]; then
celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
exec gunicorn --bind 0.0.0.0:8088 \
--workers $((2 * $(getconf _NPROCESSORS_ONLN) + 1)) \
--timeout 60 \
--limit-request-line 0 \
--limit-request-field_size 0 \
superset:app
else
superset --help
fi
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -ex
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
export FLASK_APP=superset:app
flask fab create-admin
# Initialize the database
superset db upgrade
if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
# Load some data to play with
superset load_examples
fi
# Create default roles and permissions
superset init
+17
View File
@@ -0,0 +1,17 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
gevent==1.4.0
+58
View File
@@ -0,0 +1,58 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
def get_env_variable(var_name, default=None):
"""Get the environment variable or raise exception."""
try:
return os.environ[var_name]
except KeyError:
if default is not None:
return default
else:
error_msg = 'The environment variable {} was missing, abort...'\
.format(var_name)
raise EnvironmentError(error_msg)
POSTGRES_USER = get_env_variable('POSTGRES_USER')
POSTGRES_PASSWORD = get_env_variable('POSTGRES_PASSWORD')
POSTGRES_HOST = get_env_variable('POSTGRES_HOST')
POSTGRES_PORT = get_env_variable('POSTGRES_PORT')
POSTGRES_DB = get_env_variable('POSTGRES_DB')
# The SQLAlchemy connection string.
SQLALCHEMY_DATABASE_URI = 'postgresql://%s:%s@%s:%s/%s' % (POSTGRES_USER,
POSTGRES_PASSWORD,
POSTGRES_HOST,
POSTGRES_PORT,
POSTGRES_DB)
REDIS_HOST = get_env_variable('REDIS_HOST')
REDIS_PORT = get_env_variable('REDIS_PORT')
class CeleryConfig(object):
BROKER_URL = 'redis://%s:%s/0' % (REDIS_HOST, REDIS_PORT)
CELERY_IMPORTS = ('superset.sql_lab', )
CELERY_RESULT_BACKEND = 'redis://%s:%s/1' % (REDIS_HOST, REDIS_PORT)
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_TASK_PROTOCOL = 1
CELERY_CONFIG = CeleryConfig
View File
-3
View File
@@ -1,3 +0,0 @@
sphinx
sphinx-rtd-theme
sphinxcontrib.youtube
-13
View File
@@ -1,13 +0,0 @@
codeclimate-test-reporter
coveralls
flake8
flask_cors
mock
mysqlclient
nose
psycopg2
pylint
pythrifthiveapi
pyyaml
# Also install everything we need to build Sphinx docs
-r dev-reqs-for-docs.txt
+17 -1
View File
@@ -1,3 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for Sphinx documentation
#
@@ -9,7 +25,7 @@ BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
endif
# Internal variables.
+18
View File
@@ -1,3 +1,21 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
body {
padding-top: 0px;
}
-95
View File
@@ -1,95 +0,0 @@
{% extends "!layout.html" %}
{% set bootswatch_css_custom = ['_static/docs.css'] %}
{%- block content %}
{{ navBar() }}
{% if pagename == 'index' %}
<div id="carousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>
<li data-target="#carousel" data-slide-to="3"></li>
<li data-target="#carousel" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active text-center">
<img src="_static/img/dash.png">
<div class="carousel-caption">
<div>
<h1>Superset</h1>
<p>
an open source data visualization platform
</p>
</div>
</div>
</div>
<div class="item">
<img src="_static/img/bubble.png">
<div class="carousel-caption">
<h2>Explore your data
</h2>
<p>
Intuitively navigate your data while slicing, dicing, and
visualizing through a rich set of widgets
</p>
</div>
</div>
<div class="item">
<img src="_static/img/dash.png">
<div class="carousel-caption">
<h2>Create and share dashboards</h2>
<p>Assemble many data visualization "slices" into a rich collection</p>
</div>
</div>
<div class="item">
<img src="_static/img/cloud.png">
<div class="carousel-caption">
<h2>Extend</h2>
<p>Join the community and take part in extending the widget library</p>
</div>
</div>
<div class="item">
<img src="_static/img/servers.jpg">
<div class="carousel-caption">
<h2>Connect</h2>
<p>
Access data from MySql, Presto.db, Postgres, RedShift, Oracle, MsSql,
SQLite, and more through the SqlAlchemy integration. You can also
query realtime data blazingly fast out of Druid.io
</p>
</div>
</div>
</div>
<!-- Controls -->
<div>
<a class="left carousel-control" href="#carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<hr/>
<div class="container">
<div class="jumbotron">
<h1>Superset</h1>
<p>
is an open source data visualization platform that provides easy
exploration of your data and allows you to create and share
beautiful charts and dashboards
</p>
</div>
</div>
{% endif %}
<div class="container mainbody">
{% block body %}{% endblock %}
</div>
{%- endblock %}
+16
View File
@@ -1,4 +1,20 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
rm -rf _build
make html
#cp -r ../superset/assets/images/ _build/html/_static/img/
+22 -8
View File
@@ -1,5 +1,19 @@
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# superset documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 17 15:42:06 2015.
#
@@ -33,7 +47,7 @@ import sphinx_rtd_theme
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinxcontrib.youtube',
'sphinx_autodoc_typehints',
]
# Add any paths that contain templates here, relative to this directory.
@@ -51,9 +65,9 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = "Superset's documentation"
copyright = None
author = u'Maxime Beauchemin'
project = "Apache Superset"
copyright = 'Copyright © 2019 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.'
author = u'Apache Superset Dev'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -133,7 +147,7 @@ html_theme_options = {}
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = "images/s.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -178,7 +192,7 @@ html_static_path = ['_static']
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = False
@@ -229,7 +243,7 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'superset.tex', u'Superset Documentation',
u'Maxime Beauchemin', 'manual'),
u'Apache Superset Dev', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
+33 -17
View File
@@ -1,21 +1,36 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Druid
=====
Superset works well with Druid, though currently not all
advanced features out of Druid are covered. This page clarifies what is
covered and what isn't and explains how to use some of the features.
Superset has a native connector to Druid and a majority of Druid's
features are accessible through Superset.
.. note ::
Currently Airbnb runs against Druid ``0.8.x`` and previous /
following versions are not tested against.
Supported
'''''''''
Druid now supports SQL and can be accessed through Superset's
SQLAlchemy connector. The long-term vision is to deprecate
the Druid native REST connector and query Druid exclusively through
the SQL interface.
Aggregations
------------
Common aggregations, or Druid metrics can be defined and used in Superset.
Common aggregations or Druid metrics can be defined and used in Superset.
The first and simpler use case is to use the checkbox matrix expose in your
datasource's edit view (``Sources -> Druid Datasources ->
[your datasource] -> Edit -> [tab] List Druid Column``).
@@ -23,26 +38,27 @@ Clicking the ``GroupBy`` and ``Filterable`` checkboxes will make the column
appear in the related dropdowns while in explore view. Checking
``Count Distinct``, ``Min``, ``Max`` or ``Sum`` will result in creating
new metrics that will appear in the ``List Druid Metric`` tab upon saving the
datasource. By editing these metrics, you'll notice that they their ``json``
element correspond to Druid aggregation definition. You can create your own
datasource. By editing these metrics, you'll notice that their ``json``
element corresponds to Druid aggregation definition. You can create your own
aggregations manually from the ``List Druid Metric`` tab following Druid
documentation.
.. image:: _static/img/druid_agg.png
.. image:: images/druid_agg.png
:scale: 50 %
Post-Aggregations
-----------------
Druid supports post aggregation and this works in Superset. All you have to
do is creating a metric, much like you would create an aggregation manually,
do is create a metric, much like you would create an aggregation manually,
but specify ``postagg`` as a ``Metric Type``. You then have to provide a valid
json post-aggregation definition (as specified in the Druid docs) in the
Json field.
Not yet supported
'''''''''''''''''
Unsupported Features
--------------------
- Regex filters
- Lookups / joins
.. note ::
Unclear at this point, this section of the documentation could use
some input.
+213 -17
View File
@@ -1,3 +1,20 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
FAQ
===
@@ -45,15 +62,33 @@ visualizations.
https://github.com/airbnb/superset/issues?q=label%3Aexample+is%3Aclosed
Can I upload and visualize csv data?
------------------------------------
Yes, using the ``Upload a CSV`` button under the ``Sources`` menu item.
This brings up a form that allows you specify required information.
After creating the table from CSV, it can then be loaded like any
other on the ``Sources -> Tables`` page.
Why are my queries timing out?
------------------------------
If you are seeing timeouts (504 Gateway Time-out) when running queries,
it's because the web server is timing out web requests. If you want to
increase the default (50), you can specify the timeout when starting the
web server with the ``-t`` flag, which is expressed in seconds.
There are many reasons may cause long query timing out.
``superset runserver -t 300``
- For running long query from Sql Lab, by default Superset allows it run as long as 6 hours before it being killed by celery. If you want to increase the time for running query, you can specify the timeout in configuration. For example:
``SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6``
- Superset is running on gunicorn web server, which may time out web requests. If you want to increase the default (50), you can specify the timeout when starting the web server with the ``-t`` flag, which is expressed in seconds.
``superset runserver -t 300``
- If you are seeing timeouts (504 Gateway Time-out) when loading dashboard or explore slice, you are probably behind gateway or proxy server (such as Nginx). If it did not receive a timely response from Superset server (which is processing long queries), these web servers will send 504 status code to clients directly. Superset has a client-side timeout limit to address this issue. If query didn't come back within clint-side timeout (60 seconds by default), Superset will display warning message to avoid gateway timeout message. If you have a longer gateway timeout limit, you can change the timeout settings in ``superset_config.py``:
``SUPERSET_WEBSERVER_TIMEOUT = 60``
Why is the map not visible in the mapbox visualization?
@@ -70,7 +105,7 @@ It's easy: use the ``Filter Box`` widget, build a slice, and add it to your
dashboard.
The ``Filter Box`` widget allows you to define a query to populate dropdowns
that can be use for filtering. To build the list of distinct values, we
that can be used for filtering. To build the list of distinct values, we
run a query, and sort the result by the metric you provide, sorting
descending.
@@ -78,6 +113,11 @@ The widget also has a checkbox ``Date Filter``, which enables time filtering
capabilities to your dashboard. After checking the box and refreshing, you'll
see a ``from`` and a ``to`` dropdown show up.
By default, the filtering will be applied to all the slices that are built
on top of a datasource that shares the column name that the filter is based
on. It's also a requirement for that column to be checked as "filterable"
in the column tab of the table editor.
But what about if you don't want certain widgets to get filtered on your
dashboard? You can do that by editing your dashboard, and in the form,
edit the ``JSON Metadata`` field, more specifically the
@@ -85,15 +125,16 @@ edit the ``JSON Metadata`` field, more specifically the
never be affected by any dashboard level filtering.
..code::
.. code-block:: json
{
"filter_immune_slices": [324, 65, 92],
"expanded_slices": {},
"filter_immune_slice_fields": {
"177": ["country_name", "__from", "__to"],
"32": ["__from", "__to"]
}
"177": ["country_name", "__time_range"],
"32": ["__time_range"]
},
"timed_refresh_immune_slices": [324]
}
In the json blob above, slices 324, 65 and 92 won't be affected by any
@@ -103,19 +144,174 @@ Now note the ``filter_immune_slice_fields`` key. This one allows you to
be more specific and define for a specific slice_id, which filter fields
should be disregarded.
Note the use of the ``__from`` and ``__to`` keywords, those are reserved
for dealing with the time boundary filtering mentioned above.
Note the use of the ``__time_range`` keyword, which is reserved for dealing
with the time boundary filtering mentioned above.
But what happens with filtering when dealing with slices coming from
different tables or databases? If the column name is shared, the filter will
be applied, it's as simple as that.
Why does fabmanager or superset freezed/hung/not responding when started (my home directory is NFS mounted)?
-----------------------------------------------------------------------------------------
superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.
How to limit the timed refresh on a dashboard?
----------------------------------------------
By default, the dashboard timed refresh feature allows you to automatically re-query every slice
on a dashboard according to a set schedule. Sometimes, however, you won't want all of the slices
to be refreshed - especially if some data is slow moving, or run heavy queries. To exclude specific
slices from the timed refresh process, add the ``timed_refresh_immune_slices`` key to the dashboard
``JSON Metadata`` field:
.. code-block:: json
{
"filter_immune_slices": [],
"expanded_slices": {},
"filter_immune_slice_fields": {},
"timed_refresh_immune_slices": [324]
}
In the example above, if a timed refresh is set for the dashboard, then every slice except 324 will
be automatically re-queried on schedule.
Slice refresh will also be staggered over the specified period. You can turn off this staggering
by setting the ``stagger_refresh`` to ``false`` and modify the stagger period by setting
``stagger_time`` to a value in milliseconds in the ``JSON Metadata`` field:
.. code-block:: json
{
"stagger_refresh": false,
"stagger_time": 2500
}
Here, the entire dashboard will refresh at once if periodic refresh is on. The stagger time of
2.5 seconds is ignored.
Why does 'flask fab' or superset freezed/hung/not responding when started (my home directory is NFS mounted)?
-------------------------------------------------------------------------------------------------------------
By default, superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.
__ https://www.sqlite.org/lockingv3.html
One work around is to create a symlink from ~/.superset to a directory located on a non-NFS partition.
You can override this path using the ``SUPERSET_HOME`` environment variable.
Another work around is to change where superset stores the sqlite database by adding ``SQLALCHEMY_DATABASE_URI = 'sqlite:////new/location/superset.db'`` in superset_config.py (create the file if needed), then adding the directory where superset_config.py lives to PYTHONPATH environment variable (e.g. ``export PYTHONPATH=/opt/logs/sandbox/airbnb/``).
What if the table schema changed?
---------------------------------
Table schemas evolve, and Superset needs to reflect that. It's pretty common
in the life cycle of a dashboard to want to add a new dimension or metric.
To get Superset to discover your new columns, all you have to do is to
go to ``Menu -> Sources -> Tables``, click the ``edit`` icon next to the
table who's schema has changed, and hit ``Save`` from the ``Detail`` tab.
Behind the scene, the new columns will get merged it. Following this,
you may want to
re-edit the table afterwards to configure the ``Column`` tab, check the
appropriate boxes and save again.
How do I go about developing a new visualization type?
------------------------------------------------------
Here's an example as a Github PR with comments that describe what the
different sections of the code do:
https://github.com/airbnb/superset/pull/3013
What database engine can I use as a backend for Superset?
---------------------------------------------------------
To clarify, the *database backend* is an OLTP database used by Superset to store its internal
information like your list of users, slices and dashboard definitions.
Superset is tested using Mysql, Postgresql and Sqlite for its backend. It's recommended you
install Superset on one of these database server for production.
Using a column-store, non-OLTP databases like Vertica, Redshift or Presto as a database backend simply won't work as these databases are not designed for this type of workload. Installation on Oracle, Microsoft SQL Server, or other OLTP databases may work but isn't tested.
Please note that pretty much any databases that have a SqlAlchemy integration should work perfectly fine as a datasource for Superset, just not as the OLTP backend.
How can i configure OAuth authentication and authorization?
-----------------------------------------------------------
You can take a look at this Flask-AppBuilder `configuration example
<https://github.com/dpgaspar/Flask-AppBuilder/blob/master/examples/oauth/config.py>`_.
How can I set a default filter on my dashboard?
-----------------------------------------------
Easy. Simply apply the filter and save the dashboard while the filter
is active.
How do I get Superset to refresh the schema of my table?
--------------------------------------------------------
When adding columns to a table, you can have Superset detect and merge the
new columns in by using the "Refresh Metadata" action in the
``Source -> Tables`` page. Simply check the box next to the tables
you want the schema refreshed, and click ``Actions -> Refresh Metadata``.
Is there a way to force the use specific colors?
------------------------------------------------
It is possible on a per-dashboard basis by providing a mapping of
labels to colors in the ``JSON Metadata`` attribute using the
``label_colors`` key.
.. code-block:: json
{
"label_colors": {
"Girls": "#FF69B4",
"Boys": "#ADD8E6"
}
}
Does Superset work with [insert database engine here]?
------------------------------------------------------
The community over time has curated a list of databases that work well with
Superset in the :ref:`ref_database_deps` section of the docs. Database
engines not listed in this page may work too. We rely on the
community to contribute to this knowledge base.
.. _SQLAlchemy dialect: https://docs.sqlalchemy.org/en/latest/dialects/
.. _DBAPI driver: https://www.python.org/dev/peps/pep-0249/
For a database engine to be supported in Superset through the
SQLAlchemy connector, it requires having a Python compliant
`SQLAlchemy dialect`_ as well as a
`DBAPI driver`_ defined.
Database that have limited SQL support may
work as well. For instance it's possible to connect
to Druid through the SQLAlchemy connector even though Druid does not support
joins and subqueries. Another key element for a database to be supported is through
the Superset `Database Engine Specification
<https://github.com/apache/incubator-superset/blob/master/superset/db_engine_specs.py>`_
interface. This interface allows for defining database-specific configurations
and logic
that go beyond the SQLAlchemy and DBAPI scope. This includes features like:
* date-related SQL function that allow Superset to fetch different
time granularities when running time-series queries
* whether the engine supports subqueries. If false, Superset may run 2-phase
queries to compensate for the limitation
* methods around processing logs and inferring the percentage of completion
of a query
* technicalities as to how to handle cursors and connections if the driver
is not standard DBAPI
* more, read the code for more details
Beyond the SQLAlchemy connector, it's also possible, though much more
involved, to extend Superset and write
your own connector. The only example of this at the moment is the Druid
connector, which is getting superseded by Druid's growing SQL support and
the recent availability of a DBAPI and SQLAlchemy driver. If the database
you are considering integrating has any kind of of SQL support, it's probably
preferable to go the SQLAlchemy route. Note that for a native connector to
be possible the database needs to have support for running OLAP-type queries
and should be able to things that are typical in basic SQL:
- aggregate data
- apply filters (==, !=, >, <, >=, <=, IN, ...)
- apply HAVING-type filters
- be schema-aware, expose columns and types
Another work around is to change where superset stores the sqlite database by adding ``SQLALCHEMY_DATABASE_URI = 'sqlite:////new/localtion/superset.db'`` in superset_config.py (create the file if needed), then adding the directory where superset_config.py lives to PYTHONPATH environment variable (e.g. ``export PYTHONPATH=/opt/logs/sandbox/airbnb/``).
+149 -31
View File
@@ -1,89 +1,207 @@
Gallery
=======
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. image:: _static/img/viz_thumbnails/line.png
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Visualizations Gallery
======================
.. image:: images/viz_thumbnails/area.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/bubble.png
.. image:: images/viz_thumbnails/bar.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/table.png
.. image:: images/viz_thumbnails/big_number.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/pie.png
.. image:: images/viz_thumbnails/big_number_total.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/bar.png
.. image:: images/viz_thumbnails/box_plot.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/world_map.png
.. image:: images/viz_thumbnails/bubble.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/sankey.png
.. image:: images/viz_thumbnails/bullet.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/word_cloud.png
.. image:: images/viz_thumbnails/cal_heatmap.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/filter_box.png
.. image:: images/viz_thumbnails/chord.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/pivot_table.png
.. image:: images/viz_thumbnails/compare.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/directed_force.png
.. image:: images/viz_thumbnails/country_map.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/compare.png
.. image:: images/viz_thumbnails/deck_arc.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/sunburst.png
.. image:: images/viz_thumbnails/deck_geojson.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/area.png
.. image:: images/viz_thumbnails/deck_grid.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/big_number.png
.. image:: images/viz_thumbnails/deck_hex.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/big_number_total.png
.. image:: images/viz_thumbnails/deck_multi.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/bullet.png
.. image:: images/viz_thumbnails/deck_path.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/dist_bar.png
.. image:: images/viz_thumbnails/deck_polygon.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/heatmap.png
.. image:: images/viz_thumbnails/deck_scatter.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/markup.png
.. image:: images/viz_thumbnails/deck_screengrid.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/para.png
.. image:: images/viz_thumbnails/directed_force.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/iframe.png
.. image:: images/viz_thumbnails/dist_bar.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/box_plot.png
.. image:: images/viz_thumbnails/dual_line.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/treemap.png
.. image:: images/viz_thumbnails/event_flow.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/cal_heatmap.png
.. image:: images/viz_thumbnails/filter_box.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/horizon.png
.. image:: images/viz_thumbnails/heatmap.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/mapbox.png
.. image:: images/viz_thumbnails/histogram.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/separator.png
.. image:: images/viz_thumbnails/horizon.png
:scale: 25 %
.. image:: _static/img/viz_thumbnails/histogram.png
.. image:: images/viz_thumbnails/iframe.png
:scale: 25 %
.. image:: images/viz_thumbnails/line.png
:scale: 25 %
.. image:: images/viz_thumbnails/mapbox.png
:scale: 25 %
.. image:: images/viz_thumbnails/markup.png
:scale: 25 %
.. image:: images/viz_thumbnails/paired_ttest.png
:scale: 25 %
.. image:: images/viz_thumbnails/para.png
:scale: 25 %
.. image:: images/viz_thumbnails/partition.png
:scale: 25 %
.. image:: images/viz_thumbnails/pie.png
:scale: 25 %
.. image:: images/viz_thumbnails/pivot_table.png
:scale: 25 %
.. image:: images/viz_thumbnails/rose.png
:scale: 25 %
.. image:: images/viz_thumbnails/sankey.png
:scale: 25 %
.. image:: images/viz_thumbnails/separator.png
:scale: 25 %
.. image:: images/viz_thumbnails/sunburst.png
:scale: 25 %
.. image:: images/viz_thumbnails/table.png
:scale: 25 %
.. image:: images/viz_thumbnails/time_pivot.png
:scale: 25 %
.. image:: images/viz_thumbnails/time_table.png
:scale: 25 %
.. image:: images/viz_thumbnails/treemap.png
:scale: 25 %
.. image:: images/viz_thumbnails/word_cloud.png
:scale: 25 %
.. image:: images/viz_thumbnails/world_map.png
:scale: 25 %
+1
View File
@@ -0,0 +1 @@
../superset/assets/images/
+125
View File
@@ -0,0 +1,125 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Importing and Exporting Datasources
===================================
The superset cli allows you to import and export datasources from and to YAML.
Datasources include both databases and druid clusters. The data is expected to be organized in the following hierarchy: ::
.
├──databases
| ├──database_1
| | ├──table_1
| | | ├──columns
| | | | ├──column_1
| | | | ├──column_2
| | | | └──... (more columns)
| | | └──metrics
| | | ├──metric_1
| | | ├──metric_2
| | | └──... (more metrics)
| | └── ... (more tables)
| └── ... (more databases)
└──druid_clusters
├──cluster_1
| ├──datasource_1
| | ├──columns
| | | ├──column_1
| | | ├──column_2
| | | └──... (more columns)
| | └──metrics
| | ├──metric_1
| | ├──metric_2
| | └──... (more metrics)
| └── ... (more datasources)
└── ... (more clusters)
Exporting Datasources to YAML
-----------------------------
You can print your current datasources to stdout by running: ::
superset export_datasources
To save your datasources to a file run: ::
superset export_datasources -f <filename>
By default, default (null) values will be omitted. Use the ``-d`` flag to include them.
If you want back references to be included (e.g. a column to include the table id
it belongs to) use the ``-b`` flag.
Alternatively, you can export datasources using the UI:
1. Open **Sources** -> **Databases** to export all tables associated to a
single or multiple databases. (**Tables** for one or more tables,
**Druid Clusters** for clusters, **Druid Datasources** for datasources)
#. Select the items you would like to export
#. Click **Actions** -> **Export to YAML**
#. If you want to import an item that you exported through the UI, you
will need to nest it inside its parent element, e.g. a `database`
needs to be nested under `databases` a `table` needs to be
nested inside a `database` element.
Exporting the complete supported YAML schema
--------------------------------------------
In order to obtain an exhaustive list of all fields you can import using the YAML import run: ::
superset export_datasource_schema
Again, you can use the ``-b`` flag to include back references.
Importing Datasources from YAML
-------------------------------
In order to import datasources from a YAML file(s), run: ::
superset import_datasources -p <path or filename>
If you supply a path all files ending with ``*.yaml`` or ``*.yml`` will be parsed.
You can apply additional flags e.g.: ::
superset import_datasources -p <path> -r
Will search the supplied path recursively.
The sync flag ``-s`` takes parameters in order to sync the supplied elements with
your file. Be careful this can delete the contents of your meta database. Example:
superset import_datasources -p <path / filename> -s columns,metrics
This will sync all ``metrics`` and ``columns`` for all datasources found in the
``<path / filename>`` in the Superset meta database. This means columns and metrics
not specified in YAML will be deleted. If you would add ``tables`` to ``columns,metrics``
those would be synchronised as well.
If you don't supply the sync flag (``-s``) importing will only add and update (override) fields.
E.g. you can add a ``verbose_name`` to the column ``ds`` in the table ``random_time_series`` from the example datasets
by saving the following YAML to file and then running the ``import_datasources`` command. ::
databases:
- database_name: main
tables:
- table_name: random_time_series
columns:
- column_name: ds
verbose_name: datetime
+119 -22
View File
@@ -1,55 +1,153 @@
.. image:: _static/img/s.png
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Superset's documentation
''''''''''''''''''''''''
.. http://www.apache.org/licenses/LICENSE-2.0
Superset is a data exploration platform designed to be visual, intuitive
and interactive.
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
|apache_img| |superset_img|
.. |apache_img| image:: images/apache_feather.png
:width: 7%
:target: http://www.apache.org/
:alt: The Apache Software Foundation
.. |superset_img| image:: images/s.png
:width: 25%
Apache Superset (incubating)
''''''''''''''''''''''''''''
Apache Superset (incubating) is a modern, enterprise-ready business
intelligence web application
----------------
.. warning:: This project was originally named Panoramix, was renamed to
Caravel in March 2016, and is currently named Superset as of November 2016
.. important::
**Disclaimer**: Apache Superset is an effort undergoing incubation at The
Apache Software Foundation (ASF), sponsored by the Apache Incubator.
Incubation is required of all newly accepted projects until a further
review indicates that the infrastructure, communications, and
decision making process have stabilized in a manner consistent with
other successful ASF projects. While incubation status is not
necessarily a reflection of the completeness or stability of
the code, it does indicate that the project has yet to be fully
endorsed by the ASF.
.. note:: Apache Superset, Superset, Apache, the Apache feather logo, and
the Apache Superset project logo are either registered trademarks or
trademarks of The Apache Software Foundation in the United States
and other countries.
Superset Resources
==================
- `Superset's Github <https://github.com/apache/incubator-superset>`_, note
that `we use Github for issue tracking <https://github.com/apache/incubator-superset/issues>`_
- Superset's
`contribution guidelines <https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md>`_
and
`code of conduct <https://github.com/apache/incubator-superset/blob/master/CODE_OF_CONDUCT.md>`_
on Github.
- Our `mailing list archives <https://lists.apache.org/list.html?dev@superset.apache.org>`_.
To subscribe, send an email to ``dev-subscribe@superset.apache.org``
- `Join our Slack <https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LWJmOTcxYjlhZTRhYmEyYTMzOWYxOWEwMjcwZDZiNWRiNDY2NDUwNzcwMDFhNzE1ZmMxZTZlZWY0ZTQ2MzMyNTU>`_
Apache Software Foundation Resources
====================================
- `The Apache Software Foundation Website <http://www.apache.org>`_
- `Current Events <http://www.apache.org/events/current-event>`_
- `License <https://www.apache.org/licenses/>`_
- `Thanks <https://www.apache.org/foundation/thanks.html>`_ to the ASF's sponsors
- `Sponsor Apache! <http://www.apache.org/foundation/sponsorship.html>`_
Overview
=======================================
========
Features
---------
--------
- A rich set of data visualizations, integrated from some of the best
visualization libraries
- Create and share simple dashboards
- An extensible, high-granularity security/permission model allowing
intricate rules on who can access individual features and the dataset
- A rich set of data visualizations
- An easy-to-use interface for exploring and visualizing data
- Create and share dashboards
- Enterprise-ready authentication with integration with major authentication
providers (database, OpenID, LDAP, OAuth & REMOTE_USER through
Flask AppBuilder)
- An extensible, high-granularity security/permission model allowing
intricate rules on who can access individual features and the dataset
- A simple semantic layer, allowing users to control how data sources are
displayed in the UI by defining which fields should show up in which
drop-down and which aggregation and function metrics are made available
to the user
- Integration with most RDBMS through SqlAlchemy
- Integration with most SQL-speaking RDBMS through SQLAlchemy
- Deep integration with Druid.io
------
Databases
---------
.. image:: https://camo.githubusercontent.com/82e264ef777ba06e1858766fe3b8817ee108eb7e/687474703a2f2f672e7265636f726469742e636f2f784658537661475574732e676966
The following RDBMS are currently supported:
- `Amazon Athena <https://aws.amazon.com/athena/>`_
- `Amazon Redshift <https://aws.amazon.com/redshift/>`_
- `Apache Drill <https://drill.apache.org/>`_
- `Apache Druid <http://druid.io/>`_
- `Apache Hive <https://hive.apache.org/>`_
- `Apache Impala <https://impala.apache.org/>`_
- `Apache Kylin <http://kylin.apache.org/>`_
- `Apache Pinot <https://pinot.incubator.apache.org/>`_
- `Apache Spark SQL <https://spark.apache.org/sql/>`_
- `BigQuery <https://cloud.google.com/bigquery/>`_
- `ClickHouse <https://clickhouse.yandex/>`_
- `Exasol <https://www.exasol.com/>`_
- `Google Sheets <https://www.google.com/sheets/about/>`_
- `Greenplum <https://greenplum.org/>`_
- `IBM Db2 <https://www.ibm.com/analytics/db2/>`_
- `MySQL <https://www.mysql.com/>`_
- `Oracle <https://www.oracle.com/database/>`_
- `PostgreSQL <https://www.postgresql.org/>`_
- `Presto <http://prestodb.github.io/>`_
- `Snowflake <https://www.snowflake.com/>`_
- `SQLite <https://www.sqlite.org/>`_
- `SQL Server <https://www.microsoft.com/en-us/sql-server/>`_
- `Teradata <https://www.teradata.com/>`_
- `Vertica <https://www.vertica.com/>`_
Other database engines with a proper DB-API driver and SQLAlchemy dialect should
be supported as well.
Screenshots
-----------
.. image:: images/screenshots/bank_dash.png
------
.. image:: https://camo.githubusercontent.com/4991ff37a0005ea4e4267919a52786fda82d2d21/687474703a2f2f672e7265636f726469742e636f2f755a6767594f645235672e676966
.. image:: images/screenshots/explore.png
------
.. image:: https://camo.githubusercontent.com/a389af15ac1e32a3d0fee941b4c62c850b1d583b/687474703a2f2f672e7265636f726469742e636f2f55373046574c704c76682e676966
.. image:: images/screenshots/sqllab.png
------
.. image:: images/screenshots/deckgl_dash.png
------
Contents
---------
--------
.. toctree::
:maxdepth: 2
@@ -58,9 +156,9 @@ Contents
tutorial
security
sqllab
videos
gallery
druid
misc
faq
@@ -70,4 +168,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
+879 -119
View File
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Misc
----
.. toctree::
:maxdepth: 2
visualization
videos
import_export_datasources
+19
View File
@@ -0,0 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
sphinx==2.1.2
sphinx_autodoc_typehints==1.6.0
sphinx-rtd-theme==0.4.3
+29 -35
View File
@@ -1,15 +1,33 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Security
========
Security in Superset is handled by Flask AppBuilder (FAB). FAB is a
"Simple and rapid application development framework, built on top of Flask.".
FAB provides authentication, user management, permissions and roles.
Please read its `Security documentation
<https://flask-appbuilder.readthedocs.io/en/latest/security.html>`_.
Provided Roles
--------------
Superset ships with a set of roles that are handled by Superset itself.
You can assume that these roles will stay up-to-date as Superset evolves.
Even though it's possible for ``Admin`` usrs to do so, it is not recommended
Even though it's possible for ``Admin`` users to do so, it is not recommended
that you alter these roles in any way by removing
or adding permissions to them as these roles will be re-synchronized to
their original values as you run your next ``superset init`` command.
@@ -17,7 +35,7 @@ their original values as you run your next ``superset init`` command.
Since it's not recommended to alter the roles described here, it's right
to assume that your security strategy should be to compose user access based
on these base roles and roles that you create. For instance you could
create a role ``Financial Analyst`` that would be made of set of permissions
create a role ``Financial Analyst`` that would be made of a set of permissions
to a set of data sources (tables) and/or databases. Users would then be
granted ``Gamma``, ``Financial Analyst``, and perhaps ``sql_lab``.
@@ -28,14 +46,14 @@ other users and altering other people's slices and dashboards.
Alpha
"""""
Alpha have access to all data sources, but they cannot grant or revoke access
Alpha users have access to all data sources, but they cannot grant or revoke access
from other users. They are also limited to altering the objects that they
own. Alpha users can add and alter data sources.
Gamma
"""""
Gamma have limited access. They can only consume data coming from data sources
they have been giving access to through another complementary role.
Gamma users have limited access. They can only consume data coming from data sources
they have been given access to through another complementary role.
They only have access to view the slices and
dashboards made from data sources that they have access to. Currently Gamma
users are not able to alter or add data sources. We assume that they are
@@ -69,12 +87,12 @@ sure the users with limited access have [only] the Gamma role assigned to
them. Second, create a new role (``Menu -> Security -> List Roles``) and
click the ``+`` sign.
.. image:: _static/img/create_role.png
.. image:: images/create_role.png
:scale: 50 %
This new window allows you to give this new role a name, attribute it to users
and select the tables in the ``Permissions`` dropdown. To select the data
sources you want to associate with this role, simply click in the dropdown
sources you want to associate with this role, simply click on the dropdown
and use the typeahead to search for your table names.
You can then confirm with your Gamma users that they see the objects
@@ -86,12 +104,12 @@ Customizing
The permissions exposed by FAB are very granular and allow for a great level
of customization. FAB creates many permissions automagically for each model
that is create (can_add, can_delete, can_show, can_edit, ...) as well as for
that is created (can_add, can_delete, can_show, can_edit, ...) as well as for
each view. On top of that, Superset can expose more granular permissions like
``all_datasource_access``.
We do not recommend altering the 3 base roles as there
are a set of assumptions that Superset build upon. It is possible though for
are a set of assumptions that Superset is built upon. It is possible though for
you to create your own roles, and union them to existing ones.
Permissions
@@ -106,8 +124,7 @@ of permissions. Here are the different categories of permissions:
so on. By adding ``can_delete on Dashboard`` to a role, and granting that
role to a user, this user will be able to delete dashboards.
- **Views**: views are individual web pages, like the ``explore`` view or the
``SQL Lab`` view. When granted to a user, he/she will see that view in
the its menu items, and be able to load that page.
``SQL Lab`` view. When granted to a user, he/she will see that view in its menu items, and be able to load that page.
- **Data source**: For each data source, a permission is created. If the user
does not have the ``all_datasource_access`` permission granted, the user
will only be able to see Slices or explore the data sources that are granted
@@ -136,26 +153,3 @@ a set of data sources that power dashboards only made available to executives.
When looking at its dashboard list, this user will only see the
list of dashboards it has access to, based on the roles and
permissions that were attributed.
Restricting the access to some metrics
""""""""""""""""""""""""""""""""""""""
Sometimes some metrics are relatively sensitive (e.g. revenue).
We may want to restrict those metrics to only a few roles.
For example, assumed there is a metric ``[cluster1].[datasource1].[revenue]``
and only Admin users are allowed to see it. Heres how to restrict the access.
1. Edit the datasource (``Menu -> Source -> Druid datasources -> edit the
record "datasource1"``) and go to the tab ``List Druid Metric``. Check
the checkbox ``Is Restricted`` in the row of the metric ``revenue``.
2. Edit the role (``Menu -> Security -> List Roles -> edit the record
“Admin”``), in the permissions field, type-and-search the permission
``metric access on [cluster1].[datasource1].[revenue] (id: 1)``, then
click the Save button on the bottom of the page.
Any users without the permission will see the error message
*Access to the metrics denied: revenue (Status: 500)* in the slices.
It also happens when the user wants to access a post-aggregation metric that
is dependent on revenue.
+85 -4
View File
@@ -1,9 +1,31 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
SQL Lab
=======
SQL Lab is a modern, feature-rich SQL IDE written in
`React <https://facebook.github.io/react/>`_.
------
.. image:: images/screenshots/sqllab.png
------
Feature Overview
----------------
@@ -13,9 +35,11 @@ Feature Overview
visualization capabilities
- Browse database metadata: tables, columns, indexes, partitions
- Support for long-running queries
- uses the `Celery distributed queue <http://www.python.org/>`_
- uses the `Celery distributed queue <http://www.celeryproject.org/>`_
to dispatch query handling to workers
- supports defining a "results backend" to persist query results
- A search engine to find queries executed in the past
- Supports templating using the
`Jinja templating language <http://jinja.pocoo.org/docs/dev/>`_
@@ -32,7 +56,7 @@ Templating with Jinja
SELECT *
FROM some_table
WHERE partition_key = '{{ presto.latest_partition('some_table') }}'
WHERE partition_key = '{{ presto.first_latest_partition('some_table') }}'
Templating unleashes the power and capabilities of a
programming language within your SQL code.
@@ -46,17 +70,74 @@ Available macros
We expose certain modules from Python's standard library in
Superset's Jinja context:
- ``time``: ``time``
- ``datetime``: ``datetime.datetime``
- ``uuid``: ``uuid``
- ``random``: ``random``
- ``relativedelta``: ``dateutil.relativedelta.relativedelta``
- more to come!
`Jinja's builtin filters <http://jinja.pocoo.org/docs/dev/templates/>`_ can be also be applied where needed.
.. autofunction:: superset.jinja_context.current_user_id
.. autofunction:: superset.jinja_context.current_username
.. autofunction:: superset.jinja_context.url_param
.. autofunction:: superset.jinja_context.filter_values
.. autofunction:: superset.jinja_context.CacheKeyWrapper.cache_key_wrapper
.. autoclass:: superset.jinja_context.PrestoTemplateProcessor
:members:
.. autofunction:: superset.jinja_context.url_param
.. autoclass:: superset.jinja_context.HiveTemplateProcessor
:members:
Extending macros
''''''''''''''''
As mentioned in the `Installation & Configuration <https://superset.incubator.apache.org/installation.html#installation-configuration>`_ documentation,
it's possible for administrators to expose more more macros in their
environment using the configuration variable ``JINJA_CONTEXT_ADDONS``.
All objects referenced in this dictionary will become available for users
to integrate in their queries in **SQL Lab**.
Query cost estimation
'''''''''''''''''''''
Some databases support ``EXPLAIN`` queries that allow users to estimate the cost
of queries before executing this. Currently, Presto is supported in SQL Lab. To
enable query cost estimation, add the following keys to the "Extra" field in the
database configuration:
.. code-block:: json
{
"version": "0.319",
"cost_estimate_enabled": true,
...
}
Here, "version" should be the version of your Presto cluster. Support for this
functionality was introduced in Presto 0.319.
.. _ref_ctas_engine_config:
Create Table As (CTAS)
''''''''''''''''''''''
You can use ``CREATE TABLE AS SELECT ...`` statements on SQLLab. This feature can be toggled on
and off at the database configuration level.
Note that since ``CREATE TABLE..`` belongs to a SQL DDL category. Specifically on PostgreSQL, DDL is transactional,
this means that to properly use this feature you have to set ``autocommit`` to true on your engine parameters:
.. code-block:: json
{
...
"engine_params": {"isolation_level":"AUTOCOMMIT"},
...
}
+67 -50
View File
@@ -1,31 +1,48 @@
Tutorial for Superset Administrators
====================================
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
This tutorial targets a Superset administrator: someone configuring Superset
for an organization on behalf of users. We'll show you how to connect Superset
to a new database and configure a table in that database for analysis. You'll
also explore the data you've exposed and add a visualization to a dashboard
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Tutorial - Creating your first dashboard
========================================
This tutorial targets someone who wants to create charts and dashboards
in Superset. We'll show you how to connect Superset
to a new database and configure a table in that database for analysis. You'll
also explore the data you've exposed and add a visualization to a dashboard
so that you get a feel for the end-to-end user experience.
Connecting to a new database
----------------------------
We assume you already have a database configured and can connect to it from the
instance on which youre running Superset. If youre just testing Superset and
want to explore sample data, you can load some
instance on which youre running Superset. If youre just testing Superset and
want to explore sample data, you can load some
`sample PostgreSQL datasets <https://wiki.postgresql.org/wiki/Sample_Databases>`_
into a fresh DB, or configure the
into a fresh DB, or configure the
`example weather data <https://github.com/dylburger/noaa-ghcn-weather-data>`_
we use here.
Under the **Sources** menu, select the *Databases* option:
.. image:: _static/img/tutorial/tutorial_01_sources_database.png
.. image:: images/tutorial/tutorial_01_sources_database.png
:scale: 70%
On the resulting page, click on the green plus sign, near the top left:
On the resulting page, click on the green plus sign, near the top right:
.. image:: _static/img/tutorial/tutorial_02_add_database.png
.. image:: images/tutorial/tutorial_02_add_database.png
:scale: 70%
You can configure a number of advanced options on this page, but for
@@ -33,37 +50,37 @@ this walkthrough, youll only need to do **two things**:
1. Name your database connection:
.. image:: _static/img/tutorial/tutorial_03_database_name.png
.. image:: images/tutorial/tutorial_03_database_name.png
:scale: 70%
2. Provide the SQLAlchemy Connection URI and test the connection:
.. image:: _static/img/tutorial/tutorial_04_sqlalchemy_connection_string.png
.. image:: images/tutorial/tutorial_04_sqlalchemy_connection_string.png
:scale: 70%
This example shows the connection string for our test weather database.
As noted in the text below the URI, you should refer to the SQLAlchemy
documentation on
`creating new connection URIs <http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#database-urls>`_
`creating new connection URIs <https://docs.sqlalchemy.org/en/rel_1_2/core/engines.html#database-urls>`_
for your target database.
Click the **Test Connection** button to confirm things work end to end.
Once Superset can successfully connect and authenticate, you should see
a popup like this:
.. image:: _static/img/tutorial/tutorial_05_connection_popup.png
.. image:: images/tutorial/tutorial_05_connection_popup.png
:scale: 50%
Moreover, you should also see the list of tables Superset can read from
the schema youre connected to, at the bottom of the page:
.. image:: _static/img/tutorial/tutorial_06_list_of_tables.png
.. image:: images/tutorial/tutorial_06_list_of_tables.png
:scale: 70%
If the connection looks good, save the configuration by clicking the **Save**
button at the bottom of the page:
.. image:: _static/img/tutorial/tutorial_07_save_button.png
.. image:: images/tutorial/tutorial_07_save_button.png
:scale: 70%
Adding a new table
@@ -74,25 +91,25 @@ to Superset that youd like to query.
Under the **Sources** menu, select the *Tables* option:
.. image:: _static/img/tutorial/tutorial_08_sources_tables.png
.. image:: images/tutorial/tutorial_08_sources_tables.png
:scale: 70%
On the resulting page, click on the green plus sign, near the top left:
.. image:: _static/img/tutorial/tutorial_09_add_new_table.png
.. image:: images/tutorial/tutorial_09_add_new_table.png
:scale: 70%
You only need a few pieces of information to add a new table to Superset:
* The name of the table
.. image:: _static/img/tutorial/tutorial_10_table_name.png
.. image:: images/tutorial/tutorial_10_table_name.png
:scale: 70%
* The target database from the **Database** drop-down menu (i.e. the one
you just added above)
.. image:: _static/img/tutorial/tutorial_11_choose_db.png
.. image:: images/tutorial/tutorial_11_choose_db.png
:scale: 70%
* Optionally, the database schema. If the table exists in the “default” schema
@@ -101,13 +118,13 @@ You only need a few pieces of information to add a new table to Superset:
Click on the **Save** button to save the configuration:
.. image:: _static/img/tutorial/tutorial_07_save_button.png
.. image:: images/tutorial/tutorial_07_save_button.png
:scale: 70%
When redirected back to the list of tables, you should see a message indicating
that your table was created:
.. image:: _static/img/tutorial/tutorial_12_table_creation_success_msg.png
.. image:: images/tutorial/tutorial_12_table_creation_success_msg.png
:scale: 70%
This message also directs you to edit the table configuration. Well edit a limited
@@ -116,7 +133,7 @@ a more advanced tutorial.
Click on the edit button next to the table youve created:
.. image:: _static/img/tutorial/tutorial_13_edit_table_config.png
.. image:: images/tutorial/tutorial_13_edit_table_config.png
:scale: 70%
On the resulting page, click on the **List Table Column** tab. Here, youll define the
@@ -136,7 +153,7 @@ Heres how weve configured fields for the weather data. Even for measures l
weather measurements (precipitation, snowfall, etc.), its ideal to group and filter
by these values:
.. image:: _static/img/tutorial/tutorial_14_field_config.png
.. image:: images/tutorial/tutorial_14_field_config.png
As with the configurations above, click the **Save** button to save these settings.
@@ -146,17 +163,17 @@ Exploring your data
To start exploring your data, simply click on the table name you just created in
the list of available tables:
.. image:: _static/img/tutorial/tutorial_15_click_table_name.png
.. image:: images/tutorial/tutorial_15_click_table_name.png
By default, youll be presented with a Table View:
.. image:: _static/img/tutorial/tutorial_16_datasource_chart_type.png
.. image:: images/tutorial/tutorial_16_datasource_chart_type.png
Lets walk through a basic query to get the count of all records in our table.
First, well need to change the **Since** filter to capture the range of our data.
You can use simple phrases to apply these filters, like "3 years ago":
.. image:: _static/img/tutorial/tutorial_17_choose_time_range.png
.. image:: images/tutorial/tutorial_17_choose_time_range.png
The upper limit for time, the **Until** filter, defaults to "now", which may or may
not be what you want.
@@ -164,25 +181,25 @@ not be what you want.
Look for the Metrics section under the **GROUP BY** header, and start typing "Count"
- youll see a list of metrics matching what you type:
.. image:: _static/img/tutorial/tutorial_18_choose_metric.png
.. image:: images/tutorial/tutorial_18_choose_metric.png
Select the *COUNT(\*)* metric, then click the green **Query** button near the top
of the explore:
.. image:: _static/img/tutorial/tutorial_19_click_query.png
.. image:: images/tutorial/tutorial_19_click_query.png
Youll see your results in the table:
.. image:: _static/img/tutorial/tutorial_20_count_star_result.png
.. image:: images/tutorial/tutorial_20_count_star_result.png
Lets group this by the *weather_description* field to get the count of records by
the type of weather recorded by adding it to the *Group by* section:
.. image:: _static/img/tutorial/tutorial_21_group_by.png
.. image:: images/tutorial/tutorial_21_group_by.png
and run the query:
.. image:: _static/img/tutorial/tutorial_22_group_by_result.png
.. image:: images/tutorial/tutorial_22_group_by_result.png
Lets find a more useful data point: the top 10 times and places that recorded the
highest temperature in 2015.
@@ -190,11 +207,11 @@ highest temperature in 2015.
We replace *weather_description* with *latitude*, *longitude* and *measurement_date* in the
*Group by* section:
.. image:: _static/img/tutorial/tutorial_23_group_by_more_dimensions.png
.. image:: images/tutorial/tutorial_23_group_by_more_dimensions.png
And replace *COUNT(\*)* with *max__measurement_flag*:
.. image:: _static/img/tutorial/tutorial_24_max_metric.png
.. image:: images/tutorial/tutorial_24_max_metric.png
The *max__measurement_flag* metric was created when we checked the box under **Max** and
next to the *measurement_flag* field, indicating that this field was numeric and that
@@ -206,16 +223,16 @@ precipitation and temperature). Therefore, we must filter our query only on reco
where the *weather_description* is equal to "Maximum temperature", which we do in
the **Filters** section at the bottom of the explore:
.. image:: _static/img/tutorial/tutorial_25_max_temp_filter.png
.. image:: images/tutorial/tutorial_25_max_temp_filter.png
Finally, since we only care about the top 10 measurements, we limit our results to
10 records using the *Row limit* option under the **Options** header:
.. image:: _static/img/tutorial/tutorial_26_row_limit.png
.. image:: images/tutorial/tutorial_26_row_limit.png
We click **Query** and get the following results:
.. image:: _static/img/tutorial/tutorial_27_top_10_max_temps.png
.. image:: images/tutorial/tutorial_27_top_10_max_temps.png
In this dataset, the maximum temperature is recorded in tenths of a degree Celsius.
The top value of 1370, measured in the middle of Nevada, is equal to 137 C, or roughly
@@ -231,7 +248,7 @@ You may want to do a couple more things with this measure:
Config > List Sql Metric > Edit Metric > D3Format*)
* Moreover, you may want to see the temperature measurements in plain degrees C,
not tenths of a degree. Or you may want to convert the temperature to degrees
Fahrenheit. You can change the SQL that gets executed agains the database, baking
Fahrenheit. You can change the SQL that gets executed against the database, baking
the logic into the measure itself (*Edit Table Config > List Sql Metric > Edit
Metric > SQL Expression*)
@@ -240,20 +257,20 @@ a dashboard.
We change the Chart Type to "Distribution - Bar Chart":
.. image:: _static/img/tutorial/tutorial_28_bar_chart.png
.. image:: images/tutorial/tutorial_28_bar_chart.png
Our filter on Maximum temperature measurements was retained, but the query and
formatting options are dependent on the chart type, so youll have to set the
values again:
.. image:: _static/img/tutorial/tutorial_29_bar_chart_series_metrics.png
.. image:: images/tutorial/tutorial_29_bar_chart_series_metrics.png
You should note the extensive formatting options for this chart: the ability to
set axis labels, margins, ticks, etc. To make the data presentable to a broad
audience, youll want to apply many of these to slices that end up in dashboards.
For now, though, we run our query and get the following chart:
.. image:: _static/img/tutorial/tutorial_30_bar_chart_results.png
.. image:: images/tutorial/tutorial_30_bar_chart_results.png
:scale: 70%
Creating a slice and dashboard
@@ -265,39 +282,39 @@ a saved query is called a **Slice**.
To create a slice, click the **Save as** button near the top-left of the
explore:
.. image:: _static/img/tutorial/tutorial_19_click_query.png
.. image:: images/tutorial/tutorial_19_click_query.png
A popup should appear, asking you to name the slice, and optionally add it to a
dashboard. Since we havent yet created any dashboards, we can create one and
immediately add our slice to it. Lets do it:
.. image:: _static/img/tutorial/tutorial_31_save_slice_to_dashboard.png
.. image:: images/tutorial/tutorial_31_save_slice_to_dashboard.png
:scale: 70%
Click Save, which will direct you back to your original query. We see that
our slice and dashboard were successfully created:
.. image:: _static/img/tutorial/tutorial_32_save_slice_confirmation.png
.. image:: images/tutorial/tutorial_32_save_slice_confirmation.png
:scale: 70%
Lets check out our new dashboard. We click on the **Dashboards** menu:
.. image:: _static/img/tutorial/tutorial_33_dashboard.png
.. image:: images/tutorial/tutorial_33_dashboard.png
and find the dashboard we just created:
.. image:: _static/img/tutorial/tutorial_34_weather_dashboard.png
.. image:: images/tutorial/tutorial_34_weather_dashboard.png
Things seemed to have worked - our slice is here!
.. image:: _static/img/tutorial/tutorial_35_slice_on_dashboard.png
.. image:: images/tutorial/tutorial_35_slice_on_dashboard.png
:scale: 70%
But its a bit smaller than we might like. Luckily, you can adjust the size
of slices in a dashboard by clicking, holding and dragging the bottom-right
corner to your desired dimensions:
.. image:: _static/img/tutorial/tutorial_36_adjust_dimensions.gif
.. image:: images/tutorial/tutorial_36_adjust_dimensions.gif
:scale: 120%
After adjusting the size, youll be asked to click on the icon near the
+19 -51
View File
@@ -1,54 +1,22 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Videos
======
Here is a collection of short videos showing different aspect
of Superset.
Quick Intro
'''''''''''
This video demonstrates how Superset works at a high level, it shows how
to navigate through datasets and dashboards that are already available.
.. youtube:: https://www.youtube.com/watch?v=3Txm_nj_R7M
Dashboard Creation
''''''''''''''''''
This video walk you through the creation of a simple dashboard as a
collection of data slices.
- Coming soon!
Dashboard Filtering
'''''''''''''''''''
This video shows how to create dynamic filters on dashboards, how to
immunize certain widgets from being affected by filters.
- Coming soon!
Customize CSS and dashboard themes
''''''''''''''''''''''''''''''''''
A quick walkthrough on how to apply existing CSS templates, alter them and
create new ones.
- Coming soon!
Slice Annotations
'''''''''''''''''
A short video on how to annotate your charts, the markdown language and
to toggle them on dashboards.
- Coming soon!
Adding a Table
''''''''''''''
This videos shows you how to expose a new table in Superset, and how to
define the semantics on how this can be accessed by others in the ``Explore``
and ``Dashboard`` views.
- Coming soon!
Define SQL Expressions
''''''''''''''''''''''
A walkthrough on how to create your own derived dimensions and metrics.
- Coming soon!
.. note ::
This section of the documentation has yet to be filled in.
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# requires github-changes, run
# `npm install -g github-changes`
# requires $GITHUB_TOKEN to be set
# usage: ./github-changes 0.20.0 0.20.1
# will overwrites the local CHANGELOG.md, somehow you need to merge it in
github-changes -o apache -r incubator-superset --token $GITHUB_TOKEN --between-tags $1...$2
+37
View File
@@ -0,0 +1,37 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
+25
View File
@@ -0,0 +1,25 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: superset
maintainers:
- name: Chuan-Yen Chiang
email: cychiang0823@gmail.com
url: https://github.com/cychiang
version: 0.1.0
+37
View File
@@ -0,0 +1,37 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "superset.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "superset.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "superset.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "superset.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
@@ -0,0 +1,50 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "superset.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "superset.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "superset.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -0,0 +1,27 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
kind: ConfigMap
metadata:
name: superset-configmap
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ (.Files.Glob "config/*").AsConfig | indent 2 }}
@@ -0,0 +1,66 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "superset.fullname" . }}
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "superset.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "superset.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: superset-config
mountPath: /etc/superset/
ports:
- name: http
containerPort: 8088
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: "superset-config"
configMap:
name: superset-configmap
@@ -0,0 +1,54 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{ if .Values.ingress.enabled -}}
{{- $fullName := include "superset.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}
@@ -0,0 +1,35 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
kind: Service
metadata:
name: {{ template "superset.fullname" . }}
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "superset.name" . }}
release: {{ .Release.Name }}
+62
View File
@@ -0,0 +1,62 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Default values for superset.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: amancevice/superset
tag: latest
pullPolicy: IfNotPresent
service:
type: NodePort
port: 8088
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
-2
View File
@@ -1,2 +0,0 @@
#!/bin/bash
pylint superset --errors-only
+18 -1
View File
@@ -1,7 +1,24 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# first bump up package.json manually, commit and tag
rm superset/assets/dist/*
cd superset/assets/
npm run build
cd ../..
python setup.py sdist upload
python setup.py sdist
echo "RUN: twine upload dist/superset-{VERSION}.tar.gz"
+34
View File
@@ -0,0 +1,34 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
black==19.3b0
coverage==4.5.3
flask-cors==3.0.7
ipdb==0.12
isort==4.3.21
mypy==0.670
nose==1.3.7
pip-tools==3.7.0
pre-commit==1.17.0
psycopg2-binary==2.7.5
pycodestyle==2.5.0
pydruid==0.5.6
pyhive==0.6.1
pylint==1.9.2
redis==3.2.1
requests==2.22.0
statsd==3.3.0
tox==3.11.1
+84
View File
@@ -0,0 +1,84 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file=requirements.txt setup.py
#
alembic==1.0.11 # via flask-migrate
amqp==2.5.0 # via kombu
apispec[yaml]==1.3.3 # via flask-appbuilder
asn1crypto==0.24.0 # via cryptography
attrs==19.1.0 # via jsonschema
babel==2.7.0 # via flask-babel
backoff==1.8.0
billiard==3.6.0.0 # via celery
bleach==3.1.0
celery==4.3.0
cffi==1.12.3 # via cryptography
click==6.7
colorama==0.4.1
contextlib2==0.5.5
croniter==0.3.30
cryptography==2.7
decorator==4.4.0 # via retry
defusedxml==0.6.0 # via python3-openid
flask-appbuilder==2.1.13
flask-babel==0.12.2 # via flask-appbuilder
flask-caching==1.7.2
flask-compress==1.4.0
flask-jwt-extended==3.20.0 # via flask-appbuilder
flask-login==0.4.1 # via flask-appbuilder
flask-migrate==2.5.2
flask-openid==1.2.5 # via flask-appbuilder
flask-sqlalchemy==2.4.0 # via flask-appbuilder, flask-migrate
flask-talisman==0.7.0
flask-wtf==0.14.2
flask==1.1.1
future==0.17.1 # via parsedatetime
geographiclib==1.49 # via geopy
geopy==1.20.0
gunicorn==19.8.1
humanize==0.5.1
isodate==0.6.0
itsdangerous==1.1.0 # via flask
jinja2==2.10.1 # via flask, flask-babel
jsonschema==3.0.1 # via flask-appbuilder
kombu==4.6.3 # via celery
mako==1.0.14 # via alembic
markdown==3.1.1
markupsafe==1.1.1 # via jinja2, mako
marshmallow-enum==1.4.1 # via flask-appbuilder
marshmallow-sqlalchemy==0.17.0 # via flask-appbuilder
marshmallow==2.19.5 # via flask-appbuilder, marshmallow-enum, marshmallow-sqlalchemy
msgpack==0.6.1
numpy==1.17.0 # via pandas, pyarrow
pandas==0.24.2
parsedatetime==2.4
pathlib2==2.3.4
polyline==1.4.0
prison==0.1.2 # via flask-appbuilder
py==1.8.0 # via retry
pyarrow==0.15.1
pycparser==2.19 # via cffi
pyjwt==1.7.1 # via flask-appbuilder, flask-jwt-extended
pyrsistent==0.15.4 # via jsonschema
python-dateutil==2.8.0
python-dotenv==0.10.3
python-editor==1.0.4 # via alembic
python-geohash==0.8.5
python3-openid==3.1.0 # via flask-openid
pytz==2019.2 # via babel, celery, pandas
pyyaml==5.1.2
retry==0.9.2
selenium==3.141.0
simplejson==3.16.0
six==1.12.0 # via bleach, cryptography, flask-jwt-extended, flask-talisman, isodate, jsonschema, pathlib2, polyline, prison, pyarrow, pyrsistent, python-dateutil, sqlalchemy-utils, wtforms-json
sqlalchemy-utils==0.34.1
sqlalchemy==1.3.6
sqlparse==0.3.0
urllib3==1.25.3 # via selenium
vine==1.3.0 # via amqp, celery
webencodings==0.5.1 # via bleach
werkzeug==0.15.5 # via flask, flask-jwt-extended
wtforms-json==0.3.3
wtforms==2.2.1 # via flask-wtf, wtforms-json
-9
View File
@@ -1,9 +0,0 @@
#!/usr/bin/env bash
echo $DB
rm -f .coverage
export SUPERSET_CONFIG=tests.superset_test_config
set -e
superset/bin/superset version -v
export SOLO_TEST=1
# e.g. tests.core_tests:CoreTests.test_templated_sql_json
nosetests $1
-12
View File
@@ -1,12 +0,0 @@
#!/usr/bin/env bash
echo $DB
rm ~/.superset/unittests.db
rm ~/.superset/celerydb.sqlite
rm ~/.superset/celery_results.sqlite
rm -f .coverage
export SUPERSET_CONFIG=tests.superset_test_config
set -e
superset/bin/superset db upgrade
superset/bin/superset version -v
python setup.py nosetests
coveralls
+94
View File
@@ -0,0 +1,94 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
acquire_rat_jar () {
URL="https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar"
JAR="$rat_jar"
# Download rat launch jar if it hasn't been downloaded yet
if [ ! -f "$JAR" ]; then
# Download
printf "Attempting to fetch rat\n"
JAR_DL="${JAR}.part"
if [ $(command -v curl) ]; then
curl -L --silent "${URL}" > "$JAR_DL" && mv "$JAR_DL" "$JAR"
elif [ $(command -v wget) ]; then
wget --quiet ${URL} -O "$JAR_DL" && mv "$JAR_DL" "$JAR"
else
printf "You do not have curl or wget installed, please install rat manually.\n"
exit -1
fi
fi
unzip -tq "$JAR" &> /dev/null
if [ $? -ne 0 ]; then
# We failed to download
rm "$JAR"
printf "Our attempt to download rat locally to ${JAR} failed. Please install rat manually.\n"
exit -1
fi
printf "Done downloading.\n"
}
# Go to the project root directory
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
cd "$FWDIR"
TMP_DIR=/tmp
if test -x "$JAVA_HOME/bin/java"; then
declare java_cmd="$JAVA_HOME/bin/java"
else
declare java_cmd=java
fi
export RAT_VERSION=0.13
export rat_jar="${TMP_DIR}"/lib/apache-rat-${RAT_VERSION}.jar
mkdir -p ${TMP_DIR}/lib
[[ -f "$rat_jar" ]] || acquire_rat_jar || {
echo "Download failed. Obtain the rat jar manually and place it at $rat_jar"
exit 1
}
# This is the target of a symlink in superset/assets/docs - and rat exclude doesn't cope with the symlink target doesn't exist
mkdir -p docs/_build/html/
echo "Running license checks. This can take a while."
echo "$FWDIR"/.rat-excludes
$java_cmd -jar "$rat_jar" -E "$FWDIR"/.rat-excludes -d "$FWDIR" > rat-results.txt
if [ $? -ne 0 ]; then
echo "RAT exited abnormally"
exit 1
fi
ERRORS="$(cat rat-results.txt | grep -e "??")"
if test ! -z "$ERRORS"; then
echo >&2 "Could not find Apache license headers in the following files:"
echo >&2 "$ERRORS"
exit 1
else
echo -e "RAT checks passed."
fi
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This is the recommended way to install FOSSA's cli per the docs:
# https://docs.fossa.com/docs/travisci#section-add-fossa-steps-to-travisyml
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash
# This key is a push-only API key, also recommended for public projects
# https://docs.fossa.com/docs/api-reference#section-push-only-api-token
FOSSA_API_KEY="f72e93645bdfeab94bd227c7bbdda4ef" fossa
+18 -1
View File
@@ -1,6 +1,23 @@
from superset import sm
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from collections import defaultdict
from superset import sm
def cleanup_permissions():
# 1. Clean up duplicates.
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Use this to sign the tar balls generated from
# python setup.py sdist --formats=gztar
# ie. sign.sh <my_tar_ball>
# you will still be required to type in your signing key password
# or it needs to be available in your keychain
NAME=${1}
gpg --armor --output ${NAME}.asc --detach-sig ${NAME}
gpg --print-md SHA512 ${NAME} > ${NAME}.sha512
+37 -12
View File
@@ -1,28 +1,53 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
[metadata]
name = Superset
summary = a data exploration platform
description-file = README.md
author = Maxime Beauchemin
author-email = maximebeauchemin@gmail.com
author = Apache Superset Dev
author-email = dev@superset.incubator.apache.org
license = Apache License, Version 2.0
[files]
packages = superset
[build_sphinx]
source-dir = docs/
build-dir = docs/_build
all_files = 1
source-dir = docs
build-dir = docs/_build
all_files = 1
[upload_sphinx]
upload-dir = docs/_build/html
[nosetests]
verbosity=3
detailed-errors=1
with-coverage=1
nocapture=1
cover-package=superset
verbosity = 3
detailed-errors = 1
with-coverage = 1
nocapture = 1
cover-package = superset
[pycodestyle]
max-line-length=90
[isort]
combine_as_imports = true
include_trailing_comma = true
line_length = 88
known_first_party = superset
known_third_party =alembic,backoff,bleach,celery,click,colorama,contextlib2,croniter,dateutil,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_wtf,geohash,geopy,humanize,isodate,jinja2,markdown,marshmallow,msgpack,numpy,pandas,parsedatetime,pathlib2,polyline,prison,psycopg2,pyarrow,pyhive,pytz,retry,selenium,setuptools,simplejson,sphinx_rtd_theme,sqlalchemy,sqlalchemy_utils,sqlparse,werkzeug,wtforms,wtforms_json,yaml
multi_line_output = 3
order_by_type = false
[mypy]
ignore_missing_imports = true
+98 -61
View File
@@ -1,92 +1,129 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import io
import json
import os
import subprocess
import json
from setuptools import setup, find_packages
import sys
from setuptools import find_packages, setup
if sys.version_info < (3, 6):
sys.exit("Sorry, Python < 3.6 is not supported")
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
PACKAGE_DIR = os.path.join(BASE_DIR, 'superset', 'static', 'assets')
PACKAGE_FILE = os.path.join(PACKAGE_DIR, 'package.json')
with open(PACKAGE_FILE) as package_file:
version_string = json.load(package_file)['version']
PACKAGE_JSON = os.path.join(BASE_DIR, "superset", "assets", "package.json")
with open(PACKAGE_JSON, "r") as package_file:
version_string = json.load(package_file)["version"]
with io.open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
def get_git_sha():
try:
s = str(subprocess.check_output(['git', 'rev-parse', 'HEAD']))
return s.strip()
except:
s = subprocess.check_output(["git", "rev-parse", "HEAD"])
return s.decode().strip()
except Exception:
return ""
GIT_SHA = get_git_sha()
version_info = {
'GIT_SHA': GIT_SHA,
'version': version_string,
}
version_info = {"GIT_SHA": GIT_SHA, "version": version_string}
print("-==-" * 15)
print("VERSION: " + version_string)
print("GIT SHA: " + GIT_SHA)
print("-==-" * 15)
with open(os.path.join(PACKAGE_DIR, 'version_info.json'), 'w') as version_file:
VERSION_INFO_FILE = os.path.join(
BASE_DIR, "superset", "static", "assets", "version_info.json"
)
with open(VERSION_INFO_FILE, "w") as version_file:
json.dump(version_info, version_file)
setup(
name='superset',
description=(
"A interactive data visualization platform build on SqlAlchemy "
"and druid.io"),
name="apache-superset",
description=("A modern, enterprise-ready business intelligence web application"),
long_description=long_description,
long_description_content_type="text/markdown",
version=version_string,
packages=find_packages(),
include_package_data=True,
zip_safe=False,
scripts=['superset/bin/superset'],
scripts=["superset/bin/superset"],
install_requires=[
'boto3==1.4.4',
'celery==3.1.23',
'cryptography==1.7.2',
'flask-appbuilder==1.8.1',
'flask-cache==0.13.1',
'flask-migrate==2.0.3',
'flask-script==2.0.5',
'flask-sqlalchemy==2.0',
'flask-testing==0.6.2',
'flask-wtf==0.14.2',
'future>=0.16.0, <0.17',
'humanize==0.5.1',
'gunicorn==19.7.1',
'markdown==2.6.8',
'pandas==0.19.2',
'parsedatetime==2.0.0',
'pydruid==0.3.1',
'PyHive>=0.3.0',
'python-dateutil==2.6.0',
'requests==2.13.0',
'simplejson==3.10.0',
'six==1.10.0',
'sqlalchemy==1.1.9',
'sqlalchemy-utils==0.32.14',
'sqlparse==0.2.3',
'thrift>=0.9.3',
'thrift-sasl>=0.2.1',
"backoff>=1.8.0",
"bleach>=3.0.2, <4.0.0",
"celery>=4.3.0, <5.0.0",
"click>=6.0, <7.0.0", # `click`>=7 forces "-" instead of "_"
"colorama",
"contextlib2",
"croniter>=0.3.28",
"cryptography>=2.4.2",
"flask>=1.1.0, <2.0.0",
"flask-appbuilder>=2.1.13, <2.3.0",
"flask-caching",
"flask-compress",
"flask-talisman",
"flask-migrate",
"flask-wtf",
"geopy",
"gunicorn<19.9.0", # deprecated
"humanize",
"isodate",
"markdown>=3.0",
"msgpack>=0.6.1, <0.7.0",
"pandas>=0.24.2, <0.25.0",
"parsedatetime",
"pathlib2",
"polyline",
"python-dateutil",
"python-dotenv",
"python-geohash",
"pyarrow>=0.15.1, <0.16.0",
"pyyaml>=5.1",
"retry>=0.9.2",
"selenium>=3.141.0",
"simplejson>=3.15.0",
"sqlalchemy>=1.3.5,<2.0",
"sqlalchemy-utils>=0.33.2",
"sqlparse>=0.3.0,<0.4",
"wtforms-json",
],
extras_require={
'cors': ['Flask-Cors>=2.0.0'],
"bigquery": ["pybigquery>=0.4.10", "pandas_gbq>=0.10.0"],
"cors": ["flask-cors>=2.0.0"],
"gsheets": ["gsheetsdb>=0.1.9"],
"hive": ["pyhive[hive]>=0.6.1", "tableschema", "thrift>=0.11.0, <1.0.0"],
"mysql": ["mysqlclient==1.4.2.post1"],
"postgres": ["psycopg2-binary==2.7.5"],
"presto": ["pyhive[presto]>=0.4.0"],
"druid": ["pydruid==0.5.7", "requests==2.22.0"],
},
tests_require=[
'codeclimate-test-reporter',
'coverage',
'mock',
'nose',
],
author='Maxime Beauchemin',
author_email='maximebeauchemin@gmail.com',
url='https://github.com/airbnb/superset',
download_url=(
'https://github.com/airbnb/superset/tarball/' + version_string),
python_requires="~=3.6",
author="Apache Software Foundation",
author_email="dev@superset.incubator.apache.org",
url="https://superset.apache.org/",
download_url="https://www.apache.org/dist/incubator/superset/" + version_string,
classifiers=[
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
)
+191 -61
View File
@@ -1,38 +1,110 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# pylint: disable=C,R,W
"""Package's main module!"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from logging.handlers import TimedRotatingFileHandler
import json
import logging
import os
from copy import deepcopy
from typing import Any, Dict
import wtforms_json
from flask import Flask, redirect
from flask_appbuilder import SQLA, AppBuilder, IndexView
from flask_appbuilder import AppBuilder, IndexView, SQLA
from flask_appbuilder.baseviews import expose
from flask_compress import Compress
from flask_migrate import Migrate
from flask_talisman import Talisman
from flask_wtf.csrf import CSRFProtect
from werkzeug.contrib.fixers import ProxyFix
from superset import config
from superset.connectors.connector_registry import ConnectorRegistry
from superset import utils, config # noqa
from superset.security import SupersetSecurityManager
from superset.utils.core import pessimistic_connection_handling, setup_cache
from superset.utils.log import DBEventLogger, get_event_logger_from_cfg_value
wtforms_json.init()
APP_DIR = os.path.dirname(__file__)
CONFIG_MODULE = os.environ.get('SUPERSET_CONFIG', 'superset.config')
with open(APP_DIR + '/static/assets/backendSync.json', 'r') as f:
frontend_config = json.load(f)
CONFIG_MODULE = os.environ.get("SUPERSET_CONFIG", "superset.config")
if not os.path.exists(config.DATA_DIR):
os.makedirs(config.DATA_DIR)
app = Flask(__name__)
app.config.from_object(CONFIG_MODULE)
app.config.from_object(CONFIG_MODULE) # type: ignore
conf = app.config
for bp in conf.get('BLUEPRINTS'):
#################################################################
# Handling manifest file logic at app start
#################################################################
MANIFEST_FILE = APP_DIR + "/static/assets/dist/manifest.json"
manifest: Dict[Any, Any] = {}
def parse_manifest_json():
global manifest
try:
with open(MANIFEST_FILE, "r") as f:
# the manifest inclues non-entry files
# we only need entries in templates
full_manifest = json.load(f)
manifest = full_manifest.get("entrypoints", {})
except Exception:
pass
def get_js_manifest_files(filename):
if app.debug:
parse_manifest_json()
entry_files = manifest.get(filename, {})
return entry_files.get("js", [])
def get_css_manifest_files(filename):
if app.debug:
parse_manifest_json()
entry_files = manifest.get(filename, {})
return entry_files.get("css", [])
def get_unloaded_chunks(files, loaded_chunks):
filtered_files = [f for f in files if f not in loaded_chunks]
for f in filtered_files:
loaded_chunks.add(f)
return filtered_files
parse_manifest_json()
@app.context_processor
def get_manifest():
return dict(
loaded_chunks=set(),
get_unloaded_chunks=get_unloaded_chunks,
js_manifest=get_js_manifest_files,
css_manifest=get_css_manifest_files,
)
#################################################################
for bp in conf["BLUEPRINTS"]:
try:
print("Registering blueprint: '{}'".format(bp.name))
app.register_blueprint(bp)
@@ -40,75 +112,133 @@ for bp in conf.get('BLUEPRINTS'):
print("blueprint registration failed")
logging.exception(e)
if conf.get('SILENCE_FAB'):
logging.getLogger('flask_appbuilder').setLevel(logging.ERROR)
if not app.debug:
# In production mode, add log handler to sys.stderr.
app.logger.addHandler(logging.StreamHandler())
app.logger.setLevel(logging.INFO)
logging.getLogger('pyhive.presto').setLevel(logging.INFO)
if conf.get("SILENCE_FAB"):
logging.getLogger("flask_appbuilder").setLevel(logging.ERROR)
db = SQLA(app)
if conf.get('WTF_CSRF_ENABLED'):
if conf.get("WTF_CSRF_ENABLED"):
csrf = CSRFProtect(app)
csrf_exempt_list = conf.get("WTF_CSRF_EXEMPT_LIST", [])
for ex in csrf_exempt_list:
csrf.exempt(ex)
utils.pessimistic_connection_handling(db.engine.pool)
pessimistic_connection_handling(db.engine)
cache = utils.setup_cache(app, conf.get('CACHE_CONFIG'))
tables_cache = utils.setup_cache(app, conf.get('TABLE_NAMES_CACHE_CONFIG'))
cache = setup_cache(app, conf.get("CACHE_CONFIG"))
tables_cache = setup_cache(app, conf.get("TABLE_NAMES_CACHE_CONFIG"))
migrate = Migrate(app, db, directory=APP_DIR + "/migrations")
# Logging configuration
logging.basicConfig(format=app.config.get('LOG_FORMAT'))
logging.getLogger().setLevel(app.config.get('LOG_LEVEL'))
app.config["LOGGING_CONFIGURATOR"].configure_logging(app.config, app.debug)
if app.config.get('ENABLE_TIME_ROTATE'):
logging.getLogger().setLevel(app.config.get('TIME_ROTATE_LOG_LEVEL'))
handler = TimedRotatingFileHandler(app.config.get('FILENAME'),
when=app.config.get('ROLLOVER'),
interval=app.config.get('INTERVAL'),
backupCount=app.config.get('BACKUP_COUNT'))
logging.getLogger().addHandler(handler)
if app.config.get('ENABLE_CORS'):
if app.config.get("ENABLE_CORS"):
from flask_cors import CORS
CORS(app, **app.config.get('CORS_OPTIONS'))
if app.config.get('ENABLE_PROXY_FIX'):
app.wsgi_app = ProxyFix(app.wsgi_app)
CORS(app, **app.config.get("CORS_OPTIONS"))
if app.config.get('UPLOAD_FOLDER'):
if app.config.get("ENABLE_PROXY_FIX"):
from werkzeug.middleware.proxy_fix import ProxyFix
app.wsgi_app = ProxyFix( # type: ignore
app.wsgi_app, **app.config.get("PROXY_FIX_CONFIG")
)
if app.config.get("ENABLE_CHUNK_ENCODING"):
class ChunkedEncodingFix(object):
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
# Setting wsgi.input_terminated tells werkzeug.wsgi to ignore
# content-length and read the stream till the end.
if environ.get("HTTP_TRANSFER_ENCODING", "").lower() == u"chunked":
environ["wsgi.input_terminated"] = True
return self.app(environ, start_response)
app.wsgi_app = ChunkedEncodingFix(app.wsgi_app) # type: ignore
if app.config["UPLOAD_FOLDER"]:
try:
os.makedirs(app.config.get('UPLOAD_FOLDER'))
os.makedirs(app.config["UPLOAD_FOLDER"])
except OSError:
pass
for middleware in app.config.get('ADDITIONAL_MIDDLEWARE'):
app.wsgi_app = middleware(app.wsgi_app)
for middleware in app.config["ADDITIONAL_MIDDLEWARE"]:
app.wsgi_app = middleware(app.wsgi_app) # type: ignore
class MyIndexView(IndexView):
@expose('/')
@expose("/")
def index(self):
return redirect('/superset/welcome')
return redirect("/superset/welcome")
appbuilder = AppBuilder(
app, db.session,
base_template='superset/base.html',
indexview=MyIndexView,
security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))
sm = appbuilder.sm
custom_sm = app.config.get("CUSTOM_SECURITY_MANAGER") or SupersetSecurityManager
if not issubclass(custom_sm, SupersetSecurityManager):
raise Exception(
"""Your CUSTOM_SECURITY_MANAGER must now extend SupersetSecurityManager,
not FAB's security manager.
See [4565] in UPDATING.md"""
)
with app.app_context():
appbuilder = AppBuilder(
app,
db.session,
base_template="superset/base.html",
indexview=MyIndexView,
security_manager_class=custom_sm,
update_perms=False, # Run `superset init` to update FAB's perms
)
security_manager = appbuilder.sm
get_session = appbuilder.get_session
results_backend = app.config.get("RESULTS_BACKEND")
results_backend_use_msgpack = app.config.get("RESULTS_BACKEND_USE_MSGPACK")
# Merge user defined feature flags with default feature flags
_feature_flags = app.config.get("DEFAULT_FEATURE_FLAGS") or {}
_feature_flags.update(app.config.get("FEATURE_FLAGS") or {})
# Event Logger
event_logger = get_event_logger_from_cfg_value(
app.config.get("EVENT_LOGGER", DBEventLogger())
)
def get_feature_flags():
GET_FEATURE_FLAGS_FUNC = app.config.get("GET_FEATURE_FLAGS_FUNC")
if GET_FEATURE_FLAGS_FUNC:
return GET_FEATURE_FLAGS_FUNC(deepcopy(_feature_flags))
return _feature_flags
def is_feature_enabled(feature):
"""Utility function for checking whether a feature is turned on"""
return get_feature_flags().get(feature)
# Flask-Compress
if conf.get("ENABLE_FLASK_COMPRESS"):
Compress(app)
talisman = Talisman()
if app.config["TALISMAN_ENABLED"]:
talisman.init_app(app, **app.config["TALISMAN_CONFIG"])
# Hook that provides administrators a handle on the Flask APP
# after initialization
flask_app_mutator = app.config.get("FLASK_APP_MUTATOR")
if flask_app_mutator:
flask_app_mutator(app)
from superset import views # noqa isort:skip
# Registering sources
module_datasource_map = app.config.get("DEFAULT_MODULE_DS_MAP")
module_datasource_map.update(app.config.get("ADDITIONAL_MODULE_DS_MAP"))
module_datasource_map = app.config["DEFAULT_MODULE_DS_MAP"]
module_datasource_map.update(app.config["ADDITIONAL_MODULE_DS_MAP"])
ConnectorRegistry.register_sources(module_datasource_map)
from superset import views # noqa
+30 -2
View File
@@ -1,3 +1,31 @@
{
"presets" : ["airbnb", "es2015", "react"],
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
{
"sourceMaps": true,
"retainLines": true,
"presets" : ["airbnb", "@babel/preset-react", "@babel/preset-env"],
"plugins": ["lodash", "@babel/plugin-syntax-dynamic-import", "react-hot-loader/babel"],
"env": {
"test": {
"plugins": [
"babel-plugin-dynamic-import-node"
]
}
}
}
+17
View File
@@ -1,3 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
**/*{.,-}min.js
**/*.sh
coverage/**
@@ -8,3 +24,4 @@ node_modules*/*
stylesheets/*
vendor/*
docs/*
src/dashboard/deprecated/*
+61 -27
View File
@@ -1,42 +1,76 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
{
"extends": "airbnb",
"parserOptions":{
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"globals": {
"document": true,
"env": {
"browser": true
},
"rules": {
"prefer-template": 0,
"new-cap": 0,
"no-restricted-syntax": 0,
"guard-for-in": 0,
"prefer-arrow-callback": 0,
"func-names": 0,
"react/jsx-no-bind": 0,
"no-confusing-arrow": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/anchor-has-content": 0,
"react/require-default-props": 0,
"no-plusplus": 0,
"no-mixed-operators": 0,
"no-continue": 0,
"no-bitwise": 0,
"no-undef": 0,
"no-multi-assign": 0,
"react/no-array-index-key": 0,
"no-restricted-properties": 0,
"no-prototype-builtins": 0,
"jsx-a11y/href-no-hash": 0,
"react/forbid-prop-types": 0,
"camelcase": ["error", {
"allow": ["^UNSAFE_"],
"properties": "never"
}],
"class-methods-use-this": 0,
"func-names": 0,
"guard-for-in": 0,
"import/extensions": ["error", {
".js": "always",
".jsx": "always",
".ts": "always",
".tsx": "always",
".json": "always"
}],
"import/no-named-as-default": 0,
"import/prefer-default-export": 0,
"indent": 0,
"jsx-a11y/anchor-has-content": 0,
"jsx-a11y/href-no-hash": 0,
"jsx-a11y/no-static-element-interactions": 0,
"new-cap": 0,
"no-bitwise": 0,
"no-confusing-arrow": 0,
"no-continue": 0,
"no-mixed-operators": 0,
"no-multi-assign": 0,
"no-multi-spaces": 0,
"no-plusplus": 0,
"no-prototype-builtins": 0,
"no-restricted-properties": 0,
"no-restricted-syntax": 0,
"padded-blocks": 0,
"prefer-arrow-callback": 0,
"prefer-template": 0,
"react/forbid-prop-types": 0,
"react/jsx-no-bind": 0,
"react/no-array-index-key": 0,
"react/no-string-refs": 0,
"react/no-unescaped-entities": 0,
"react/no-unused-prop-types": 0,
"react/no-string-refs": 0,
"react/require-default-props": 0
},
"settings": {
"import/resolver": "webpack"
}
}
-54
View File
@@ -1,54 +0,0 @@
verbose: true
instrumentation:
root: './javascripts'
extensions: ['.js', '.jsx']
excludes: [
'dist/**'
]
embed-source: false
variable: __coverage__
compact: true
preserve-comments: false
complete-copy: false
save-baseline: true
baseline-file: ./coverage/coverage-baseline.json
include-all-sources: true
include-pid: false
es-modules: true
reporting:
print: summary
reports:
- lcov
dir: ./coverage
watermarks:
statements: [50, 80]
lines: [50, 80]
functions: [50, 80]
branches: [50, 80]
report-config:
clover: {file: clover.xml}
cobertura: {file: cobertura-coverage.xml}
json: {file: coverage-final.json}
json-summary: {file: coverage-summary.json}
lcovonly: {file: lcov.info}
teamcity: {file: null, blockName: Code Coverage Summary}
text: {file: null, maxCols: 0}
text-lcov: {file: lcov.info}
text-summary: {file: null}
hooks:
hook-run-in-context: false
post-require-hook: null
handle-sigint: false
check:
global:
statements: 0
lines: 0
branches: 0
functions: 0
excludes: []
each:
statements: 0
lines: 0
branches: 0
functions: 0
excludes: []

Some files were not shown because too many files have changed in this diff Show More