Commit Graph

3830 Commits

Author SHA1 Message Date
Christine Chambers 19b3753d2c Move feature flag utility function into superset/__init__.py 2019-02-01 13:35:50 -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