Commit Graph

3873 Commits

Author SHA1 Message Date
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