Commit Graph

915 Commits

Author SHA1 Message Date
Daniel Vaz Gaspar 6c018c0a28
refactor: dbapi exception mapping for dbapi's (#12869)
* refactor: dbapi exception mapping for dbapi's

* fix test

* fix lint

* fix grammar on comment
2021-02-02 15:07:46 +00:00
Ricardo Gândara Pinto 51195af4fa
fix: Presto column_type_mappings time and timestamp (#12861)
* Fix presto column_type_mappings time and timestamp

* Added unit tests
2021-02-01 17:41:57 +02:00
Amit Miran 9a7fba810e
feat(dashboard-rbac): dashboard lists (#12680) 2021-01-31 09:17:46 +02:00
Jesse Yang e3db935c62
refactor: migrate table chart to new API (#10270)
* refactor: migrate table chart to new API

* chore: bump superset-ui to 0.17.0

* Fix Cypress tests

* Apply soft-conversion to numeric metrics

Fix time column formatting test

* Add translation to chart does not exist error

* Bump to 0.17.1
2021-01-29 13:12:09 +02:00
Duy Nguyen Hoang 32f2c45f93
fix(explore): preserve metric column order in bar chart (#12417)
* fix: Preserve Column Order in Bar chart

* Update tests/viz_tests.py to use f-strings style

Co-authored-by: Duy Nguyen <duy.nguyenhoang@global-fashion-group.com>
2021-01-28 10:39:00 +02:00
Daniel Vaz Gaspar 365770e7c3
feat: request ids on API related endpoints (#12663)
* feat: request ids on API related endpoints

* rename ids to include_ids
2021-01-27 20:24:49 +00:00
Rob DiCiuccio d7cbd53fce
fix(async queries): Remove "force" param on cached data retrieval (#12103)
* Async queries: remove force cache param on data retrieval

* Assert equal query_object cache keys

* Decouple etag_cache from permission checks

* Fix query_context test

* Use marshmallow EnumField for validation
2021-01-27 10:16:57 -08:00
Jesse Yang 55c8f9ba60
feat(explore): allow opening charts with missing dataset (#12705) 2021-01-25 15:09:03 -08:00
Karol Kostrzewa 8ccfdba672
test: oracle engine spec (#12615)
* test fetch_data, fix test_convert_dttm

* refactor test_convert_dttm
2021-01-25 09:49:58 -08:00
Karol Kostrzewa 0c32cf4244
test: hive db engine spec (#12520)
* add tests for upload_to_s3

* add fetch_data tests

* add test_create_table_from_csv_if_exists_fail

* add test_where_latest_partition

* fix app context

* test for where_latest_partition create_table_from_csv
2021-01-25 09:49:43 -08:00
Yongjie Zhao 9e58eb809e
fix(explore): deprecated x periods pattern in new time picker value (#12552) 2021-01-23 23:41:15 -08:00
Beto Dealmeida 4255c22d01
feat: add decorator to guard public APIs (#12635)
* feat: add decorator to guard public APIs

* Add unit tests

* Refactor to use unit tests

* Paramterize tests

* Remove decorator
2021-01-22 13:06:14 -08:00
Karol Kostrzewa f2b802978d
fix: bar chart data order (#12665)
* fix bar chart order

* fix test_explore_json_dist_bar_order

* fix quotes
2021-01-22 12:38:33 +02:00
Karol Kostrzewa e1db016a6c
test: presto engine spec tests (#12594)
* test get_table_names

* test _get_full_name

* add test_split_data_type

* test _show_columns

* add test_is_column_name_quoted

* test select_star

* test get_view_names

* test estimate_statement_cost

* test get_all_datasource_names

* test get_create_view

* test _extract_error_message

* fix typo
2021-01-21 12:53:54 -08:00
Karol Kostrzewa cdea1324f1
add test_convert_dttm (#12539) 2021-01-21 12:52:38 -08:00
Karol Kostrzewa 0de61df72f
test: sqlite db engine spec (#12616) 2021-01-21 09:34:48 +00:00
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