Commit Graph

3868 Commits

Author SHA1 Message Date
Beto Dealmeida
f24efa7250 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() }}`.

(cherry picked from commit 8041b63af6)
2019-02-06 14:18:50 -08:00
John Bodley
1ddacc42d0 [wtforms] Using wtforms-json which supports None (#5445)
(cherry picked from commit e1b907783a)
2019-02-06 14:17:51 -08:00
Christine Chambers
4f37b9aefc 0.31.0rc4 2019-02-04 18:58:54 -08:00
Michael McDuffee
845c7aa91c creating new circular-json safe stringify and replacing one call (#6772)
(cherry picked from commit 11a7ad00b7)
2019-02-04 18:54:39 -08:00
michellethomas
8ea805ea0a Fixing sort issue with area chart and adding tests (#6358)
(cherry picked from commit 8100a8fa97)
2019-02-04 18:50:55 -08:00
Beto Dealmeida
aff43c7453 Allow specifying custom width for logo (#6739)
(cherry picked from commit cf1a35b94b)
2019-02-04 18:49:30 -08:00
Beto Dealmeida
7f86517970 Remove test URL (#6740)
(cherry picked from commit bbd781b66e)
2019-02-04 18:48:24 -08:00
Christine Chambers
ed0f0ab2d8 0.31.0rc30.31.0rc30.31.0rc3 2019-02-04 16:13:23 -08:00
Grace Guo
db81dc50b1 [fix] Add action for update chart id (#6769)
(cherry picked from commit 744135c7fe)
2019-02-04 15:30:52 -08:00
Grace Guo
37de92b883 [fix] JS error out when rename a new chart (#6752)
(cherry picked from commit 879c553b0a)
2019-02-04 15:30:27 -08:00
Christine Chambers
4d01a02f21 0.31.0rc2 2019-02-01 18:41:37 -08:00
Christine Chambers
0e48e05008 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.

(cherry picked from commit 501340b5db)
2019-02-01 15:38:22 -08:00
Beto Dealmeida
ae95c8930b Fix playslider
(cherry picked from commit a09348d0ec)
2019-02-01 15:37:49 -08:00
Krist Wongsuphasawat
58e3a39f55 Add iframe and markup legacy plugin (#6741)
* Add iframe plugin

* Use lazy load and add description

* remove unintended files

* Add markup

* minor adjustment

(cherry picked from commit 3ae7d32caa)
2019-02-01 15:32:55 -08:00
Christine Chambers
b80b0b90e2 0.31.0rc1 2019-01-24 13:59:41 -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