Commit Graph

899 Commits

Author SHA1 Message Date
Jesse Yang c14ed80f28
refactor: rename DbColumnType to GenericDataType (#12617) 2021-01-20 10:07:42 -08:00
Duy Nguyen Hoang 77da4ada99
fix: error while parsing invalid json form_data (#12586)
* Fix error while parsing invalid json form_data

* Refine error returned
2021-01-19 16:15:16 +00:00
Ville Brofeldt 7e99d768af
feat(bigquery): implement custom minute time grains (#12581)
* feat(bigquery): implement custom minute time grains

* address review comment
2021-01-19 14:32:33 +02:00
Kasia Kucharczyk ad63823d6f
fix: Added message flash when chart with missing dataset is accessed. (#12468) 2021-01-18 22:42:03 -08:00
Karol Kostrzewa fc5e311842
test: /postgres engine spec test coverage (#12490)
* add tests for PostgresEngineSpec.estimate_statement_cost

* add tests for PostgresEngineSpec.query_cost_formatter

* fix docstring

* fix dependency

* fix raise SyntaxError
2021-01-15 16:50:37 +02:00
Karol Kostrzewa 5fbfb82266
add test_extract_error_message (#12548) 2021-01-15 16:46:27 +02:00
Xiang Fu 8f940aecca
Fixing Pinot queries for time granularities: WEEKS/MONTHS/QUARTERS/YEARS (#12536) 2021-01-15 11:05:31 +02:00
Karol Kostrzewa 241f380e2e
test: World bank examples (#12161)
* add world bank data fixture

* fix fixture cleanup, add fixture to dashboard_tests

* apply world bank fixtures, fix tests

* fix fixture typo, dashboard ids

* fix export dashboard metadata

* fix test_export_dashboard_command_key_order

* fix export dash tests, not add row when no orphans

* debug timeout

* fixes after merge

* fix lint

* run pre-commit

* comment test for debug

* fix save.test.js

Co-authored-by: Karol Kostrzewa <karol.kostrzewa@polidea.com>
2021-01-13 14:20:05 -08:00
Jesse Yang f8270b0b80
fix(dashboard): use datasource id from slice metadata (#12483) 2021-01-13 18:49:51 +02:00
Ville Brofeldt 40a334aacf
feat(db-engine-specs): add support for Postgres root cert (#11720)
* feat(db-engine-specs): add support for Postgres root cert

* remove logging of json decode exception message

* fix error message

* fix error message
2021-01-13 13:39:28 +02:00
Beto Dealmeida e47350ef96
fix: import ZIP files that have been modified (#12425)
* fix: import ZIP files that have been modified

* Add unit test
2021-01-12 12:56:26 -08:00
Yongjie Zhao 9b0e6d0cc0
refactor: from superset.utils.core break down date_parser (#12408) 2021-01-11 14:16:42 -08:00
Karol Kostrzewa 2ab490a101
test: birth names (#12226)
* add birth names fixture

* fix birth names related tests

* fix test_import_v0_dataset_cli_export columns order

* fix celery tests drop table

* fix mysql datetime type

* fix mysql typo in charts/api_tests

* refactor

* add licence

* fix use fixture for presto

* fix presto, hive query

* fix flaky metadata

* fix mysql bigint type

* fix run query

* fix hive datatype in metadata

* fix slice owner for cypress

* refactor num_boys num_girls

* fix is_dttm column

* debug logging

* fix query offset

* fix presto ds type in metadata

* fix presto ds type

* clean up debug logging
2021-01-11 05:57:55 -08:00
Jesse Yang 2210015aab
test: rename column names for birth_names dataset (#12082) 2021-01-08 14:13:20 -08:00
Daniel Vaz Gaspar c685c9ea8f
refactor: test connection raises only command exceptions (#12307)
* refactor: test connection raises only command exceptions

* fix tests

* fix tests

* fix tests

* lint fix
2021-01-08 13:10:11 +00:00
Beto Dealmeida 24fccdb2bc
fix: append orphan charts (#12320)
* fix: append orphan charts

* Add unit tests
2021-01-07 14:05:08 -08:00
Yongjie Zhao 9eb911dca3
fix(explore): refine previous calendar range (#12308) 2021-01-06 10:09:13 -08:00
Yongjie Zhao 1f8347228e
fix(explore): timepicker show human readable string in pill (#12300)
* fix(explore): timepicker show human readable string in pill

* fix lint
2021-01-06 22:37:35 +08:00
Amit Miran b221417e19
chore: remove harmless incubator refs (#12289)
* chore: migrate all harmless incubator refs like comments and documentation files

* chore: migrate all superset.incubator.apache.org to superset.apache.org to

* chore: migrate dist.apache.org refs

* chore: removing incubating and Disclaimer

* fix: linting issues
2021-01-06 13:45:19 +02:00
Karol Kostrzewa 1a2680d4a1
test: fix flaky Python unit tests (#12253) 2021-01-05 16:40:01 -08:00
Beto Dealmeida 164db3e5a1
fix: CTAS on multiple statements (#12188)
* WIP

* Add unit tests for sql_parse

* Add unit tests for sql_lab
2021-01-04 09:22:35 -08:00
Daniel Vaz Gaspar 74f3faf1cd
fix(reports): make name unique between alerts and reports (#12196)
* fix(reports): make name unique between alerts and reports

* add missing migration

* make it work for mySQL and PG only (yet)

* fixing sqlite crazy unique drop

* fixing sqlite missing one col
2020-12-24 09:18:46 +00:00
Daniel Vaz Gaspar 09a381da1d
fix(reports): notification without standalone link back to superset (#12174)
* fix(reports): notification without standalone link back to superset

* fix comment
2020-12-23 11:31:08 +00: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
Beto Dealmeida ca680cf976
fix: append ID to filename when exporting chart (#12166) 2020-12-22 14:19:05 -08:00
Nikola Gigić a52031a55e
chore: Change chart_is_fav to chart_is_favorite (#12075)
* Change chart_is_fav to chart_is_favorite

* Trigger cypress tests

* Retrigger cypress tests

* Retrigger all tests

* Dashboard

* Additions
2020-12-22 10:03:26 -08:00
Beto Dealmeida c281e52f81
feat: add new dashboard with video game sales (#12162) 2020-12-22 08:53:18 -08:00
Daniel Vaz Gaspar 2f0add3aec
fix: database alpha permissions (#12136)
* fix: database alpha permissions

* add test
2020-12-21 19:17:58 +00:00
Daniel Vaz Gaspar 8d5dcc5784
fix(report): fix last_eval_dttm sort and more tests (#12121)
* fix(report): fix last_eval_dttm sort and more tests

* remove unnecessary permissions and split code path

* remove SIP_34_ALERTS_UI

* disabling an alert that is working will turn it to not triggered
2020-12-21 19:07:30 +00: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
Ville Brofeldt 1a5f61b133
feat(chart-data-api): ignore unknown fields on QueryObject (#12118) 2020-12-18 14:32:55 +02:00
Beto Dealmeida 6e7f276775
feat: initial custom error messages for SQL Lab (#12080) 2020-12-17 22:58:21 -08:00
Yongjie Zhao b592cc7e73
feat(explore): time picker enhancement (#11418) 2020-12-17 18:27:21 -08:00
Daniel Vaz Gaspar 1a20552c2b
fix(reports): increase crontab size and alert fixes (#12056)
* fix(reports): increase crontab size

* update to current alembic revision

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

# Conflicts:
#	tests/security_tests.py

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

# Conflicts:
#	tests/security_tests.py

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

# Conflicts:
#	tests/security_tests.py

* lint

* update alembic revision

* fix related fields

* fix test
2020-12-17 18:03:05 +00:00
Daniel Vaz Gaspar 5d9721e6ba
feat(queries): security perm simplification (#12072)
* feat(queries): security perm simplification

* fix mig

* update alembic down revision
2020-12-17 14:27:14 +00: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
Kasia Kucharczyk 700dee6db6
feat(logs): security permissions simplification (#12061)
* Added migration for logs security converge

* Changed class permission name and method permission in LogModelView and LogRestApi

* Updated recent revision and filename

* Changed name of Log perm in manager. Updated TestRolePermission to have correct menu and permission.

* Updated latest migration revision

* Updated latest migration revision
2020-12-17 00:50:31 -08: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
Beto Dealmeida 8bda6b0bd9
feat: show missing parameters in query (#12049)
* feat: show missing parameters in query

* Fix lint

* Address comments

* Simplify error message

* Use f-string in helper function
2020-12-15 18:47:40 -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
Jesse Yang 76f9f185fb
refactor: optimize backend log payload (#11927) 2020-12-15 17:22:23 -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
Daniel Vaz Gaspar 0f979dea06
feat(reports): security perm simplification (#11853)
* feat: security converge report

* black

* fix: comment

* add frontend changes and rebase

* fix multiple heads
2020-12-15 08:48:00 +00:00
Daniel Vaz Gaspar 20b1aa7d6c
fix(reports): apply owners security validation (#12035)
* fix(reports): apply owners security validation

* fix pylint
2020-12-15 08:43:31 +00:00
ʈᵃᵢ 6fcda5dac1
feat: add cron picker to AlertReportModal (#12032)
* humanize cron display in list view
2020-12-14 22:29:31 -08:00
Beto Dealmeida 45703a1dea
feat: update IDs when importing dashboards (#11991)
* feat: update IDs when importing dashboards

* Fix typos
2020-12-11 18:19:36 -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
Beto Dealmeida 475f59cb1c
feat: confirm overwrite when importing (#11982)
* feat: confirm overwrite when importing

* Skip flaky test
2020-12-10 14:50:10 -08:00