Commit Graph

143 Commits

Author SHA1 Message Date
Will Barrett
68aca88c54 Re-enable pylint on some configuration files (#8767)
* re-enable pylint for superset/config.py

* re-enable pylint on superset/migrations/env.py

* re-enable pylint for superset/legacy.py

* re-enable pylint for superset/forms.py

* re-enable pylint for superset/stats_logger.py

* Tweaks to make mypy and pylint happy

* black
2019-12-06 14:30:11 -08:00
Evan Rusackas
b107cc03bf SHA display touchups (#8614)
* Only showing last 8 chars of SHA

* visual touchups

* Grabbing first 8 rather than last 8

* 10 char SHA rather than 8

* atting config var for SHA length
2019-12-04 13:13:51 -08:00
Daniel Vaz Gaspar
385484eb9d [config] Enables swagger UI by default (#8732)
* [config] Enables swagger UI by default
2019-12-04 09:50:56 +00:00
Beto Dealmeida
f8e15e1c55 Add protocol to cache warmup (#8721)
* Add protocol to cache warmup

* Update unit tests

* Fix wrong commit

* Update UPDATING.md

* Fix pylint
2019-12-03 10:51:06 -08:00
Will Barrett
16c0599470 Disable deprecated druid connector by default (#8512)
* Disable deprecated druid connector by default

* Add a line in UPDATING.md for the configuration change

* Remove security tests related default-disabled feature

* More test updates

* black
2019-11-27 11:28:23 -08:00
Evan Rusackas
ac665d360c showing version and SHA (subtly) in user menu. (#8562)
* showing version and SHA (subtly) in user menu.

* not using VERSION_INFO_FILE after all.

* cleanup... excess linebraks...

* Just trying to make you happy, Black!

* adding some spaces before opening brackets for CSS selectors

* setting version_sha from appbuilder.app.config['VERSION_SHA']
2019-11-19 21:35:18 -08:00
Beto Dealmeida
d66bc5ad90 SIP-23: Persist SQL Lab state in the backend (#8060)
* Squash all commits from VIZ-689

* Fix javascript

* Fix black

* WIP fixing javascript

* Add feature flag SQLLAB_BACKEND_PERSISTENCE

* Use feature flag

* Small fix

* Fix lint

* Fix setQueryEditorSql

* Improve unit tests

* Add unit tests for backend sync

* Rename results to description in table_schema

* Add integration tests

* Fix black

* Migrate query history

* Handle no results backend

* Small improvement

* Address comments

* Store SQL directly instead of reference to query

* Small fixes

* Fix clone tab

* Fix remove query

* Cascade delete

* Cascade deletes

* Fix tab closing

* Small fixes

* Small fix

* Fix error when deleting tab

* Catch 404 when tab is deleted

* Remove tables from state on tab close

* Add index, autoincrement and cascade

* Prevent duplicate table schemas

* Fix mapStateToProps

* Fix lint

* Fix head

* Fix javascript

* Fix mypy

* Fix isort

* Fix javascript

* Fix merge

* Fix heads

* Fix heads

* Fix displayLimit

* Recreate migration script trying to fix heads

* Fix heads
2019-11-14 09:44:57 -08:00
Paul Vickers
62476c5901 Allow customization of documentation icon and text (#8507)
* Allow customization of documentation icon and text

* Set icon width to 100%

* Use double quotes for strings
2019-11-11 17:35:19 -08:00
Ville Brofeldt
49ea232c3a [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-07 20:03:42 +02:00
John Bodley
0e64dc84de [SIP-15] Making sure the toast link opens in a new tab (#8503)
* [SIP-15] Ensuring toast opens in a new tab

* Update config.py
2019-11-05 07:02:18 -08:00
John Bodley
5dba2f4b56 [SIP-15] Adding grace period (#8490) 2019-11-04 12:00:41 -08:00
John Bodley
554a6d82db [sip-15] Adding database level python-date-format (#8474) 2019-10-31 07:13:41 -07:00
Will Barrett
e4ca44e95f Use config[] not config.get() (#8454)
* Typo fix in CONTRIBUTING.md

* Alter references to config.get('FOO') to use preferred config['FOO']

* Set missing configuration constants in superset/config.py

* Misc. CI fixes

* Add type annotation for FEATURE_FLATGS
2019-10-30 16:19:16 -07:00
John Bodley
8b74745f9e [SIP-15] Adding initial framework (#8398)
* [sip-15] Adding initial framework

* [toast] Addressing etr2460's comments

* [fix] Addressing etr2460's comments
2019-10-28 14:23:12 -07:00
John Bodley
9fc37ea9f1 [ci] Deprecate flake8 (#8409)
* [ci] Deprecate flake8

* Addressing @villebro's comments
2019-10-18 14:44:27 -07:00
Erik Ritter
d3406e0a04 [Config] Cache static resources (#8370) 2019-10-17 09:09:25 -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
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
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
Erik Ritter
c053e23397 [Config] Disable celery acks late (#8182) 2019-09-09 09:07:38 -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
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
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
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
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
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
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
Maxime Beauchemin
87f50ba0d8 Make SHOW_STACKTRACE config apply across the board (#7845) 2019-07-12 08:58:44 -07:00
John Bodley
5c58fd1802 [format] Using Black (#7769) 2019-06-25 13:34:48 -07:00
John Bodley
8d6257afcd [epoch] Remove non-UTC epoch logic (#7667) 2019-06-11 22:34:53 -07:00
Erik Ritter
f7812a3f27 [SQL Lab] Clarify SQL Lab query and display limits (#7641) 2019-06-07 17:16:38 -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
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
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
Craig Rueda
21a467094b Talisman config (#7529)
* Making Talisman configurable

* Fixing double quotes

* Fixing flake8

* Removing default
2019-05-16 22:55:59 -05:00
John Bodley
a4392c8fcd [security] Adding Flask-Talisman (#7443) 2019-05-13 17:08:24 -07: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
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
Beto Dealmeida
51544212b6 Add link to documentation (#7251) 2019-04-09 09:40:19 -07:00
michellethomas
ead3d48133 Adding warning message for sqllab save query (#7028) 2019-03-18 10:14:26 -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
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
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
Maxime Beauchemin
73e119a84e [config] clarifications around SUPERSET_WEBSERVER_TIMEOUT (#6840) 2019-02-11 10:32:11 -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
Hugh A. Miles II
9573fe338e added docs on proper function call for db mutator (#6826) 2019-02-06 13:17:15 -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
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