From e2b015dcbf5ca9cbcd8164b8cde4a959916870c7 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Tue, 16 Jan 2024 12:42:35 -0300 Subject: [PATCH] refactor: Removes the filters set feature (#26369) --- RESOURCES/FEATURE_FLAGS.md | 1 - RESOURCES/STANDARD_ROLES.md | 428 ++-- UPDATING.md | 1 + docs/static/resources/openapi.json | 2100 +++-------------- .../src/query/types/Dashboard.ts | 12 - .../src/utils/featureFlags.ts | 1 - .../spec/fixtures/mockNativeFilters.ts | 1 - superset-frontend/spec/fixtures/mockStore.js | 2 +- superset-frontend/src/constants.ts | 4 - .../src/dashboard/actions/nativeFilters.ts | 208 +- .../DashboardBuilder/DashboardBuilder.tsx | 9 +- .../FiltersBadge/FilterIndicator/index.tsx | 2 +- .../FilterBar/FilterBar.test.tsx | 145 -- .../FilterBar/FilterSets/EditSection.test.tsx | 113 - .../FilterBar/FilterSets/EditSection.tsx | 171 -- .../FilterSets/FilterSetUnit.test.tsx | 100 - .../FilterBar/FilterSets/FilterSetUnit.tsx | 144 -- .../FilterBar/FilterSets/FilterSets.test.tsx | 68 - .../FilterSets/FiltersHeader.test.tsx | 54 - .../FilterBar/FilterSets/FiltersHeader.tsx | 156 -- .../FilterBar/FilterSets/Footer.test.tsx | 94 - .../FilterBar/FilterSets/Footer.tsx | 120 - .../FilterBar/FilterSets/index.tsx | 281 --- .../FilterBar/FilterSets/state.ts | 37 - .../utils/findExistingFilterSet.test.ts | 136 -- .../utils/generateFiltersSetId.test.ts | 24 - .../utils/getFilterValueForDisplay.test.ts | 42 - .../FilterBar/FilterSets/utils/index.ts | 66 - .../nativeFilters/FilterBar/Vertical.tsx | 105 +- .../nativeFilters/FilterBar/index.tsx | 1 - .../nativeFilters/FilterBar/state.ts | 6 - .../nativeFilters/FilterBar/types.ts | 9 +- .../components/nativeFilters/utils.ts | 19 + .../dashboard/containers/DashboardPage.tsx | 12 - .../dashboard/fixtures/mockNativeFilters.ts | 8 - .../src/dashboard/reducers/nativeFilters.ts | 28 +- .../src/dashboard/reducers/types.ts | 14 - .../commands/dashboard/filter_set/__init__.py | 16 - .../commands/dashboard/filter_set/base.py | 87 - .../commands/dashboard/filter_set/create.py | 76 - .../commands/dashboard/filter_set/delete.py | 54 - .../dashboard/filter_set/exceptions.py | 94 - .../commands/dashboard/filter_set/update.py | 53 - superset/config.py | 2 - superset/daos/dashboard.py | 35 - superset/dashboards/filter_sets/__init__.py | 16 - superset/dashboards/filter_sets/api.py | 381 --- superset/dashboards/filter_sets/filters.py | 58 - superset/dashboards/filter_sets/schemas.py | 97 - superset/dashboards/schemas.py | 2 - superset/initialization/__init__.py | 2 - ...14_59a1450b3c10_drop_filter_sets_table.py} | 41 +- superset/models/dashboard.py | 27 - superset/models/filter_set.py | 101 - .../dashboards/filter_sets/__init__.py | 16 - .../dashboards/filter_sets/conftest.py | 286 --- .../dashboards/filter_sets/consts.py | 22 - .../filter_sets/create_api_tests.py | 629 ----- .../filter_sets/delete_api_tests.py | 210 -- .../dashboards/filter_sets/get_api_tests.py | 132 -- .../filter_sets/update_api_tests.py | 520 ---- .../dashboards/filter_sets/utils.py | 102 - 62 files changed, 653 insertions(+), 7128 deletions(-) delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.test.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.test.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSets.test.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.test.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/Footer.test.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/Footer.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/index.tsx delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/state.ts delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/utils/findExistingFilterSet.test.ts delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/utils/generateFiltersSetId.test.ts delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/utils/getFilterValueForDisplay.test.ts delete mode 100644 superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/utils/index.ts delete mode 100644 superset/commands/dashboard/filter_set/__init__.py delete mode 100644 superset/commands/dashboard/filter_set/base.py delete mode 100644 superset/commands/dashboard/filter_set/create.py delete mode 100644 superset/commands/dashboard/filter_set/delete.py delete mode 100644 superset/commands/dashboard/filter_set/exceptions.py delete mode 100644 superset/commands/dashboard/filter_set/update.py delete mode 100644 superset/dashboards/filter_sets/__init__.py delete mode 100644 superset/dashboards/filter_sets/api.py delete mode 100644 superset/dashboards/filter_sets/filters.py delete mode 100644 superset/dashboards/filter_sets/schemas.py rename superset/{dashboards/filter_sets/consts.py => migrations/versions/2024-01-16_13-14_59a1450b3c10_drop_filter_sets_table.py} (62%) delete mode 100644 superset/models/filter_set.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/__init__.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/conftest.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/consts.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/create_api_tests.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/delete_api_tests.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/get_api_tests.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/update_api_tests.py delete mode 100644 tests/integration_tests/dashboards/filter_sets/utils.py diff --git a/RESOURCES/FEATURE_FLAGS.md b/RESOURCES/FEATURE_FLAGS.md index 7006a442ed915..7a4e32b8f2125 100644 --- a/RESOURCES/FEATURE_FLAGS.md +++ b/RESOURCES/FEATURE_FLAGS.md @@ -89,7 +89,6 @@ These features flags currently default to True and **will be removed in a future - DASHBOARD_CACHE - DASHBOARD_FILTERS_EXPERIMENTAL - DASHBOARD_NATIVE_FILTERS -- DASHBOARD_NATIVE_FILTERS_SET - ENABLE_EXPLORE_JSON_CSRF_PROTECTION - ENABLE_TEMPLATE_REMOVE_FILTERS - GENERIC_CHART_AXES diff --git a/RESOURCES/STANDARD_ROLES.md b/RESOURCES/STANDARD_ROLES.md index 3febf1f429903..7516ed2868a99 100644 --- a/RESOURCES/STANDARD_ROLES.md +++ b/RESOURCES/STANDARD_ROLES.md @@ -1,216 +1,212 @@ -||Admin|Alpha|Gamma|SQL_LAB| -|---|---|---|---|---| -|Permission/role description|Admins have all possible rights, including granting or revoking rights from other users and altering other people’s slices and dashboards.| Alpha users have access to all data sources, but they cannot grant or revoke access from other users. They are also limited to altering the objects that they own. Alpha users can add and alter data sources.|Gamma users have limited access. They can only consume data coming from data sources they have been given access to through another complementary role. They only have access to view the slices and dashboards made from data sources that they have access to. Currently Gamma users are not able to alter or add data sources. We assume that they are mostly content consumers, though they can create slices and dashboards.|The sql_lab role grants access to SQL Lab. Note that while Admin users have access to all databases by default, both Alpha and Gamma users need to be given access on a per database basis.|| -|can read on SavedQuery|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can write on SavedQuery|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can read on CssTemplate|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on CssTemplate|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on ReportSchedule|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on ReportSchedule|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on Chart|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on Chart|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on Annotation|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on Annotation|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on Dataset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on Dataset|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can read on Log|:heavy_check_mark:|O|O|O| -|can write on Log|:heavy_check_mark:|O|O|O| -|can read on Dashboard|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on Dashboard|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on Database|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can write on Database|:heavy_check_mark:|O|O|O| -|can read on Query|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can this form get on ResetPasswordView|:heavy_check_mark:|O|O|O| -|can this form post on ResetPasswordView|:heavy_check_mark:|O|O|O| -|can this form get on ResetMyPasswordView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form post on ResetMyPasswordView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form get on UserInfoEditView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form post on UserInfoEditView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on UserDBModelView|:heavy_check_mark:|O|O|O| -|can edit on UserDBModelView|:heavy_check_mark:|O|O|O| -|can delete on UserDBModelView|:heavy_check_mark:|O|O|O| -|can add on UserDBModelView|:heavy_check_mark:|O|O|O| -|can list on UserDBModelView|:heavy_check_mark:|O|O|O| -|can userinfo on UserDBModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|resetmypassword on UserDBModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|resetpasswords on UserDBModelView|:heavy_check_mark:|O|O|O| -|userinfoedit on UserDBModelView|:heavy_check_mark:|O|O|O| -|can show on RoleModelView|:heavy_check_mark:|O|O|O| -|can edit on RoleModelView|:heavy_check_mark:|O|O|O| -|can delete on RoleModelView|:heavy_check_mark:|O|O|O| -|can add on RoleModelView|:heavy_check_mark:|O|O|O| -|can list on RoleModelView|:heavy_check_mark:|O|O|O| -|copyrole on RoleModelView|:heavy_check_mark:|O|O|O| -|can get on OpenApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on SwaggerView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can get on MenuApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can list on AsyncEventsRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can invalidate on CacheRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can function names on Database|:heavy_check_mark:|O|O|O| -|can query form data on Api|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can query on Api|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can time range on Api|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form get on CsvToDatabaseView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form post on CsvToDatabaseView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form get on ExcelToDatabaseView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form post on ExcelToDatabaseView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can external metadata on Datasource|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can save on Datasource|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can get on Datasource|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can shortner on R|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can my queries on SqlLab|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can log on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can schemas access for csv upload on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can import dashboards on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can schemas on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can sqllab history on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can publish on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can csv on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can slice on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can sync druid source on Superset|:heavy_check_mark:|O|O|O| -|can explore on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can approve on Superset|:heavy_check_mark:|O|O|O| -|can explore json on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can fetch datasource metadata on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can csrf token on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can sqllab on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can select star on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can warm up cache on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can sqllab table viz on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can profile on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can available domains on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can request access on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can dashboard on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can post on TableSchemaView|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can expanded on TableSchemaView|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can delete on TableSchemaView|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can get on TabStateView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can post on TabStateView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can delete query on TabStateView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can migrate query on TabStateView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can activate on TabStateView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can delete on TabStateView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can put on TabStateView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can read on SecurityRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|menu access on Security|:heavy_check_mark:|O|O|O| -|menu access on List Users|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on List Roles|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Action Log|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Manage|:heavy_check_mark:|:heavy_check_mark:|O|O| -|menu access on Annotation Layers|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on CSS Templates|:heavy_check_mark:|:heavy_check_mark:|O|O| -|menu access on Import Dashboards|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Data|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Databases|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Datasets|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Upload a CSV|:heavy_check_mark:|:heavy_check_mark:|O|O| -|menu access on Upload Excel|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Charts|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Dashboards|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on SQL Lab|:heavy_check_mark:|O|O|:heavy_check_mark:| -|menu access on SQL Editor|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|menu access on Saved Queries|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|menu access on Query Search|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|all datasource access on all_datasource_access|:heavy_check_mark:|:heavy_check_mark:|O|O| -|all database access on all_database_access|:heavy_check_mark:|:heavy_check_mark:|O|O| -|all query access on all_query_access|:heavy_check_mark:|O|O|O| -|can edit on UserOAuthModelView|:heavy_check_mark:|O|O|O| -|can list on UserOAuthModelView|:heavy_check_mark:|O|O|O| -|can show on UserOAuthModelView|:heavy_check_mark:|O|O|O| -|can userinfo on UserOAuthModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can add on UserOAuthModelView|:heavy_check_mark:|O|O|O| -|can delete on UserOAuthModelView|:heavy_check_mark:|O|O|O| -|userinfoedit on UserOAuthModelView|:heavy_check_mark:|O|O|O| -|can write on DynamicPlugin|:heavy_check_mark:|O|O|O| -|can edit on DynamicPlugin|:heavy_check_mark:|O|O|O| -|can list on DynamicPlugin|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on DynamicPlugin|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can download on DynamicPlugin|:heavy_check_mark:|O|O|O| -|can add on DynamicPlugin|:heavy_check_mark:|O|O|O| -|can delete on DynamicPlugin|:heavy_check_mark:|O|O|O| -|can edit on RowLevelSecurityFiltersModelView|:heavy_check_mark:|O|O|O| -|can list on RowLevelSecurityFiltersModelView|:heavy_check_mark:|O|O|O| -|can show on RowLevelSecurityFiltersModelView|:heavy_check_mark:|O|O|O| -|can download on RowLevelSecurityFiltersModelView|:heavy_check_mark:|O|O|O| -|can add on RowLevelSecurityFiltersModelView|:heavy_check_mark:|O|O|O| -|can delete on RowLevelSecurityFiltersModelView|:heavy_check_mark:|O|O|O| -|muldelete on RowLevelSecurityFiltersModelView|:heavy_check_mark:|O|O|O| -|can external metadata by name on Datasource|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can get value on KV|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can store on KV|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can tagged objects on TagView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can suggestions on TagView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can get on TagView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can post on TagView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can delete on TagView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can edit on DashboardEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can list on DashboardEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on DashboardEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can add on DashboardEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can delete on DashboardEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|muldelete on DashboardEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can edit on SliceEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can list on SliceEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on SliceEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can add on SliceEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can delete on SliceEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|muldelete on SliceEmailScheduleView|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can edit on AlertModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can list on AlertModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on AlertModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can add on AlertModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can delete on AlertModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can list on AlertLogModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on AlertLogModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can list on AlertObservationModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can show on AlertObservationModelView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Row Level Security|:heavy_check_mark:|O|O|O| -|menu access on Access requests|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Home|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Plugins|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Dashboard Email Schedules|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Chart Emails|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Alerts|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Alerts & Report|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Scan New Datasources|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can share dashboard on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can share chart on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can list on FilterSets|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can add on FilterSets|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can delete on FilterSets|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can edit on FilterSets|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form get on ColumnarToDatabaseView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can this form post on ColumnarToDatabaseView|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|menu access on Upload a Columnar file|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can export on Chart|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on DashboardFilterStateRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on DashboardFilterStateRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on DashboardPermalinkRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on DashboardPermalinkRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can delete embedded on Dashboard|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can set embedded on Dashboard|:heavy_check_mark:|O|O|O| -|can export on Dashboard|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can get embedded on Dashboard|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can export on Database|:heavy_check_mark:|O|O|O| -|can export on Dataset|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can write on ExploreFormDataRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on ExploreFormDataRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can write on ExplorePermalinkRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on ExplorePermalinkRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can export on ImportExportRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can import on ImportExportRestApi|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can export on SavedQuery|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| -|can dashboard permalink on Superset|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can grant guest token on SecurityRestApi|:heavy_check_mark:|O|O|O| -|can read on AdvancedDataType|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can read on EmbeddedDashboard|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can duplicate on Dataset|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can read on Explore|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can samples on Datasource|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can read on AvailableDomains|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| -|can get or create dataset on Dataset|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can get column values on Datasource|:heavy_check_mark:|:heavy_check_mark:|O|O| -|can export csv on SQLLab|:heavy_check_mark:|O|O|:heavy_check_mark:| -|can get results on SQLLab|:heavy_check_mark:|O|O|:heavy_check_mark:| -|can execute sql query on SQLLab|:heavy_check_mark:|O|O|:heavy_check_mark:| -|can recent activity on Log|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|O| +| | Admin | Alpha | Gamma | SQL_LAB | +| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | +| Permission/role description | Admins have all possible rights, including granting or revoking rights from other users and altering other people’s slices and dashboards. | Alpha users have access to all data sources, but they cannot grant or revoke access from other users. They are also limited to altering the objects that they own. Alpha users can add and alter data sources. | Gamma users have limited access. They can only consume data coming from data sources they have been given access to through another complementary role. They only have access to view the slices and dashboards made from data sources that they have access to. Currently Gamma users are not able to alter or add data sources. We assume that they are mostly content consumers, though they can create slices and dashboards. | The sql_lab role grants access to SQL Lab. Note that while Admin users have access to all databases by default, both Alpha and Gamma users need to be given access on a per database basis. | | +| can read on SavedQuery | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can write on SavedQuery | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can read on CssTemplate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on CssTemplate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on ReportSchedule | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on ReportSchedule | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on Chart | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on Chart | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on Annotation | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on Annotation | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on Dataset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on Dataset | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can read on Log | :heavy_check_mark: | O | O | O | +| can write on Log | :heavy_check_mark: | O | O | O | +| can read on Dashboard | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on Dashboard | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on Database | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can write on Database | :heavy_check_mark: | O | O | O | +| can read on Query | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can this form get on ResetPasswordView | :heavy_check_mark: | O | O | O | +| can this form post on ResetPasswordView | :heavy_check_mark: | O | O | O | +| can this form get on ResetMyPasswordView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form post on ResetMyPasswordView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form get on UserInfoEditView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form post on UserInfoEditView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on UserDBModelView | :heavy_check_mark: | O | O | O | +| can edit on UserDBModelView | :heavy_check_mark: | O | O | O | +| can delete on UserDBModelView | :heavy_check_mark: | O | O | O | +| can add on UserDBModelView | :heavy_check_mark: | O | O | O | +| can list on UserDBModelView | :heavy_check_mark: | O | O | O | +| can userinfo on UserDBModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| resetmypassword on UserDBModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| resetpasswords on UserDBModelView | :heavy_check_mark: | O | O | O | +| userinfoedit on UserDBModelView | :heavy_check_mark: | O | O | O | +| can show on RoleModelView | :heavy_check_mark: | O | O | O | +| can edit on RoleModelView | :heavy_check_mark: | O | O | O | +| can delete on RoleModelView | :heavy_check_mark: | O | O | O | +| can add on RoleModelView | :heavy_check_mark: | O | O | O | +| can list on RoleModelView | :heavy_check_mark: | O | O | O | +| copyrole on RoleModelView | :heavy_check_mark: | O | O | O | +| can get on OpenApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on SwaggerView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can get on MenuApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can list on AsyncEventsRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can invalidate on CacheRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can function names on Database | :heavy_check_mark: | O | O | O | +| can query form data on Api | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can query on Api | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can time range on Api | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form get on CsvToDatabaseView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form post on CsvToDatabaseView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form get on ExcelToDatabaseView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form post on ExcelToDatabaseView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can external metadata on Datasource | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can save on Datasource | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can get on Datasource | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can shortner on R | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can my queries on SqlLab | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can log on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can schemas access for csv upload on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can import dashboards on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can schemas on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can sqllab history on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can publish on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can csv on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can slice on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can sync druid source on Superset | :heavy_check_mark: | O | O | O | +| can explore on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can approve on Superset | :heavy_check_mark: | O | O | O | +| can explore json on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can fetch datasource metadata on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can csrf token on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can sqllab on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can select star on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can warm up cache on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can sqllab table viz on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can profile on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can available domains on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can request access on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can dashboard on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can post on TableSchemaView | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can expanded on TableSchemaView | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can delete on TableSchemaView | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can get on TabStateView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can post on TabStateView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can delete query on TabStateView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can migrate query on TabStateView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can activate on TabStateView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can delete on TabStateView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can put on TabStateView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can read on SecurityRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| menu access on Security | :heavy_check_mark: | O | O | O | +| menu access on List Users | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on List Roles | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Action Log | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Manage | :heavy_check_mark: | :heavy_check_mark: | O | O | +| menu access on Annotation Layers | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on CSS Templates | :heavy_check_mark: | :heavy_check_mark: | O | O | +| menu access on Import Dashboards | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Data | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Databases | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Datasets | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Upload a CSV | :heavy_check_mark: | :heavy_check_mark: | O | O | +| menu access on Upload Excel | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Charts | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Dashboards | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on SQL Lab | :heavy_check_mark: | O | O | :heavy_check_mark: | +| menu access on SQL Editor | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| menu access on Saved Queries | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| menu access on Query Search | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| all datasource access on all_datasource_access | :heavy_check_mark: | :heavy_check_mark: | O | O | +| all database access on all_database_access | :heavy_check_mark: | :heavy_check_mark: | O | O | +| all query access on all_query_access | :heavy_check_mark: | O | O | O | +| can edit on UserOAuthModelView | :heavy_check_mark: | O | O | O | +| can list on UserOAuthModelView | :heavy_check_mark: | O | O | O | +| can show on UserOAuthModelView | :heavy_check_mark: | O | O | O | +| can userinfo on UserOAuthModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can add on UserOAuthModelView | :heavy_check_mark: | O | O | O | +| can delete on UserOAuthModelView | :heavy_check_mark: | O | O | O | +| userinfoedit on UserOAuthModelView | :heavy_check_mark: | O | O | O | +| can write on DynamicPlugin | :heavy_check_mark: | O | O | O | +| can edit on DynamicPlugin | :heavy_check_mark: | O | O | O | +| can list on DynamicPlugin | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on DynamicPlugin | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can download on DynamicPlugin | :heavy_check_mark: | O | O | O | +| can add on DynamicPlugin | :heavy_check_mark: | O | O | O | +| can delete on DynamicPlugin | :heavy_check_mark: | O | O | O | +| can edit on RowLevelSecurityFiltersModelView | :heavy_check_mark: | O | O | O | +| can list on RowLevelSecurityFiltersModelView | :heavy_check_mark: | O | O | O | +| can show on RowLevelSecurityFiltersModelView | :heavy_check_mark: | O | O | O | +| can download on RowLevelSecurityFiltersModelView | :heavy_check_mark: | O | O | O | +| can add on RowLevelSecurityFiltersModelView | :heavy_check_mark: | O | O | O | +| can delete on RowLevelSecurityFiltersModelView | :heavy_check_mark: | O | O | O | +| muldelete on RowLevelSecurityFiltersModelView | :heavy_check_mark: | O | O | O | +| can external metadata by name on Datasource | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can get value on KV | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can store on KV | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can tagged objects on TagView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can suggestions on TagView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can get on TagView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can post on TagView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can delete on TagView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can edit on DashboardEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can list on DashboardEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on DashboardEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can add on DashboardEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can delete on DashboardEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| muldelete on DashboardEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can edit on SliceEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can list on SliceEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on SliceEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can add on SliceEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can delete on SliceEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| muldelete on SliceEmailScheduleView | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can edit on AlertModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can list on AlertModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on AlertModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can add on AlertModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can delete on AlertModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can list on AlertLogModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on AlertLogModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can list on AlertObservationModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can show on AlertObservationModelView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Row Level Security | :heavy_check_mark: | O | O | O | +| menu access on Access requests | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Home | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Plugins | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Dashboard Email Schedules | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Chart Emails | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Alerts | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Alerts & Report | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Scan New Datasources | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can share dashboard on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can share chart on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form get on ColumnarToDatabaseView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can this form post on ColumnarToDatabaseView | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| menu access on Upload a Columnar file | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can export on Chart | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on DashboardFilterStateRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on DashboardFilterStateRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on DashboardPermalinkRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on DashboardPermalinkRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can delete embedded on Dashboard | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can set embedded on Dashboard | :heavy_check_mark: | O | O | O | +| can export on Dashboard | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can get embedded on Dashboard | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can export on Database | :heavy_check_mark: | O | O | O | +| can export on Dataset | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can write on ExploreFormDataRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on ExploreFormDataRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can write on ExplorePermalinkRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on ExplorePermalinkRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can export on ImportExportRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can import on ImportExportRestApi | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can export on SavedQuery | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| can dashboard permalink on Superset | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can grant guest token on SecurityRestApi | :heavy_check_mark: | O | O | O | +| can read on AdvancedDataType | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can read on EmbeddedDashboard | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can duplicate on Dataset | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can read on Explore | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can samples on Datasource | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can read on AvailableDomains | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | +| can get or create dataset on Dataset | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can get column values on Datasource | :heavy_check_mark: | :heavy_check_mark: | O | O | +| can export csv on SQLLab | :heavy_check_mark: | O | O | :heavy_check_mark: | +| can get results on SQLLab | :heavy_check_mark: | O | O | :heavy_check_mark: | +| can execute sql query on SQLLab | :heavy_check_mark: | O | O | :heavy_check_mark: | +| can recent activity on Log | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | O | diff --git a/UPDATING.md b/UPDATING.md index 18278d2029c4e..500841f4813e3 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -31,6 +31,7 @@ assists people when migrating to a new version. ### Breaking Changes +- [26369](https://github.com/apache/superset/issues/26369): Removes the Filter Sets feature including the deprecated `DASHBOARD_NATIVE_FILTERS_SET` feature flag and all related API endpoints. The feature is permanently removed as it was not being actively maintained, it was not widely used, and it was full of bugs. We also considered that if we were to provide a similar feature, it would be better to re-implement it from scratch given the amount of technical debt that the current implementation has. The previous value of the feature flag was `False` and now the feature is permanently removed. - [26343](https://github.com/apache/superset/issues/26343): Removes the deprecated `ENABLE_EXPLORE_DRAG_AND_DROP` feature flag. The previous value of the feature flag was `True` and now the feature is permanently enabled. - [26331](https://github.com/apache/superset/issues/26331): Removes the deprecated `DISABLE_DATASET_SOURCE_EDIT` feature flag. The previous value of the feature flag was `False` and now the feature is permanently removed. diff --git a/docs/static/resources/openapi.json b/docs/static/resources/openapi.json index 7f32a4aee26d9..13d5c8c21cead 100644 --- a/docs/static/resources/openapi.json +++ b/docs/static/resources/openapi.json @@ -124,11 +124,7 @@ "type": "object" }, "level": { - "enum": [ - "info", - "warning", - "error" - ], + "enum": ["info", "warning", "error"], "type": "string" }, "message": { @@ -210,12 +206,7 @@ "properties": { "annotationType": { "description": "Type of annotation layer", - "enum": [ - "FORMULA", - "INTERVAL", - "EVENT", - "TIME_SERIES" - ], + "enum": ["FORMULA", "INTERVAL", "EVENT", "TIME_SERIES"], "type": "string" }, "color": { @@ -246,12 +237,7 @@ }, "opacity": { "description": "Opacity of layer", - "enum": [ - "", - "opacityLow", - "opacityMedium", - "opacityHigh" - ], + "enum": ["", "opacityLow", "opacityMedium", "opacityHigh"], "nullable": true, "type": "string" }, @@ -278,22 +264,12 @@ }, "sourceType": { "description": "Type of source for annotation data", - "enum": [ - "", - "line", - "NATIVE", - "table" - ], + "enum": ["", "line", "NATIVE", "table"], "type": "string" }, "style": { "description": "Line style. Only applies to time-series annotations", - "enum": [ - "dashed", - "dotted", - "solid", - "longDashed" - ], + "enum": ["dashed", "dotted", "solid", "longDashed"], "type": "string" }, "timeColumn": { @@ -315,12 +291,7 @@ "type": "number" } }, - "required": [ - "name", - "show", - "showMarkers", - "value" - ], + "required": ["name", "show", "showMarkers", "value"], "type": "object" }, "AnnotationLayerRestApi.get": { @@ -387,10 +358,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "AnnotationLayerRestApi.get_list.User1": { @@ -404,10 +372,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "AnnotationLayerRestApi.post": { @@ -424,9 +389,7 @@ "type": "string" } }, - "required": [ - "name" - ], + "required": ["name"], "type": "object" }, "AnnotationLayerRestApi.put": { @@ -476,9 +439,7 @@ "type": "string" } }, - "required": [ - "layer" - ], + "required": ["layer"], "type": "object" }, "AnnotationRestApi.get.AnnotationLayer": { @@ -540,9 +501,7 @@ "type": "integer" } }, - "required": [ - "first_name" - ], + "required": ["first_name"], "type": "object" }, "AnnotationRestApi.get_list.User1": { @@ -555,9 +514,7 @@ "type": "integer" } }, - "required": [ - "first_name" - ], + "required": ["first_name"], "type": "object" }, "AnnotationRestApi.post": { @@ -589,11 +546,7 @@ "type": "string" } }, - "required": [ - "end_dttm", - "short_descr", - "start_dttm" - ], + "required": ["end_dttm", "short_descr", "start_dttm"], "type": "object" }, "AnnotationRestApi.put": { @@ -721,9 +674,7 @@ "type": "string" } }, - "required": [ - "chart_id" - ], + "required": ["chart_id"], "type": "object" }, "ChartCacheWarmUpResponseSchema": { @@ -759,14 +710,7 @@ "properties": { "aggregate": { "description": "Aggregation operator.Only required for simple expression types.", - "enum": [ - "AVG", - "COUNT", - "COUNT_DISTINCT", - "MAX", - "MIN", - "SUM" - ], + "enum": ["AVG", "COUNT", "COUNT_DISTINCT", "MAX", "MIN", "SUM"], "type": "string" }, "column": { @@ -774,10 +718,7 @@ }, "expressionType": { "description": "Simple or SQL metric", - "enum": [ - "SIMPLE", - "SQL" - ], + "enum": ["SIMPLE", "SQL"], "example": "SQL", "type": "string" }, @@ -811,9 +752,7 @@ "type": "string" } }, - "required": [ - "expressionType" - ], + "required": ["expressionType"], "type": "object" }, "ChartDataAggregateOptionsSchema": { @@ -878,25 +817,16 @@ }, "percentiles": { "description": "Upper and lower percentiles for percentile whisker type.", - "example": [ - 1, - 99 - ] + "example": [1, 99] }, "whisker_type": { "description": "Whisker type. Any numpy function will work.", - "enum": [ - "tukey", - "min/max", - "percentile" - ], + "enum": ["tukey", "min/max", "percentile"], "example": "tukey", "type": "string" } }, - "required": [ - "whisker_type" - ], + "required": ["whisker_type"], "type": "object" }, "ChartDataColumn": { @@ -918,17 +848,12 @@ "properties": { "orientation": { "description": "Should cell values be calculated across the row or column.", - "enum": [ - "row", - "column" - ], + "enum": ["row", "column"], "example": "row", "type": "string" } }, - "required": [ - "orientation" - ], + "required": ["orientation"], "type": "object" }, "ChartDataDatasource": { @@ -950,9 +875,7 @@ "type": "string" } }, - "required": [ - "id" - ], + "required": ["id"], "type": "object" }, "ChartDataExtras": { @@ -963,18 +886,12 @@ }, "relative_end": { "description": "End time for relative time deltas. Default: `config[\"DEFAULT_RELATIVE_START_TIME\"]`", - "enum": [ - "today", - "now" - ], + "enum": ["today", "now"], "type": "string" }, "relative_start": { "description": "Start time for relative time deltas. Default: `config[\"DEFAULT_RELATIVE_START_TIME\"]`", - "enum": [ - "today", - "now" - ], + "enum": ["today", "now"], "type": "string" }, "time_grain_sqla": { @@ -1055,18 +972,11 @@ }, "val": { "description": "The value or values to compare against. Can be a string, integer, decimal, None or list, depending on the operator.", - "example": [ - "China", - "France", - "Japan" - ], + "example": ["China", "France", "Japan"], "nullable": true } }, - "required": [ - "col", - "op" - ], + "required": ["col", "op"], "type": "object" }, "ChartDataGeodeticParseOptionsSchema": { @@ -1088,11 +998,7 @@ "type": "string" } }, - "required": [ - "geodetic", - "latitude", - "longitude" - ], + "required": ["geodetic", "latitude", "longitude"], "type": "object" }, "ChartDataGeohashDecodeOptionsSchema": { @@ -1110,11 +1016,7 @@ "type": "string" } }, - "required": [ - "geohash", - "latitude", - "longitude" - ], + "required": ["geohash", "latitude", "longitude"], "type": "object" }, "ChartDataGeohashEncodeOptionsSchema": { @@ -1132,11 +1034,7 @@ "type": "string" } }, - "required": [ - "geohash", - "latitude", - "longitude" - ], + "required": ["geohash", "latitude", "longitude"], "type": "object" }, "ChartDataPivotOptionsSchema": { @@ -1228,17 +1126,12 @@ } } }, - "groupby": [ - "country", - "gender" - ] + "groupby": ["country", "gender"] }, "type": "object" } }, - "required": [ - "operation" - ], + "required": ["operation"], "type": "object" }, "ChartDataProphetOptionsSchema": { @@ -1299,11 +1192,7 @@ "example": false } }, - "required": [ - "confidence_interval", - "periods", - "time_grain" - ], + "required": ["confidence_interval", "periods", "time_grain"], "type": "object" }, "ChartDataQueryContextSchema": { @@ -1331,11 +1220,7 @@ "type": "array" }, "result_format": { - "enum": [ - "csv", - "json", - "xlsx" - ] + "enum": ["csv", "json", "xlsx"] }, "result_type": { "enum": [ @@ -1452,14 +1337,8 @@ "orderby": { "description": "Expects a list of lists where the first element is the column name which to sort by, and the second element is a boolean.", "example": [ - [ - "my_col_1", - false - ], - [ - "my_col_2", - true - ] + ["my_col_1", false], + ["my_col_2", true] ], "items": {}, "nullable": true, @@ -1784,12 +1663,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -1808,10 +1682,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartDataRestApi.get_list": { @@ -1956,9 +1827,7 @@ "type": "string" } }, - "required": [ - "table_name" - ], + "required": ["table_name"], "type": "object" }, "ChartDataRestApi.get_list.Tag": { @@ -1972,12 +1841,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -1996,10 +1860,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartDataRestApi.get_list.User1": { @@ -2016,10 +1877,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartDataRestApi.get_list.User2": { @@ -2036,10 +1894,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartDataRestApi.get_list.User3": { @@ -2053,10 +1908,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartDataRestApi.post": { @@ -2147,21 +1999,13 @@ }, "viz_type": { "description": "The type of chart visualization used.", - "example": [ - "bar", - "area", - "table" - ], + "example": ["bar", "area", "table"], "maxLength": 250, "minLength": 0, "type": "string" } }, - "required": [ - "datasource_id", - "datasource_type", - "slice_name" - ], + "required": ["datasource_id", "datasource_type", "slice_name"], "type": "object" }, "ChartDataRestApi.put": { @@ -2256,11 +2100,7 @@ }, "viz_type": { "description": "The type of chart visualization used.", - "example": [ - "bar", - "area", - "table" - ], + "example": ["bar", "area", "table"], "maxLength": 250, "minLength": 0, "nullable": true, @@ -2341,21 +2181,14 @@ "type": "integer" } }, - "required": [ - "rolling_type", - "window" - ], + "required": ["rolling_type", "window"], "type": "object" }, "ChartDataSelectOptionsSchema": { "properties": { "columns": { "description": "Columns which to select from the input data, in the desired order. If columns are renamed, the original column name should be referenced here.", - "example": [ - "country", - "gender", - "age" - ], + "example": ["country", "gender", "age"], "items": { "type": "string" }, @@ -2363,9 +2196,7 @@ }, "exclude": { "description": "Columns to exclude from selection.", - "example": [ - "my_temp_column" - ], + "example": ["my_temp_column"], "items": { "type": "string" }, @@ -2410,9 +2241,7 @@ "type": "object" } }, - "required": [ - "columns" - ], + "required": ["columns"], "type": "object" }, "ChartEntityResponseSchema": { @@ -2602,12 +2431,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -2626,10 +2450,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartRestApi.get_list": { @@ -2774,9 +2595,7 @@ "type": "string" } }, - "required": [ - "table_name" - ], + "required": ["table_name"], "type": "object" }, "ChartRestApi.get_list.Tag": { @@ -2790,12 +2609,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -2814,10 +2628,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartRestApi.get_list.User1": { @@ -2834,10 +2645,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartRestApi.get_list.User2": { @@ -2854,10 +2662,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartRestApi.get_list.User3": { @@ -2871,10 +2676,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ChartRestApi.post": { @@ -2965,21 +2767,13 @@ }, "viz_type": { "description": "The type of chart visualization used.", - "example": [ - "bar", - "area", - "table" - ], + "example": ["bar", "area", "table"], "maxLength": 250, "minLength": 0, "type": "string" } }, - "required": [ - "datasource_id", - "datasource_type", - "slice_name" - ], + "required": ["datasource_id", "datasource_type", "slice_name"], "type": "object" }, "ChartRestApi.put": { @@ -3074,11 +2868,7 @@ }, "viz_type": { "description": "The type of chart visualization used.", - "example": [ - "bar", - "area", - "table" - ], + "example": ["bar", "area", "table"], "maxLength": 250, "minLength": 0, "nullable": true, @@ -3121,10 +2911,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "CssTemplateRestApi.get_list": { @@ -3172,10 +2959,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "CssTemplateRestApi.get_list.User1": { @@ -3192,10 +2976,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "CssTemplateRestApi.post": { @@ -3248,9 +3029,7 @@ "type": "string" } }, - "required": [ - "json_metadata" - ], + "required": ["json_metadata"], "type": "object" }, "DashboardDatasetSchema": { @@ -3607,9 +3386,7 @@ "type": "string" } }, - "required": [ - "name" - ], + "required": ["name"], "type": "object" }, "DashboardRestApi.get_list.Tag": { @@ -3623,12 +3400,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -3647,10 +3419,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DashboardRestApi.get_list.User1": { @@ -3667,10 +3436,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DashboardRestApi.get_list.User2": { @@ -3687,10 +3453,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DashboardRestApi.post": { @@ -4143,9 +3906,7 @@ "type": "string" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "DatabaseRestApi.get_list": { @@ -4228,9 +3989,7 @@ "type": "string" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "DatabaseRestApi.get_list.User": { @@ -4244,10 +4003,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DatabaseRestApi.post": { @@ -4280,10 +4036,7 @@ "configuration_method": { "default": "sqlalchemy_form", "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri.", - "enum": [ - "sqlalchemy_form", - "dynamic_form" - ] + "enum": ["sqlalchemy_form", "dynamic_form"] }, "database_name": { "description": "A database name to identify this connection.", @@ -4361,9 +4114,7 @@ "type": "string" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "DatabaseRestApi.put": { @@ -4396,10 +4147,7 @@ "configuration_method": { "default": "sqlalchemy_form", "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri.", - "enum": [ - "sqlalchemy_form", - "dynamic_form" - ] + "enum": ["sqlalchemy_form", "dynamic_form"] }, "database_name": { "description": "A database name to identify this connection.", @@ -4542,10 +4290,7 @@ "configuration_method": { "default": "sqlalchemy_form", "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri.", - "enum": [ - "sqlalchemy_form", - "dynamic_form" - ] + "enum": ["sqlalchemy_form", "dynamic_form"] }, "database_name": { "description": "A database name to identify this connection.", @@ -4615,10 +4360,7 @@ }, "configuration_method": { "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri.", - "enum": [ - "sqlalchemy_form", - "dynamic_form" - ] + "enum": ["sqlalchemy_form", "dynamic_form"] }, "database_name": { "description": "A database name to identify this connection.", @@ -4667,10 +4409,7 @@ "type": "string" } }, - "required": [ - "configuration_method", - "engine" - ], + "required": ["configuration_method", "engine"], "type": "object" }, "Dataset": { @@ -4860,10 +4599,7 @@ "type": "string" } }, - "required": [ - "db_name", - "table_name" - ], + "required": ["db_name", "table_name"], "type": "object" }, "DatasetCacheWarmUpResponseSchema": { @@ -4957,9 +4693,7 @@ "type": "string" } }, - "required": [ - "column_name" - ], + "required": ["column_name"], "type": "object" }, "DatasetColumnsRestApi.get": { @@ -5005,10 +4739,7 @@ "type": "string" } }, - "required": [ - "base_model_id", - "table_name" - ], + "required": ["base_model_id", "table_name"], "type": "object" }, "DatasetMetricRestApi.get": { @@ -5096,10 +4827,7 @@ "type": "string" } }, - "required": [ - "expression", - "metric_name" - ], + "required": ["expression", "metric_name"], "type": "object" }, "DatasetRelatedChart": { @@ -5312,12 +5040,7 @@ "readOnly": true } }, - "required": [ - "columns", - "database", - "metrics", - "table_name" - ], + "required": ["columns", "database", "metrics", "table_name"], "type": "object" }, "DatasetRestApi.get.Database": { @@ -5333,9 +5056,7 @@ "type": "integer" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "DatasetRestApi.get.SqlMetric": { @@ -5393,10 +5114,7 @@ "type": "string" } }, - "required": [ - "expression", - "metric_name" - ], + "required": ["expression", "metric_name"], "type": "object" }, "DatasetRestApi.get.TableColumn": { @@ -5474,9 +5192,7 @@ "type": "string" } }, - "required": [ - "column_name" - ], + "required": ["column_name"], "type": "object" }, "DatasetRestApi.get.User": { @@ -5490,10 +5206,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DatasetRestApi.get.User1": { @@ -5510,10 +5223,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DatasetRestApi.get.User2": { @@ -5527,10 +5237,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DatasetRestApi.get_list": { @@ -5591,10 +5298,7 @@ "type": "string" } }, - "required": [ - "database", - "table_name" - ], + "required": ["database", "table_name"], "type": "object" }, "DatasetRestApi.get_list.Database": { @@ -5607,9 +5311,7 @@ "type": "integer" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "DatasetRestApi.get_list.User": { @@ -5626,10 +5328,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DatasetRestApi.get_list.User1": { @@ -5643,10 +5342,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "DatasetRestApi.post": { @@ -5684,10 +5380,7 @@ "type": "string" } }, - "required": [ - "database", - "table_name" - ], + "required": ["database", "table_name"], "type": "object" }, "DatasetRestApi.put": { @@ -5809,9 +5502,7 @@ "type": "string" } }, - "required": [ - "datasource_type" - ], + "required": ["datasource_type"], "type": "object" }, "DistincResponseSchema": { @@ -5847,9 +5538,7 @@ "type": "array" } }, - "required": [ - "allowed_domains" - ], + "required": ["allowed_domains"], "type": "object" }, "EmbeddedDashboardResponseSchema": { @@ -5932,10 +5621,7 @@ "type": "object" } }, - "required": [ - "database_id", - "sql" - ], + "required": ["database_id", "sql"], "type": "object" }, "ExecutePayloadSchema": { @@ -5995,10 +5681,7 @@ "type": "string" } }, - "required": [ - "database_id", - "sql" - ], + "required": ["database_id", "sql"], "type": "object" }, "ExploreContextSchema": { @@ -6036,177 +5719,59 @@ "type": "array" } }, - "required": [ - "formData" - ], + "required": ["formData"], "type": "object" }, - "FilterSetRestApi.get": { + "FormDataPostSchema": { "properties": { - "dashboard_id": { - "nullable": true, + "chart_id": { + "description": "The chart ID", "type": "integer" }, - "description": { - "nullable": true, - "type": "string" - }, - "id": { + "datasource_id": { + "description": "The datasource ID", "type": "integer" }, - "name": { - "maxLength": 500, + "datasource_type": { + "description": "The datasource type", + "enum": [ + "sl_table", + "table", + "dataset", + "query", + "saved_query", + "view" + ], "type": "string" }, - "owner_id": { - "type": "integer" - }, - "owner_type": { - "maxLength": 255, + "form_data": { + "description": "Any type of JSON supported text.", "type": "string" - }, - "params": { - "readOnly": true } }, - "required": [ - "name", - "owner_id", - "owner_type" - ], + "required": ["datasource_id", "datasource_type", "form_data"], "type": "object" }, - "FilterSetRestApi.get_list": { + "FormDataPutSchema": { "properties": { - "changed_by_fk": { - "nullable": true, + "chart_id": { + "description": "The chart ID", "type": "integer" }, - "changed_on": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "created_by_fk": { - "nullable": true, + "datasource_id": { + "description": "The datasource ID", "type": "integer" }, - "created_on": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "dashboard_id": { - "nullable": true, - "type": "integer" - }, - "description": { - "nullable": true, - "type": "string" - }, - "id": { - "type": "integer" - }, - "name": { - "maxLength": 500, - "type": "string" - }, - "owner_id": { - "type": "integer" - }, - "owner_type": { - "maxLength": 255, - "type": "string" - }, - "params": { - "readOnly": true - } - }, - "required": [ - "name", - "owner_id", - "owner_type" - ], - "type": "object" - }, - "FilterSetRestApi.post": { - "properties": { - "description": { - "maxLength": 1000, - "minLength": 1, - "nullable": true, - "type": "string" - }, - "json_metadata": { - "type": "string" - }, - "name": { - "maxLength": 500, - "minLength": 0, - "type": "string" - }, - "owner_id": { - "type": "integer" - }, - "owner_type": { - "enum": [ - "User", - "Dashboard" - ], - "type": "string" - } - }, - "required": [ - "json_metadata", - "name", - "owner_type" - ], - "type": "object" - }, - "FilterSetRestApi.put": { - "properties": { - "description": { - "maxLength": 1000, - "minLength": 1, - "type": "string" - }, - "json_metadata": { - "type": "string" - }, - "name": { - "maxLength": 500, - "minLength": 0, - "type": "string" - }, - "owner_type": { - "enum": [ - "Dashboard" - ], - "type": "string" - } - }, - "type": "object" - }, - "FormDataPostSchema": { - "properties": { - "chart_id": { - "description": "The chart ID", - "type": "integer" - }, - "datasource_id": { - "description": "The datasource ID", - "type": "integer" - }, - "datasource_type": { - "description": "The datasource type", - "enum": [ - "sl_table", - "table", - "dataset", - "query", - "saved_query", - "view" - ], + "datasource_type": { + "description": "The datasource type", + "enum": [ + "sl_table", + "table", + "dataset", + "query", + "saved_query", + "view" + ], "type": "string" }, "form_data": { @@ -6214,45 +5779,7 @@ "type": "string" } }, - "required": [ - "datasource_id", - "datasource_type", - "form_data" - ], - "type": "object" - }, - "FormDataPutSchema": { - "properties": { - "chart_id": { - "description": "The chart ID", - "type": "integer" - }, - "datasource_id": { - "description": "The datasource ID", - "type": "integer" - }, - "datasource_type": { - "description": "The datasource type", - "enum": [ - "sl_table", - "table", - "dataset", - "query", - "saved_query", - "view" - ], - "type": "string" - }, - "form_data": { - "description": "Any type of JSON supported text.", - "type": "string" - } - }, - "required": [ - "datasource_id", - "datasource_type", - "form_data" - ], + "required": ["datasource_id", "datasource_type", "form_data"], "type": "object" }, "GetFavStarIdsSchema": { @@ -6289,10 +5816,7 @@ "type": "string" } }, - "required": [ - "database_id", - "table_name" - ], + "required": ["database_id", "table_name"], "type": "object" }, "GuestTokenCreate": { @@ -6313,10 +5837,7 @@ "$ref": "#/components/schemas/User2" } }, - "required": [ - "resources", - "rls" - ], + "required": ["resources", "rls"], "type": "object" }, "LogRestApi.get": { @@ -6369,9 +5890,7 @@ "type": "string" } }, - "required": [ - "username" - ], + "required": ["username"], "type": "object" }, "LogRestApi.get_list": { @@ -6424,9 +5943,7 @@ "type": "string" } }, - "required": [ - "username" - ], + "required": ["username"], "type": "object" }, "LogRestApi.post": { @@ -6605,10 +6122,7 @@ "readOnly": true } }, - "required": [ - "client_id", - "database" - ], + "required": ["client_id", "database"], "type": "object" }, "QueryRestApi.get.Database": { @@ -6789,10 +6303,7 @@ }, "filter_type": { "description": "filter_type_description", - "enum": [ - "Regular", - "Base" - ], + "enum": ["Regular", "Base"], "type": "string" }, "group_key": { @@ -6837,10 +6348,7 @@ }, "filter_type": { "description": "filter_type_description", - "enum": [ - "Regular", - "Base" - ], + "enum": ["Regular", "Base"], "type": "string" }, "group_key": { @@ -6883,10 +6391,7 @@ }, "filter_type": { "description": "filter_type_description", - "enum": [ - "Regular", - "Base" - ], + "enum": ["Regular", "Base"], "type": "string" }, "group_key": { @@ -6916,13 +6421,7 @@ "type": "array" } }, - "required": [ - "clause", - "filter_type", - "name", - "roles", - "tables" - ], + "required": ["clause", "filter_type", "name", "roles", "tables"], "type": "object" }, "RLSRestApi.put": { @@ -6938,10 +6437,7 @@ }, "filter_type": { "description": "filter_type_description", - "enum": [ - "Regular", - "Base" - ], + "enum": ["Regular", "Base"], "type": "string" }, "group_key": { @@ -7115,10 +6611,7 @@ "type": "string" } }, - "required": [ - "scheduled_dttm", - "state" - ], + "required": ["scheduled_dttm", "state"], "type": "object" }, "ReportExecutionLogRestApi.get_list": { @@ -7162,10 +6655,7 @@ "type": "string" } }, - "required": [ - "scheduled_dttm", - "state" - ], + "required": ["scheduled_dttm", "state"], "type": "object" }, "ReportExecutionLogRestApi.post": { @@ -7191,16 +6681,11 @@ }, "type": { "description": "The recipient type, check spec for valid options", - "enum": [ - "Email", - "Slack" - ], + "enum": ["Email", "Slack"], "type": "string" } }, - "required": [ - "type" - ], + "required": ["type"], "type": "object" }, "ReportRecipientConfigJSON": { @@ -7324,12 +6809,7 @@ "type": "integer" } }, - "required": [ - "crontab", - "name", - "recipients", - "type" - ], + "required": ["crontab", "name", "recipients", "type"], "type": "object" }, "ReportScheduleRestApi.get.Dashboard": { @@ -7355,9 +6835,7 @@ "type": "integer" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "ReportScheduleRestApi.get.ReportRecipients": { @@ -7374,9 +6852,7 @@ "type": "string" } }, - "required": [ - "type" - ], + "required": ["type"], "type": "object" }, "ReportScheduleRestApi.get.Slice": { @@ -7411,10 +6887,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ReportScheduleRestApi.get_list": { @@ -7501,12 +6974,7 @@ "type": "string" } }, - "required": [ - "crontab", - "name", - "recipients", - "type" - ], + "required": ["crontab", "name", "recipients", "type"], "type": "object" }, "ReportScheduleRestApi.get_list.ReportRecipients": { @@ -7519,9 +6987,7 @@ "type": "string" } }, - "required": [ - "type" - ], + "required": ["type"], "type": "object" }, "ReportScheduleRestApi.get_list.User": { @@ -7535,10 +7001,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ReportScheduleRestApi.get_list.User1": { @@ -7555,10 +7018,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ReportScheduleRestApi.get_list.User2": { @@ -7572,10 +7032,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "ReportScheduleRestApi.post": { @@ -7594,11 +7051,7 @@ }, "creation_method": { "description": "Creation method is used to inform the frontend whether the report/alert was created in the dashboard, chart, or alerts and reports UI.", - "enum": [ - "charts", - "dashboards", - "alerts_reports" - ] + "enum": ["charts", "dashboards", "alerts_reports"] }, "crontab": { "description": "A CRON expression.[Crontab Guru](https://crontab.guru/) is a helpful resource that can help you craft a CRON expression.", @@ -7665,11 +7118,7 @@ "type": "array" }, "report_format": { - "enum": [ - "PNG", - "CSV", - "TEXT" - ], + "enum": ["PNG", "CSV", "TEXT"], "type": "string" }, "selected_tabs": { @@ -8286,10 +7735,7 @@ }, "type": { "description": "The report schedule type", - "enum": [ - "Alert", - "Report" - ], + "enum": ["Alert", "Report"], "type": "string" }, "validator_config_json": { @@ -8297,10 +7743,7 @@ }, "validator_type": { "description": "Determines when to trigger alert based off value from alert query. Alerts will be triggered with these validator types:\n- Not Null - When the return value is Not NULL, Empty, or 0\n- Operator - When `sql_return_value comparison_operator threshold` is True e.g. `50 <= 75`
Supports the comparison operators <, <=, >, >=, ==, and !=", - "enum": [ - "not null", - "operator" - ], + "enum": ["not null", "operator"], "type": "string" }, "working_timeout": { @@ -8310,11 +7753,7 @@ "type": "integer" } }, - "required": [ - "crontab", - "name", - "type" - ], + "required": ["crontab", "name", "type"], "type": "object" }, "ReportScheduleRestApi.put": { @@ -8333,11 +7772,7 @@ }, "creation_method": { "description": "Creation method is used to inform the frontend whether the report/alert was created in the dashboard, chart, or alerts and reports UI.", - "enum": [ - "charts", - "dashboards", - "alerts_reports" - ], + "enum": ["charts", "dashboards", "alerts_reports"], "nullable": true }, "crontab": { @@ -8403,11 +7838,7 @@ "type": "array" }, "report_format": { - "enum": [ - "PNG", - "CSV", - "TEXT" - ], + "enum": ["PNG", "CSV", "TEXT"], "type": "string" }, "sql": { @@ -9018,10 +8449,7 @@ }, "type": { "description": "The report schedule type", - "enum": [ - "Alert", - "Report" - ], + "enum": ["Alert", "Report"], "type": "string" }, "validator_config_json": { @@ -9029,10 +8457,7 @@ }, "validator_type": { "description": "Determines when to trigger alert based off value from alert query. Alerts will be triggered with these validator types:\n- Not Null - When the return value is Not NULL, Empty, or 0\n- Operator - When `sql_return_value comparison_operator threshold` is True e.g. `50 <= 75`
Supports the comparison operators <, <=, >, >=, ==, and !=", - "enum": [ - "not null", - "operator" - ], + "enum": ["not null", "operator"], "nullable": true, "type": "string" }, @@ -9052,15 +8477,10 @@ "type": "string" }, "type": { - "enum": [ - "dashboard" - ] + "enum": ["dashboard"] } }, - "required": [ - "id", - "type" - ], + "required": ["id", "type"], "type": "object" }, "RlsRule": { @@ -9072,9 +8492,7 @@ "type": "integer" } }, - "required": [ - "clause" - ], + "required": ["clause"], "type": "object" }, "Roles": { @@ -9151,9 +8569,7 @@ "type": "integer" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "SavedQueryRestApi.get.User": { @@ -9170,10 +8586,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "SavedQueryRestApi.get_list": { @@ -9246,9 +8659,7 @@ "type": "integer" } }, - "required": [ - "database_name" - ], + "required": ["database_name"], "type": "object" }, "SavedQueryRestApi.get_list.Tag": { @@ -9262,12 +8673,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -9286,10 +8692,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "SavedQueryRestApi.post": { @@ -9639,12 +9042,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -9658,12 +9056,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -9702,12 +9095,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -9766,12 +9154,7 @@ "type": "string" } }, - "required": [ - "email", - "first_name", - "last_name", - "username" - ], + "required": ["email", "first_name", "last_name", "username"], "type": "object" }, "TagRestApi.get.User1": { @@ -9785,10 +9168,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "TagRestApi.get_list": { @@ -9811,12 +9191,7 @@ "type": "string" }, "type": { - "enum": [ - 1, - 2, - 3, - 4 - ] + "enum": [1, 2, 3, 4] } }, "type": "object" @@ -9832,10 +9207,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "TagRestApi.get_list.User1": { @@ -9849,10 +9221,7 @@ "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], + "required": ["first_name", "last_name"], "type": "object" }, "TagRestApi.post": { @@ -9908,9 +9277,7 @@ "type": "string" } }, - "required": [ - "value" - ], + "required": ["value"], "type": "object" }, "TemporaryCachePutSchema": { @@ -9920,9 +9287,7 @@ "type": "string" } }, - "required": [ - "value" - ], + "required": ["value"], "type": "object" }, "User": { @@ -10011,9 +9376,7 @@ "type": "object" } }, - "required": [ - "sql" - ], + "required": ["sql"], "type": "object" }, "ValidateSQLResponse": { @@ -10037,14 +9400,7 @@ "properties": { "op": { "description": "The operation to compare with a threshold to apply to the SQL output\n", - "enum": [ - "<", - "<=", - ">", - ">=", - "==", - "!=" - ], + "enum": ["<", "<=", ">", ">=", "==", "!="], "type": "string" }, "threshold": { @@ -10067,10 +9423,7 @@ "type": "array" } }, - "required": [ - "type", - "values" - ], + "required": ["type", "values"], "type": "object" }, "database_schemas_query_schema": { @@ -10090,9 +9443,7 @@ "type": "string" } }, - "required": [ - "schema_name" - ], + "required": ["schema_name"], "type": "object" }, "delete_tags_schema": { @@ -10225,11 +9576,7 @@ ] } }, - "required": [ - "col", - "opr", - "value" - ], + "required": ["col", "opr", "value"], "type": "object" }, "type": "array" @@ -10252,10 +9599,7 @@ "type": "string" }, "order_direction": { - "enum": [ - "asc", - "desc" - ], + "enum": ["asc", "desc"], "type": "string" }, "page": { @@ -10313,9 +9657,7 @@ "type": "number" } }, - "required": [ - "last_updated_ms" - ], + "required": ["last_updated_ms"], "type": "object" }, "screenshot_query_schema": { @@ -10344,9 +9686,7 @@ "type": "string" } }, - "required": [ - "key" - ], + "required": ["key"], "type": "object" }, "thumbnail_query_schema": { @@ -10423,9 +9763,7 @@ } ], "summary": "Returns a AdvancedDataTypeResponse object populated with the passed in args.", - "tags": [ - "Advanced Data Type" - ] + "tags": ["Advanced Data Type"] } }, "/api/v1/advanced_data_type/types": { @@ -10465,9 +9803,7 @@ "jwt": [] } ], - "tags": [ - "Advanced Data Type" - ] + "tags": ["Advanced Data Type"] } }, "/api/v1/annotation_layer/": { @@ -10520,9 +9856,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "get": { "description": "Get a list of Annotation layers, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -10627,9 +9961,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "post": { "description": "Create an Annotation layer", @@ -10681,9 +10013,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] } }, "/api/v1/annotation_layer/_info": { @@ -10767,9 +10097,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] } }, "/api/v1/annotation_layer/related/{column_name}": { @@ -10824,9 +10152,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] } }, "/api/v1/annotation_layer/{pk}": { @@ -10874,9 +10200,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "get": { "description": "Get an Annotation layer", @@ -10974,9 +10298,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "put": { "description": "Update an Annotation layer", @@ -11039,9 +10361,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] } }, "/api/v1/annotation_layer/{pk}/annotation/": { @@ -11103,9 +10423,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "get": { "description": "Get a list of Annotation layers, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -11180,9 +10498,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "post": { "description": "Create an Annotation layer", @@ -11245,9 +10561,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] } }, "/api/v1/annotation_layer/{pk}/annotation/{annotation_id}": { @@ -11304,9 +10618,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "get": { "description": "Get an Annotation layer", @@ -11382,9 +10694,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] }, "put": { "description": "Update an Annotation layer", @@ -11456,9 +10766,7 @@ "jwt": [] } ], - "tags": [ - "Annotation Layers" - ] + "tags": ["Annotation Layers"] } }, "/api/v1/assets/export/": { @@ -11491,9 +10799,7 @@ "jwt": [] } ], - "tags": [ - "Import/export" - ] + "tags": ["Import/export"] } }, "/api/v1/assets/import/": { @@ -11565,9 +10871,7 @@ "jwt": [] } ], - "tags": [ - "Import/export" - ] + "tags": ["Import/export"] } }, "/api/v1/async_event/": { @@ -11640,9 +10944,7 @@ "jwt": [] } ], - "tags": [ - "AsyncEventsRestApi" - ] + "tags": ["AsyncEventsRestApi"] } }, "/api/v1/available_domains/": { @@ -11676,9 +10978,7 @@ "jwt": [] } ], - "tags": [ - "Available Domains" - ] + "tags": ["Available Domains"] } }, "/api/v1/cachekey/invalidate": { @@ -11711,9 +11011,7 @@ "jwt": [] } ], - "tags": [ - "CacheRestApi" - ] + "tags": ["CacheRestApi"] } }, "/api/v1/chart/": { @@ -11769,9 +11067,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] }, "get": { "description": "Get a list of charts, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -11876,9 +11172,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] }, "post": { "description": "Create a new Chart.", @@ -11933,9 +11227,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/_info": { @@ -12019,9 +11311,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/data": { @@ -12074,9 +11364,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/data/{cache_key}": { @@ -12124,9 +11412,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/export/": { @@ -12175,9 +11461,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/favorite_status/": { @@ -12225,9 +11509,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/import/": { @@ -12303,9 +11585,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/related/{column_name}": { @@ -12361,9 +11641,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/warm_up_cache": { @@ -12407,9 +11685,7 @@ } ], "summary": "Warms up the cache for the chart", - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/{pk}": { @@ -12462,9 +11738,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] }, "get": { "description": "Get a chart detail information.", @@ -12562,9 +11836,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] }, "put": { "description": "Changes a Chart.", @@ -12632,9 +11904,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/{pk}/cache_screenshot/": { @@ -12690,9 +11960,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/{pk}/data/": { @@ -12769,9 +12037,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/{pk}/favorites/": { @@ -12818,9 +12084,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] }, "post": { "description": "Marks the chart as favorite for the current user", @@ -12865,9 +12129,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/{pk}/screenshot/{digest}/": { @@ -12921,9 +12183,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/chart/{pk}/thumbnail/{digest}/": { @@ -12980,9 +12240,7 @@ "jwt": [] } ], - "tags": [ - "Charts" - ] + "tags": ["Charts"] } }, "/api/v1/css_template/": { @@ -13035,9 +12293,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] }, "get": { "description": "Get a list of CSS templates, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -13142,9 +12398,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] }, "post": { "description": "Create a CSS template", @@ -13196,9 +12450,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] } }, "/api/v1/css_template/_info": { @@ -13282,9 +12534,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] } }, "/api/v1/css_template/related/{column_name}": { @@ -13339,9 +12589,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] } }, "/api/v1/css_template/{pk}": { @@ -13388,9 +12636,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] }, "get": { "description": "Get a CSS template", @@ -13488,9 +12734,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] }, "put": { "description": "Update a CSS template", @@ -13552,9 +12796,7 @@ "jwt": [] } ], - "tags": [ - "CSS Templates" - ] + "tags": ["CSS Templates"] } }, "/api/v1/dashboard/": { @@ -13610,9 +12852,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] }, "get": { "description": "Get a list of dashboards, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -13717,9 +12957,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] }, "post": { "description": "Create a new Dashboard.", @@ -13771,9 +13009,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/_info": { @@ -13857,9 +13093,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/export/": { @@ -13910,9 +13144,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/favorite_status/": { @@ -13960,9 +13192,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/import/": { @@ -14038,9 +13268,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/permalink/{key}": { @@ -14094,9 +13322,7 @@ "jwt": [] } ], - "tags": [ - "Dashboard Permanent Link" - ] + "tags": ["Dashboard Permanent Link"] } }, "/api/v1/dashboard/related/{column_name}": { @@ -14152,294 +13378,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] - } - }, - "/api/v1/dashboard/{dashboard_id}/filtersets": { - "get": { - "description": "Get a dashboard's list of filter sets", - "parameters": [ - { - "description": "The id of the dashboard", - "in": "path", - "name": "dashboard_id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "properties": { - "description": { - "description": "A description field of the filter set", - "type": "string" - }, - "json_metadata": { - "description": "metadata of the filter set", - "type": "string" - }, - "name": { - "description": "Name of the Filter set", - "type": "string" - }, - "owner_id": { - "description": "A description field of the filter set", - "type": "integer" - }, - "owner_type": { - "description": "the Type of the owner ( Dashboard/User)", - "type": "integer" - }, - "parameters": { - "description": "JSON schema defining the needed parameters" - } - }, - "type": "object" - }, - "type": "array" - } - } - }, - "description": "FilterSets" - }, - "302": { - "description": "Redirects to the current digest" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "jwt": [] - } - ], - "tags": [ - "FilterSetRestApi" - ] - }, - "post": { - "description": "Create a new Dashboard's Filter Set.", - "parameters": [ - { - "description": "The id of the dashboard", - "in": "path", - "name": "dashboard_id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FilterSetRestApi.post" - } - } - }, - "description": "Filter set schema", - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "type": "number" - }, - "result": { - "$ref": "#/components/schemas/FilterSetRestApi.post" - } - }, - "type": "object" - } - } - }, - "description": "Filter set added" - }, - "302": { - "description": "Redirects to the current digest" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "security": [ - { - "jwt": [] - } - ], - "tags": [ - "FilterSetRestApi" - ] - } - }, - "/api/v1/dashboard/{dashboard_id}/filtersets/{pk}": { - "delete": { - "description": "Deletes a Dashboard.", - "parameters": [ - { - "in": "path", - "name": "dashboard_id", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "Filter set deleted" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "security": [ - { - "jwt": [] - } - ], - "tags": [ - "FilterSetRestApi" - ] - }, - "put": { - "description": "Changes a Dashboard's Filter set.", - "parameters": [ - { - "in": "path", - "name": "dashboard_id", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FilterSetRestApi.put" - } - } - }, - "description": "Filter set schema", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "type": "number" - }, - "result": { - "$ref": "#/components/schemas/FilterSetRestApi.put" - } - }, - "type": "object" - } - } - }, - "description": "Filter set changed" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "security": [ - { - "jwt": [] - } - ], - "tags": [ - "FilterSetRestApi" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{id_or_slug}": { @@ -14490,9 +13429,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{id_or_slug}/charts": { @@ -14545,9 +13482,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{id_or_slug}/copy/": { @@ -14614,9 +13549,7 @@ } ], "summary": "Makes a copy of an existing dashboard", - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{id_or_slug}/datasets": { @@ -14670,9 +13603,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{id_or_slug}/embedded": { @@ -14717,9 +13648,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] }, "get": { "description": "Returns the dashboard's embedded configuration", @@ -14762,9 +13691,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] }, "post": { "description": "Sets a dashboard's embedded configuration.", @@ -14818,9 +13745,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] }, "put": { "description": "Sets a dashboard's embedded configuration.", @@ -14874,9 +13799,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{pk}": { @@ -14929,9 +13852,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] }, "put": { "description": "Changes a Dashboard.", @@ -15002,9 +13923,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{pk}/favorites/": { @@ -15051,9 +13970,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] }, "post": { "description": "Marks the dashboard as favorite for the current user", @@ -15098,9 +14015,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/dashboard/{pk}/filter_state": { @@ -15168,9 +14083,7 @@ "jwt": [] } ], - "tags": [ - "Dashboard Filter State" - ] + "tags": ["Dashboard Filter State"] } }, "/api/v1/dashboard/{pk}/filter_state/{key}": { @@ -15233,9 +14146,7 @@ "jwt": [] } ], - "tags": [ - "Dashboard Filter State" - ] + "tags": ["Dashboard Filter State"] }, "get": { "description": "Retrives a value.", @@ -15295,9 +14206,7 @@ "jwt": [] } ], - "tags": [ - "Dashboard Filter State" - ] + "tags": ["Dashboard Filter State"] }, "put": { "description": "Updates an existing value.", @@ -15374,9 +14283,7 @@ "jwt": [] } ], - "tags": [ - "Dashboard Filter State" - ] + "tags": ["Dashboard Filter State"] } }, "/api/v1/dashboard/{pk}/permalink": { @@ -15441,9 +14348,7 @@ "jwt": [] } ], - "tags": [ - "Dashboard Permanent Link" - ] + "tags": ["Dashboard Permanent Link"] } }, "/api/v1/dashboard/{pk}/thumbnail/{digest}/": { @@ -15527,9 +14432,7 @@ "jwt": [] } ], - "tags": [ - "Dashboards" - ] + "tags": ["Dashboards"] } }, "/api/v1/database/": { @@ -15636,9 +14539,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] }, "post": { "description": "Create a new Database.", @@ -15690,9 +14591,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/_info": { @@ -15776,9 +14675,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/available/": { @@ -15857,9 +14754,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/export/": { @@ -15905,9 +14800,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/import/": { @@ -15983,9 +14876,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/test_connection/": { @@ -16033,9 +14924,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/validate_parameters/": { @@ -16083,9 +14972,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}": { @@ -16138,9 +15025,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] }, "get": { "description": "Get a database", @@ -16184,9 +15069,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] }, "put": { "description": "Changes a Database.", @@ -16254,9 +15137,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/connection": { @@ -16302,9 +15183,7 @@ } ], "summary": "Get a database connection info", - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/function_names/": { @@ -16346,9 +15225,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/related_objects/": { @@ -16390,9 +15267,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/schemas/": { @@ -16449,9 +15324,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/schemas_access_for_file_upload/": { @@ -16493,9 +15366,7 @@ } ], "summary": "The list of the database schemas where to upload information", - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/select_star/{table_name}/": { @@ -16562,9 +15433,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/select_star/{table_name}/{schema_name}/": { @@ -16631,9 +15500,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/ssh_tunnel/": { @@ -16686,9 +15553,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/table/{table_name}/{schema_name}/": { @@ -16755,9 +15620,7 @@ "jwt": [] } ], - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/table_extra/{table_name}/{schema_name}/": { @@ -16825,9 +15688,7 @@ } ], "summary": "Get table extra metadata", - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/tables/": { @@ -16899,9 +15760,7 @@ } ], "summary": "Get a list of tables for given database", - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/database/{pk}/validate_sql/": { @@ -16967,9 +15826,7 @@ } ], "summary": "Validates that arbitrary sql is acceptable for the given database", - "tags": [ - "Database" - ] + "tags": ["Database"] } }, "/api/v1/dataset/": { @@ -17028,9 +15885,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] }, "get": { "description": "Get a list of models", @@ -17135,9 +15990,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] }, "post": { "description": "Create a new Dataset", @@ -17189,9 +16042,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/_info": { @@ -17275,9 +16126,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/distinct/{column_name}": { @@ -17332,9 +16181,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/duplicate": { @@ -17394,9 +16241,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/export/": { @@ -17444,9 +16289,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/get_or_create/": { @@ -17501,9 +16344,7 @@ } ], "summary": "Retrieve a table by name, or create it if it does not exist", - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/import/": { @@ -17587,9 +16428,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/related/{column_name}": { @@ -17644,9 +16483,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/warm_up_cache": { @@ -17690,9 +16527,7 @@ } ], "summary": "Warms up the cache for each chart powered by the given table", - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/{pk}": { @@ -17745,9 +16580,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] }, "get": { "description": "Get an item model", @@ -17845,9 +16678,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] }, "put": { "description": "Changes a Dataset", @@ -17922,9 +16753,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/{pk}/column/{column_id}": { @@ -17987,9 +16816,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/{pk}/metric/{metric_id}": { @@ -18052,9 +16879,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/{pk}/refresh": { @@ -18107,9 +16932,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/dataset/{pk}/related_objects": { @@ -18151,9 +16974,7 @@ "jwt": [] } ], - "tags": [ - "Datasets" - ] + "tags": ["Datasets"] } }, "/api/v1/datasource/{datasource_type}/{datasource_id}/column/{column_name}/values/": { @@ -18244,9 +17065,7 @@ } ], "summary": "Get possible values for a datasource column", - "tags": [ - "Datasources" - ] + "tags": ["Datasources"] } }, "/api/v1/embedded_dashboard/{uuid}": { @@ -18294,9 +17113,7 @@ "jwt": [] } ], - "tags": [ - "Embedded Dashboard" - ] + "tags": ["Embedded Dashboard"] } }, "/api/v1/explore/": { @@ -18372,9 +17189,7 @@ } ], "summary": "Assembles Explore related information (form_data, slice, dataset)\\n in a single endpoint.", - "tags": [ - "Explore" - ] + "tags": ["Explore"] } }, "/api/v1/explore/form_data": { @@ -18434,9 +17249,7 @@ "jwt": [] } ], - "tags": [ - "Explore Form Data" - ] + "tags": ["Explore Form Data"] } }, "/api/v1/explore/form_data/{key}": { @@ -18491,9 +17304,7 @@ "jwt": [] } ], - "tags": [ - "Explore Form Data" - ] + "tags": ["Explore Form Data"] }, "get": { "description": "Retrives a form_data.", @@ -18545,9 +17356,7 @@ "jwt": [] } ], - "tags": [ - "Explore Form Data" - ] + "tags": ["Explore Form Data"] }, "put": { "description": "Updates an existing form_data.", @@ -18616,9 +17425,7 @@ "jwt": [] } ], - "tags": [ - "Explore Form Data" - ] + "tags": ["Explore Form Data"] } }, "/api/v1/explore/permalink": { @@ -18673,9 +17480,7 @@ "jwt": [] } ], - "tags": [ - "Explore Permanent Link" - ] + "tags": ["Explore Permanent Link"] } }, "/api/v1/explore/permalink/{key}": { @@ -18729,9 +17534,7 @@ "jwt": [] } ], - "tags": [ - "Explore Permanent Link" - ] + "tags": ["Explore Permanent Link"] } }, "/api/v1/log/": { @@ -18838,9 +17641,7 @@ "jwt": [] } ], - "tags": [ - "LogRestApi" - ] + "tags": ["LogRestApi"] }, "post": { "requestBody": { @@ -18891,9 +17692,7 @@ "jwt": [] } ], - "tags": [ - "LogRestApi" - ] + "tags": ["LogRestApi"] } }, "/api/v1/log/recent_activity/": { @@ -18950,9 +17749,7 @@ } ], "summary": "Get recent activity data for a user", - "tags": [ - "LogRestApi" - ] + "tags": ["LogRestApi"] } }, "/api/v1/log/{pk}": { @@ -19052,9 +17849,7 @@ "jwt": [] } ], - "tags": [ - "LogRestApi" - ] + "tags": ["LogRestApi"] } }, "/api/v1/me/": { @@ -19080,9 +17875,7 @@ "$ref": "#/components/responses/401" } }, - "tags": [ - "Current User" - ] + "tags": ["Current User"] } }, "/api/v1/me/roles/": { @@ -19108,9 +17901,7 @@ "$ref": "#/components/responses/401" } }, - "tags": [ - "Current User" - ] + "tags": ["Current User"] } }, "/api/v1/menu/": { @@ -19169,9 +17960,7 @@ "jwt": [] } ], - "tags": [ - "Menu" - ] + "tags": ["Menu"] } }, "/api/v1/query/": { @@ -19278,9 +18067,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/query/distinct/{column_name}": { @@ -19335,9 +18122,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/query/related/{column_name}": { @@ -19392,9 +18177,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/query/stop": { @@ -19445,9 +18228,7 @@ } ], "summary": "Manually stop a query with client_id", - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/query/updated_since": { @@ -19504,9 +18285,7 @@ } ], "summary": "Get a list of queries that changed after last_updated_ms", - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/query/{pk}": { @@ -19606,9 +18385,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/report/": { @@ -19664,9 +18441,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] }, "get": { "description": "Get a list of report schedules, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -19771,9 +18546,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] }, "post": { "description": "Create a report schedule", @@ -19828,9 +18601,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] } }, "/api/v1/report/_info": { @@ -19914,9 +18685,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] } }, "/api/v1/report/related/{column_name}": { @@ -19971,9 +18740,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] } }, "/api/v1/report/{pk}": { @@ -20024,9 +18791,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] }, "get": { "description": "Get a report schedule", @@ -20124,9 +18889,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] }, "put": { "description": "Update a report schedule", @@ -20195,9 +18958,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] } }, "/api/v1/report/{pk}/log/": { @@ -20274,9 +19035,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] } }, "/api/v1/report/{pk}/log/{log_id}": { @@ -20354,9 +19113,7 @@ "jwt": [] } ], - "tags": [ - "Report Schedules" - ] + "tags": ["Report Schedules"] } }, "/api/v1/rowlevelsecurity/": { @@ -20412,9 +19169,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] }, "get": { "description": "Get a list of models", @@ -20519,9 +19274,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] }, "post": { "description": "Create a new RLS Rule", @@ -20576,9 +19329,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] } }, "/api/v1/rowlevelsecurity/_info": { @@ -20662,9 +19413,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] } }, "/api/v1/rowlevelsecurity/related/{column_name}": { @@ -20719,9 +19468,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] } }, "/api/v1/rowlevelsecurity/{pk}": { @@ -20767,9 +19514,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] }, "get": { "description": "Get an item model", @@ -20867,9 +19612,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] }, "put": { "description": "Updates an RLS Rule", @@ -20938,9 +19681,7 @@ "jwt": [] } ], - "tags": [ - "Row Level Security" - ] + "tags": ["Row Level Security"] } }, "/api/v1/saved_query/": { @@ -20993,9 +19734,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] }, "get": { "description": "Get a list of saved queries, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -21100,9 +19839,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] }, "post": { "description": "Create a saved query", @@ -21154,9 +19891,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/saved_query/_info": { @@ -21240,9 +19975,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/saved_query/distinct/{column_name}": { @@ -21297,9 +20030,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/saved_query/export/": { @@ -21348,9 +20079,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/saved_query/import/": { @@ -21426,9 +20155,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/saved_query/related/{column_name}": { @@ -21483,9 +20210,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/saved_query/{pk}": { @@ -21532,9 +20257,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] }, "get": { "description": "Get a saved query", @@ -21632,9 +20355,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] }, "put": { "description": "Update a saved query", @@ -21696,9 +20417,7 @@ "jwt": [] } ], - "tags": [ - "Queries" - ] + "tags": ["Queries"] } }, "/api/v1/security/csrf_token/": { @@ -21732,9 +20451,7 @@ "jwt": [] } ], - "tags": [ - "Security" - ] + "tags": ["Security"] } }, "/api/v1/security/guest_token/": { @@ -21782,9 +20499,7 @@ "jwt": [] } ], - "tags": [ - "Security" - ] + "tags": ["Security"] } }, "/api/v1/security/login": { @@ -21802,10 +20517,7 @@ }, "provider": { "description": "Choose an authentication provider", - "enum": [ - "db", - "ldap" - ], + "enum": ["db", "ldap"], "example": "db", "type": "string" }, @@ -21855,9 +20567,7 @@ "$ref": "#/components/responses/500" } }, - "tags": [ - "Security" - ] + "tags": ["Security"] } }, "/api/v1/security/refresh": { @@ -21892,9 +20602,7 @@ "jwt_refresh": [] } ], - "tags": [ - "Security" - ] + "tags": ["Security"] } }, "/api/v1/sqllab/estimate/": { @@ -21945,9 +20653,7 @@ } ], "summary": "Estimates the SQL query execution cost", - "tags": [ - "SQL Lab" - ] + "tags": ["SQL Lab"] } }, "/api/v1/sqllab/execute/": { @@ -22006,9 +20712,7 @@ "jwt": [] } ], - "tags": [ - "SQL Lab" - ] + "tags": ["SQL Lab"] } }, "/api/v1/sqllab/export/{client_id}/": { @@ -22057,9 +20761,7 @@ } ], "summary": "Exports the SQL query results to a CSV", - "tags": [ - "SQL Lab" - ] + "tags": ["SQL Lab"] } }, "/api/v1/sqllab/results/": { @@ -22113,9 +20815,7 @@ } ], "summary": "Gets the result of a SQL query execution", - "tags": [ - "SQL Lab" - ] + "tags": ["SQL Lab"] } }, "/api/v1/tag/": { @@ -22171,9 +20871,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] }, "get": { "description": "Get a list of tags, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -22278,9 +20976,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] }, "post": { "requestBody": { @@ -22331,9 +21027,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/_info": { @@ -22417,9 +21111,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/favorite_status/": { @@ -22467,9 +21159,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/get_objects/": { @@ -22525,9 +21215,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/related/{column_name}": { @@ -22582,9 +21270,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/{object_type}/{object_id}/": { @@ -22653,9 +21339,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/{object_type}/{object_id}/{tag}/": { @@ -22724,9 +21408,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/{pk}": { @@ -22772,9 +21454,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] }, "get": { "description": "Get a tag detail information.", @@ -22872,9 +21552,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] }, "put": { "parameters": [ @@ -22935,9 +21613,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/v1/tag/{pk}/favorites/": { @@ -22987,9 +21663,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] }, "post": { "description": "Marks the tag as favorite for the current user", @@ -23037,9 +21711,7 @@ "jwt": [] } ], - "tags": [ - "Tags" - ] + "tags": ["Tags"] } }, "/api/{version}/_openapi": { @@ -23078,9 +21750,7 @@ "jwt": [] } ], - "tags": [ - "OpenApi" - ] + "tags": ["OpenApi"] } } }, diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/Dashboard.ts b/superset-frontend/packages/superset-ui-core/src/query/types/Dashboard.ts index b916e27a394e8..40939a1f50210 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/Dashboard.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/Dashboard.ts @@ -54,17 +54,6 @@ export type DataMaskState = { [id: string]: DataMask }; export type DataMaskWithId = { id: string } & DataMask; export type DataMaskStateWithId = { [filterId: string]: DataMaskWithId }; -export type FilterSet = { - id: number; - name: string; - nativeFilters: Filters; - dataMask: DataMaskStateWithId; -}; - -export type FilterSets = { - [filtersSetId: string]: FilterSet; -}; - export type Filter = { cascadeParentIds: string[]; defaultDataMask: DataMask; @@ -133,7 +122,6 @@ export type PartialFilters = { export type NativeFiltersState = { filters: Filters; - filterSets: FilterSets; focusedFilterId?: string; hoveredFilterId?: string; }; diff --git a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts index f30f7d1e1b83c..5435ca1b5dd8b 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts +++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts @@ -30,7 +30,6 @@ export enum FeatureFlag { DASHBOARD_FILTERS_EXPERIMENTAL = 'DASHBOARD_FILTERS_EXPERIMENTAL', CONFIRM_DASHBOARD_DIFF = 'CONFIRM_DASHBOARD_DIFF', DASHBOARD_NATIVE_FILTERS = 'DASHBOARD_NATIVE_FILTERS', - DASHBOARD_NATIVE_FILTERS_SET = 'DASHBOARD_NATIVE_FILTERS_SET', DASHBOARD_VIRTUALIZATION = 'DASHBOARD_VIRTUALIZATION', DASHBOARD_RBAC = 'DASHBOARD_RBAC', DATAPANEL_CLOSED_BY_DEFAULT = 'DATAPANEL_CLOSED_BY_DEFAULT', diff --git a/superset-frontend/spec/fixtures/mockNativeFilters.ts b/superset-frontend/spec/fixtures/mockNativeFilters.ts index dea5cfb8fd025..1ff78467d682f 100644 --- a/superset-frontend/spec/fixtures/mockNativeFilters.ts +++ b/superset-frontend/spec/fixtures/mockNativeFilters.ts @@ -24,7 +24,6 @@ import { } from '@superset-ui/core'; export const nativeFilters: NativeFiltersState = { - filterSets: {}, filters: { 'NATIVE_FILTER-e7Q8zKixx': { id: 'NATIVE_FILTER-e7Q8zKixx', diff --git a/superset-frontend/spec/fixtures/mockStore.js b/superset-frontend/spec/fixtures/mockStore.js index 3106163a98d09..1689555dd5aac 100644 --- a/superset-frontend/spec/fixtures/mockStore.js +++ b/superset-frontend/spec/fixtures/mockStore.js @@ -166,5 +166,5 @@ export const stateWithoutNativeFilters = { }, }, dataMask: {}, - nativeFilters: { filters: {}, filterSets: {} }, + nativeFilters: { filters: {} }, }; diff --git a/superset-frontend/src/constants.ts b/superset-frontend/src/constants.ts index b707a48e04fa3..a5d10b93e3396 100644 --- a/superset-frontend/src/constants.ts +++ b/superset-frontend/src/constants.ts @@ -47,10 +47,6 @@ export const URL_PARAMS = { name: 'native_filters_key', type: 'string', }, - filterSet: { - name: 'filter_set', - type: 'string', - }, showFilters: { name: 'show_filters', type: 'boolean', diff --git a/superset-frontend/src/dashboard/actions/nativeFilters.ts b/superset-frontend/src/dashboard/actions/nativeFilters.ts index 572b3237b0e98..968805dbb7605 100644 --- a/superset-frontend/src/dashboard/actions/nativeFilters.ts +++ b/superset-frontend/src/dashboard/actions/nativeFilters.ts @@ -16,14 +16,7 @@ * specific language governing permissions and limitations * under the License. */ - -import { - FilterConfiguration, - Filters, - FilterSet, - FilterSets, - makeApi, -} from '@superset-ui/core'; +import { FilterConfiguration, Filters, makeApi } from '@superset-ui/core'; import { Dispatch } from 'redux'; import { cloneDeep } from 'lodash'; import { @@ -32,8 +25,7 @@ import { } from 'src/dataMask/actions'; import { HYDRATE_DASHBOARD } from './hydrate'; import { dashboardInfoChanged } from './dashboardInfo'; -import { FilterSetFullData } from '../reducers/types'; -import { DashboardInfo, RootState } from '../types'; +import { DashboardInfo } from '../types'; export const SET_FILTER_CONFIG_BEGIN = 'SET_FILTER_CONFIG_BEGIN'; export interface SetFilterConfigBegin { @@ -56,61 +48,6 @@ export interface SetInScopeStatusOfFilters { type: typeof SET_IN_SCOPE_STATUS_OF_FILTERS; filterConfig: FilterConfiguration; } -export const SET_FILTER_SETS_BEGIN = 'SET_FILTER_SETS_BEGIN'; -export interface SetFilterSetsBegin { - type: typeof SET_FILTER_SETS_BEGIN; -} -export const SET_FILTER_SETS_COMPLETE = 'SET_FILTER_SETS_COMPLETE'; -export interface SetFilterSetsComplete { - type: typeof SET_FILTER_SETS_COMPLETE; - filterSets: FilterSet[]; -} -export const SET_FILTER_SETS_FAIL = 'SET_FILTER_SETS_FAIL'; -export interface SetFilterSetsFail { - type: typeof SET_FILTER_SETS_FAIL; -} - -export const CREATE_FILTER_SET_BEGIN = 'CREATE_FILTER_SET_BEGIN'; -export interface CreateFilterSetBegin { - type: typeof CREATE_FILTER_SET_BEGIN; -} -export const CREATE_FILTER_SET_COMPLETE = 'CREATE_FILTER_SET_COMPLETE'; -export interface CreateFilterSetComplete { - type: typeof CREATE_FILTER_SET_COMPLETE; - filterSet: FilterSet; -} -export const CREATE_FILTER_SET_FAIL = 'CREATE_FILTER_SET_FAIL'; -export interface CreateFilterSetFail { - type: typeof CREATE_FILTER_SET_FAIL; -} - -export const DELETE_FILTER_SET_BEGIN = 'DELETE_FILTER_SET_BEGIN'; -export interface DeleteFilterSetBegin { - type: typeof DELETE_FILTER_SET_BEGIN; -} -export const DELETE_FILTER_SET_COMPLETE = 'DELETE_FILTER_SET_COMPLETE'; -export interface DeleteFilterSetComplete { - type: typeof DELETE_FILTER_SET_COMPLETE; - filterSet: FilterSet; -} -export const DELETE_FILTER_SET_FAIL = 'DELETE_FILTER_SET_FAIL'; -export interface DeleteFilterSetFail { - type: typeof DELETE_FILTER_SET_FAIL; -} - -export const UPDATE_FILTER_SET_BEGIN = 'UPDATE_FILTER_SET_BEGIN'; -export interface UpdateFilterSetBegin { - type: typeof UPDATE_FILTER_SET_BEGIN; -} -export const UPDATE_FILTER_SET_COMPLETE = 'UPDATE_FILTER_SET_COMPLETE'; -export interface UpdateFilterSetComplete { - type: typeof UPDATE_FILTER_SET_COMPLETE; - filterSet: FilterSet; -} -export const UPDATE_FILTER_SET_FAIL = 'UPDATE_FILTER_SET_FAIL'; -export interface UpdateFilterSetFail { - type: typeof UPDATE_FILTER_SET_FAIL; -} export const setFilterConfiguration = (filterConfig: FilterConfiguration) => @@ -213,7 +150,6 @@ export const setInScopeStatusOfFilters = type BootstrapData = { nativeFilters: { filters: Filters; - filterSets: FilterSets; filtersState: object; }; }; @@ -223,134 +159,6 @@ export interface SetBootstrapData { data: BootstrapData; } -export const getFilterSets = - (dashboardId: number) => async (dispatch: Dispatch) => { - const fetchFilterSets = makeApi< - null, - { - count: number; - ids: number[]; - result: FilterSetFullData[]; - } - >({ - method: 'GET', - endpoint: `/api/v1/dashboard/${dashboardId}/filtersets`, - }); - - dispatch({ - type: SET_FILTER_SETS_BEGIN, - }); - - const response = await fetchFilterSets(null); - - dispatch({ - type: SET_FILTER_SETS_COMPLETE, - filterSets: response.ids.map((id, i) => ({ - ...response.result[i].params, - id, - name: response.result[i].name, - })), - }); - }; - -export const createFilterSet = - (filterSet: Omit) => - async (dispatch: Function, getState: () => RootState) => { - const dashboardId = getState().dashboardInfo.id; - const postFilterSets = makeApi< - Partial, - { - count: number; - ids: number[]; - result: FilterSetFullData[]; - } - >({ - method: 'POST', - endpoint: `/api/v1/dashboard/${dashboardId}/filtersets`, - }); - - dispatch({ - type: CREATE_FILTER_SET_BEGIN, - }); - - const serverFilterSet: Omit & { name?: string } = - { - ...filterSet, - }; - - delete serverFilterSet.name; - - await postFilterSets({ - name: filterSet.name, - owner_type: 'Dashboard', - owner_id: dashboardId, - json_metadata: JSON.stringify(serverFilterSet), - }); - - dispatch({ - type: CREATE_FILTER_SET_COMPLETE, - }); - dispatch(getFilterSets(dashboardId)); - }; - -export const updateFilterSet = - (filterSet: FilterSet) => - async (dispatch: Function, getState: () => RootState) => { - const dashboardId = getState().dashboardInfo.id; - const postFilterSets = makeApi< - Partial, - {} - >({ - method: 'PUT', - endpoint: `/api/v1/dashboard/${dashboardId}/filtersets/${filterSet.id}`, - }); - - dispatch({ - type: UPDATE_FILTER_SET_BEGIN, - }); - - const serverFilterSet: Omit & { - name?: string; - id?: number; - } = { - ...filterSet, - }; - - delete serverFilterSet.id; - delete serverFilterSet.name; - - await postFilterSets({ - name: filterSet.name, - json_metadata: JSON.stringify(serverFilterSet), - }); - - dispatch({ - type: UPDATE_FILTER_SET_COMPLETE, - }); - dispatch(getFilterSets(dashboardId)); - }; - -export const deleteFilterSet = - (filterSetId: number) => - async (dispatch: Function, getState: () => RootState) => { - const dashboardId = getState().dashboardInfo.id; - const deleteFilterSets = makeApi<{}, {}>({ - method: 'DELETE', - endpoint: `/api/v1/dashboard/${dashboardId}/filtersets/${filterSetId}`, - }); - - dispatch({ - type: DELETE_FILTER_SET_BEGIN, - }); - - await deleteFilterSets({}); - - dispatch({ - type: DELETE_FILTER_SET_COMPLETE, - }); - dispatch(getFilterSets(dashboardId)); - }; - export const SET_FOCUSED_NATIVE_FILTER = 'SET_FOCUSED_NATIVE_FILTER'; export interface SetFocusedNativeFilter { type: typeof SET_FOCUSED_NATIVE_FILTER; @@ -416,22 +224,10 @@ export type AnyFilterAction = | SetFilterConfigBegin | SetFilterConfigComplete | SetFilterConfigFail - | SetFilterSetsBegin - | SetFilterSetsComplete - | SetFilterSetsFail | SetInScopeStatusOfFilters | SetBootstrapData | SetFocusedNativeFilter | UnsetFocusedNativeFilter | SetHoveredNativeFilter | UnsetHoveredNativeFilter - | CreateFilterSetBegin - | CreateFilterSetComplete - | CreateFilterSetFail - | DeleteFilterSetBegin - | DeleteFilterSetComplete - | DeleteFilterSetFail - | UpdateFilterSetBegin - | UpdateFilterSetComplete - | UpdateFilterSetFail | UpdateCascadeParentIds; diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 51de15c7a1fcd..cf50c24db55ca 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -78,7 +78,6 @@ import { BUILDER_SIDEPANEL_WIDTH, CLOSED_FILTER_BAR_WIDTH, FILTER_BAR_HEADER_HEIGHT, - FILTER_BAR_TABS_HEIGHT, MAIN_HEADER_HEIGHT, OPEN_FILTER_BAR_MAX_WIDTH, OPEN_FILTER_BAR_WIDTH, @@ -463,18 +462,12 @@ const DashboardBuilder: FC = () => { threshold: [1], }); - // Filter sets depend on native filters - const filterSetEnabled = - isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS_SET) && - isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS); - const showFilterBar = (crossFiltersEnabled || nativeFiltersEnabled) && !editMode; const offset = FILTER_BAR_HEADER_HEIGHT + - (isSticky || standaloneMode ? 0 : MAIN_HEADER_HEIGHT) + - (filterSetEnabled ? FILTER_BAR_TABS_HEIGHT : 0); + (isSticky || standaloneMode ? 0 : MAIN_HEADER_HEIGHT); const filterBarHeight = `calc(100vh - ${offset}px)`; const filterBarOffset = dashboardFiltersOpen ? 0 : barTopOffset + 20; diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx index ed09e1679078b..2f8fd5af1d37d 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx @@ -20,7 +20,7 @@ import React, { FC } from 'react'; import { css } from '@superset-ui/core'; import Icons from 'src/components/Icons'; -import { getFilterValueForDisplay } from 'src/dashboard/components/nativeFilters/FilterBar/FilterSets/utils'; +import { getFilterValueForDisplay } from 'src/dashboard/components/nativeFilters/utils'; import { FilterValue, FilterItem, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx index a38843ec46665..b93d843fd73a3 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx @@ -25,9 +25,7 @@ import * as mockCore from '@superset-ui/core'; import { testWithId } from 'src/utils/testUtils'; import { FeatureFlag, Preset } from '@superset-ui/core'; import { TimeFilterPlugin, SelectFilterPlugin } from 'src/filters/components'; -import { DATE_FILTER_TEST_KEY } from 'src/explore/components/controls/DateFilterControl'; import fetchMock from 'fetch-mock'; -import { waitFor } from '@testing-library/react'; import { FilterBarOrientation } from 'src/dashboard/types'; import { FILTER_BAR_TEST_ID } from './utils'; import FilterBar from '.'; @@ -74,12 +72,10 @@ const getTestId = testWithId(FILTER_BAR_TEST_ID, true); const getModalTestId = testWithId(FILTERS_CONFIG_MODAL_TEST_ID, true); const FILTER_NAME = 'Time filter 1'; -const FILTER_SET_NAME = 'New filter set'; // @ts-ignore global.featureFlags = { [FeatureFlag.DASHBOARD_NATIVE_FILTERS]: true, - [FeatureFlag.DASHBOARD_NATIVE_FILTERS_SET]: true, }; const addFilterFlow = async () => { @@ -95,38 +91,6 @@ const addFilterFlow = async () => { // await screen.findByText('All filters (1)'); }; -const addFilterSetFlow = async () => { - // add filter set - userEvent.click(screen.getByText('Filter sets (0)')); - - // check description - expect(screen.getByText('Filters (1)')).toBeInTheDocument(); - expect(screen.getByText(FILTER_NAME)).toBeInTheDocument(); - - expect(screen.getAllByText('No filter').length).toBe(1); - - // apply filters - expect(screen.getByTestId(getTestId('new-filter-set-button'))).toBeEnabled(); - - // create filter set - userEvent.click(screen.getByText('Create new filter set')); - userEvent.click(screen.getByText('Create')); - - // check filter set created - expect(await screen.findByRole('img', { name: 'check' })).toBeInTheDocument(); - expect(screen.getByTestId(getTestId('filter-set-wrapper'))).toHaveAttribute( - 'data-selected', - 'true', - ); -}; - -const changeFilterValue = async () => { - userEvent.click(screen.getAllByText('No filter')[0]); - userEvent.click(screen.getByDisplayValue('Last day')); - expect(await screen.findByText(/2021-04-13/)).toBeInTheDocument(); - userEvent.click(screen.getByTestId(DATE_FILTER_TEST_KEY.applyButton)); -}; - describe('FilterBar', () => { new MainPreset().register(); const toggleFiltersBar = jest.fn(); @@ -157,30 +121,6 @@ describe('FilterBar', () => { "cascadeParentIds":[], "scope":{"rootPath":["ROOT_ID"],"excluded":[]} }], - "filter_sets_configuration":[{ - "name":"${FILTER_SET_NAME}", - "id":"${json.filter_sets_configuration?.[0].id}", - "nativeFilters":{ - "${filterId}":{ - "id":"${filterId}", - "name":"${FILTER_NAME}", - "filterType":"filter_time", - "targets":[{}], - "defaultDataMask":{"filterState":{},"extraFormData":{}}, - "controlValues":{}, - "cascadeParentIds":[], - "scope":{"rootPath":["ROOT_ID"],"excluded":[]} - } - }, - "dataMask":{ - "${filterId}":{ - "extraFormData":{}, - "filterState":{}, - "ownState":{}, - "id":"${filterId}" - } - } - }] }`, }, }; @@ -353,7 +293,6 @@ describe('FilterBar', () => { it('create filter and apply it flow', async () => { // @ts-ignore global.featureFlags = { - [FeatureFlag.DASHBOARD_NATIVE_FILTERS_SET]: true, [FeatureFlag.DASHBOARD_NATIVE_FILTERS]: true, }; renderWrapper(openedBarProps, stateWithoutNativeFilters); @@ -363,88 +302,4 @@ describe('FilterBar', () => { expect(screen.getByTestId(getTestId('apply-button'))).toBeDisabled(); }); - - // disable due to filter sets not detecting changes in metadata properly - it.skip('add and apply filter set', async () => { - // @ts-ignore - global.featureFlags = { - [FeatureFlag.DASHBOARD_NATIVE_FILTERS]: true, - [FeatureFlag.DASHBOARD_NATIVE_FILTERS_SET]: true, - }; - renderWrapper(openedBarProps, stateWithoutNativeFilters); - - await addFilterFlow(); - - userEvent.click(screen.getByTestId(getTestId('apply-button'))); - - await addFilterSetFlow(); - - // change filter - expect(screen.getByTestId(getTestId('apply-button'))).toBeDisabled(); - userEvent.click(await screen.findByText('All filters (1)')); - await changeFilterValue(); - await waitFor(() => expect(screen.getAllByText('Last day').length).toBe(2)); - - // apply new filter value - userEvent.click(screen.getByTestId(getTestId('apply-button'))); - await waitFor(() => - expect(screen.getByTestId(getTestId('apply-button'))).toBeDisabled(), - ); - - // applying filter set - userEvent.click(screen.getByText('Filter Sets (1)')); - expect( - await screen.findByText('Create new filter set'), - ).toBeInTheDocument(); - expect( - screen.getByTestId(getTestId('filter-set-wrapper')), - ).not.toHaveAttribute('data-selected', 'true'); - userEvent.click(screen.getByTestId(getTestId('filter-set-wrapper'))); - userEvent.click(screen.getAllByText('Filters (1)')[1]); - expect(await screen.findByText('No filter')).toBeInTheDocument(); - userEvent.click(screen.getByTestId(getTestId('apply-button'))); - expect(screen.getByTestId(getTestId('apply-button'))).toBeDisabled(); - }); - - // disable due to filter sets not detecting changes in metadata properly - it.skip('add and edit filter set', async () => { - // @ts-ignore - global.featureFlags = { - [FeatureFlag.DASHBOARD_NATIVE_FILTERS_SET]: true, - [FeatureFlag.DASHBOARD_NATIVE_FILTERS]: true, - }; - renderWrapper(openedBarProps, stateWithoutNativeFilters); - - await addFilterFlow(); - - userEvent.click(screen.getByTestId(getTestId('apply-button'))); - - await addFilterSetFlow(); - - userEvent.click(screen.getByTestId(getTestId('filter-set-menu-button'))); - userEvent.click(screen.getByText('Edit')); - - await changeFilterValue(); - - // apply new changes and save them - await waitFor(() => - expect( - screen.getByTestId(getTestId('filter-set-edit-save')), - ).toBeDisabled(), - ); - expect(screen.getByTestId(getTestId('apply-button'))).toBeEnabled(); - userEvent.click(screen.getByTestId(getTestId('apply-button'))); - expect(screen.getByTestId(getTestId('apply-button'))).toBeDisabled(); - - expect(screen.getByTestId(getTestId('filter-set-edit-save'))).toBeEnabled(); - userEvent.click(screen.getByTestId(getTestId('filter-set-edit-save'))); - expect(screen.queryByText('Save')).not.toBeInTheDocument(); - - expect( - Object.values( - JSON.parse(mockApi.mock.calls[2][0].json_metadata) - .filter_sets_configuration[0].dataMask as object, - )[0]?.filterState?.value, - ).toBe('Last day'); - }); }); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.test.tsx deleted file mode 100644 index 829b70cf3a7df..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.test.tsx +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React from 'react'; -import { render, screen } from 'spec/helpers/testing-library'; -import userEvent from '@testing-library/user-event'; -import { mockStore } from 'spec/fixtures/mockStore'; -import { Provider } from 'react-redux'; -import EditSection, { EditSectionProps } from './EditSection'; - -const createProps = () => ({ - filterSetId: 1, - dataMaskSelected: { - DefaultsID: { - filterState: { - value: 'value', - }, - }, - }, - onCancel: jest.fn(), - disabled: false, -}); - -const setup = (props: EditSectionProps) => ( - - - -); - -test('should render', () => { - const mockedProps = createProps(); - const { container } = render(setup(mockedProps)); - expect(container).toBeInTheDocument(); -}); - -test('should render the title', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByText('Editing filter set:')).toBeInTheDocument(); -}); - -test('should render the set name', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByText('Set name')).toBeInTheDocument(); -}); - -test('should render a textbox', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByRole('textbox')).toBeInTheDocument(); -}); - -test('should change the set name', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - const textbox = screen.getByRole('textbox'); - userEvent.clear(textbox); - userEvent.type(textbox, 'New name'); - expect(textbox).toHaveValue('New name'); -}); - -test('should render the enter icon', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByRole('img', { name: 'enter' })).toBeInTheDocument(); -}); - -test('should render the Cancel button', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByText('Cancel')).toBeInTheDocument(); -}); - -test('should cancel', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - const cancelBtn = screen.getByText('Cancel'); - expect(mockedProps.onCancel).not.toHaveBeenCalled(); - userEvent.click(cancelBtn); - expect(mockedProps.onCancel).toHaveBeenCalled(); -}); - -test('should render the Save button', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByText('Save')).toBeInTheDocument(); -}); - -test('should render the Save button as disabled', () => { - const mockedProps = createProps(); - const saveDisabledProps = { - ...mockedProps, - disabled: true, - }; - render(setup(saveDisabledProps)); - expect(screen.getByText('Save').parentElement).toBeDisabled(); -}); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx deleted file mode 100644 index 4b753a6a3e6a3..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx +++ /dev/null @@ -1,171 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React, { FC, useMemo, useState } from 'react'; -import { DataMaskState, HandlerFunction, styled, t } from '@superset-ui/core'; -import { Typography, AntdTooltip } from 'src/components'; -import { useDispatch } from 'react-redux'; -import Button from 'src/components/Button'; -import { updateFilterSet } from 'src/dashboard/actions/nativeFilters'; -import Icons from 'src/components/Icons'; -import { ActionButtons } from './Footer'; -import { useNativeFiltersDataMask, useFilters, useFilterSets } from '../state'; -import { APPLY_FILTERS_HINT, findExistingFilterSet } from './utils'; -import { useFilterSetNameDuplicated } from './state'; -import { getFilterBarTestId } from '../utils'; - -const Wrapper = styled.div` - display: grid; - grid-template-columns: 1fr; - align-items: flex-start; - justify-content: flex-start; - grid-gap: ${({ theme }) => theme.gridUnit}px; - background: ${({ theme }) => theme.colors.primary.light4}; - padding: ${({ theme }) => theme.gridUnit * 2}px; -`; - -const Title = styled(Typography.Text)` - color: ${({ theme }) => theme.colors.primary.dark2}; -`; - -const Warning = styled(Typography.Text)` - font-size: ${({ theme }) => theme.typography.sizes.s}px; - & .anticon { - padding: ${({ theme }) => theme.gridUnit}px; - } -`; - -const ActionButton = styled.div<{ disabled?: boolean }>` - display: flex; - & button { - ${({ disabled }) => `pointer-events: ${disabled ? 'none' : 'all'}`}; - flex: 1; - } -`; - -export type EditSectionProps = { - filterSetId: number; - dataMaskSelected: DataMaskState; - onCancel: HandlerFunction; - disabled: boolean; -}; - -const EditSection: FC = ({ - filterSetId, - onCancel, - dataMaskSelected, - disabled, -}) => { - const dataMaskApplied = useNativeFiltersDataMask(); - const dispatch = useDispatch(); - const filterSets = useFilterSets(); - const filters = useFilters(); - const filterSetFilterValues = Object.values(filterSets); - - const [filterSetName, setFilterSetName] = useState( - filterSets[filterSetId].name, - ); - - const isFilterSetNameDuplicated = useFilterSetNameDuplicated( - filterSetName, - filterSets[filterSetId].name, - ); - - const handleSave = () => { - dispatch( - updateFilterSet({ - id: filterSetId, - name: filterSetName, - nativeFilters: filters, - dataMask: { ...dataMaskApplied }, - }), - ); - onCancel(); - }; - - const foundFilterSet = useMemo( - () => - findExistingFilterSet({ - dataMaskSelected, - filterSetFilterValues, - }), - [dataMaskSelected, filterSetFilterValues], - ); - - const isDuplicateFilterSet = - foundFilterSet && foundFilterSet.id !== filterSetId; - - const resultDisabled = - disabled || isDuplicateFilterSet || isFilterSetNameDuplicated; - - return ( - - {t('Editing filter set:')} - , - onChange: setFilterSetName, - }} - > - {filterSetName} - - - - - - - - - - {isDuplicateFilterSet && ( - - - {t('This filter set is identical to: "%s"', foundFilterSet?.name)} - - )} - - ); -}; - -export default EditSection; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.test.tsx deleted file mode 100644 index 50fe910c53ae1..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.test.tsx +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React from 'react'; -import { render, screen } from 'spec/helpers/testing-library'; -import { mockStore } from 'spec/fixtures/mockStore'; -import { Provider } from 'react-redux'; -import userEvent from '@testing-library/user-event'; -import FilterSetUnit, { FilterSetUnitProps } from './FilterSetUnit'; - -const createProps = () => ({ - editMode: true, - setFilterSetName: jest.fn(), - onDelete: jest.fn(), - onEdit: jest.fn(), - onRebuild: jest.fn(), -}); - -function openDropdown() { - const dropdownIcon = screen.getAllByRole('img', { name: '' })[0]; - userEvent.click(dropdownIcon); -} - -const setup = (props: FilterSetUnitProps) => ( - - - -); - -test('should render', () => { - const mockedProps = createProps(); - const { container } = render(setup(mockedProps)); - expect(container).toBeInTheDocument(); -}); - -test('should render the edit button', () => { - const mockedProps = createProps(); - const editModeOffProps = { - ...mockedProps, - editMode: false, - }; - render(setup(editModeOffProps)); - expect(screen.getByRole('button', { name: 'Edit' })).toBeInTheDocument(); -}); - -test('should render the menu', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - openDropdown(); - expect(screen.getByRole('menu')).toBeInTheDocument(); - expect(screen.getAllByRole('menuitem')).toHaveLength(3); - expect(screen.getByText('Edit')).toBeInTheDocument(); - expect(screen.getByText('Rebuild')).toBeInTheDocument(); - expect(screen.getByText('Delete')).toBeInTheDocument(); -}); - -test('should edit', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - openDropdown(); - const editBtn = screen.getByText('Edit'); - expect(mockedProps.onEdit).not.toHaveBeenCalled(); - userEvent.click(editBtn); - expect(mockedProps.onEdit).toHaveBeenCalled(); -}); - -test('should delete', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - openDropdown(); - const deleteBtn = screen.getByText('Delete'); - expect(mockedProps.onDelete).not.toHaveBeenCalled(); - userEvent.click(deleteBtn); - expect(mockedProps.onDelete).toHaveBeenCalled(); -}); - -test('should rebuild', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - openDropdown(); - const rebuildBtn = screen.getByText('Rebuild'); - expect(mockedProps.onRebuild).not.toHaveBeenCalled(); - userEvent.click(rebuildBtn); - expect(mockedProps.onRebuild).toHaveBeenCalled(); -}); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx deleted file mode 100644 index 74cf3aa6625e4..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import { AntdDropdown, Typography } from 'src/components'; -import { Menu } from 'src/components/Menu'; -import React, { FC } from 'react'; -import { - DataMaskState, - FilterSet, - HandlerFunction, - styled, - useTheme, - t, -} from '@superset-ui/core'; -import Icons from 'src/components/Icons'; -import Button from 'src/components/Button'; -import { Tooltip } from 'src/components/Tooltip'; -import FiltersHeader from './FiltersHeader'; -import { getFilterBarTestId } from '../utils'; - -const HeaderButton = styled(Button)` - padding: 0; -`; - -const TitleText = styled.div` - display: flex; - justify-content: space-between; - align-items: center; -`; - -const IconsBlock = styled.div` - display: flex; - justify-content: flex-end; - align-items: center; - & > *, - & > button.superset-button { - ${({ theme }) => `margin-left: ${theme.gridUnit * 2}px`}; - } -`; - -export type FilterSetUnitProps = { - editMode?: boolean; - isApplied?: boolean; - filterSet?: FilterSet; - filterSetName?: string; - dataMaskSelected?: DataMaskState; - setFilterSetName?: (name: string) => void; - onDelete?: HandlerFunction; - onEdit?: HandlerFunction; - onRebuild?: HandlerFunction; -}; - -const FilterSetUnit: FC = ({ - editMode, - setFilterSetName, - onDelete, - onEdit, - filterSetName, - dataMaskSelected, - filterSet, - isApplied, - onRebuild, -}) => { - const theme = useTheme(); - - const menu = ( - - {t('Edit')} - - - {t('Rebuild')} - - - - {t('Delete')} - - - ); - - return ( - <> - - , - onChange: setFilterSetName, - }} - > - {filterSet?.name ?? filterSetName} - - - {isApplied && ( - - )} - {onDelete && ( - - { - e.stopPropagation(); - e.preventDefault(); - }} - {...getFilterBarTestId('filter-set-menu-button')} - buttonStyle="link" - buttonSize="xsmall" - > - - - - )} - - - - - ); -}; - -export default FilterSetUnit; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSets.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSets.test.tsx deleted file mode 100644 index 2fe855147ab60..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSets.test.tsx +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React from 'react'; -import { render, screen } from 'spec/helpers/testing-library'; -import { mockStore } from 'spec/fixtures/mockStore'; -import { Provider } from 'react-redux'; -import FilterSets, { FilterSetsProps } from '.'; -import { TabIds } from '../types'; - -const createProps = () => ({ - disabled: false, - tab: TabIds.FilterSets, - dataMaskSelected: { - DefaultsID: { - filterState: { - value: 'value', - }, - }, - }, - onEditFilterSet: jest.fn(), - onFilterSelectionChange: jest.fn(), -}); - -const setup = (props: FilterSetsProps) => ( - - - -); - -test('should render', () => { - const mockedProps = createProps(); - const { container } = render(setup(mockedProps)); - expect(container).toBeInTheDocument(); -}); - -test('should render the default title', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByText('New filter set')).toBeInTheDocument(); -}); - -test('should render the right number of filters', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByText('Filters (1)')).toBeInTheDocument(); -}); - -test('should render the filters', () => { - const mockedProps = createProps(); - render(setup(mockedProps)); - expect(screen.getByText('Set name')).toBeInTheDocument(); -}); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.test.tsx deleted file mode 100644 index 1879b7922b48d..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.test.tsx +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React from 'react'; -import { render, screen } from 'spec/helpers/testing-library'; -import { mockStore } from 'spec/fixtures/mockStore'; -import { Provider } from 'react-redux'; -import FiltersHeader, { FiltersHeaderProps } from './FiltersHeader'; - -const mockedProps = { - dataMask: { - DefaultsID: { - filterState: { - value: 'value', - }, - }, - }, -}; -const setup = (props: FiltersHeaderProps) => ( - - - -); - -test('should render', () => { - const { container } = render(setup(mockedProps)); - expect(container).toBeInTheDocument(); -}); - -test('should render the right number of filters', () => { - render(setup(mockedProps)); - expect(screen.getByText('Filters (1)')).toBeInTheDocument(); -}); - -test('should render the name and value', () => { - render(setup(mockedProps)); - expect(screen.getByText('test:')).toBeInTheDocument(); - expect(screen.getByText('value')).toBeInTheDocument(); -}); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx deleted file mode 100644 index 5982bf515a6eb..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React, { FC } from 'react'; -import { - DataMaskState, - FilterSet, - isNativeFilter, - styled, - t, - useTheme, -} from '@superset-ui/core'; -import { Typography, AntdTooltip, AntdCollapse } from 'src/components'; -import Icons from 'src/components/Icons'; -import { areObjectsEqual } from 'src/reduxUtils'; -import { getFilterValueForDisplay } from './utils'; -import { useFilters } from '../state'; -import { getFilterBarTestId } from '../utils'; - -const FilterHeader = styled.div` - display: flex; - align-items: center; - font-size: ${({ theme }) => theme.typography.sizes.s}px; -`; - -const StyledCollapse = styled(AntdCollapse)` - &.ant-collapse-ghost > .ant-collapse-item { - & > .ant-collapse-content > .ant-collapse-content-box { - padding: 0; - padding-top: 0; - padding-bottom: 0; - font-size: ${({ theme }) => theme.typography.sizes.s}px; - } - & > .ant-collapse-header { - padding: 0; - display: flex; - align-items: center; - flex-direction: row-reverse; - justify-content: flex-end; - max-width: max-content; - & .ant-collapse-arrow { - position: static; - padding-left: ${({ theme }) => theme.gridUnit}px; - } - } -`; - -const StyledFilterRow = styled.div` - padding-top: ${({ theme }) => theme.gridUnit}px; - padding-bottom: ${({ theme }) => theme.gridUnit}px; -`; - -export type FiltersHeaderProps = { - dataMask?: DataMaskState; - filterSet?: FilterSet; -}; - -const FiltersHeader: FC = ({ dataMask, filterSet }) => { - const theme = useTheme(); - const filters = useFilters(); - const filterValues = Object.values(filters).filter(isNativeFilter); - - let resultFilters = filterValues ?? []; - if (filterSet?.nativeFilters) { - resultFilters = Object.values(filterSet?.nativeFilters).filter( - isNativeFilter, - ); - } - - const getFiltersHeader = () => ( - - - {t('Filters (%d)', resultFilters.length)} - - - ); - - const getFilterRow = ({ id, name }: { id: string; name: string }) => { - const changedFilter = - filterSet && - !areObjectsEqual( - filters[id]?.controlValues, - filterSet?.nativeFilters?.[id]?.controlValues, - { - ignoreUndefined: true, - }, - ); - const removedFilter = !Object.keys(filters).includes(id); - - return ( - - - - {name}:  - - - {getFilterValueForDisplay(dataMask?.[id]?.filterState?.value) || ( - {t('None')} - )} - - - - ); - }; - - const getExpandIcon = ({ isActive }: { isActive: boolean }) => { - const color = theme.colors.grayscale.base; - const Icon = isActive ? Icons.CaretUpOutlined : Icons.CaretDownOutlined; - return ; - }; - - return ( - - - {resultFilters.map(getFilterRow)} - - - ); -}; - -export default FiltersHeader; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/Footer.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/Footer.test.tsx deleted file mode 100644 index b1a2638e7e004..0000000000000 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/Footer.test.tsx +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import React from 'react'; -import userEvent from '@testing-library/user-event'; -import { render, screen } from 'spec/helpers/testing-library'; -import Footer from './Footer'; - -const createProps = () => ({ - filterSetName: 'Set name', - disabled: false, - editMode: false, - onCancel: jest.fn(), - onEdit: jest.fn(), - onCreate: jest.fn(), -}); - -const editModeProps = { - ...createProps(), - editMode: true, -}; - -test('should render', () => { - const mockedProps = createProps(); - const { container } = render(