Commit Graph

611 Commits

Author SHA1 Message Date
Michael S. Molina
fc20e8b594
Apply capitalization guidelines - iteration 4 (#12343) (#12450) 2021-01-22 10:11:38 -08:00
Michael S. Molina
7838f035ae
Apply capitalization guidelines - iteration 9 (#12343) (#12455) 2021-01-21 21:46:29 -08:00
Michael S. Molina
217034e990
Apply capitalization guidelines - iteration 8 (#12343) (#12454) 2021-01-21 21:46:18 -08:00
Michael S. Molina
2a587f6cb1
Apply capitalization guidelines - iteration 6 (#12343) (#12452) 2021-01-21 21:45:44 -08:00
Agata Stawarz
c72c39bffd
feat(native-filters): Show alert for unsaved filters after cancelling Filter Config Modal (#12554)
* Add Alert when native filter is canceled and not saved

* Improve styles and setting styles visible

* Improve displaying filter names

* Add tests for canceling native filter modal

* Fix linter errors

* Refactor Cancel Confirmation Alert
2021-01-20 20:57:28 -08:00
simchaNielsen
2463215d73
refactor: Sync Scoping tree with Forms data (#12171)
* refactor: sync Scoping tree with Forms data

* refactor: update scoping tree

* refactor: update scope tree logic to be more UX friendly

* test: fix tests

* lint: fix lin CR notes

* fix: fix jsx

* refactor: revert type changes

* refactor: revert type changes

* lint: fix lint

* lint: fix lint

* test: fix test

* fix: process initial dashboard case

* lint: fix lint / tests
2021-01-20 11:40:53 +02:00
Kamil Gabryjelski
853d34beba
fix(explore): Disable saved metric name edit in Metric popover (#12582) 2021-01-19 12:28:55 -08:00
Hugh A. Miles II
68fe2208ba
fix: save tabs when saving the query bug (#12607)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2021-01-19 14:27:48 -05:00
Yongjie Zhao
9771b82c94
refactor(explore): move MetricControl and FilterControl to sub-component (#12446)
* wip

* wip

* wip

* wip

* move spec

* wip

* wip

* remove unused file

* wip

* wip

* Update superset-frontend/spec/javascripts/explore/components/AdhocFilterEditPopoverSqlTabContent_spec.jsx

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update superset-frontend/spec/javascripts/explore/components/AdhocFilterOption_spec.jsx

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update superset-frontend/spec/javascripts/explore/components/AdhocMetricEditPopoverTitle_spec.jsx

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2021-01-19 22:46:28 +08:00
Kamil Gabryjelski
e1eeeebe53
fix: Select options overflowing Save chart modal on Explore view (#12522)
* Fix select options overflowing modal

* fix unit test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-01-15 12:43:33 +02:00
Beto Dealmeida
086b3a66a0
fix (SQL Lab): disappearing results on tab switch (#12472)
* fix (SQL Lab): disappearing results on tab switch

* Remove state

* Fix test
2021-01-13 19:10:04 +02:00
Michael S. Molina
6731cd0be6
chore: apply capitalization guidelines - iteration 1 (#12447)
Apply capitalization guidelines defined in #12343 

Use sentence casing for most places.
2021-01-12 10:47:55 -08:00
Michael S. Molina
75f927b9eb
Fixes control panel fields styling (#12236) (#12326) 2021-01-11 16:47:10 -08:00
Geido
376723a1f5
chore: Show datasets when search input is empty (#12391) 2021-01-11 14:06:57 -08:00
Agata Stawarz
ddbcf5b0e9
fix: Refresh Interval Modal dropdown (#12406) 2021-01-11 11:58:28 -08:00
Jesse Yang
9acf48fd1e
chore: upgrade eslint, babel, and prettier (#12393) 2021-01-10 17:26:35 -08:00
Duy Nguyen Hoang
99de8a49b6
fix: explore replace wrong standalone slice url (#12359) 2021-01-09 13:32:06 -08:00
Hugh A. Miles II
12504264e7
fix: datasets populating after user creation (#12368) 2021-01-08 21:04:00 -05:00
Jesse Yang
2210015aab
test: rename column names for birth_names dataset (#12082) 2021-01-08 14:13:20 -08:00
Kamil Gabryjelski
fd15dff60e
perf: Optimize performance of Results and Samples tables on Explore (#12257) 2021-01-08 12:07:51 -08:00
Nikola Gigić
737e6b4aee
chore(dashboard): Add ErrorBoudary for AdhocFilter components (#12352)
* Add ErrorBoudary for AdhocFilter components

* Add tests

* typo fix
2021-01-08 20:58:26 +02:00
Ville Brofeldt
78d3557757
fix(explore): improve filter translation (#12350)
* fix(explore): improve filter translation

* address review comments
2021-01-08 20:57:21 +02:00
simchaNielsen
fecfc34cd3
feat: move filters from superset-ui to incubator (#12154)
* feat: move filters from superset-ui to incubator

* refactor: add safety check

* refactor: move extraForm data utils

* refactor: move extraForm data utils

* lint: fix lint

* chore: add license

* chore: undo changes to file

* refactor: fix CR notes / add tests

* test: update tests

* fix: fix range logic

Co-authored-by: Amit Miran <47772523+amitmiran137@users.noreply.github.com>
2021-01-08 14:44:25 +02:00
Hugh A. Miles II
9997abeab6
feat: SQL Toolbar (#12067)
Co-authored-by: hughhhh <hughmil3s@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Lily Kuang <lily@preset.io>
Co-authored-by: Victor Malai <malai9696@gmail.com>
Co-authored-by: Agata Stawarz <47450693+agatapst@users.noreply.github.com>
Co-authored-by: Daniel Vaz Gaspar <danielvazgaspar@gmail.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: Nikola Gigić <nik.gigic@gmail.com>
Co-authored-by: Jagadish <jagadishmts@gmail.com>
Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2021-01-07 17:04:43 -05:00
Kamil Gabryjelski
e660723a2f
fix(explore): bugs in Custom SQL editor in filter popover (#12278)
* Fix Save button disabled until clause is switched

* Fix 'undefined undefined' when sql query is empty

* fix test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-01-06 15:08:20 +02:00
Kamil Gabryjelski
811e1b273b
fix: Altered button crashing and title not updating on Explore view (#11960)
* Fix chart name not updating

* Fix AlteredSliceTag crashing

* Update name after it's changed in another modal
2021-01-04 16:14:06 -08:00
Lily Kuang
ff0fe434e4
feat(report): add/edit modal improvements (#12183)
* alert/report modal improvements

* update spec for alert report modal
2021-01-04 09:15:55 -08:00
Kamil Gabryjelski
f3ab1f41ee
feat: Implement drag & drop for metrics and filters labels (#12184) 2020-12-24 20:46:37 -08:00
Jesse Yang
d2da25a621
refactor: remove queryFields in QueryObject and update chart control configs (#12091)
* Clean up queryFields

* Clean up unused vars

* Bump chart plugins

* Bringing changes in #12147
2020-12-22 17:10:19 -08:00
Ville Brofeldt
41fac6b0d9
fix(explore): save chart not working (#12178)
* fix(explore): save to dashboard not working

* fix test
2020-12-22 23:18:36 +02:00
Michael S. Molina
8682c6fc1c
refactor: Fix anchor-is-valid lint warnings (#12010)
* Fix anchor-is-valid lint warnings

* Change IconTooltip to use named exports
2020-12-21 23:58:05 -08:00
David Aaron Suddjian
b5dd0f32cc
feat: Dynamically imported viz plugins (#10288)
* first attempts at dynamic plugin loading

* dynamic import working for explore

* memoize appropriately

* add a backend for dynamic plugins

* hack at getting dynamic plugins working with dashboards

* more work on making it work, + feature flag

* lint

* actions to fix explore state when plugins load

* handle dynamic control panel, functionify ExploreViewContainer

* fix: rearrange migrations branch

* fix: name and key as strings with length 50

* bundle url length 2000

* bundle url to text
for some reason not supported on my sql

* fix: too long varchart

* fix: pre-commit typing

* fix: licenses

* fix: add slice container was not initing feature flags

* fix: undo linting issue

* fix: adjust down revision again

* fix: adjust down revision again

* isort

* pylint

* god damn linters

* remove unnecessary(?) loading message

* only log non-standard errors

* testing

* python is terrible

* see above commit message

* fix imports in DynamicPluginProvider

* fix

* shift migration forward

* lint

* fix form data calculations to handle missing control config

* temp commit - waiting for superset-ui changes and crud fixes

* remove unnecessary todo

* use new superset-ui shared module function

* fetch the plugins instead of hardcoding the test one

* migration sort

* remove duplicated import statement

* format

* try moving the import 🙄

* copy

* fix frontend tests

* safe access

* comment out dead code

* isort

* disable pylint on necessary lines

* use @superset-ui/logging instead of console

* remove temp code

* rearrange some code

* try triggering mouseover in cypress before click

* use loading spinner instead of text

* trying to fix cypress

* attempt cypress fix

* customize permissions

* update package lock

* only admins can write to plugins by default

* better copy

* disable flaky tests

* use makeApi

* flaky tests

* cleanup code

* flaaaakkkyyyyyy

* dry

Co-authored-by: amitNielsen <amit.miran@nielsen.com>
2020-12-19 07:06:11 -08:00
Evan Rusackas
4a471b8c71
feat: Native filters fast-follow (#12138)
* wip: filter create modal

* add a feature flag

* automatic changes to package lock

* wip

* filter sidebar and basic state management

* move create button to the sidebar

* first step for edit filterconfig

* partially fix tests...

* edits to types and comments

* respect feature flag on the filter sidebar

* add filterconfig form

* get input state working

* feat: tree filter scopes UI

* fix: turn on flag

* sticky filter bar

* stop preferring default export

* feat: finish filter scoping

* fix: under toggle

* fix: title

* fix: add licence

* refactor: update TS

* fix: fix on reopen modal + validation

* new filter bar menu

* adding, but commenting out, bulk scoping action

* adding some placeholder buttons and styles therefor

* feat: add filter chart

* add relative path to package.json

* update modal

* a little input styling... just getting warmed up

* Revert "feat: add filter chart"

This reverts commit b1302d35b6.

* Revert "add relative path to package.json"

This reverts commit 26a7b40e18.

* https package lock idk

* feat: add filter chart

* add relative path to package.json

* flexboxes all the way down

* dynamically generate groupby and datasource in select control

* big wip

* fix target column name

* no importing nonexistent things

* styles and name editing

* Add hook for retrieval of all filter states

* start with a new filter when clicking add filter

* handle removed filters gracefully

* fix incorrect default filter configuration

* add fields to useAllFilterState

* add redux for filterconfigs

* add support for native_filters

* remove consoles

* improve filter removal

* unbreak infinite loop

* basic sidebar toggling working!

* collapsing and menu working more smoothly

* linting

* make dataset and column inputs work

* save filter values properly

* add dashboard event for filter updates

* guarded

* apply filters properly

* fix schema

* making New Filter button a link

* gridunits ftw

* centering modal

* tis not a button anymore! nixing type.

* plus and collapse buttons instead of "more" menu

* updating full size filter icons

* adding icons to filter collapsing/expanding

* turning off animation, but leaving class-based animation css

* fix linting error

* fix native filters for legacy charts

* updates test

* no individual apply buttons

* fix bugs with filter config modal

* remove redundant code

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* update tests

* oops forgot to add the fancy new useChangeEffect hook

* comments and code reorganization

* rename native_filters to extr_form_data and move hook

* disable native filters in viz selector

* add cascading

* implement new extra form data api

* cleanup

* updates tests

* bump npm packages

* fix bad merge on package.json + lock

* lint

* replace in and not in with uppercase

* lint

* lint

* lint

* lint

* bulk test fix

* Sort select input alphabetically

* Change type for sorting elements

* sleeker filter removal UX

* fix rest of unit tests

* make filter operators all uppercase

* Hide Filter bar when there are no filters

* Show edit button for dashboard owners only

* Add visible argument to filters toggle function to avoid future regression

* Improve Toggle filters bar function

* lint

* fix js lint + set createNewOnOpen

* Handle setting extra form data in Filter Bar instead of Filter Control

* Add Handle apply filter function to Apply button

* Allow applying changes instantly

* Fix types

* remove console logs

* fix package

* Add Error Boundary component to Filter bar and Filter Config Modal

* fix jest tests

* update native filters tests to pass

* reset cypress baseUrl

* remove unnecessary field

* Add Parent Filter input field to Config Modal

* Create Cascade Filter & display children filters

* Add Cascade Popover

* Display Filter value both in Filter Bar and in Cascade Popover

* Display the youngest filter value label in the Filter bar

* Add styles to Cascade Popover and filters

* Force to apply changes instantly for parent filters and refactor styles

* Show error for no cyclical hierarchy and refactor

* Add validation for parent filter to be applied instantly

* Add Error Boundary to Filter Config Modal

* cleanup: remove unused state fields

* move unrelated types to an appropriate location

* remove misplaced resource fetch error logic

* fix cascadeParentIds error

* fix cypress password

* initial attempt at fixing scope issue

* fix bad merge

* fix lint

* trying out makeApi for saving filters

* remove unused import

* fix test

* silence bad test

* Improve styling of Filter Config Modal

* Improve styles for whole native filters feature

* Add styles for active filter tab

* Fix text for scoping

* Clean up Filter Bar and Config Modal styles

* Remove fractional gridUnits. Change name for CheckboxFormItem. Add placeholder to Parent Filter select.

* Remove unnecessary button size for Config Modal

* add native-filter feat flag config

* oops fix here

* remove space

* Update superset-frontend/src/common/components/index.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts

Co-authored-by: Evan Rusackas <evan@preset.io>

* Add Cache Wrapper helper to avoid datasets requests deduplication

* Add license to new Cache Wrapper helper

* Add Cache Wrapper tests

* Fix expanding Filter Bar

* use styledMount in tests

* comment

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigurationLink.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* address PR feedback

* fix package lock

* null guards

* Fix charts resizing

* removing emotion/react and going old school on css animation

* fxing css glitch on scoping disclaimer

* src paths.

* using gridUnits

* nixing unnecessary diamonds

* linting

* fix type errors

* Inverting collapsed icons... closer to data src selector design

* restoring feature flag to proper default setting

* missing condition

* fix tests

* patching test

* just a button

* flaky tests

Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-19 01:57:06 -08:00
David Aaron Suddjian
865beae3d8
feat(dashboard): Dashboard-Native Filters (#11814)
* wip: filter create modal

* add a feature flag

* automatic changes to package lock

* wip

* filter sidebar and basic state management

* move create button to the sidebar

* first step for edit filterconfig

* partially fix tests...

* edits to types and comments

* respect feature flag on the filter sidebar

* add filterconfig form

* get input state working

* feat: tree filter scopes UI

* fix: turn on flag

* sticky filter bar

* stop preferring default export

* feat: finish filter scoping

* fix: under toggle

* fix: title

* fix: add licence

* refactor: update TS

* fix: fix on reopen modal + validation

* new filter bar menu

* adding, but commenting out, bulk scoping action

* adding some placeholder buttons and styles therefor

* feat: add filter chart

* add relative path to package.json

* update modal

* a little input styling... just getting warmed up

* Revert "feat: add filter chart"

This reverts commit b1302d35b6.

* Revert "add relative path to package.json"

This reverts commit 26a7b40e18.

* https package lock idk

* feat: add filter chart

* add relative path to package.json

* flexboxes all the way down

* dynamically generate groupby and datasource in select control

* big wip

* fix target column name

* no importing nonexistent things

* styles and name editing

* Add hook for retrieval of all filter states

* start with a new filter when clicking add filter

* handle removed filters gracefully

* fix incorrect default filter configuration

* add fields to useAllFilterState

* add redux for filterconfigs

* add support for native_filters

* remove consoles

* improve filter removal

* unbreak infinite loop

* basic sidebar toggling working!

* collapsing and menu working more smoothly

* linting

* make dataset and column inputs work

* save filter values properly

* add dashboard event for filter updates

* guarded

* apply filters properly

* fix schema

* making New Filter button a link

* gridunits ftw

* centering modal

* tis not a button anymore! nixing type.

* plus and collapse buttons instead of "more" menu

* updating full size filter icons

* adding icons to filter collapsing/expanding

* turning off animation, but leaving class-based animation css

* fix linting error

* fix native filters for legacy charts

* updates test

* no individual apply buttons

* fix bugs with filter config modal

* remove redundant code

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* update tests

* oops forgot to add the fancy new useChangeEffect hook

* comments and code reorganization

* rename native_filters to extr_form_data and move hook

* disable native filters in viz selector

* add cascading

* implement new extra form data api

* cleanup

* updates tests

* bump npm packages

* fix bad merge on package.json + lock

* lint

* replace in and not in with uppercase

* lint

* lint

* lint

* lint

* bulk test fix

* Sort select input alphabetically

* Change type for sorting elements

* fix rest of unit tests

* make filter operators all uppercase

* Hide Filter bar when there are no filters

* Show edit button for dashboard owners only

* Add visible argument to filters toggle function to avoid future regression

* Improve Toggle filters bar function

* lint

* fix js lint + set createNewOnOpen

* Handle setting extra form data in Filter Bar instead of Filter Control

* Add Handle apply filter function to Apply button

* Allow applying changes instantly

* Fix types

* remove console logs

* Add Error Boundary component to Filter bar and Filter Config Modal

* fix jest tests

* update native filters tests to pass

* reset cypress baseUrl

* remove unnecessary field

* cleanup: remove unused state fields

* move unrelated types to an appropriate location

* remove misplaced resource fetch error logic

* fix cascadeParentIds error

* fix cypress password

* initial attempt at fixing scope issue

* fix bad merge

* fix lint

* trying out makeApi for saving filters

* remove unused import

* fix test

* silence bad test

* add native-filter feat flag config

* oops fix here

* remove space

* Update superset-frontend/src/common/components/index.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts

Co-authored-by: Evan Rusackas <evan@preset.io>

* use styledMount in tests

* comment

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigurationLink.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* address PR feedback

* fix package lock

* null guards

* Fix charts resizing

* fix cypress tests

* add in nativefilters to form data

* fix lint and test

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-18 17:06:37 -08:00
Geido
f4ce831a10
feat: View all fav charts and dashboards (#12060)
* Add fav filter - tentative

* Closes #11984

* Fix tests

* Delete trailing spaces

* Fix spec btns length

* Fix mock test

* Add urlDisplay option

* Redirect with history

* Catch initial fav filter
2020-12-18 13:16:07 -08:00
Kamil Gabryjelski
2a23744223
feat: Add Saved Metrics tab to metrics popover (#12123)
* Implement saved metrics

* Fix bug in sql editor

* Fix unit tests

* Fix outlines in popovers

* Add types for saved metrics

* Add translations

* Move savedMetricType to a separate file
2020-12-18 11:11:49 -08:00
simchaNielsen
49ec13c68c
feat: Support multiple queries per request (#11880)
* refactor: add queriesData fields for multiple queries

* feat: support multi queries request

* lint: fix lint

* lint: fix lint

* lint: fix lint

* fix: fix CR notes

* fix: fix CR notes

* fix: fix CR notes

* fix: fix error case for multi queries

* feat: change queryResponse to queriesResponse

* fix: revert webpack

* test: fix tests

* chore: lint

* chore: adjust asyncEvent to multiple results

* fix: lint

* fix: eslint

* fix: another eslint rule

Co-authored-by: Amit Miran <47772523+amitmiran137@users.noreply.github.com>
Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
2020-12-18 09:15:27 -08:00
Phillip Kelley-Dotson
35addee3ae
feat(explore-datasource): add new datasource tab to explore view (#12008)
* update to datsource tab

* second update

* style updates

* update style and fix metrics bug

* updates to datsource panel

* backgrounds and borders

* more updates

* shuffling some paddings around

* more updates

* moving some more paddings around!

* Fixing sidebar width

* using Global to adjust body layout

* update test and fix bug

* removing hotkeys

* layout fixes for short content, simplifying some class names

* more styles

* add tooltip to collapse and div clickable

* more updates

* more updates for styles and add list component

* update from comments

* vising cosmetic issue with line-wrapping drop down caret on controls sections

* controls area scrolling properly again.

* change lists to old list and updates from comments

* border radius from theme

* add length field and updates from comments

* more changes from comments

* integrate health with new control

* change callapse back from stylsheet more udpates

* substitution string

* more substitution strings

* fix tests

* datasource alignment

* taking margin off the search input

* update input to flex

* fix lint

* adjusting column/metric label stylng

* fixing scrollable area layout, one more color variable

* simplifying some styles

* nixing a bad left margin

* Using gridunit for padding

* using gridUnit for padding

* define types for datsource panel

* fixing a padding issue

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-12-18 01:49:05 -08:00
Moriah Kreeger
1cf4a1b3ea
fix: updates to alert/report modal + more tests (#12045)
Co-authored-by: Tai Dupree <tdupreetan@gmail.com>
2020-12-17 23:50:17 -08:00
Kamil Gabryjelski
b61e243f39
feat(explore): metrics and filters controls redesign (#12095)
* Redesign metrics control

* Redesign filters control

* Bugfixes

* Fix unit tests

* Fix tests

* Code review fixes
2020-12-18 00:13:37 +02:00
Daniel Vaz Gaspar
790ac5ef87
feat(databases): security perm simplification (#12036)
* feat(databases): security perm simplification

* fix tests

* fix JS tests
2020-12-17 12:37:05 +00:00
Daniel Vaz Gaspar
dd5cdb1b5f
feat(dashboards): security permissions simplification (#12012)
* feat(dashboards): security perm simplification

* fix tests

* fix tests

* remove unnecessary mapping

* fix JS tests

* fix cypress test and explore endpoint

* update alembic down revision

* Merge branch 'master' into feat/security-converge-dashboards

# Conflicts:
#	superset/constants.py
#	tests/security_tests.py
2020-12-17 09:53:13 +00:00
Victor Malai
51c3b7156c
chore: Remove unused CodeModal (#11972)
* Transform code modal to tsx

* Fix

* Fix

* Remove unused modal

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-16 23:44:58 -08:00
ʈᵃᵢ
e299dbf797
feat(alerts/reports): delete and bulk delete actions (#12053) 2020-12-16 12:57:29 -08:00
Nikola Gigić
48fb8c0b77
fix(dataset): Page blanks on large data load (#11979)
* Implement pagination in <TableView> for Samples preview

* Increase page size

* Fix lint

* Render cells based on width

* Fix lint errors

* Additional tests and changes

* Search bar fix

* Additional fixes

* Suggested changes
2020-12-16 16:35:12 +02:00
Daniel Vaz Gaspar
2302adb61a
feat(datasets): security perm simplification (#12000)
* feat(datasets): security perm simplification

* feat(datasets): security perm simplification

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* include SqlMetricInlineView converge and fix JS tests

* update to current alembic revision
2020-12-16 11:49:03 +00:00
Kasia Kucharczyk
9c8b65d03f
feat(annotations): security permissions simplification (#12014)
* Changed security permissions for annotations and annotation layers

* Updated permissions in annotation layers list

* Created test for retrieving premissions info. Updated uris from f-strings to strings

* Updated annotations in security_tests and added annotations to NEW_SECURITY_CONVERGE_VIEWS

* Added migration for annotations security converge

* Updated current revision after rebase master

* Updated migration name to annotations security converge

* Updated annotations permissions names in AnnotationLayersList and updated test since 'can_write' has wider permissions

* Updated annotations migration to current
2020-12-16 09:08:06 +00:00
Kamil Gabryjelski
794d318989
refactor: Migrate react-select to Antd Select in Metrics and Filters popovers (#12042)
* Migrate react-select to Antd select in Metrics popover

* Fix tests

* Migrate react-select to Antd select in Filters popover

* Migrate SelectControl to Antd Select

* Add label with number of options left
2020-12-15 21:20:10 -08:00
Grace Guo
8da1900d8a
feat: add hook for dataset health check (#11970)
* feat: add hook for dataset health check

* add event log

* optimize datasource json data like certified data

* add unit test

* fix review comments

* extra code review comments
2020-12-15 18:12:06 -08:00
Daniel Vaz Gaspar
f79e52f48e
feat(charts): security perm simplification (#11981)
* feat(charts): security perm simplification

* fix superset explore

* fix JS test

* fix cypress test

* fix split heads

* fix favorite permission

* fix permission

* update with new async permission

* fix new permission coming from master

* fix core permission assert

* black

* update alembic down revision
2020-12-15 11:27:06 +00:00
Hugh A. Miles II
3d56f58ef5
fix: Explore "Change Dataset" UX Enhancements (#12006) 2020-12-14 13:17:20 -05:00
Moriah Kreeger
696308715d
feat: alerts/reports add/edit modal (#11770) 2020-12-11 15:50:08 -08:00
Rob DiCiuccio
4d329071a1
feat(SIP-39): Async query support for charts (#11499)
* Generate JWT in Flask app

* Refactor chart data API query logic, add JWT validation and async worker

* Add redis stream implementation, refactoring

* Add chart data cache endpoint, refactor QueryContext caching

* Typing, linting, refactoring

* pytest fixes and openapi schema update

* Enforce caching be configured for async query init

* Async query processing for explore_json endpoint

* Add /api/v1/async_event endpoint

* Async frontend for dashboards [WIP]

* Chart async error message support, refactoring

* Abstract asyncEvent middleware

* Async chart loading for Explore

* Pylint fixes

* asyncEvent middleware -> TypeScript, JS linting

* Chart data API: enforce forced_cache, add tests

* Add tests for explore_json endpoints

* Add test for chart data cache enpoint (no login)

* Consolidate set_and_log_cache and add STORE_CACHE_KEYS_IN_METADATA_DB flag

* Add tests for tasks/async_queries and address PR comments

* Bypass non-JSON result formats for async queries

* Add tests for redux middleware

* Remove debug statement

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Skip force_cached if no queryObj

* SunburstViz: don't modify self.form_data

* Fix failing annotation test

* Resolve merge/lint issues

* Reduce polling delay

* Fix new getClientErrorObject reference

* Fix flakey unit tests

* /api/v1/async_event: increment redis stream ID, add tests

* PR feedback: refactoring, configuration

* Fixup: remove debugging

* Fix typescript errors due to redux upgrade

* Update UPDATING.md

* Fix failing py tests

* asyncEvent_spec.js -> asyncEvent_spec.ts

* Refactor flakey Python 3.7 mock assertions

* Fix another shared state issue in Py tests

* Use 'sub' claim in JWT for user_id

* Refactor async middleware config

* Fixup: restore FeatureFlag boolean type

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-10 20:21:56 -08:00
Lily Kuang
df6efb6aa2
feat: alert/report execution log list view (#11937) 2020-12-10 15:15:13 -08:00
Michael S. Molina
3a6254184a
refactor: Removes hard coded colors (#11977)
* Removes hard coded colors

Removes hard coded colors defined in src/components/styles.ts. The colors defined in this file were used only in the Select component so they were migrated to src/components/Select/styles.tsx and ajusted to conform to the theme colors.

* Use theme context for Select styles

* Includes Theme Provider in tests with Select
2020-12-10 11:43:57 -08:00
David Aaron Suddjian
6270fa2026
refactor: Upgrade Redux (#11967)
* upgrade redux and react-redux, adjust types

* first round of test fixes

* fix rest of unit tests

* lint

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
2020-12-09 11:58:42 -08:00
Hugh A. Miles II
cc44a2c01b
feat: Sqllab to Explore UX improvements (#11755)
* create boiler modal component

* hello world modal

* setup modal flow

* setup savemodal for components

* flake8

* fix onclick reference

* working create datasource boiler

* saving spot for callback on text input

* working dataset with input box

* working redirect on completion

* get data for owners dropdown

* fix build with pull from master

* fix the filteroption

* 💯

* move state to upper component

* add overwrite state

* hacked overwrite process

* linting

* fix filter

* cleaning up the coe

* Delete preset.code-workspace

* remove unused code

* remove visualize

* update default value

* remove unneeded vars

* checkout package-lock.json

* linting

* get user id

* remove page filter

* setup proper call for updating columns in dataset

* add move to explore flow

* linting

* add param for overriding columns

* linting

* change title

* fix some tings

* cleanup

* linting

* add types in some places

* save toast

* use moment

* add error toast

* create enum for radio states

* initial state for saving query

* add tpying

* addressing concerns

* update propTypes

* add functionality for CTAS explor btn

* handle CTAS state

* fix onclick to reference upper level component

* formatting

* reset state after closing

* add error message when user doesn't pick an already selected dataset

* remove unneeded todo

* remove styling

* move async calls to api directory

* remove console.log

* add user id param

* typing

* littty

* move put to seperate file

* save

* dsf

* fix typing errors

* adding more types

* fix typing erros

* linting

* add basic spec test

* create dataset modal

* add components reference

* Rename SaveDatasetModal_spec.jsx to SaveDatasetModal_spec.tsx

* remove sinon for now

* fix typing errors on modal files

* fix linting

* address comments

* attempt to fix linting

* add props

* fix test

* fix the linting

* yerp

* fix this references

* spaces

* handleOverwriteCancel reference cleanup

* rename bool value for shouldOverwriteDataset

* fix typing for onChange

* you still the best in the world

* fix spec

* align branches

* push

* fix key names

* fix dataset reference

* lowercase

* fix save bug with tiem

* fixed styling

* fix date state after push to explore

* add disabling states

* plz refactor this

* this is working fully now

* do some renaming

* renaming

* remove console.logs

* still refactoring

* remove unneeded code

* remove unneeded variables

* still cleaning

* added interface

* fix typing issues

* cleanup unused code

* fix npm lnit

* fix initial problems

* add props to test

* remove unneeded files

* skip linting

* saving

* this works

* remove old test

* remove old test

* fix linting

* fix broken test

* remove jsx file

* refactoring

* cleanup

* remove comments

* reset user object

* fix functions

* fix this

* reverting CTAS btn flow

* remove onclick

* save frontend work

* allow for database id to be passed as param in body

* use enum

* fix linting

* style alignment

* get rid of .then

* add function to compute default value with tiem

* lit

* remove ts-error

* fix typing
2020-12-08 17:29:41 -08:00
Kamil Gabryjelski
41738df77d
feat: Results table on Explore view (#11854)
* Upgrade react-split

* Implement split on ExploreChartPanel

* Implement tabs with collapse

* Fix run query button

* Fix copy to clipboard button

* Move table controls to separate file

* Make component more generic to handle samples

* Remove samples from DisplayQueryButton

* Move data tables to separate file

* Make split dynamically controlled

* Fix unit test

* Fix arrow not centered

* fixup! Fix arrow not centered

* Change copy button paddings

* Use translations

* Fix grammar in a comment

* Fix imports

* Use grid units

* Convert new files to typescript

* Fix after rebase

* Remove forceRender

* Fix big_number test

* Delay making request until panel is opened

* White background in south panel

* fixup! White background in south panel

* Lint fix

* Lint fix

* Remove redundant prop types

* Remove console log

* Delay loading samples until user switches tab

* Add debounce to filter input

* Use gridUnit for gutter sizes

* Change types object to Record<string, any>
2020-12-04 19:49:24 -08:00
Lily Kuang
60122a2b2d
feat: filters for alerts and reports list view (#11900) 2020-12-04 09:58:34 -08:00
Geido
5b1939802d
refactor: Move ProgressBar to Antd (#11875)
* Move ProgressBar to Antd

* Remove trailing space

* Fix linting issues

* Export enhanced Progress only
2020-12-03 13:28:06 -08:00
Hugh A. Miles II
9ae2f95b34
feat: Adding SaveDatasetModal component (#11861) 2020-12-03 11:14:44 -08:00
Daniel Vaz Gaspar
71c567bf3a
feat(css templates): security perm simplification (#11856)
* feat: security converge css templates

* fix security tests

* fix JS test

* add migration

* black and fix migration
2020-12-03 08:45:32 +00:00
Grace Guo
61064b9634
add fix for extra comments for #11781 (#11902) 2020-12-02 18:13:42 -08:00
Nikola Gigić
9514be5daf
style: remove react bootstrap fade component (#11843)
* Replace Bootstrap Fade component with custom Emotion Fade component

* Fix lint errors

* Added test

* Fixing front-end build errors

* Fix lint errors
2020-12-01 22:43:30 -08:00
Lily Kuang
a76eadd838
feat: report/alert list CRUD view (#11802) 2020-12-01 17:57:15 -08:00
Grace Guo
f292015ccd
fix (dataset editor): allow Source tab readOnly mode (#11781)
* fix (dataset editor) add read-only mode for Source tab

* add feature flag, add unit tests

* rebase and fix comment

* add message for padlock

* move padlock to the bottom of tab
2020-12-01 17:10:33 -08:00
Jesse Yang
a5af2ade0a
test: add React Testing Library (#11771) 2020-12-01 11:14:37 -08:00
Agata Stawarz
44e80e0175
chore: Add home link to navbar (#11851)
* Add Home link to Navbar

* Change test text for rendering elements in the main navbar

* Display Home link only when Logo Target Path is set
2020-11-30 23:14:42 -08:00
Elizabeth Thompson
84e0606a90
chore: move fixtures and helpers to root (#11812) 2020-11-30 14:23:56 -08:00
ʈᵃᵢ
011724750f
feat: list view filters for Query History (#11702) 2020-11-30 14:21:53 -08:00
Daniel Vaz Gaspar
9dd33d5566
feat(saved queries): security perm simplification (#11764)
* feat(saved queries): security perm simplification

* migration script and frontend

* add downgrade procedure

* downgrade procedure, inferred from the upgrade data

* fix JS test

* improve code

* add tests for role migration

* more tests and a short description for each one

* Improve readability

* simplify dataclass creation

* fix dataclass
2020-11-30 13:07:39 +00:00
Lily Kuang
9c69679e14
feat: filter by me on CRUD list view (#11683) 2020-11-25 11:56:48 -08:00
Kamil Gabryjelski
9b68b65568
refactor: Replace react-bootstrap tooltips with Antd tooltips (#11737)
* Refactor tooltip in ColumnElement

* Refactor tooltip for Button 

* Remove redundant import

* Refactor tooltip in SqlEditor

* Increase line height in tooltip so that the text is centered

* Refactor tooltip in Link

* Refactor tooltip in AdhocMetricEditPopoverTitle

* Refactor tooltip from ControlHeader

* Refactor tooltip in DateFilterControl

* Refactor tooltip in VizTypeControl

* fixup! Refactor tooltip in AdhocMetricEditPopoverTitle

* Refactor tooltip in QueryAndSaveBtns

* fixup! Refactor tooltip in DateFilterControl

* Refactor tooltip in CopyToClipboard, fix cursor pointer

* Refactor tooltip in TooltipWrapper

* Refactor tooltip in Field/DatasourceEditor

* Remove redundant import

* Fix typing for placement prop

* Decrease margin in ColumnElement divider

* Change default export to named

* Move SqlLab Tooltip styles to Emotion

* Fix tests
2020-11-24 13:04:55 -08:00
Erik Ritter
c0224aa928
feat: add certification info to table selector (#11785) 2020-11-24 12:13:52 -08:00
Moriah Kreeger
6019113bc6
refactor: use rison for list view filters stateful urls (#11675) 2020-11-24 11:19:48 -08:00
Kamil Gabryjelski
3ad65bc163
fix: Dropdown menu not closing on Dashboard view (#11671) 2020-11-12 14:48:48 -08:00
ʈᵃᵢ
432e5ab460
feat: Query History CRUD list view (#11574) 2020-11-12 11:55:13 -10:00
Elizabeth Thompson
b277f19808
keep placeholder on multiselect (#11289) 2020-11-12 11:36:24 -08:00
Grace Guo
a9f9c4bbd5
[fix] handle null value in date filter (#11655) 2020-11-11 09:32:26 -08:00
Grace Guo
966a826720
fix: js unit test when save dash (#11632) 2020-11-09 17:56:30 -08:00
Grace Guo
b9284d3a3c
fix(dashboard): use server-side lastModifiedTime for co-edit check (#11614)
* fix: [dashboard][co-edit] Round client-side lastModifiedTime

* another try: server-side returns last_updated_time in save_dash response
2020-11-09 13:30:40 -08:00
Lily Kuang
dda95ed250
feat: annotation delete modal, bulk delete and empty state (#11540) 2020-11-09 11:25:16 -10:00
Jesse Yang
6ab03feed8
chore: clean up mountedTab (#11569) 2020-11-08 21:09:27 -08:00
Phillip Kelley-Dotson
d8373f2bb9
chore(home-screen): fixes for loading states, flicker issue, and reduction of api calls (#11557)
* fixes for loading states, flicker issue, api calls

* fix filter bug

* add high res images

* bug fixes for cards and face pile, change imgs to svgs, and address comments

* update from comments

* add stopprop

* fix tests

* add liscenses

* remove unused type

* fix types

* add license

* fix lint
2020-11-06 19:35:13 -08:00
Kamil Gabryjelski
6d5d92a6fe
fix: Issues with filters and metrics popovers (#11578)
* Fix bugs in AdhocFilterEditPopover

* Fix bugs in AdhocMetricEditPopover

* Remove handleMultiComparatorInputHeightChange function

* Fix tests
2020-11-05 20:00:43 -08:00
Kamil Gabryjelski
1490f3074d
refactor: Replace react-bootstrap MenuItems with Antd Menu (#11554)
* Refactor SliceHeaderControls

* Refactor DisplayQueryButton

* Fix duplicate keys

* Refactor SliceAdder

* Move css from styles to Emotion

* Fix e2e test
2020-11-05 13:30:03 -08:00
Kamil Gabryjelski
3e35ddd609
refactor: Replace react-bootstrap MenuItems with Antd Menu (#11555)
* Remove MenuItem from SubMenu

* Fix tests

* Refactor PopoverDropdown

* Refactor Button

* Remove redundant Menu import
2020-11-04 14:32:38 -08:00
Kamil Gabryjelski
128ddfabb6
fix: Pasting text issues in MetricsControl and AdhocFilterControl inputs (#11445)
* Fix paste not working in Metrics and Filter inputs

* Use noOp instead of empty function

* Use default Select component instead of OnPasteSelect

* Revert onPaste override
2020-11-04 13:48:48 -08:00
Kamil Gabryjelski
ad98981d9d
refactor: Replace react-bootstrap MenuItems with Antd Menu (#11487)
* Remove MenuItem from CopyToClipboard

* Refactor DateFilterControl

* fixup! Remove MenuItem from CopyToClipboard

* Remove console log

* Refactor LanguagePicker

* Refactor HeaderActionsDropdown

* Remove dir with Menu component

* Add imports to common/components/index

* Fix after rebase
2020-11-04 13:47:25 -08:00
Kamil Gabryjelski
937f9ca277
refactor: Replace react-bootstrap dialogs with Antd dialogs (#11527)
* Refactor Dialogs in dashboard properties modal

* Refactor Dialogs in explore properties modal

* Refactor dialogs in DatasourceModal

* Refactor dialogs in ExploreResultsButton

* Remove react-bootstrap-dialog from ExploreCtasResultsButton

* Remove react-bootstrap-dialog dependency

* Remove unnecessary functions from Modal

* Bump antd version to fix a bug

* Fix unit tests

* Fix e2e test

* Change antd version to 4.5.4 to fix tests

* Reenable all tests in control

* Another version bump to fix tests
2020-11-03 22:07:21 -08:00
Kamil Gabryjelski
15111db6c5
refactor: Use Antd Menu in Menu component (#11528)
* Menu dropdown refactored

* MenuObject refactored

* Fix unit tests

* Style menu

* Use theme variables
2020-11-03 16:19:15 -08:00
Moriah Kreeger
536346ff5e
feat: annotation layers delete logic + linking w/ annotation view (#11530) 2020-11-03 13:01:20 -08:00
Lily Kuang
eef4809978
feat: annotation edit modal with antd datepicker (#11500) 2020-11-03 12:59:13 -08:00
Jesse Yang
fac29f9dff
refactor: rewrite and enhance chart control withVerification (#11435)
* refactor: rewrite and enhance chart control withVerification

* Add toasts for failed messages; fixes popover render
2020-11-02 15:06:20 -08:00
David Aaron Suddjian
d7aa3d792b
fix(dashboard): multiple lines and indentation when editing json (#11501)
* multiple lines and indentation when editing json

* fix tests, address pr feedback

* remove json minification
2020-11-02 13:39:04 -08:00
Kamil Gabryjelski
a874b14a8a
refactor: Replace react-bootstrap Tabs with Antd Tabs in DashboardBuilder (#11160)
* Replace tabs in DashboardBuilder

* Fix tests

* Fix styling of anchor

* Fix

* Fix cypress test

* Fix tests

* Fix e2e tests

* Use data-tests

* Move tabs styles from superset.less to Emotion

* Restyle tabs in DashboardBuilder

* Test fix

* Fix styling
2020-11-02 13:31:55 -08:00
Kamil Gabryjelski
19f2deb27f
refactor: Replace react-bootstrap Modals with Antd in Explore (#11389)
* VizTypeControl

* SaveModal

* explore/PropertiesModal

* Fix e2e tests

* Remove console logs

* Fix tests

* Fix test

* Fix e2e test

* Remove unnecessary fragment

* Fix e2e tests

* Fix e2e test
2020-11-01 23:04:53 -08:00
Kamil Gabryjelski
55a3404b71
refactor: Replace react-bootstrap tabs with Antd tabs (#11118)
* Replace tabs in BuilderComponentPane

* Replace tabs in ControlPanelsContainer

* Replace tabs in AdhocMetricEditPopover

* Replace Tabs in DatasourceEditor

* Replace tabs in AdhocFilterEditPopover

* Replace tabs in DateFilterControl

* Bug fix

* Change Tab styles

* Fix tests

* Fix cypress tests

* Lint fix

* Fix tests

* Change Tabs style in ControlPanelsContainer

* Change tabs content height

* Lint fix

* Add data test

* Fix e2e test

* Move Tabs file to separate dir

* Fix after rebase

* Fix e2e tests

* Fix after rebase
2020-10-30 22:05:31 -07:00
Moriah Kreeger
01ddbd0697
feat: annotation layers modal + filters (#11494) 2020-10-30 15:51:46 -07:00
Phillip Kelley-Dotson
f7051eaade
feat: home screen mvp (#11206)
* step 1: broken stuff!

* first steps

* more adding and slicing

* step 1: broken stuff!

* can now filter dashboards/charts for "Edited" tabs (filter by changed_by o_m)

* more updates

* update recent card

* add icon

* Adding Expand Icon to Collapse component

* more updates

* clean up code

* remove lock file

* remove consoles

* fixing subnav button height shift

* lil' ascii arrows

* update branch

* update test part 1

* remove consoles

* fix typescript

* add images and update emptystate

* add changes

* update chart card

* fix css issues from rebase

* add suggestions

* more changes

* update tests and clear typescript errors

* Update superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* update from comments

* more updates..

* fix rebase

* fix pesky type errors

* test fixes

* lint fix

* Update superset-frontend/spec/javascripts/views/CRUD/welcome/Welcome_spec.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/views/CRUD/welcome/EmptyState.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/components/Menu/SubMenu.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/components/ListViewCard/index.tsx

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset-frontend/src/components/ListViewCard/index.tsx

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* add suggestions

* fix lint

* remove unused code

* toast getrecentActivityobjs

* add some suggestions

* remove types for now

* cypress fix

* remove unused type

Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
2020-10-29 21:59:31 -07:00
David Aaron Suddjian
18658f45be
feat(dashboards): Filter status indicators (#10936)
* Initial commit of new filters badge.

* refactor applied/rejected filters code

* finished filter indicators

* filter badge tested

* unnecessary imports

* formatting and types

* fixes

* license

* code quality tweaks

* state management for showing focused filter scope

* clean up filter key extraction code

* remove unnecessary styles

* temp css to demonstrate highlighting

* fix focused filter logic

* no more color badges

* new toys for highlighting dash components (#11144)

* tweak style for the filter chart when filter is focused

* style: Filters p0 css2 (#11151)

* nixing background tweak

* src paths

* another quick theme color

* src paths, adjusting pill icon color, changing icons, showing applied/busted counts

* linting stuff

* fixing and tweaking tests

* show filter indicator when filters are not active

* chart title bar cleanup

* open the right panel when popover opens

* unused import

* fix EditableTitle tests

* margin on dashboard header

* show the chart dropdown menu

* fix blur filter breaking dropdowns

* style tweak - no pointer events when irrelevant charts are blurred

* fix box shadow on filter highlight

* it's an array

* attempt fixing e2e

* style: filters p0 icon churn (#11215)

* new filters icon

* icon styling

* bigger icons in list views

* better sizing of table actions and favStars

* more icon sizing...

* fixing more button size jankiness

* linting

* Filters performance (#11255)

* fixing time filter "ok" button

* making unset filter menu collapsible

* sort alphabetically

* fix highlighting when removing items

* try a flex layout (for browser render perf)

* more specific transitioning

* temp: comment out some code as a test

* temp: comment out more code

* temp: remove possibly expensive computations from ChartHolder

* Revert "temp: comment out some code as a test"

This reverts commit 309b880e90.

* Revert "temp: comment out more code"

This reverts commit 64c88b2cba.

* Revert "temp: remove possibly expensive computations from ChartHolder"

This reverts commit 37ce0214f0.

* experiment: upgrade react-select to v3

* Revert "experiment: upgrade react-select to v3"

This reverts commit c3972ba486.

* fix the damn problem

* remove code used for testing purposes

* awful hack to avoid adding a class to a container

* approaching infinity... and not beyond!

* fix ref forwarding

* add theme to tests as necessary

* fix(extra-filters): add logic for identifying applied extra filters (#11325)

* fix: use dashboard id for stable cache key (#11293)

* fix: button translations missing (#11187)

* button translations missing

* blank space before text

* feat: update time_compare description and choices (#11294)

* feat: update time_compare description and choices

* Update sections.jsx

* fix(extra-filters): add logic for identifying applied extra filters

* lint

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: rubenSastre <ruben.sastre@decathlon.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>

* address design feedback

* slight tweak to panel logic, keep panels open that user has opened

* rearrange code to be more graceful

* fix: bump superset-ui/core (#11385)

* use is_dttm instead of is_temporal

* types, names

* only show unset filter panel if there are unset filters

* fix highlighting the filter control

* fix filterbox layout

* translations

* fix cypress

* actually add the test attribute

* Update superset-frontend/src/dashboard/components/DashboardBuilder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/DashboardBuilder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* formatting

* add link comment to hack

* Update superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* stop importing lodash

* Update superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* skip broken test

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* adjust colors of titles

* linting

* no indicators when chart is loading

* support all time fields

* fix lock file

Co-authored-by: Natalie Ruhe <natalie@preset.io>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: rubenSastre <ruben.sastre@decathlon.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2020-10-28 15:46:24 -07:00
Moriah Kreeger
e9dba18466
feat: annotation layers CRUD list view (#11432) 2020-10-28 15:45:07 -07:00
Kamil Gabryjelski
52294c836a
refactor: Replace react-bootstrap Modals with Antd in Datasource (#11390)
* ChangeDatasourceModal

* DatasourceModal

* DeleteModal, AddDatasetModal

* Fix tests

* Remove unused file

* Fix e2e tests

* Fix test

* Remove it.only

* Fix after rebase

* Fix e2e tests

* Fix data-test in modal

* Lint fix
2020-10-28 14:42:13 -07:00
Lily Kuang
e5e35634de
feat: annotations list CRUD view (#11446)
* annotations list CRUD view

* comment out modal

* update test

* fix lint
2020-10-28 12:19:50 -07:00
Kamil Gabryjelski
b2636f01bb
fix: Explore popovers issues (#11428)
* Fix spaces and comas not working in filter popover

* Fix popup not opening automatically

* Add e2e test

* Remove only from test

* Remove redundant test, add checking label content

* Add comments to e2e test

* Fix unit test

* Use destructuring

* Always open popup for functions and saved metrics, too

* Fix popover for adhoc metrics too

* Small refactor to consistency

* Refactor for consistency

* Remove redundant functions

* Test fix

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-10-28 09:38:52 -07:00
Hugh A. Miles II
81f77fd28e
feat: hide datasource legacy based on featureflag (#11371) 2020-10-26 17:31:29 -07:00
Kamil Gabryjelski
894ca3c09b
refactor: Use Modals from Antd instead of react-bootstrap (#11330)
* Refactor ModalTrigger to use antd modal

* Refactor a few components

* dynamic width

* Fix unit tests

* Use i18n for button text
2020-10-26 11:20:10 -07:00
Jesse Yang
8aecffd83b
refactor: typing for explore Control and messageToasts (#11416) 2020-10-24 21:40:36 -07:00
Evan Rusackas
efdda8b69e
chore: Button cruft cleanup (#11342)
* toggleSchedule

* cleaning up run query button

* removing unnecessary (subtle!) style overrides

* bulk action classname to button style prop

* nixing btn-primary

* nixing cancelQuery class

* togglesave

* nixing autocomplete class

* linting

* nixing button classes of 'ok' and 'reset'

* unoing diagnostic test

* begrudgingly adding an m-r-3 class... for now

* this is not a class to worry about

* test fixes for limit control

* updating TODO notes, calling it a day for now.

* gah... copy paste error.
2020-10-23 10:42:29 -07:00
Kamil Gabryjelski
ad88a06d61
refactor: Use Antd Dropdown instead of react-bootstrap in DatasourceControl (#11395)
* Create Tooltip component

* Refactor DatasourceControl

* Bug fix

* Lint fix

* E2E test fix

* Move menu item keys to constants

* Remove LESS file

* Test fix

* Test fix

* Lint fix
2020-10-23 09:08:35 -07:00
Elizabeth Thompson
43b92b220f
fix: dashboard edit/save errors (#10834)
* use conditional operator for lookup

* editing dashboard title should update after save

* uncomment test

* fix json metadata save

* json metadata color scheme should overwrite state

* test's functionality is no longer applicable

* add lastModifiedTime to DashboardInfo
2020-10-22 14:33:22 -07:00
Kamil Gabryjelski
30c71fd794
refactor: Replace react-bootstrap tabs with Antd tabs on Profile (#11211)
* Create styled Antd Tabs and Dropdown

* Replace Tabs in Profile view

* Change some hard coded variables to theme

* Lint fix
2020-10-22 14:19:37 -07:00
Moriah Kreeger
a2a614d760
feat: CSS Templates List Actions (#11271) 2020-10-21 20:32:59 -07:00
Maxime Beauchemin
c360413fc2
style(menu): clean up right menu - leaving only "Settings" (#11227)
* style(menu): clean up right menu - leaving only settings

* bring pre-commit back

* fix frontend tests

* pre-commit

* re-introduce subtle '+'
2020-10-20 21:33:28 -07:00
Lily Kuang
6f3d4c131f
feat: css template add/edit modal (#11296) 2020-10-20 12:15:39 -07:00
Kamil Gabryjelski
901a42b1df
refactor: Replace usages of Popover from react-bootstrap with Antd (#11163)
* New popover component

* LimitControl

* Moar components migrated

* TimeSeriesColumnControl

* Hotkeys

* ColorPicker

* FilterBoxItemCOntrol

* AdhocFilterEditPopover

* AdhocMetric

* AnnotationLayerControl

* DateFilterControl

* Tests fix

* Fix linting issue

* Fix tests

* Bug fix

* Test fix

* Remove Antd global stylesheet

* Fix linting

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test
2020-10-19 20:42:33 -07:00
Kamil Gabryjelski
735123d1f5
refactor: Refactor QueryTable to use react-table (#11216)
* Refactor QueryTable to use react-table

* Fix lodash import

* Fix tests

* Fix imports and QuerySearch styles

* Update superset-frontend/src/SqlLab/components/QuerySearch.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/SqlLab/components/QuerySearch.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Lint fix

* Refactored QueryTable into functional component

* Remove calculating content height

* Lint fix

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-10-18 22:32:13 -07:00
Grace Guo
8863c939ad
fix: should update last_modified_time in client-side after save dash (#11305) 2020-10-16 10:54:35 -07:00
rubenSastre
4f0a06dda5
fix: button translations missing (#11187)
* button translations missing

* blank space before text
2020-10-15 21:27:26 -07:00
adam-stasiak-polidea
fc03549299
chore: Added data-test attributes for testing (#11254)
* Added data-test attributes for testing

* fixed incorrect naming change

* review changes
2020-10-14 16:12:01 -07:00
Erik Ritter
fc74b5d4a2
Revert "fix: keep placeholder in multivalue select when a value exists (#11181)" (#11270)
This reverts commit 31cc4155b7.
2020-10-14 12:58:58 -07:00
Kamil Gabryjelski
820fa473a7
refactor: Implement TableView component (#11217) 2020-10-14 11:15:34 -07:00
Elizabeth Thompson
31cc4155b7
fix: keep placeholder in multivalue select when a value exists (#11181) 2020-10-13 13:45:31 -07:00
Grace Guo
88af85ac53
fix: show TIME COLUMN options in dashboard (#11210)
* fix: show TIME COLUMN options in dashboard

* add unit test
2020-10-12 21:43:30 -07:00
Kamil Gabryjelski
b071344531
refactor: Replace react-bootstrap tabs with Antd tabs in SqlLab (#11212)
* Create styled Antd Tabs and Dropdown

* Replace Tabs in SqlLab
2020-10-09 23:11:25 -07:00
Moriah Kreeger
a6fc3d2384
feat: CSS Templates List (#11189) 2020-10-09 16:32:31 -07:00
John Bodley
2a447ff466
Revert "refactor: Replace react-bootstrap tabs with Antd tabs (#11090)" (#11194)
This reverts commit 4fd993c4e0.

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-07 16:21:24 -07:00
Moriah Kreeger
21c8d672a8
fix: save query modal/button styling + convert to ant-d modal (#11164) 2020-10-06 16:55:17 -07:00
Grace Guo
13963acefb
fix: Fix Time Column dropdown for date filter (#11149) 2020-10-06 11:51:10 -07:00
Lily Kuang
152315d0f4
feat: saved query preview modal (#11135) 2020-10-05 16:21:59 -07:00
Elizabeth Thompson
d95b7c2a73
fix: clean up prop type errors in jest tests (#11120) 2020-10-02 14:59:04 -07:00
Kamil Gabryjelski
4fd993c4e0
refactor: Replace react-bootstrap tabs with Antd tabs (#11090)
* Replace tabs in profile

* Replace tabs in SouthPane

* Replace tabs in TabbedSqlEditors

* Add typing for dropdown

* Add license

* Remove isSelected

* Fixes

* Add data-test

* Fix test

* Remove unnecessary style

* Remove unnecessary style

* Tests fix

* Tests fix

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Tabs.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Remove inModal prop

* Remove inModal from storybook

* Move inline style to styled component

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-10-02 13:07:52 -07:00
Jesse Yang
53cd05d74a
perf(explore): render datasource details only when needed (#10924) 2020-10-02 12:15:06 -07:00
Phillip Kelley-Dotson
07716ffd76
chore: refactor submenu's right nav to accept list of buttons (#11102)
* submenu right-nav button refactor

* undo changes

* fix lint

* fix test

* update pr with suggested changes and test

* fix lint

* use enum to define btn style props

* add suggestions

* update savedquery buttons
2020-10-01 15:05:49 -07:00
ʈᵃᵢ
7a72082d31
fix: Revert "Replace reactable with DataTable from superset-ui in QueryTable (#10981)" (#11125)
This reverts commit e93d92e8ac.
2020-10-01 10:06:22 -07:00
Moriah Kreeger
e7a4265c30
feat: saved query list actions (#11109) 2020-09-30 18:18:34 -07:00
Moriah Kreeger
b8d616a9d2
feat: saved query list view + sort/filters (#11005) 2020-09-29 13:39:10 -07:00
Lily Kuang
e337355162
refactor: table selector on dataset editor (#10914)
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-09-28 11:16:03 -07:00
Kamil Gabryjelski
2fd8fca207
chore: Clean up some console warnings (#11061)
* Upgrade a few packages

* Update some prop types

* Update HTML

* Moar warning fixes

* Remove wrapper div
2020-09-28 09:43:21 -07:00
Kamil Gabryjelski
a879622e07
refactor: Remove usages of reactable from AlteredSliceTag (#11012)
* Remove usages of reactable in AlteredSliceTag

* Fix tests

* Move mocked data to fixtures file

* Use optional chaining

* Remove default value, change a unit test logic

* Code review fixes
2020-09-28 09:41:08 -07:00
Evan Rusackas
cff034e2cf
chore: cleaning out unused code from utils (#11076)
* removing unused stuff (and some jquery) from utils.js

* linting
2020-09-27 20:08:05 -07:00
Yongjie Zhao
1493450a6f
fix(jest): using UTC mock date (#11079) 2020-09-26 14:53:41 -07:00
Evan Rusackas
eeeb21077d
feat: adding all icons from the design system to the codebase (#11033)
* error -> error-solid

* warning -> warning-solid

* all the new icons mixed in!

* card-view -> card_view

* circle-check-solid -> circle_check_solid

* corrected circle-check to new name and correct (stroke) icon

* sort-asc/desc -> sort_asc/desc

* databases -> database

* compass -> nav_explore

* pencil -> edit-alt

* more pencil migrations

* easy list view rename

* star -> favorite (changed in Figma)

* removing deprecated icon

* renaming icon to mach figma

* More -> More Horiz

* forgot to change this when ranming the file

* updating some icon names in use

* adding hella icons

* fixing errant viewboxes

* removing dropdown-arrow in favor of triangle-down

* adding key to storybook map.

* fixing icon component reference

* tweaks to fave star styling to support revised icon

* fixing a bad icon inclusion

* missed a license

* touchup to virtual dataset... will tweak later.

* e2e fix

* linting
2020-09-25 14:49:30 -07:00
Grace Guo
3467d2d8d6
Revert "style: fix checkbox color (#10970)" (#11051)
This reverts commit e4e78b66fa.
2020-09-24 16:53:02 -07:00
Grace Guo
f99753a800
Revert "ESLint: Re-enable rule default-props-match-prop-types (#10868)" (#11050)
This reverts commit 9f01a7fdf8.
2020-09-24 12:33:38 -07:00
Jesse Yang
7549dad12d
fix: timer component, fixes #10849, closes #11002 (#11004) 2020-09-23 10:53:24 -07:00
ʈᵃᵢ
0d1f6119a6
feat(listview): feature flag config to set default viewing mode (#10986) 2020-09-22 18:01:19 -07:00
Kamil Gabryjelski
e93d92e8ac
Replace reactable with DataTable from superset-ui in QueryTable (#10981)
* Replace reactable with DataTable from superset-ui in QueryTable

* Fix tests

* Fix pagination

* Fix tests
2020-09-22 13:24:30 -07:00
Kamil Gabryjelski
9f01a7fdf8
ESLint: Re-enable rule default-props-match-prop-types (#10868)
* Re-enable rule default-props-match-prop-types

* Restore default props and remove isRequired

* Remove unused props
2020-09-22 13:17:41 -07:00
Maxime Beauchemin
e4e78b66fa
style: fix checkbox color (#10970)
* style: fix checkbox color

* lint

* wrap test into theme
2020-09-21 13:12:12 -07:00
Moriah Kreeger
4aa53244c7
fix: update the time filter for 'Last Year' option in explore (#10829)
* Update explore time filter ranges

* rm console statements

* only update moment calculation for years

* tests

* add open/close test
2020-09-21 11:39:11 -07:00
Kamil Gabryjelski
557a303cc5
ESLint: Enable rule no-named-as-default (#10879)
* Enable rule no-named-as-default

* Fix wrong import
2020-09-18 13:41:01 -07:00
Kamil Gabryjelski
ccfd293227
ESLint: no-restricted-syntax (#10889)
* Enable no-restricted syntax rule

* Fix webpack.config.js

* Remove unused function from utils/common.js

* Refactor triple nested for loop

* Fix loops in src/explore components

* Fix loops in SqlLab components

* Fix loops in AlteredSliceTag

* Fix loops in FilterableTable

* Add fixtures and uinit tests for findControlItem

* Add license
2020-09-18 09:05:57 -07:00
Moriah Kreeger
5623cd64ca
feat: update saved query backend routing + add savedquery list (#10922)
* Update saved query backend routing + add savedquery list

* add spec fileg

* add FE flag for SIP_34_SAVED_QUERIES_UI
2020-09-16 21:08:40 -07:00
Yongjie Zhao
af75bee582
feat: adding dashboard toggle fullscreen button (#10840) 2020-09-16 14:20:52 -07:00
Kamil Gabryjelski
281305e0cf
Enable anchor-has-content rule (#10908) 2020-09-16 13:27:52 -07:00
Elizabeth Thompson
d3e9c565b7
feat: use svg for checkbox component (#10799)
* use svg for checkbox component

* add vertical align to svg

* use emotion styling

* update import to superset core

Co-authored-by: Elizabeth Thompson <elizabeth@preset.io>
2020-09-16 12:03:14 -07:00
Moriah Kreeger
c43992bec8
feat: data menu routing (#10880) 2020-09-15 14:53:31 -07:00
Jesse Yang
0129c4253d
feat: move ace-editor and mathjs to async modules (#10837)
Follow up on #10831, move brace and mathjs to async modules so that the initial page load for dashboards most pages can be faster.
2020-09-15 14:12:06 -07:00
Kamil Gabryjelski
352e8a1afd
Re-enable rule prefer-destructuring (only for objects) (#10867) 2020-09-14 10:11:20 -07:00
Kamil Gabryjelski
8a774d59ed
Eslint dependencies versions updates (#10839)
* Update eslint version to 7.8.1

* Give names to unnamed functions  to fix lint errors

* Update eslint-import-resolver-webpack

* Update eslint-plugin-cypress

* Add eslint-plugin-react-hooks

* Update necessary peer dependencies for eslint-config-airbnb

* Update eslint airbnb config and ts plugins

* Remove "this" from functional component

* Disable all rules that cause new errors

* Fix linting errors in tests

* Add licenses to .eslintrc files

* Add path and zlib to package.json

* Disable incompatible rule in eslint-plugin-cypress

* Remove redundant config for typescript linting

* Mark disabled rules with comments

* Remove path and zlib from deps, disable import rule for webpack files
2020-09-13 23:59:02 -07:00
Moriah Kreeger
7cd96edcdf
feat: add/edit database modal form sections UI (#10745) 2020-09-11 09:53:18 -07:00
Ville Brofeldt
8a9ae811d0
fix(sql-lab): relax column name restrictions (#10816) 2020-09-10 07:54:37 +03:00
Jesse Yang
9a59bdda48
refactor: merge/upgrade superset-ui packages (#10790)
* refactor: merge/upgrade superset-ui packages

* Fix flaky big number test

* Fix Flaky AdhocFilters test
2020-09-09 13:18:55 -07:00
ʈᵃᵢ
50672bb11b
feat: database delete warning (#10800) 2020-09-08 18:54:02 -07:00
Jesse Yang
cda232bf15
fix: ColorSchemeControl should not use CreatableSelect (#10814)
* fix: ColorSchemeControl should not be CreatableSelect

   Currently if you type to search in ColorSchemeControl it crashes the
whole page.

* Make it possible to filter by label

* Fix ColorSchemeControl unit test
2020-09-08 18:38:50 -07:00
ʈᵃᵢ
92f2353f80
feat: filters for database list view (#10772) 2020-09-04 16:23:38 -07:00
ʈᵃᵢ
7bccb38a60
feat: SIP-34 table list view for databases (#10705) 2020-09-02 11:48:21 -07:00
ʈᵃᵢ
5a4370012b
refactor: convert DatasetList schema filter to use new distinct api (#10746) 2020-09-02 11:07:37 -07:00
Maxime Beauchemin
3d8857ecc8
style: rename 'Source' top nav item to 'Data' (#10715)
* style: rename 'Source' top nav item to 'Data'

* Fix tests

* tables -> datasets

* rename datasource -> dataset

* lint

* more renaming

* use npm ci
2020-08-29 18:09:47 -07:00
Evan Rusackas
9fe30ab71e
style: Pass at propagating (and enhancing) Button component throughout Superset (#10649)
* getting rid of weird focus/active outline ring

* Buttons... buttons _everywhere_

* linting

* Nixing views/CRUD/dataset/Button component

* fixing 2 typing errors

* fixing more TS errors

* prefer src path for include

* one more real button, one less CSS class

* one more "button" to "Button"

* Published Status is now a proper clickable Label

* nixing the CRUD button again

* touching up stories, with SupersetButton story

* SIP-34 button colors

* adding polished package to mix colors

* updating button colors to match Superset theme

* abstracting away from bootstrap-specific props (might pivot libraries soon!)

* more abstraction from bsStyle/bsSize props

* exchanging styles for a prop

* linting

* restoring feature flag to stock

* using src alias

* last <button> replacement

* this classname would never be applied

* more linting action

* fixing unsupported bsSize 'medium', and cta typing error

* more cta action

* unnecessary styles

* errant bsSize prop

* cleanup

* tweaks to make new New button work

* Linting

* fixing a couple tests

* fixing theme based test failure

* margin tweak for NEW button

* another fixed test

* another fixed test

* fixing two more tests

* fixing last broken tests.

* always be linting

* Adding tertiary/dashed buttons

* cleaning up QueryAndSave buttons

* fixing "link" button styles

* fixing/updating link button styles

* cta buttons on Modal component

* linting.

* exporting button story knobs, making ALL knobs safe for export.

* capitalizing a file... no big whoop

* Basic button tests

* renaming button - temporarily

* renaming file to fix capitalization issue

* passing theme through to a difficult popover.

* fixin' a newly busted unit test

* lint fixin'

* oops, shouldn't have changed this prop!

* adding a dive() to themedShallow, and fixing a cypress/jest test

* addressing lint stuff

* touching up stories, with SupersetButton story

* SIP-34 button colors

* updating button colors to match Superset theme

* abstracting away from bootstrap-specific props (might pivot libraries soon!)

* linting

* restoring feature flag to stock

* cleanup

* Linting

* renaming button - temporarily

* renaming file to fix capitalization issue

* oops, shouldn't have changed this prop!

* adding a dive() to themedShallow, and fixing a cypress/jest test

* addressing lint stuff

* nixing new modal button

* Fixing another popover/button issue that should break cypress

* lint 

* passing classNames through to new button (should fix some tests)

* cleaning unused classes, making cypress tests use data attrs

* fixin' the test

* fixing another class-based test with data-test attr

* no longer passing theme as prop to buttons in popovers... themeprovider is better

* outline/border tweaks!
2020-08-28 17:34:28 -07:00
ʈᵃᵢ
d3bdea3805
fix: move menu reorg logic from crud app into Menu component (#10717) 2020-08-28 13:56:01 -07:00
Moriah Kreeger
c715cad48e
feat: base tabbed modal for new database CRUD UI (#10668) 2020-08-27 14:28:06 -07:00
ʈᵃᵢ
937b868321
style: add border between menu and submenu (#10698) 2020-08-27 14:15:22 -07:00
Moriah Kreeger
8d94534881
style: Move security/manage navigation tabs into a settings dropdown (#10439) 2020-08-27 10:21:51 -07:00
Grace Guo
7fc227c92d
fix: shorten url with extra request parameters (#10693) 2020-08-27 09:53:20 -07:00
ʈᵃᵢ
81525c3e9d
feat(listview): set default view mode based on THUMBNAIL feature flag (#10691)
* feat(listview): set default view mode based on THUMBNAIL feature flag

* add spec

* better generic typing for ListView

* lint

* fix specs
2020-08-27 09:40:32 -07:00
Ville Brofeldt
aaf04cc344
fix(filter-box): don't add empty filter to filtersChoices (#10687)
* fix(filter-box): don't add empty filter to filtersChoices

* add test
2020-08-27 12:36:02 +03:00
ʈᵃᵢ
6ff96cfc72
refactor: useListViewResource hook for charts, dashboards, datasets (#10680) 2020-08-26 15:39:18 -07:00
Evan Rusackas
fdfb7cdfd2
Eslint error cleanup (#10657)
* moving two console errors to logger errors

* nixing unused map index

* nixing unused param

* linting

* changing an alert to a toast

* fixing tests

* lint fix

* one letter change, just to see if iti gets CI to pass this test.
2020-08-24 14:04:27 -07:00
Grace Guo
aa8ff8759c
feat: use shorten url in standalone iframe (#10651) 2020-08-21 15:27:15 -07:00
ʈᵃᵢ
b86c0e5727
feat(listview): skeleton loading states for table and card collections (#10606) 2020-08-21 10:32:37 -07:00
ʈᵃᵢ
7301a363c1
feat: setup react page with submenu for datasources listview (#10642) 2020-08-20 11:42:17 -07:00
Ville Brofeldt
ca5dc4256f
feat(datasource): remove deleted columns and update column type on metadata refresh (#10619)
* fix: remove missing columns on metadata refresh

* add tests

* lint and simplify

* lint

* reduce locals

* fix label style
2020-08-18 21:47:13 +03:00
Evan Rusackas
f868580f64
chore: bump react-redux to 5.1.2, whittling console noise (#10602)
* chore: bump react-redux to 5.1.2

* fixing spy, and thus the breaking test.

* relabeling tests to UNSAFE_componentWillReceiveProps because why not.
2020-08-16 21:29:08 -07:00
Lily Kuang
03a62f15d8
feat: sort card view by Alphabetical, Recently Modified, and Least Recently Modified (#10601) 2020-08-14 15:07:37 -07:00
ʈᵃᵢ
db88cec431
feat: SIP-34 card/grid views for dashboards and charts (#10526) 2020-08-13 14:46:56 -07:00
Jesse Yang
a37b635674
fix(dashboard): add animation state to fix tab switch re-renders (#10475) 2020-08-11 00:57:50 -07:00
Tanmay Laud
a6fa02aaec
chore: Migrate Timer component from jsx to tsx (#10455)
* migrated LanguagePicker.jsx to tsx

* Migrated Menu.jsx to tsx

* migrated MenuObject.jsx to tsx

* migrated NewMenu.jsx to tsx

* Migrated UserMenu.jsx to tsx

* removed unnecessary export from UserMenu

* added language definition in LanguagePicker

* removed unnecessary exports from Menu.tsx

* used typeof guard for childs

* changed LanguageProps to Languages

* removed unnecessary type casting

* fixed linting errors

* migrated Checkbox to tsx

* Migrated Timer component to tsx

* fixed linting errors

* fixed test cases

* removed unused import in timer spec

* reverting changes

* renamed and then modified Timer

* changes for review comments

* fixed incorrect clear

* using stopTimer in stopwatch

* fixed lint issues

* added explicit timer cleanup

* fixed lint issue

* fixed memory leak

* renamed Timer

* added changes after git mv
2020-08-07 09:30:17 -07:00
Maxime Beauchemin
0bad77f0fe
chore: TypeScript <Label /> (#10494)
* chore: TypeScript <Label />

* rebase

* chore: TypeScript <Label />

* rebase

* A bunch o' test fixes. One more to go!

* helper for mountying Emotional components with Enzyme

* asf license

* fixed last test, some linting

* improve the storybook

* Adressing comments

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-08-06 22:33:07 -07:00
Maxime Beauchemin
ece91928a9
style: use tabs in dashboard edit pane (#10394)
* style: use tabs in dashboard edit pane

* fix tests

* more hackin'

* getting ready to rip cell measurer

* working

* pogress

* Fix cards

* done

* fix jest

* fix cy
2020-08-05 18:53:53 -07:00
simchaNielsen
57dc7622b4
fix: show label for filters in filter box in explore (#10412)
* fix: show label for filters in filter box in explore

* test: add test for label in filter box

* test: add test / fix lint

* fix: fix CR notes

* refactor: add label propType to FilterBoxItemControl.jsx
2020-08-05 09:23:11 +03:00
Lily Kuang
fa07506d0d
feat: dataset editor improvements (#10444) 2020-08-04 11:52:35 -07:00
Ville Brofeldt
a43ee22f11
style: replace inclusive/exclusive on DateFilterControl with </≤ (#10420)
* feat: improve filter control tooltips

* add styles

* break out utils into own file

* lint

* add tests

* styled component now working

* lint

* add license headers

* replace shallow with mount due to withTheme

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-07-31 20:06:04 +03:00
ʈᵃᵢ
78cad9a4a8
refactor(listviews): use correct filter endpoints for charts and datasets (#10442) 2020-07-29 11:00:19 -07:00
David Aaron Suddjian
7f70a241f9
test: Add jest-enzyme assertion library for better frontend tests (#10459)
* adding jest-enzyme

* enzymeify lots of assertions

* types for jest-enzyme
2020-07-29 10:53:06 -07:00
Daniel Vaz Gaspar
671461d0d0
feat(api): database schemas migration to new API (#10436)
* fix(log): log crashes if expired or not authenticated

* fix lint and rison

* add tests

* more tests

* perm fix

* fix test not found

* JS lint

* fix Jest test
2020-07-29 09:33:15 +01:00
Lily Kuang
39fad8575c
feat: update dataset editor modal (#10347) 2020-07-28 15:53:20 -07:00
ʈᵃᵢ
6f56cd5e9d
feat(listviews): SIP-34 filters for charts, dashboards, datasets (#10335) 2020-07-27 10:14:11 -07:00
Ville Brofeldt
5b6ff4944c
fix: incorrect filter operator emitted by Filter Box (#10421)
* fix: equals operator in filter box

* fix time range endpoint schema

* fix test

* bump packages

* fix tests

* lint
2020-07-26 12:40:03 +03:00
Moriah Kreeger
6fde7f8984
style: add fade transition to bottom border on navbar menu items (#10402)
* Add fade transition to bottom border on navbar menu items

* lint fix

* use theme variables

* fix spec
2020-07-23 12:49:28 -07:00
Maxime Beauchemin
ea53916730
feat: SIP-34 explore save modal (#10355)
* feat: SIP-34 explore save modal

* using a const for the session storage key

* backend changes

* minor tweaks

* more tweaks

* radio cosmetics

* styles

* fix tests

* CreatableSelect\!

* Fix cypress & lint

* fix unit

* lint
2020-07-23 00:26:29 -07:00
Evan Rusackas
ca71d4d6ee
feat: adding Storybook to Superset (#10383)
* Storybook added!

* starting to configure junk....

* Storybook works!!!

* Now with theme!

* apache boilerplate

* more apache comments

* lots o' knobs for the Button.... taking stock of the codebase

* more classes, but killing the knob for now.

* nixing unused module

* linting

* fresh package-lock

* now with tooltip!

* adding path and zlip because the linter told me to

* upgrading storybook packages from devdeps

* linting

* removing cruft

* killing an annoying (and old?) lint issue

* lint fix, take 2.

* removing zlib/path

* package lock reset from master

* re-adding new packages for this here PR

* nixing console log, simplifying

* nixing comment TODOs (done enough!)

* basic docs.
2020-07-22 10:21:25 -07:00
Daniel Vaz Gaspar
961108625e
fix(datasets): sort and humanized modified by (#10380)
* fix(datasets): sort and humanized modified by

* size xl on changed_on_delta_humanized

* Fix, tests

* Fix, tests

* Fix, frontend tests

* remove debug flag
2020-07-22 11:34:47 +01:00
Ville Brofeldt
3c39b26c99
fix: extra filters for chart data endpoint (#10359)
* fix: extra filters

* fix old test and add new test

* add test for null filter value

* leave lowercase until all operators are fully uppercased

* bump packages

* rename test
2020-07-21 08:24:50 +03:00
Maxime Beauchemin
61544de6c3
chore: uniform icons across list views (#10363)
* chore: uniform icons across list views

* smaller modals

* integrating comments
2020-07-20 19:56:51 -07:00
Erik Ritter
5fa4680447
feat: update timeout error UX (#10274) 2020-07-20 15:32:17 -07:00
Erik Ritter
09de805017
chore: enable no-unused-vars and prefer-template eslint rules (#10350) 2020-07-16 19:13:59 -07:00
ʈᵃᵢ
0eee6785a8
feat(listviews): SIP-34 Bulk Select (#10298) 2020-07-16 16:07:49 -07:00
Ville Brofeldt
611dd7a8f6
fix: make __time an ok column name in SQL Lab (#10336) 2020-07-16 10:34:50 +03:00
Daniel Vaz Gaspar
74cb82e1ad
fix: humanised changed on UTC on dashboards and charts (#10321)
* fix: API marshmallow3 drop utc for naive datetime fields

* fix: API marshmallow3 drop utc for naive datetime fields

* fix, tests

* isort and test

* black

* add and fix test

* fix comment
2020-07-15 19:09:32 +01:00
Erik Ritter
66b0239eca
chore: type welcome (#10317) 2020-07-15 08:38:43 -07:00
Erik Ritter
6ae9f3af8e
feat: add download as image button to explore (#10297) 2020-07-14 16:40:12 -07:00
Erik Ritter
518dbd05b6
chore: add typing to more sqllab components (#10278) 2020-07-14 16:39:56 -07:00
Erik Ritter
80902bca50
chore: add typing to profile (#10282) 2020-07-14 16:39:37 -07:00
Ville Brofeldt
7eb00481de
fix: leave null timestamp unformatted in view results table (#10313) 2020-07-14 19:12:06 +03:00
Jesse Yang
96e0da9fea
fix(table-viz): table chart time column should use default (#10293) 2020-07-13 23:44:57 -07:00
Lily Kuang
3b4df51848
style: new toast design closer to SIP-34 (#10178) 2020-07-10 14:58:59 -07:00
Lily Kuang
80b06f6827
feat: update delete modal for dataset (#10258)
* update delete modal for dataset

* update datasetList to use hooks

* fix typo on dataset delete modal
2020-07-10 14:23:17 -07:00
Jesse Yang
4d179622fa
fix(explore): edit datasource does not update control states (#10284) 2020-07-10 12:46:25 -07:00
Ville Brofeldt
c0d663db9a
feat: show formatted dates instead of epoch on results (#10268) 2020-07-09 20:48:53 +03:00
Jesse Yang
e94c9804a2
fix: optimize mapStateToProps for chart controls (#10264) 2020-07-09 00:33:48 -07:00
Evan Rusackas
3dfa4aa15d
chore: nixing requiresTime (#10259) 2020-07-08 17:10:03 -07:00
Grace Guo
6690963ec2
feat: minor reorder SQL Lab Tab controls (#10257) 2020-07-08 16:21:47 -07:00
Jesse Yang
e5761d3cf7
fix(table-viz): JS error when sort time column (#10250) 2020-07-07 21:28:09 -07:00
Grace Guo
f849103374
feat: Typeahead searchable filter_box for dashboard (#10210)
* [WIP] Typeahead dashboard filter_box

* Make it work

* add config option for async filter_box

* enable for > 1000 options only

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-07-07 09:31:18 -07:00
Evan Rusackas
569e4a7c50
chore: Revised logo (new color), w/CSS for vert alignment (#10237)
* out with the old, in with the new

* vertically centering logo once and for all

* lint: black instead of IDE formating

* touch config.py

* Styles -> StyledHeader

* nixing vestigial SVG

* removing trademark

Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-07-06 17:30:18 -07:00
Erik Ritter
9a5195ab85
feat: support new errors payload in SQL Lab (#10243) 2020-07-06 09:49:32 -07:00
Erik Ritter
4281ad5486
chore: type ResultSet.tsx (#10226) 2020-07-02 10:12:31 -07:00
Jesse Yang
700429f431
fix: chart validation error not cleared on control value update (#10224) 2020-07-01 18:32:27 -07:00
Jesse Yang
9bdfa055ac
feat(viz): add query mode switch to table chart (#10113)
1, Replace table chart rendering from jquery.DataTables to react-table: apache-superset/superset-ui#623
2. Rearrange the control panel, replace GROUP BY and NOT GROUP BY with a "Query Mode" switch: apache-superset/superset-ui#609
2020-06-28 21:37:04 -07:00
ʈᵃᵢ
3414f35792
refactor: better naming for config flags (#10180) 2020-06-26 17:36:50 -07:00
Jason Davis
9de9e1c19d
feat: Added configuration to SQL Lab results "Explore" button (#10164)
* added configuration to virtual table explore button

* added description to mixin

* fixed unit tests

Co-authored-by: Jason Davis <@dropbox.com>
2020-06-26 09:54:55 -07:00
Jesse Yang
ecb44a4243
refactor: import emotion-theming methods from @superset-ui/style (#10157)
This makes the code cleaner and fixes missing theme variables when `npm link @superset-ui/style`.
2020-06-24 19:23:51 -07:00
Ville Brofeldt
38667b72b1
fix: refine shouldUseLegacyApi and add tests (#10148)
* fix: refine shouldUseLegacyApi and add tests

* address review comments
2020-06-24 19:38:36 +03:00
ʈᵃᵢ
be936c2eb8
style: listviews closer to SIP-34 (#10094) 2020-06-23 14:17:28 -07:00
Jesse Yang
ed4f6e93ac
chore: bump superset-ui to v0.14.1 (#10112) 2020-06-22 11:14:23 -07:00
Grace Guo
a80453d945
fix: dashboard filter scope bug (#10114)
* fix: dashboard filter scope bug

* add extra comments per review
2020-06-22 10:18:04 -07:00
Erik Ritter
cb1705fdae
chore: type src/addSlice (#10127) 2020-06-22 08:14:27 -07:00
Maxime Beauchemin
cf0f1d568d
style: replace broken glyphs with font-awesome (#10123)
Glyphicons stopped working recently, not sure why, but let's get rid of
them and double down on font-awesome that we use a lot more in the
codebase. There's only a few instances of glyphicons and they all are
broken ATM.

Also a few other minor style tweaks
2020-06-21 21:38:08 -07:00
Will Barrett
961b55cfba
fix: Visualization settings were lost when editing a datasource from Explore (#10092) 2020-06-19 12:55:49 -07:00
Erik Ritter
2e76fbb7e5
chore: type FilterableTable (#10073) 2020-06-18 21:57:11 -07:00
Maxime Beauchemin
a6390afb89
style: push bootstrap theme towards SIP-34 styles (#10056)
* feat: cartel theme

* piling

* more tweaks

* Make things look better

* lint

* fix tests

* paint it black

* tweaks
2020-06-18 15:01:58 -07:00
Phillip Kelley-Dotson
02fee35314
chore(metricoption): remove metricoption and columntypelable dependency (#10077)
* remove columntypeLabel and metricoptions from superset

* fix lint

* remove old test

* update pakage

* add suggestions

* fix merge conflict
2020-06-17 19:55:17 -07:00
ʈᵃᵢ
c914af0bc4
fix: adds pagination/infinite scroll to owners select in DashboardList and ChartList (#10035) 2020-06-17 16:27:21 -07:00
Erik Ritter
987cb6e1fe
chore: type src/dashboard/util/charts (#10068) 2020-06-17 12:34:04 -07:00
ʈᵃᵢ
8c012f7941
feat: add more columns and icons to dataset listview (#10043) 2020-06-16 17:30:10 -07:00
Ville Brofeldt
ee77707532
feat: add deafult buildQuery for V1 chart data requests (#10048) 2020-06-12 07:49:13 -07:00
Lily Kuang
5339d31ed1
feat: implement secondary navigation for datasets (#9982) 2020-06-10 11:55:51 -07:00
Ville Brofeldt
56397d75cc
fix: raise error in sqllab when using reserved column name (#9859) 2020-06-10 16:32:43 +03:00
Ville Brofeldt
5c4d4f16b3
feat: finalize Word Cloud move to new chart data endpoint (#9975)
* remove word cloud from viz.py

* Fix Run in SQL Lab

* remove deprecated python tests

* break out legacy endpoint type into function

* Break out exploreChart from exportChart and implement results type

* Fix jest tests and refactor accordingly

* lint

* Rename v1 payload function

* Add dashboard id to v1 chart data request url params

* Add support for domain sharding to v1 chart data request
2020-06-05 14:08:46 +03:00
ʈᵃᵢ
d187d2887e
fix: fetch all owners for dashboard, chart listview filters and properties modal (#9784) 2020-06-03 19:57:03 -07:00
Grace Guo
dcac860f3e
feat: [dashboard] notification and warning for auto force refresh (#9886)
* feat: [dashboard] notification and warning for auto force refresh

* fix review comments
2020-06-03 10:20:56 -07:00
Ville Brofeldt
fc92692f49
feat: implement new version of word cloud (#9962) 2020-06-02 19:28:58 +03:00
Ville Brofeldt
38a6bd79da
feat: expand new chart data endpoint coverage (#9903)
* feat: implement new chart API for additional components

* Fix python tests

* Fix tests

* Fix lint

* fix camel case error in requestParams

* lint

* fix samples row limit

* Add samples row limit to config

* remove unnecessary code

* lint

* Address review comments
2020-06-02 10:47:28 +03:00
Jesse Yang
359ea8825d
fix(react-select): FilterBox focus event and adhoc filter popup height (#9933)
* fix(react-select): FilterBox focus event and adhoc filter popup height

* Fix flacky cypress test

* Use focus instead of click
2020-05-27 15:15:32 -07:00
Ville Brofeldt
1b72907b18
Revert "feat: bump superset-ui and implement queryFields in formData (#9908)" (#9931)
This reverts commit 2c97e72959.
2020-05-27 22:50:14 +03:00
Ville Brofeldt
5ff61048c6
feat: bump sinon to latest (#9926) 2020-05-27 19:34:40 +03:00
Ville Brofeldt
2c97e72959
feat: bump superset-ui and implement queryFields in formData (#9908)
* feat: Bump superset-ui packages for queryFields

* feat: Implement queryField in formData
2020-05-26 10:19:33 -07:00
Grace Guo
e6a55d8858
fix: [dashboard] should not trigger chart refresh when filter not applicable (#9891)
* fix: [dashboard][filter] should not trigger chart refresh when filter is not applicable

* fix comments
2020-05-26 10:14:12 -07:00
Phillip Kelley-Dotson
333dc8529e
feat: tablechart plugin controls migration (#9847)
* delete controls

* move columnoption to controls

* update package and remove columnoption

* fix: remove console and fix import

* fix: lint

* update version

* fix last rebase

* fix: lint:
2020-05-21 12:15:02 -07:00
Christian Murphy
a262ea7487
refactor(frontend): move utils to TypeScript (#9820)
* refactor(frontend): move utils to typescript (#9101)

* refactor(frontend): don't export interfaces

* test(frontend): update types and test for isValidChild
2020-05-20 14:47:40 -07:00
Jesse Yang
81ab8dd8b4
feat: upgrade react-select and make multi-select sortable (#9628)
* feat: upgrade react-select v1.3.0 to v3.1.0

Upgrade `react-select`, replace `react-virtualized-select` with a custom
solution implemented with `react-window`.

Future plans include deprecate `react-virtualized` used in other places, too.

Migrate all react-select related components to `src/Components/Select`.

* Fix new list view

* Fix tests

* Address PR comments

* Fix a flacky Cypress test

* Adjust styles for Select in CRUD ListView

* Fix loadOptions for owners select in chart PropertiesModal

TODO: add typing support for AsyncSelect props.

* Address PR comments; allow isMulti in SelectControl, too

* Clean up NaN in table filter values

* Fix flacky test
2020-05-19 16:59:49 -07:00
Grace Guo
5ca6ed716f
[explore view] inline edit slice name should not overwrite (#9817) 2020-05-18 22:53:29 -07:00
Grace Guo
d96bb874f2
fix: [filter_box] fix 2 issues in single value filter_box (#9829)
* fix: [filter_box] fix 2 issues in single value filter_box

* add unit test

* add fix per comments
2020-05-18 21:25:10 -07:00
Phillip Kelley-Dotson
38c57f45ac
feat: partitionchart controls migration (#9768)
* fix lint error

* fix: import lint error

* pull in latests code

* delete control from plugin registry

* fixing again...

* another fix with rebase...

* commit change

* update packages and fix test

* fix: add ignore to lint error

* fix mr

* fix lint

* fix imports

Co-authored-by: Phillip Kelley-Dotson <pkd@pkd.lan>
2020-05-18 12:48:51 -07:00
Erik Ritter
b36738cf56
fix: use snake_case for error_type (#9835) 2020-05-18 12:35:55 -07:00
Ville Brofeldt
7a95c52d61
refactor: simplify getExploreUrl functions (#9831)
* remove payload from return signature

* Rename function and fix tests

* Lint

* fix tests

* Move useLegacyApi inquiry to exploreUtils
2020-05-18 19:19:05 +03:00
Christian Murphy
b8eaa114ed
feat(frontend): add ability to download dashboard and chart as image (#9819)
* feat(frontend): add ability to export dashboard and chart as image (#6973)

* refactor: migrate download image as to typescript

* feature(frontend): download as image updates

add toast message if error occurs.
make generate file stem an internal method.

* refactor(frontend): move default background color to a const

* feat(frontend): wrap download image toast in translate function
2020-05-17 14:50:27 -07:00
Erik Ritter
d02f2d1fa7
feat: return security errors in the SIP-40 format (#9796) 2020-05-13 17:10:37 -07:00
Erik Ritter
83ec7365a7
feat: convert backend chart errors to the new error type (#9753) 2020-05-12 18:15:53 -07:00
Jesse Yang
13c5b133a9
test(frontend): use absolute path for src imports (#9761)
* test(frontend): use absolute path for src imports

* Upgrade prettier, fix eslint
2020-05-07 14:18:10 -07:00
David Aaron Suddjian
80f8349018
Query the new chart data api for charts that support it (#9710)
* calling new chart api (mostly working)

* can't .then when the promise has already been await-ed

* Add handling for v1 API response

* comment

* update word cloud plugin & dependencies

* testing

* try just waiting

* Revert "try just waiting"

This reverts commit 10c092effd.

* tweaking bootstrap types

* Bumping word cloud package version

* new package lock

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
2020-05-07 01:09:28 -07:00
Grace Guo
83b4165e61
[perf logging] Add extra logging for new/editMode dash (#9745)
* [perf logging] Add extra logging for new/editMode dash

* fix review comments
2020-05-06 09:03:04 -07:00
Maxime Beauchemin
9aabafe9fe
fix: adhoc filter 'equals' doesn't let you save (#9652)
When altering a filter, when using `equals` or `does not equals`,
the save button is disabled even when it should be enalbed.
2020-05-06 08:38:10 -07:00
Ville Brofeldt
5485eb993c
feat: Add controlGroups to formData (#9740) 2020-05-06 14:53:13 +03:00
David Aaron Suddjian
d65d29c810
fix: css prop is now overwhelmed with emotion (#9742) 2020-05-05 10:10:56 -07:00
Grace Guo
43eec67291
[table editor] hide Edit Datasource option when no onDatasourceSave (#9706)
* [table editor] hide Edit Datasource option when no onDatasourceSave

* add !! operator to get truthiness
2020-04-30 17:32:01 -07:00
Erik Ritter
5fb883e279
chore(ts): type getClientErrorObject (#9693) 2020-04-30 17:03:31 -07:00
ʈᵃᵢ
f7f60cc75d
[Chart & Dashboard] improve listview filter ui and add expandable list support (#9651)
* better styling for select filters and search input

* add emotion babel plugin

* add spec for search input

* fix async select, add beeter error messages

* add error boundary around views

* cleanup and lint

* add expandable list to dashboards

* fix emotion babel config

* fix specs

* remove commented out code

* add selected style

* DRY up styles

* add icons

* fix type

* add apache license

* fix svgs

* fix ExpandableList type

* reduce custom css

* lint
2020-04-29 21:54:07 -07:00
Erik Ritter
5d7b13507e
feat(errors): add client scaffolding for custom error messages (#9677) 2020-04-29 17:20:31 -07:00
Grace Guo
735dcd2002
[explore view] add partition as adhoc filter option (#9637)
* [explore view] add partition as adhoc option

* use adhocFilter Simple Tab

* simplify conditional check for custom adhoc filter operator

* add simple unit tests
2020-04-28 23:09:44 -07:00
Natalie Ruhe
9d755bc1ad
[fix] Support APP_ICON_WIDTH configuration parameter in SPA menu (#9666)
* Expose additional APP_ICON_WIDTH python config variable to ui via app bootstrap for use in Menu

* Update base.py to inclue APP_ICON_WIDTH via bracket notation instead of .get and adjust Menu proptypes to be required.

Co-authored-by: Natalie Ruhe <nruhe@nruhe.attlocal.net>
Co-authored-by: Natalie Ruhe <natalie@preset.io>
2020-04-28 12:59:03 -07:00
Lily Kuang
c474ea848a
[fix] Push browser history on pagination in react listviews (#9624)
* improve history for query params

* fix: push browser history on pagination in react listviews

* fix spec

Co-authored-by: Tai Dupree <tdupreetan@gmail.com>
2020-04-27 21:37:22 -07:00
Evan Rusackas
5e4c291913
Controls cleanup pass (#9578)
* migrating date_filter

* normalized control

* filter_configs control

* column_collection control

* time_range_endpoints control

* time_range_fixed control

* url_params control

* cache_timeout control

* annotation_layers control

* color control unused?

* linters rule 🤘

* this should have been deleted earlier

* global_opacity, mapbox_label, mapbox_style, viewport_zoom

* linting

* comparison_type

* contribution control

* log_scale

* show_values

* table_filter

* pandas_aggfunc

* code control

* formatSelectOptions import

* lint

* markup_type control

* lintage

* date_time_format control, linting

* url control, test mods

* min_periods control

* rolling_periods

* rolling_type

* missing lib

* order_desc

* number_format

* link_length

* all_columns_y

* all_columns_x

* normalize_across, select_country, all_columns

* fixing test

* linter-caught dependencies

* waiting

* wait longer!

* utilizing tabOverride for Analytics

* tabOverride for Annotations and Layers
2020-04-24 16:12:26 -07:00
David Aaron Suddjian
f8adfc8fbf
use new @superset-ui/style package for theming (#9605)
* use new @superset-ui/style package for theming

* fix tests to reference theme

* try adding a wait
2020-04-22 13:13:40 -07:00
ʈᵃᵢ
0b999e3b91
[charts] adds new filters ui (#9530)
* [charts] adds new filters ui

* move null check to be more visible

* better filter lists and async filter functionality
2020-04-21 12:04:11 -07:00
Erik Ritter
ba691d3a27
Bump superset-ui-connection to 0.12.22 (#9602) 2020-04-21 11:36:01 -07:00
Evan Rusackas
ea27e68ee1
Migrating shared NVD3 controls to new module (#9525)
* proto module

* caught a missed 'freq' unique control

* line_interpolation

* linting

* showLegend

* show_controls

* xAxisLabel

* bottomMargin

* x_ticks_layout

* missed one

* x_axis_format

* yLogScale

* y_axis_bounds

* linting

* nixing yarn lock

* x_axis_showminmax

* xAxisShowminmax control

* richTooltip

* linting, syntax fix

* show_bar_value, bar_stacked

* reduceXticks, yaxislabel

* left_margin, max_bubble_size, y_axis_showminmax

* show_labels

* send_time_range, y_axis_2_format, show_markers, order_bars

* nixing commented imports

* fake controls

* looking up actual controls for comparison.

* adding key to test setup

* controls inventory

* apache junk

* lint 

* ignore null controls

* fixing goofed up spread operation for xAxisFormat config

* lint 

* fixes for errors caused by <hr> element in filterbox controls

* fixing filter controls for 'druid_time_origin', 'granularity', 'granularity_sqla', 'time_grain_sqla'

* getControlsInventory -> getControlsForVizType

* further renaming of chartControlsInventory - > getControlsForVizType

Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
2020-04-17 11:40:50 -07:00
Grace Guo
4a55e1ea3a
[fix] dashboard filter scope bug (#9550) 2020-04-16 15:44:03 -07:00
ʈᵃᵢ
f90824fa17
[Dashboard] new listview filters & emotion infra (#9462)
* [Dashboard] listview filters to match new design

* use title_or_slug filter

* use ?. operator

* move components to components folder
2020-04-13 13:39:55 -07:00
Evan Rusackas
1cdfb829d7
Eslint prefer-object-spread (#9466)
* The rule.

* The result
2020-04-03 17:05:16 -07:00
Evan Rusackas
265a2feb29
Migrating NVD3 Area's stacked_style config (#9454)
* Migrating NVD3 Area's stacked_style config

* test mods

* lint

* nonsense change

* undoing nonsense. Come on GitHub, WORK.
2020-04-03 12:50:28 -07:00
ʈᵃᵢ
893c95521b
fix pagination for list views (#9425) 2020-04-01 09:20:17 -07:00
Grace Guo
a9ff51bd61
[fix] dashboard filter indicator no showing single number value (#9401) 2020-03-30 15:05:04 -07:00
David Aaron Suddjian
cfa786850f
upgrade to react-bootstrap v0.33.1 (#9372)
* upgrade to react-bootstrap v0.33.1

* fix test

* simplify proptypes

Co-Authored-By: Evan Rusackas <evan@preset.io>

* simplify more proptypes

Co-Authored-By: Evan Rusackas <evan@preset.io>

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-03-26 11:16:49 -07:00
Maxime Beauchemin
98a71be80b
feat: [explore] don't save filters inherited from a dashboard (#9340)
* feat: [explore] don't save filters inherited from a dashboard

When navigating to explore from a dashboard context, the current
dashboard filter(s) are passed along to explore so that the context is
kept. So say you're filtering on "country=Romania", in your dashboard
and pivot to explore, that filter is still there and keep on exploring.

Now a common issue is that you'll want to make some tweak to your chart
that are unrelated to the filter, say toggling the legend off for
instance, and then save it. Now you back to your dashboard and even
though you started with an "all countries" dashboard, with a global
filter on country, now that one chart is stuck on "Romania". Typically
you notice this when filtering on something else, say "Italy" and then
that one chart now has two mutually exclusive filters, and show "No data".

Now, the fix is to flag the filter as "extra" (that's the not-so-good internal
name we use for these inherited filters) and make it clear that that
specific filter is special and won't be saved when saving the chart.

* fix build
2020-03-23 23:05:00 -07:00
ʈᵃᵢ
866f6f9330
feat: [SQLLAB] add checkbox to control autocomplete (#9338)
* [SQLLAB] add checkbox to control autocomplete

* autocomplete -> autocompleteEnabled

* fix defaultProps

* fix spec
2020-03-23 22:11:05 -07:00
Jianchao Yang
c4b53a7d42
Build: optimize frontend build configs to improve superset-ui-plugin dev experience (#9326)
* Upgrade webpack, babel and React

* Upgrade all Babel related packages

Also remove babel-plugin-css-modules-transform that is not in use.

* Remvoe tslib as dependency

* Remove unnecesary packages
2020-03-19 14:57:39 -07:00
David Aaron Suddjian
46598830e9
show edit modal on dashboards list view (#9211)
* show edit modal on dashboards list view

* lint

* fix test

* simplify PropertiesModal interface

* lint

* comply with method ordering

* fix type issue
2020-03-19 08:05:35 -07:00
David Aaron Suddjian
f6f40c815a
[Charts] Use the Edit Properties modal throughout React views (#9267)
* typescriptification

* use the chart edit modal on the react list view

* linting

* typings don't work on old react-bootstrap version

* lint

* remove duplicate field
2020-03-13 15:14:50 -07:00
ʈᵃᵢ
5767fb15cd
[datasets] new, listview (react) (#9197)
* [datasets] new, react listview

* add hidden columns to support filtering by columns not rendered

* throw exception if config is incorrect

* fix database filter

* update endpoints to point to datasets; fix translation strings

* move Link into src/components

* add add new record button to datasets listview
2020-03-13 21:35:00 +02:00
Erik Ritter
786e575dbe
[build] Bump superset-ui packages and update build (#9241) 2020-03-05 14:20:45 -08:00
Daniel Vaz Gaspar
26e916e46b
[api] enable CSRF by default (#9205)
* [api] Fix, don't exempt CSRF on APIs

* adds cookie based CSRF token support

* blacking

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
2020-03-03 12:22:40 +00:00
Jianchao Yang
1992069af1
Upgrade typescript to 3.8.2 (#9189) 2020-02-25 08:44:26 -08:00
ʈᵃᵢ
1748728c45
adds FAB style filter types (#9086) 2020-02-24 10:16:11 -08:00
ʈᵃᵢ
74423e5d19
deprecate tslint and configure eslint for typescript (#9172) 2020-02-20 09:54:33 -08:00
Grace Guo
c1750af54a
[dashboard] clean up usage for old filter immune metadata (#9146)
* [dashboard] clean up usage for filter_immune metadata

* add fix per comment
2020-02-19 09:58:34 -08:00
Will Barrett
38f3fd0c9f
Add feature flags to control query sharing, KV exposure (#9120)
* Add feature flags to control query sharing, KV exposure

* Add tests, fix bug

* Skip test for kv endpoints when they are disabled

* ESLint fixes

* Remove unnecessary binds

* Fix eslint errors

* Add note to UPDATING.md RE: new feature flag options

* Use expanded version of RBAC

* Enable KV_STORE and SHARE_QUERIES_VIA_KV_STORE feature flags in the test environment

* Fix black
2020-02-19 09:51:50 -08:00
Grace Guo
b0110a74e7
[dashboard] remove loading spinner in missing chart holder (#9140) 2020-02-14 09:01:47 -08:00
David Aaron Suddjian
2913063924 SIP-32: Moving frontend code to the base of the repo (#9098)
* move assets out, get webpack dev working

* update docs to reference superset-frontend

* draw the rest of the owl

* fix docs

* fix webpack script

* rats

* correct docs

* fix tox dox
2020-02-09 17:53:56 -08:00