Commit Graph

325 Commits

Author SHA1 Message Date
ʈᵃᵢ
7b97764dbc [dashboard] New, list view (react) (#8845)
* adds dashboard listview component

* use new api

* use json over rison

* lint

* adds seperate dashboard list view

* edit and delete actions

* fix lint ignore

* fix common_bootstrap_payload is now a function

* fix license

* fix pylint

* isort

* fix tests

* lint

* lint ts

* fix js tests

* fix double import from bad rebase

* fix indent error

* lookup permissions

* generic permission lookup

* get tslint to pass

* adds js specs

* lint

* fix rebase

* lint

* lint again

* fix type errors preventing build

* adds more specs

* fix tslint error

* fix null check

* remove unecessary code

* use translations provided by api

* more translations

* linting

* fix spec

* i18n

* fix register order
2020-01-16 00:48:55 -05:00
David Aaron Suddjian
614f13377b [dashboard] Modal for editing dashboard properties & metadata (#8876)
* wip

* wip

* wip

* modal to update dashboard properties

* cleanup

* translations and flavor text

* linted

* more explanatory text in the modal
2020-01-14 14:29:59 -05:00
Grace Guo
50f21cb7db [filter_box] Fix ; separated filter_box default values (#8949) 2020-01-13 20:35:33 -08:00
Rob DiCiuccio
6537d5ed8c Replace pandas.DataFrame with PyArrow.Table for nullable int typing (#8733)
* Use PyArrow Table for query result serialization

* Cleanup dev comments

* Additional cleanup

* WIP: tests

* Remove explicit dtype logic from db_engine_specs

* Remove obsolete  column property

* SupersetTable column types

* Port SupersetDataFrame methods to SupersetTable

* Add test for nullable boolean columns

* Support datetime values with timezone offsets

* Black formatting

* Pylint

* More linting/formatting

* Resolve issue with timezones not appearing in results

* Types

* Enable running of tests in tests/db_engine_specs

* Resolve application context errors

* Refactor and add tests for pyodbc.Row conversion

* Appease isort, regardless of isort:skip

* Re-enable RESULTS_BACKEND_USE_MSGPACK default based on benchmarks

* Dataframe typing and nits

* Renames to reduce ambiguity
2020-01-03 11:55:39 -05:00
Grace Guo
cd8aa92cbb [explore view] fix: Inline edit chart title cause unintended overwrite original query parameter (#8835)
* [explore view] fix: Inline edit chart title cause unintended overwrite original query parameter

* add more unit tests

* handle new slice case
2019-12-18 16:17:48 -08:00
Evan Rusackas
5780d9d53b Version number and SHA added to user menu (#8850)
* working!

* sigh... linting.

* more linting
2019-12-16 23:48:27 -08:00
Grace Guo
1d3c93ccb2 [filter_box] dashboard should carry defaultValue in filter_box (#8812) 2019-12-12 11:01:18 -08:00
Maxime Beauchemin
e127579fc8 fix: remove unused .js module (#8741)
* fix: remove unused .js module

* fix tests, remove more references

* lints
2019-12-04 16:51:05 -08:00
Grace Guo
89950440f2 [filter_box] Fix show time column in filter_box (#8740) 2019-12-03 17:02:09 -08:00
David Aaron Suddjian
b0b93768bb handle nulls in bar chart series/breakdown (#8724)
* handle nulls in bar chart series/breakdown

* snake_case

* add tests for null groups in bar charts

* black

* comments will save us
2019-12-03 16:11:15 -08:00
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