Commit Graph

315 Commits

Author SHA1 Message Date
Grace Guo
69dcaca324 [explore] should not triger chart render when overlay is on (#8719) 2019-12-03 10:36:15 -08:00
Erik Ritter
44d919c757 Prettify the frontend code (#8648)
* Add Prettier global configs

* Format js/jsx/ts/tsx/less files
2019-11-27 14:02:48 -08:00
ʈᵃᵢ
9d36fa348f Move from MVC FAB menu to Superset React menu (#8289)
* adds react based menu for welcome view

* bump fab

* better logic in common_bootstrap_payload

* split up files

* fix spacing and module scope styles

* lint

* render correct template for welcome
2019-11-19 22:56:27 -08:00
Grace Guo
ff6ab10893 [Feature] Dashboard scoped filter (#8590)
* [WIP][dashboard scoped filter] part 1: scope selector modal (#8557)

* filter scope selector modal

* add single-field-edit in multi-edit mode switch

* fix code review comments (round 1)

* refactory after design review

* fix a few props initial value

* [WIP][dashboard scoped filter] part 2: add algorithm to convert checked ids to scope object (#8564)

* convert ids to scope object

* use lodash helpers to make code readable

* [WIP][dashboard scoped filter] part 3: merge filter scope settings into dashboard redux state (#8522)

* merge filter scope settings into dashboard redux state

* fix/add unit tests

* minor bug fixes

* fix save filter Scopes behavior

* resolve review comments

* fix save filter scope settings

* minor comments

* [dashboard scoped filter] Improve scrollbar inside modal (#8553)

* improve scroll inside modal

* make left pane and right pane scroll separately

* fix review comments

* force show filter_box as unchecked (#8587)
2019-11-18 13:02:25 -08:00
Beto Dealmeida
9044f210ee Do not autorun query on tab duplicate (#8577)
* Pass autorun argument to cloneQueryToNewTab

* Accept autorun argument

* Fix unit test
2019-11-14 17:08:03 -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
Evan Rusackas
1b3e40feac Clickable checkbox labels (#8534)
* passing onClick prop to header with the existing onChange method.

* basic test checking that label click fires the onChange method.

* cleaning up stuff caught by linting.
2019-11-12 10:22:17 -08:00
Paul Vickers
5df1fcb7bd Add Duplicate Tab option (#8485)
* Add `Duplicate Tab` option

Adds an option to duplicate the current tab's setting/content into a new tab. Useful if you're iterating on a query.

* Add test
2019-11-04 09:05:10 -08:00
Grace Guo
5fb0bcb854 [Datasource Editor] A few small UI changes in modal to prevent accidental edits (#8471) 2019-10-29 15:26:11 -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
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
John Bodley
5d1bf4245d [sql_json] Ensuring the request body is JSON encoded (#8256) 2019-09-23 09:09:12 -07: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
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
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
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
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
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
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
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
Grace Guo
40776bd547 [Feature] Dashboard filter indicators (#7908)
* dashboard filter indicators

* add/fix unit tests
2019-08-21 17:34:08 -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
Grace Guo
613dcf5def [fix] Allow dashboard viewer auto refresh dashboard (#8014) 2019-08-13 13:49:39 -07:00
Grace Guo
b380879c41 [fix] reduce content in sql lab localStorage (#7998) 2019-08-06 21:23:40 -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
df9efa8ed9 [dashboard] fix chart showing loading icon when filter updated immuned fields (#7895) 2019-07-25 10:37:44 -07:00
Erik Ritter
7a1dcaae8a [SQL Lab] Fix TableSelector perf for large option sets (#7868) 2019-07-22 14:39:12 -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
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
Grace Guo
9b8996038e [dashboard] Fix URLShortLinkButton position after click anchor link (#7812) 2019-07-03 15:05:51 -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
michellethomas
5864ddc079 Allowing withVerification to remove all options if none are valid (#7652) 2019-06-18 14:06:05 -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
Grace Guo
39d67cbc59 [SQL Lab] Show warning when user used up localStorage (#7572) 2019-06-07 14:27:57 -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
Grace Guo
5701629d95 [SQL Lab] Old query showing success state but not showing results (#7628) 2019-05-31 15:26:41 -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
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
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
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
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
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
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
Grace Guo
9e703f399b [dashboard] allow user re-order top-level tabs (#7390) 2019-04-30 00:40:35 -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
Maxime Beauchemin
5f28027ce7 Merging lyftga into master 2019-04-18 22:47:47 -07:00