Commit Graph

1025 Commits

Author SHA1 Message Date
Beto Dealmeida ca680cf976
fix: append ID to filename when exporting chart (#12166) 2020-12-22 14:19:05 -08:00
Nikola Gigić a52031a55e
chore: Change chart_is_fav to chart_is_favorite (#12075)
* Change chart_is_fav to chart_is_favorite

* Trigger cypress tests

* Retrigger cypress tests

* Retrigger all tests

* Dashboard

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

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

* remove unnecessary permissions and split code path

* remove SIP_34_ALERTS_UI

* disabling an alert that is working will turn it to not triggered
2020-12-21 19:07:30 +00:00
David Aaron Suddjian 865beae3d8
feat(dashboard): Dashboard-Native Filters (#11814)
* wip: filter create modal

* add a feature flag

* automatic changes to package lock

* wip

* filter sidebar and basic state management

* move create button to the sidebar

* first step for edit filterconfig

* partially fix tests...

* edits to types and comments

* respect feature flag on the filter sidebar

* add filterconfig form

* get input state working

* feat: tree filter scopes UI

* fix: turn on flag

* sticky filter bar

* stop preferring default export

* feat: finish filter scoping

* fix: under toggle

* fix: title

* fix: add licence

* refactor: update TS

* fix: fix on reopen modal + validation

* new filter bar menu

* adding, but commenting out, bulk scoping action

* adding some placeholder buttons and styles therefor

* feat: add filter chart

* add relative path to package.json

* update modal

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

* Revert "feat: add filter chart"

This reverts commit b1302d35b6.

* Revert "add relative path to package.json"

This reverts commit 26a7b40e18.

* https package lock idk

* feat: add filter chart

* add relative path to package.json

* flexboxes all the way down

* dynamically generate groupby and datasource in select control

* big wip

* fix target column name

* no importing nonexistent things

* styles and name editing

* Add hook for retrieval of all filter states

* start with a new filter when clicking add filter

* handle removed filters gracefully

* fix incorrect default filter configuration

* add fields to useAllFilterState

* add redux for filterconfigs

* add support for native_filters

* remove consoles

* improve filter removal

* unbreak infinite loop

* basic sidebar toggling working!

* collapsing and menu working more smoothly

* linting

* make dataset and column inputs work

* save filter values properly

* add dashboard event for filter updates

* guarded

* apply filters properly

* fix schema

* making New Filter button a link

* gridunits ftw

* centering modal

* tis not a button anymore! nixing type.

* plus and collapse buttons instead of "more" menu

* updating full size filter icons

* adding icons to filter collapsing/expanding

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

* fix linting error

* fix native filters for legacy charts

* updates test

* no individual apply buttons

* fix bugs with filter config modal

* remove redundant code

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* update tests

* oops forgot to add the fancy new useChangeEffect hook

* comments and code reorganization

* rename native_filters to extr_form_data and move hook

* disable native filters in viz selector

* add cascading

* implement new extra form data api

* cleanup

* updates tests

* bump npm packages

* fix bad merge on package.json + lock

* lint

* replace in and not in with uppercase

* lint

* lint

* lint

* lint

* bulk test fix

* Sort select input alphabetically

* Change type for sorting elements

* fix rest of unit tests

* make filter operators all uppercase

* Hide Filter bar when there are no filters

* Show edit button for dashboard owners only

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

* Improve Toggle filters bar function

* lint

* fix js lint + set createNewOnOpen

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

* Add Handle apply filter function to Apply button

* Allow applying changes instantly

* Fix types

* remove console logs

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

* fix jest tests

* update native filters tests to pass

* reset cypress baseUrl

* remove unnecessary field

* cleanup: remove unused state fields

* move unrelated types to an appropriate location

* remove misplaced resource fetch error logic

* fix cascadeParentIds error

* fix cypress password

* initial attempt at fixing scope issue

* fix bad merge

* fix lint

* trying out makeApi for saving filters

* remove unused import

* fix test

* silence bad test

* add native-filter feat flag config

* oops fix here

* remove space

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

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

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

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

* use styledMount in tests

* comment

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

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

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

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

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

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

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

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

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

* address PR feedback

* fix package lock

* null guards

* Fix charts resizing

* fix cypress tests

* add in nativefilters to form data

* fix lint and test

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-18 17:06:37 -08:00
Ville Brofeldt 1a5f61b133
feat(chart-data-api): ignore unknown fields on QueryObject (#12118) 2020-12-18 14:32:55 +02:00
Beto Dealmeida 6e7f276775
feat: initial custom error messages for SQL Lab (#12080) 2020-12-17 22:58:21 -08:00
Yongjie Zhao b592cc7e73
feat(explore): time picker enhancement (#11418) 2020-12-17 18:27:21 -08:00
Daniel Vaz Gaspar 1a20552c2b
fix(reports): increase crontab size and alert fixes (#12056)
* fix(reports): increase crontab size

* update to current alembic revision

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

# Conflicts:
#	tests/security_tests.py

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

# Conflicts:
#	tests/security_tests.py

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

# Conflicts:
#	tests/security_tests.py

* lint

* update alembic revision

* fix related fields

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

* fix mig

* update alembic down revision
2020-12-17 14:27:14 +00:00
Daniel Vaz Gaspar 790ac5ef87
feat(databases): security perm simplification (#12036)
* feat(databases): security perm simplification

* fix tests

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

* fix tests

* fix tests

* remove unnecessary mapping

* fix JS tests

* fix cypress test and explore endpoint

* update alembic down revision

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

# Conflicts:
#	superset/constants.py
#	tests/security_tests.py
2020-12-17 09:53:13 +00:00
Kasia Kucharczyk 700dee6db6
feat(logs): security permissions simplification (#12061)
* Added migration for logs security converge

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

* Updated recent revision and filename

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

* Updated latest migration revision

* Updated latest migration revision
2020-12-17 00:50:31 -08:00
Daniel Vaz Gaspar 2302adb61a
feat(datasets): security perm simplification (#12000)
* feat(datasets): security perm simplification

* feat(datasets): security perm simplification

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* include SqlMetricInlineView converge and fix JS tests

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

* Updated permissions in annotation layers list

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

* Updated annotations in security_tests and added annotations to NEW_SECURITY_CONVERGE_VIEWS

* Added migration for annotations security converge

* Updated current revision after rebase master

* Updated migration name to annotations security converge

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

* Updated annotations migration to current
2020-12-16 09:08:06 +00:00
Beto Dealmeida 8bda6b0bd9
feat: show missing parameters in query (#12049)
* feat: show missing parameters in query

* Fix lint

* Address comments

* Simplify error message

* Use f-string in helper function
2020-12-15 18:47:40 -08:00
Grace Guo 8da1900d8a
feat: add hook for dataset health check (#11970)
* feat: add hook for dataset health check

* add event log

* optimize datasource json data like certified data

* add unit test

* fix review comments

* extra code review comments
2020-12-15 18:12:06 -08:00
Jesse Yang 76f9f185fb
refactor: optimize backend log payload (#11927) 2020-12-15 17:22:23 -08:00
Daniel Vaz Gaspar f79e52f48e
feat(charts): security perm simplification (#11981)
* feat(charts): security perm simplification

* fix superset explore

* fix JS test

* fix cypress test

* fix split heads

* fix favorite permission

* fix permission

* update with new async permission

* fix new permission coming from master

* fix core permission assert

* black

* update alembic down revision
2020-12-15 11:27:06 +00:00
Daniel Vaz Gaspar 0f979dea06
feat(reports): security perm simplification (#11853)
* feat: security converge report

* black

* fix: comment

* add frontend changes and rebase

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

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

* Fix typos
2020-12-11 18:19:36 -08:00
Rob DiCiuccio 4d329071a1
feat(SIP-39): Async query support for charts (#11499)
* Generate JWT in Flask app

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

* Add redis stream implementation, refactoring

* Add chart data cache endpoint, refactor QueryContext caching

* Typing, linting, refactoring

* pytest fixes and openapi schema update

* Enforce caching be configured for async query init

* Async query processing for explore_json endpoint

* Add /api/v1/async_event endpoint

* Async frontend for dashboards [WIP]

* Chart async error message support, refactoring

* Abstract asyncEvent middleware

* Async chart loading for Explore

* Pylint fixes

* asyncEvent middleware -> TypeScript, JS linting

* Chart data API: enforce forced_cache, add tests

* Add tests for explore_json endpoints

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

* Consolidate set_and_log_cache and add STORE_CACHE_KEYS_IN_METADATA_DB flag

* Add tests for tasks/async_queries and address PR comments

* Bypass non-JSON result formats for async queries

* Add tests for redux middleware

* Remove debug statement

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

* Skip force_cached if no queryObj

* SunburstViz: don't modify self.form_data

* Fix failing annotation test

* Resolve merge/lint issues

* Reduce polling delay

* Fix new getClientErrorObject reference

* Fix flakey unit tests

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

* PR feedback: refactoring, configuration

* Fixup: remove debugging

* Fix typescript errors due to redux upgrade

* Update UPDATING.md

* Fix failing py tests

* asyncEvent_spec.js -> asyncEvent_spec.ts

* Refactor flakey Python 3.7 mock assertions

* Fix another shared state issue in Py tests

* Use 'sub' claim in JWT for user_id

* Refactor async middleware config

* Fixup: restore FeatureFlag boolean type

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-10 20:21:56 -08:00
Beto Dealmeida 475f59cb1c
feat: confirm overwrite when importing (#11982)
* feat: confirm overwrite when importing

* Skip flaky test
2020-12-10 14:50:10 -08:00
Kasia Kucharczyk 4da47f1635
tests: added fixture with energy usage instead of example (#11308)
* Added energy usage fixture. Updated dashboard utils and unicode fixture with new method parameters.

* Add energy fixture to tests/access_tests.py

* Add energy fixture to tests/core_tests.py

* Add energy fixture to tests/dashboard_tests.py

* Add energy fixture to tests/datasets/api_tests.py

* Add energy fixture to tests/db_engine_specs/base_engine_spec_tests.py

* Add energy fixture to tests/import_export_tests.py

* Add energy fixture to tests/model_tests.py

* Add energy fixture to tests/query_context_tests.py

* Add energy fixture to tests/security_tests.py

* Add energy fixture to tests/charts/api_tests.py

* Changed formatting of slices' parameters in energy usage fixture

* Removed loading energy udage data from test conf file

* Add energy fixture to tests/databases/api_tests.py

* Fixes after review: removed isort:skip, load_charts->load_energy_charts, removed unused import.

* Added energy fixture to tests/charts/commands_tests.py and retrieving proper Slice by name

* Fixed charts/api_tests.py to use energy_usage from fixtures

* Fixed datasets/commands_tests.py to retrieve dataset by name and use energy_usage fixture

* Changed energy usage data to generated data and fixed chart tests which was checking energy usage data
2020-12-09 12:02:29 -08:00
Daniel Vaz Gaspar 1e3aaab590
fix(reports): validator_config, report state machine, working_timeout (#11890)
* fix(reports): expect more exceptions and fix validator config

* use a state pattern on command reports

* use a state pattern on command reports continue

* fix multiple heads

* fix unittests

* add more tests

* fix api tests after enum rename

* fix alembic multiple heads

* fix tests

* fix fixture cleanup

* fix mysql tests

* fix initial and not found state

* fix schema, and private public methods, addressing comments

* add new col to the API
2020-12-09 18:19:07 +00:00
Beto Dealmeida 33325f9fa6
feat: add modal to import charts (#11956)
* WIP

* Splat props
2020-12-07 18:33:59 -08:00
Beto Dealmeida 2b9695c520
feat: add modal to import databases (#11884)
* feat: add modal to import databases

* Fix test

* Improve hook

* Remove log and needless store.

* Change JS functions
2020-12-07 11:22:45 -08:00
Beto Dealmeida 66cd565bff
feat: add Postgres SQL validator (#11538)
* Add Postgres SQL validator

* Strip line number from message

* Add unit tests

* Run tests only with postgres backend

* Add dep

* Add dep to bashlib
2020-12-04 19:17:23 -08:00
Erik Ritter 77d362d306
fix: Remove expensive logs table migration (#11920) 2020-12-04 07:59:28 -08:00
Ville Brofeldt 327a2817d3
feat: add event and interval annotation support to chart data ep (#11665)
* feat: add event and interval annotation support to chart data ep

* add tests + refactor fixtures

* use chart dao
2020-12-04 14:40:31 +02:00
Beto Dealmeida e0288bf76b
chore: add unit tests for the current import functionality (#11786)
* chore: add unit tests for the current import functionality

* Improve comment

* Fix unit test
2020-12-03 14:48:43 -08:00
Bogdan 0396c705d4
chore: Support SET & SHOW commands as read only SQL commands (#11868)
* Support SET & SHOW commands as read only SQL commands

* Move is_readonly definition into the engine spec

* Rename & use super()

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-12-03 10:44:11 -08:00
Daniel Vaz Gaspar 71c567bf3a
feat(css templates): security perm simplification (#11856)
* feat: security converge css templates

* fix security tests

* fix JS test

* add migration

* black and fix migration
2020-12-03 08:45:32 +00:00
Lily Kuang a76eadd838
feat: report/alert list CRUD view (#11802) 2020-12-01 17:57:15 -08:00
Kasia Kucharczyk 462b39d762
fix: update chart doesn't remove all connections to dashboards (#11830)
* Added possibility to not change dashboards connection when chart is changed

* Added two chart unit tests which checks if dashboards properly change on update
2020-11-30 09:48:14 -08:00
Hugh A. Miles II 0689738e7c
feat: Sqllab to Explore UX improvements api changes (#11836) 2020-11-30 09:23:11 -08:00
Daniel Vaz Gaspar 9dd33d5566
feat(saved queries): security perm simplification (#11764)
* feat(saved queries): security perm simplification

* migration script and frontend

* add downgrade procedure

* downgrade procedure, inferred from the upgrade data

* fix JS test

* improve code

* add tests for role migration

* more tests and a short description for each one

* Improve readability

* simplify dataclass creation

* fix dataclass
2020-11-30 13:07:39 +00:00
Daniel Vaz Gaspar bac84a3aac
fix: delete chart, dashboards, dbs with assoc reports (#11801)
* fix: delete chart or dashboards with assoc reports

* database constraint to reports and tests

* add tests for dashboards and database

* fix exceptions default text
2020-11-26 08:45:49 +00:00
Beto Dealmeida c354e7e0ab
fix: remove root dir from ZIP bundle (#11805)
* fix: remove root dir from ZIP bundle

* Fix lint

* Fix tests

* Improve tests

* Fix dashboard as well
2020-11-25 11:47:48 -08:00
Daniel Vaz Gaspar f27ebc4be5
feat: new reports scheduler (#11711)
* feat(reports): scheduler and delivery system

* working version

* improvements and fix grace_period

* add tests and fix bugs

* fix report API test

* test MySQL test fail

* delete-orphans

* fix MySQL tests

* address comments

* lint
2020-11-25 08:50:30 +00:00
Beto Dealmeida 501b9d47c5
feat: API endpoint to import dashboards (#11751)
* ImportChartsCommand

* feat: add a command to import dashboards

* feat: API endpoint to import dashboards

* Add dispatcher

* Raise specific exception

* Fix test

* Remove print calls

* Add logging when passing
2020-11-24 22:45:35 -08:00
Erik Ritter c0224aa928
feat: add certification info to table selector (#11785) 2020-11-24 12:13:52 -08:00
Beto Dealmeida 25345bea64
feat: add a command to import dashboards (#11749)
* feat: add a command to import dashboards

* Fix lint

* Remove print()
2020-11-23 16:28:26 -08:00
ʈᵃᵢ fbe4a6622e
feat: SQL preview modal for Query History (#11634) 2020-11-20 16:01:06 -08:00
Beto Dealmeida a3a2a68f01
feat: API endpoint to import charts (#11744)
* ImportChartsCommand

* feat: API endpoint to import charts

* Add dispatcher

* Fix docstring
2020-11-20 14:40:27 -08:00
Beto Dealmeida 2f4f87795d
feat: add a command to import charts (#11743)
* ImportChartsCommand

* Fix type
2020-11-20 14:20:13 -08:00
Ville Brofeldt 7ae8cd07cc
fix: do not drop calculated column on metadata sync (#11731) 2020-11-18 08:33:14 -08:00
Beto Dealmeida cce716a821
feat: API endpoints to upload dataset/db (#11728)
* feat: API endpoints to upload dataset/db

* Fix method call
2020-11-17 14:49:33 -08:00
Rob DiCiuccio 01d15f5368
feat(templating): Safer Jinja template processing (#11704)
* Enable safer Jinja template processing

* Allow JINJA_CONTEXT_ADDONS with SAFE_JINJA_PROCESSING

* Make template processor initialization less magical, refactor classes

* Consolidat Jinja logic, remove config flag in favor of sane defaults

* Restore previous ENABLE_TEMPLATE_PROCESSING default

* Add recursive type checking, update tests

* remove erroneous config file

* Remove TableColumn models from template context

* pylint refactoring

* Add entry to UPDATING.md

* Resolve botched merge conflict

* Update docs on running single python test

* Refactor template context checking to support engine-specific methods
2020-11-17 11:55:47 -08:00
Beto Dealmeida 7bc353f8a8
feat: new import commands for dataset and databases (#11670)
* feat: commands for importing databases and datasets

* Refactor code
2020-11-16 17:11:20 -08:00
Bogdan a16a2b87c7
chore: statds metrics for cache invalidation (#11701)
* Add more logging to the cache invalidation

* Address linter & tests

* Fix linter

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-11-16 06:48:26 -08:00
Jesse Yang 4cfcaebb61
feat: rename TABLE_NAMES_CACHE_CONFIG to DATA_CACHE_CONFIG (#11509)
* feat: rename TABLE_NAMES_CACHE_CONFIG to DATA_CACHE_CONFIG

The corresponding cache will now also cache the query results.

* Slice use DATA_CACHE_CONFIG CACHE_DEFAULT_TIMEOUT

* Add test for default cache timeout

* rename FAR_FUTURE to ONE_YEAR_IN_SECS
2020-11-13 22:35:10 -08:00
Jesse Yang ec8ccd4cf1
feat: keep modal open when saving database failed (#11618) 2020-11-12 16:10:14 -08:00
ʈᵃᵢ 432e5ab460
feat: Query History CRUD list view (#11574) 2020-11-12 11:55:13 -10:00
Daniel Vaz Gaspar 12cb27f5cb
feat: new reports models api (#11606)
* feat: new report schedule models

* lint and unique constraint

* support sqlite

* fix sqlite

* add audit mixin and minor fixes

* feat(api): alerts and reports REST API

* feat: new report schedule models

* lint and unique constraint

* support sqlite

* fix sqlite

* add audit mixin and minor fixes

* feat(api): alerts and reports REST API

* draft working version

* add tests

* test

* black

* remove copy pasta

* solve dashboard object representation being used on cache

* tests and custom filter

* fix PUT has PATCH on active field

* create feature flag

* fix lint

* address comments
2020-11-12 13:21:01 -08:00
Grace Guo 0338b48fdd
fix (dashboard): remove default filters parameters in dashboard url (#11661) 2020-11-12 13:00:27 -08:00
Jesse Yang 542d2e3b06
chore: clean up a debug line from #11653 (#11663) 2020-11-12 08:37:49 -08:00
Ville Brofeldt 2718909314
feat: add ECharts BoxPlot chart (#11199)
* feat: add ECharts BoxPlot chart

* lint

* fix cypress tests

* lint

* remove viz.py shim

* bump plugin package

* skip non-legacy plugin cypress dashboard tests

* fix cypress tests

* disable cypress tests for non-leagcy charts

* fix bad rebase

* use midpoint interpolation for quartile calculation

* bump packages and add support for no groupby

* whitespace

* whitespace

* linting

* fix tests

* xit mathjs load test

* bump mathjs to 8.0.1

* disable cypress filter test for v1 charts
2020-11-12 10:01:04 +02:00
Jesse Yang 302c9603c4
fix: database connection validation when creation (#11653) 2020-11-12 08:00:38 +00:00
Beto Dealmeida 45738ffc1d
chore: consolidate datasource import logic (#11533)
* Consolidate dash import logic

* WIP

* Add license

* Fix lint

* Retrigger tests

* Fix lint
2020-11-11 22:04:16 -08:00
Beto Dealmeida 4a070cfceb
chore: consolidate dashboard import logic (#11529)
* Consolidate dash import logic

* Fix lint

* Remove Slice.import_obj

* Remove unused import

* Fix log
2020-11-11 14:50:18 -08:00
Ville Brofeldt 77dff0e4e0
fix(chart-data): ignore orderby on sample result type (#11656) 2020-11-11 16:27:56 +02:00
Beto Dealmeida 51712bf7ce
fix: CommandInvalidError had invalid init (#11635) 2020-11-10 07:41:03 -08:00
Ville Brofeldt 600a6fa92a
chore(rls): move to feature flag and disable related view (#11575)
* chore(rls): move to feature flag and disable related view

* rename feature flag
2020-11-05 12:19:48 +02:00
Lily Kuang eef4809978
feat: annotation edit modal with antd datepicker (#11500) 2020-11-03 12:59:13 -08:00
Daniel Vaz Gaspar 6f2e36dd1b
fix(tests): flaky test with dttm on Query API (#11526)
* fix(tests): flaky test wirh dttm on Query API
2020-11-03 09:01:17 +00:00
ʈᵃᵢ edb9619731
refactor: reduce number of api calls needed to fetch favorite status for charts and dashboards (#11502) 2020-11-02 21:26:14 -08:00
Beto Dealmeida fd10c47bc6
chore: remove sanitize (#11532)
* chore: remove sanitize

* Fix lint
2020-11-02 15:13:44 -08:00
Daniel Vaz Gaspar 34ae29e59b
feat: query REST API more fields and tests (#11482)
* feat: query REST API more fields and tests

* fix missing field
2020-10-31 10:18:34 +00:00
Moriah Kreeger 01ddbd0697
feat: annotation layers modal + filters (#11494) 2020-10-30 15:51:46 -07:00
Beto Dealmeida fbcfaacda3
feat: create base class for export commands (#11463)
* Add UUID to saved_query

* Reuse function from previous migration

* Point to new head

* feat: add backend to export saved queries using new format

* Rename ImportMixin to ImportExportMixin

* Create base class for exports

* Add saved queries as well

* Add constant, small fixes

* Fix wrong import

* Fix lint
2020-10-30 11:52:11 -07:00
Erik Ritter ca40877640
feat: add certifications to tables (#11450) 2020-10-30 11:28:01 -07:00
Beto Dealmeida 21f722c9bc
feat: add endpoint to export saved queries using new format (#11447)
* Add UUID to saved_query

* Reuse function from previous migration

* Point to new head

* feat: add backend to export saved queries using new format
2020-10-30 08:32:16 -07:00
John Bodley a8eb3fe8e7
chore: Cleaning up ENABLE_REACT_CRUD_VIEWS config (#11496)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-29 16:47:11 -07:00
ʈᵃᵢ f918ca14aa
fix(datasets): add custom filter for virtual datasets based on sql attribute (#11452) 2020-10-29 13:11:33 -07:00
David Aaron Suddjian 18658f45be
feat(dashboards): Filter status indicators (#10936)
* Initial commit of new filters badge.

* refactor applied/rejected filters code

* finished filter indicators

* filter badge tested

* unnecessary imports

* formatting and types

* fixes

* license

* code quality tweaks

* state management for showing focused filter scope

* clean up filter key extraction code

* remove unnecessary styles

* temp css to demonstrate highlighting

* fix focused filter logic

* no more color badges

* new toys for highlighting dash components (#11144)

* tweak style for the filter chart when filter is focused

* style: Filters p0 css2 (#11151)

* nixing background tweak

* src paths

* another quick theme color

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

* linting stuff

* fixing and tweaking tests

* show filter indicator when filters are not active

* chart title bar cleanup

* open the right panel when popover opens

* unused import

* fix EditableTitle tests

* margin on dashboard header

* show the chart dropdown menu

* fix blur filter breaking dropdowns

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

* fix box shadow on filter highlight

* it's an array

* attempt fixing e2e

* style: filters p0 icon churn (#11215)

* new filters icon

* icon styling

* bigger icons in list views

* better sizing of table actions and favStars

* more icon sizing...

* fixing more button size jankiness

* linting

* Filters performance (#11255)

* fixing time filter "ok" button

* making unset filter menu collapsible

* sort alphabetically

* fix highlighting when removing items

* try a flex layout (for browser render perf)

* more specific transitioning

* temp: comment out some code as a test

* temp: comment out more code

* temp: remove possibly expensive computations from ChartHolder

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

This reverts commit 309b880e90.

* Revert "temp: comment out more code"

This reverts commit 64c88b2cba.

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

This reverts commit 37ce0214f0.

* experiment: upgrade react-select to v3

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

This reverts commit c3972ba486.

* fix the damn problem

* remove code used for testing purposes

* awful hack to avoid adding a class to a container

* approaching infinity... and not beyond!

* fix ref forwarding

* add theme to tests as necessary

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

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

* fix: button translations missing (#11187)

* button translations missing

* blank space before text

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

* feat: update time_compare description and choices

* Update sections.jsx

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

* lint

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

* address design feedback

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

* rearrange code to be more graceful

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

* use is_dttm instead of is_temporal

* types, names

* only show unset filter panel if there are unset filters

* fix highlighting the filter control

* fix filterbox layout

* translations

* fix cypress

* actually add the test attribute

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

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

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

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

* formatting

* add link comment to hack

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

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

* stop importing lodash

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

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

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

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

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

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

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

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

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

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

* skip broken test

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

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

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

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

* adjust colors of titles

* linting

* no indicators when chart is loading

* support all time fields

* fix lock file

Co-authored-by: Natalie Ruhe <natalie@preset.io>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: rubenSastre <ruben.sastre@decathlon.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2020-10-28 15:46:24 -07:00
Moriah Kreeger e9dba18466
feat: annotation layers CRUD list view (#11432) 2020-10-28 15:45:07 -07:00
Ville Brofeldt ecdff724ea
feat: enable metadata sync for virtual tables (#10645)
* feat: enable metadata sync for virtual tables

* add migration and check for empty schema name

* simplify request

* truncate trailing column attributes for MySQL

* add unit test

* use db_engine_spec func to truncate collation and charset

* Remove redundant migration

* add more tests

* address review comments and apply templating to query

* add todo for refactoring

* remove schema from tests

* check column datatype
2020-10-27 07:58:38 +02:00
Ville Brofeldt 8575439f48
fix: is_temporal should be overridden by is_dttm value (#11429) 2020-10-27 07:22:27 +02:00
Daniel Vaz Gaspar 144b279aa2
feat: saved queries with execution info (#11391)
* feat: add rows and last_run info to saved queries

* feat: add rows to saved query

* refactor and tests

* lint

* fix tests
2020-10-26 11:20:07 -07:00
Daniel Vaz Gaspar 6f69212f28
feat: annotations REST API (#11344)
* feat(api): annotations and layers CRUD REST API

* lint

* annotations API and tests

* fix openapi spec

* fix openapi spec

* fix openapi spec

* annotations bulk delete

* fix openapi spec

* fix older tests

* fix older tests

* small lint fixes

* layer_id to pk to keep broad coherence on openapi spec

* fix openapi spec

* one more test and validation

* fix test name

* fix test

* fix bulk delete

* add name validation

* annotation uniqueness validation

* lint

* add sorting reqs and tests

* add statsd metrics

* Update superset/annotation_layers/annotations/dao.py

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

* Update tests/core_tests.py

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

* address comments

* address my comment :)

* fix, address comments

* lint

Co-authored-by: riahk <moar.riah@gmail.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-23 09:41:17 +01:00
Beto Dealmeida c81204aeef
feat: export dashboards as ZIP files (#11351)
* Export datasets as ZIP files

* Add logging when failing to parse extra

* Export datasets as ZIP files

* Export charts as Zip file

* Export dashboards as a Zip file

* Add logging
2020-10-22 20:02:40 -07:00
Beto Dealmeida 633355ab00
feat: export charts as ZIP files (#11349)
* Export datasets as ZIP files

* Add logging when failing to parse extra

* Export charts as Zip file

* Fix lint
2020-10-22 12:06:58 -07:00
Beto Dealmeida 00e394451f
feat: export datasets as ZIP files (#11332)
* Export datasets as ZIP files

* Add logging when failing to parse extra

* Fix logging
2020-10-22 10:32:08 -07:00
Daniel Vaz Gaspar b86f779dc1
feat: add statsd metrics to FAB rest API post, put and delete (#11362) 2020-10-22 08:56:26 +01:00
Moriah Kreeger a2a614d760
feat: CSS Templates List Actions (#11271) 2020-10-21 20:32:59 -07:00
Daniel Vaz Gaspar f14cf9d6dc
fix: saved_query search on schema and database not working (#11286)
* fix: saved_query search on schema and database not working

* add tests
2020-10-21 21:17:25 +01:00
Hugh A. Miles II dfbcbcce67
fix: Allow "EXPLAIN" queries when "Allow DML" setting is False (#11348)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2020-10-21 12:58:57 -07:00
Maxime Beauchemin 796a2a6924
fix: error around latest partition in BigQuery (#11274)
* fix: error around latest partition in BigQuery

* lint

* Going with a backend-first approach

* fix test

* add an extra test
2020-10-20 21:34:46 -07:00
Lily Kuang 9f8d0e7a06
fix: update table_name and schema on dataset editor (#11218)
* fix dataset editor for updating table_name and schema

* update test

* remove table_name from restrict list

* fix pylint

* fix cypress test

* fix test
2020-10-20 09:38:57 -07:00
hnle 7369039713
tests: Parameterize some tests in alerts_tests.py (#11313)
* SO-1099 Parameterize some tests in alerts_tests.py

* Update alerts_tests.py

Remove commented out line

* Update alerts_tests.py

Reformatted using black
2020-10-19 23:05:04 -07:00
Kasia Kucharczyk 0e97c4f66c
tests: added fixtures to created dashboards and updated test with proper value (#11290)
* Added fixtures for hidden and published dashboards. Added fixture to restore copied dashboard in dashboard tests. Changed number of dashboards in datasets/api_tests.py because copied dashboard is removed.

* Changed number of dashboards in database api tests after cleanup of dashboards in dashboards_tests
2020-10-19 15:07:26 -07:00
Beto Dealmeida 94e23bfc82
feat: export databases as a ZIP bundle (#11229)
* Export databases as Zip file

* Fix tests

* Address comments

* Implement mulexport for database

* Fix lint

* Fix lint
2020-10-16 11:10:39 -07:00
Kasia Kucharczyk 9caf875263
Refactored api_tests in charts. Split filter test into several unit tests cases. Added table id based on database id (#11249) 2020-10-14 12:41:37 -07:00
Jesse Yang 634676d467
refactor: use contextmanager for event_logger decorators (#11222) 2020-10-14 10:44:06 -07:00
Yongjie Zhao 22d8171dd6
chore(engine): adapt postgres backend connection URI (#11233)
* chore(engine): adapt postgres backend connection URI

* fix tests

* Update superset/db_engine_specs/__init__.py

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

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-14 18:57:41 +03:00
Jesse Yang 2c649ac20f
perf: cache dashboard bootstrap data (#11234) 2020-10-13 18:43:06 -07:00
Grace Guo 4f4367edf3
feat: prevent co-edit dashboard collision (#11220)
* feat: prevent co-edit dashboard collision

* fix comments
2020-10-12 17:58:32 -07:00
Daniel Vaz Gaspar 9e9dac68f7
feat(datasets): REST API bulk delete (#11237)
* feat(datasets): REST API bulk delete

* doc HTTP 400
2020-10-12 13:40:05 +01:00
Ville Brofeldt 9f3d089655
chore(sqla): assert query is single read-only statement (#11236) 2020-10-12 15:11:43 +03:00
Bogdan cb3f649a7f
chore: simplify alerting data model to leverage a single class (#11179)
* Collapse alerting models into a single one

Fixing upgrade migration & tests

* Address feedback

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-10-09 19:20:12 -07:00
Kasia Kucharczyk 56d5e8a1cb
Changed cache uid to be depending on table in test_csv_response_format (#11214) 2020-10-09 09:01:26 -07:00
Kasia Kucharczyk d93b1afe79
test: test_cache_logging is not depending on other dashboard (#11213)
* Changed test_cache_logging to be idempotent and not depending on other data than tested one

* Changed cache uid to be depending on table, not datashource
2020-10-09 09:00:41 -07:00
Grace Guo a10e86ab31
fix: revert eTag cache feature for dashboard (#11203)
* revert #11137

* revert #10963
2020-10-08 12:15:08 -07:00
Beto Dealmeida b6728d87a0
fix: skip unit test that is failing in master for test-postgres-hive (#11196)
* Get full diff

* Test

* Test

* Test

* Test

* Test

* Explicitly detect backend to skip test
2020-10-08 09:17:09 -07:00
Daniel Vaz Gaspar 7c60939429
chore: turn SQL templating off by default (#11172)
* feat: possible to turn off SQL templating

* turn SQL templating off by default

* Update UPDATING.md

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

* fix missing PR number

* fix missing PR number

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-08 11:55:39 +01:00
Beto Dealmeida 9785667a0d
feat: add UUID column to ImportMixin (#11098)
* Add UUID column to ImportMixin

* Fix default value

* Fix lint

* Fix order of downgrade

* Add logging when downgrade fails

* Migrate position_json to contain UUIDs, and add schedule tables

* Save UUID when adding charts to dashboard

* Fix heads

* Rename migration file

* Fix dashboard serialization

* Fix migration script with Postgres

* Fix unique contraint name

* Handle UUID when exporting dashboard

* Fix Dataset PUT

* Add UUID JSON serialization

* Fix tests

* Simplify logic

* Try binary=True
2020-10-07 09:00:55 -07:00
Kasia Kucharczyk 32e174d4b8
test: removed unicode_test example from unit tests (#11131)
* Removed depemdency to unicode example in tests config.

* Added common methods for creating dashboards for tests.

* Added fixtures to all tests which were using unicode example.

* Added cleanup for unicode_test table

* Removed unnecessary fixture parts of unicode dashboard tests

* Parametrized creating slice for tests

* Moved fixtures for unicode test to separate file and refactored to several methods. Added param types and return types.

* Cleandup after fix

* Changed variable names to more readable

* Added cleanup for dashboards and slices

* Applied unicode fixture to charts api tests

* Update schema variable to dtype in dashboard utils

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

* Changed variable schema to dtype in dashboards. Replaced accessing first element with one_or_none

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-07 18:29:37 +03:00
Daniel Vaz Gaspar 4c85d33109
feat: custom favorite filter for dashboards, charts and saved queries (#11083)
* feat: custom favorite filter for dashboards

* lint and sort

* add favored for charts

* fix tests and lint

* more tests and saved query filter

* fix tests

* fix tests

* lint

* lint and fix conflict

* remove unnecessary prop

* separate tests
2020-10-01 15:08:40 -07:00
Daniel Vaz Gaspar fdb26f6131
feat: CRUD REST API for CSS Templates (#11114)
* feat: CSS Template CRUD API

* fix API docs

* fix copy pasta

* lint
2020-10-01 11:46:25 +01:00
Moriah Kreeger e7a4265c30
feat: saved query list actions (#11109) 2020-09-30 18:18:34 -07:00
Lily Kuang 5b284e67eb
feat: add created by chart CRUD view (#11067) 2020-09-30 13:53:04 -07:00
Ville Brofeldt ada66e30dd
fix(chart-data-api): ignore missing filters (#11112) 2020-09-30 09:34:23 +01:00
Bogdan 03eebd3019
fix: fix table existence validation function (#11066)
* Fix table existance validation function

* Drop left over table name index in mysql db

* Do not modify model

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-29 15:01:01 -07:00
Moriah Kreeger b8d616a9d2
feat: saved query list view + sort/filters (#11005) 2020-09-29 13:39:10 -07:00
Grace Guo 6633409a15
feat: enable ETag header for dashboard GET requests (#10963)
* feat: add etag for dashboard load requests

* fix review comments
2020-09-29 10:57:16 -07:00
Daniel Vaz Gaspar 5d08a426d3
fix(api): unable to delete virtual dataset, wrong permission name (#11019)
* fix(api): unable to delete virtual dataset because of wrong permission name

* Still delete the dataset even when no permission was found

* migration script to fix possible existing faulty permissions on the db

* black

* fix db migration and one more test

* add more comments to the migration script

* freeze a partial schema of the model on the migration step

* fix mig script

* Update superset/migrations/versions/3fbbc6e8d654_fix_data_access_permissions_for_virtual_.py

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

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-09-29 12:33:07 +01:00
Ville Brofeldt 80e395559d
fix: echarts timeseries groupby (#11103)
* fix: echarts timeseries groupby

* address review comment
2020-09-29 14:25:38 +03:00
Lily Kuang e337355162
refactor: table selector on dataset editor (#10914)
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-09-28 11:16:03 -07:00
ʈᵃᵢ 1dc05d4c12
feat(charts): modify custom api filter to include more fields (#11054) 2020-09-28 10:18:34 -07:00
Lily Kuang ea105bc23b
feat: add "created by" to dashboard CRUD view (#11030) 2020-09-24 14:33:55 -07:00
ʈᵃᵢ eded51b2f8
feat(saved_queries): add custom api filter for all string & text fields (#11031) 2020-09-24 11:05:25 -07:00
Bogdan b2fdf12f62
Support jinja templates (#11008)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-24 10:29:44 -07:00
Ville Brofeldt a9eab33d64
feat: add ECharts Pie chart (#10966)
* feat: introduce echarts pie chart

* lint

* remove viz.py shim

* remove tests

* fix cypress test

* fix test
2020-09-22 19:27:40 +03:00
Ville Brofeldt bd140e018a
fix(presto): default unknown types to string type (#10753)
* fix(presto): default unknown types to string type

* lint
2020-09-22 13:16:54 +03:00
Ville Brofeldt 448a41a4e7
feat(row-level-security): add base filter type and filter grouping (#10946)
* feat(row-level-security): add filter type and group key

* simplify tests and add custom list widget

* address comments

* use enum value to ensure case sensitive value is used
2020-09-22 08:54:10 +03:00
Bogdan 56d001835e
fix: use nullpool even for user lookup in the celery (#10938)
* Use nullpool even for user lookup in the celery

* Address feedback

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-21 10:34:03 -07:00
Bogdan 801fb4063c
Allow empty observations in alerting (#10939)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-21 08:48:02 -07:00
Daniel Vaz Gaspar e375ed4678
fix(jinja): make context attrs private on SQL templates (#10934)
* fix(jinja): make SQLAlchemy models private on SQL templates

* add missing privates

* fix test
2020-09-18 12:56:07 +01:00
Bogdan c3f1720456
fix: superset alerting misc fixes (#10891)
* Superset alerting misc fixes

* Test 0 threshold

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-16 11:09:11 -07:00
John Bodley b48dd4b7d9
chore: Using cache factory method (#10887)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-09-15 12:48:19 -07:00
Bogdan 9c420d6efe
feat: implement cache invalidation api (#10761)
* Add cache endpoints

* Implement cache endpoint

* Tests and address feedback

* Set cache config

* Address feedback

* Expose only invalidate endpoint

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-15 11:17:21 -07:00
Yongjie Zhao 38edb69d95
Feat: Adding table comment and columns comment for SQLLab (#10844)
* Adding table comment and columns comment for backend

* fix mypy

* Fix CI

* adding wider catch

* use logger

* fix lint
2020-09-14 21:11:48 -07:00
Daniel Vaz Gaspar 7b2200437e
fix(test): missing auth on tests (#10842)
* fix(test): missing auth on tests

* fix mock

* make test login more inline with other tests
2020-09-11 14:28:41 +01:00
Daniel Vaz Gaspar 136f90f87c
feat: SavedQuery REST API for bulk delete and new API fields (#10793)
* feat: SavedQuery REST API for bulk delete

* fix, singular msg and test

* remove 403 from OpenAPI spec

* filter by current user using created_by add sql_tables field

* fixes for new filter, add user field on pre_update, pre_add

* add lru cache to property

* Revert "add lru cache to property"

This reverts commit ad0d9428
2020-09-11 09:36:47 +01:00
Lily Kuang f0545bfe50
fix(databases): test connection api endpoint (#10824)
* fix test connection with extra

* fix lint and allow_none server_cert

* update test connection tests
2020-09-10 21:49:14 +01:00
Bogdan ac2937a6c5
fix: use nullpool in the celery workers (#10819)
* Use nullpool in the celery workers

* Address comments

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-10 13:29:57 -07:00
Daniel Vaz Gaspar e6a4808cb7
fix(tests): export dataset tests fails with presto (#10818)
* fix(tests): export dataset tests fails with presto

* debug

* debug

* skip dataset export test on presto

* add TODO on failing test
2020-09-09 21:46:28 -07:00
Lily Kuang 8a3ac70c06
feat(databases): test connection api (#10723)
* test connection api on databases

* update test connection tests

* update database api test and open api description

* moved test connection to commands

* update error message

* fix isort

* fix mypy

* fix black

* fix mypy pre commit
2020-09-09 13:37:48 -07:00
ʈᵃᵢ 50672bb11b
feat: database delete warning (#10800) 2020-09-08 18:54:02 -07:00
Ville Brofeldt 3ae80d3b98
test: add rls jinja extra cache key test (#10810) 2020-09-08 07:42:48 +03:00
Daniel Vaz Gaspar 5199423ad1
feat: CRUD REST API for saved queries (#10777)
* feat: CRUD REST API for saved queries

* debug test

* fix test

* use pytest fixtures
2020-09-03 15:46:27 -07:00
Ville Brofeldt 70c6764780
fix: pivot table timestamp grouping (#10774)
* fix: pivot table timestamp grouping

* address comments
2020-09-03 19:49:54 +03:00
Jason Davis 54ae3b044f
fix: add validator information to email/slack alerts (#10762)
* added validator info to alerts

* adjusted format of messages

* added nits

Co-authored-by: Jason Davis <@dropbox.com>
2020-09-03 08:15:05 -07:00
John Bodley 1ee87cc4d1
fix: dashboard extra filters (#10692)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-09-02 16:03:25 -07:00
ʈᵃᵢ 7bccb38a60
feat: SIP-34 table list view for databases (#10705) 2020-09-02 11:48:21 -07:00
ʈᵃᵢ 5a4370012b
refactor: convert DatasetList schema filter to use new distinct api (#10746) 2020-09-02 11:07:37 -07:00
Daniel Vaz Gaspar 77a3167412
feat(database): POST, PUT, DELETE API endpoints (#10741)
* feat(database): POST, PUT, DELETE API endpoints

* post tests

* more tests

* lint

* lint

* debug ci

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* cleanup

* handle db connection failures

* lint

* skip hive and presto for connection fail test

* fix typo
2020-09-02 09:58:08 -07:00
Jason Davis b59f6b1833
feat: refractored SQL-based alerting framework (#10605)
* added new tables for alerting refractor

* reformatted inheritance structure

* added workflow for updated framework

* added suggested changes

* cleaned up changes

* added obervations to alert table to enable view

* added comments

* added requested changes

* fix tests

* added styling changes

* mypy

* added requested changes

* updated operator logic

* requested changes, 1 validator, styling changes

* refactored tests

* fix test alert workflow

* fixed create_alert in test

Co-authored-by: Jason Davis <@dropbox.com>
2020-09-01 13:36:02 -07:00
Bogdan 4572ebb600
chore: log cache keys to the logs (#10678)
* Log cache keys to the logs

* Add tests

* Use separate table for the cache keys

* Add migration for the cache lookup table

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-01 09:41:25 -07:00
Maxime Beauchemin 3d8857ecc8
style: rename 'Source' top nav item to 'Data' (#10715)
* style: rename 'Source' top nav item to 'Data'

* Fix tests

* tables -> datasets

* rename datasource -> dataset

* lint

* more renaming

* use npm ci
2020-08-29 18:09:47 -07:00
Bogdan 33fa9ebff1
Covert celery tests to the pytest (#10704)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-28 17:04:30 -07:00
Ville Brofeldt 58b075bc17
fix(jinja): extract form_data from json body (#10684)
* fix(jinja): extract form_data from json body

* add test

* disable test for presto
2020-08-28 21:26:07 +03:00
Daniel Vaz Gaspar 3e374dab07
fix: change public role like gamma procedure (#10674)
* fix: change public role like gamma procedure

* lint and updating UPDATING with breaking change

* fix updating text

* add test and support PUBLIC_ROLE_LIKE_GAMMA

* fix, cleanup tests

* fix, new test

* fix, public default

* Update superset/config.py

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

* add simple public welcome page

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-28 10:49:10 +01:00
Bogdan 6ed36552e6
Use test name for the custom macros testing: (#10695)
:

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-27 13:12:24 -07:00
Bogdan 19a9bcc9c5
chore: ci Initial hive support (#10593)
* Initial hive support

* Clone hive setup

* Make hive tests work locally

* Debugging presto failure

* sleep in dataset test

* Address comments

* Address comments

* Pin ipython, exclude new pylint rules

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-27 09:49:18 -07:00
Lily Kuang bb92c1f84d
feat: chart and dashboard card list view e2e cypress test (#10669)
* card view cypress tests

* update test config

* chart filter cypress test

* move setting to superset test config

* update test description card view
2020-08-27 09:38:12 -07:00
John Bodley 502f4db6f9
feature: Adding extra_filters to warm_up_cache (#10675)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-08-25 15:19:34 -07:00
Ville Brofeldt 9461f9c1e0
fix(db_engine_specs): improve Presto column type matching (#10658)
* fix: improve Presto column type matching

* add optional callback to type map and add tests

* lint

* change private to public
2020-08-24 22:42:07 +03:00
Ville Brofeldt 0177c2f591
fix(db_engine_specs): mysql longtext type should not be numeric (#10661) 2020-08-24 21:24:43 +03:00
Daniel Vaz Gaspar 692266f4f5
feat: dataset REST API for distinct values (#10595)
* feat: dataset REST API for distinct values

* add tests and fix lint

* fix mypy, and tests

* fix docs

* fix test

* lint

* fix test
2020-08-17 15:46:59 +01:00
Ville Brofeldt acb00f509c
fix(chart-data-api): assert referenced columns are present in datasource (#10451)
* fix(chart-data-api): assert requested columns are present in datasource

* add filter tests

* add column_names to AnnotationDatasource

* add assertion for simple metrics

* lint
2020-08-14 20:58:24 +03:00
Ville Brofeldt c0ebd7f434
fix: show error if rolling window returns empty df (#10572)
* fix: show error if rolling window returns empty df

* add test
2020-08-13 20:51:03 +03:00
Daniel Vaz Gaspar 11da6ee812
fix: dataset delete and perm delete (#10578) 2020-08-13 10:18:13 +01:00
Craig Rueda 2aaa4d92d9
chore: Migrating reports to AuthWebdriverProxy (#10567)
* Migrating reports to AuthWebdriverProxy

* Extracting out webdriver proxy / Adding thumbnail tests to CI

* Adding license

* Adding license again

* Empty commit

* Adding thumbnail tests to CI

* Switching thumbnail test to Postgres

* Linting

* Adding mypy:ignore / removing thumbnail tests from CI

* Putting ignore statement back

* Updating docs

* First cut at authprovider

* First cut at authprovider mostly working - still needs more tests

* Auth provider tests added

* Linting

* Linting again...

* Linting again...

* Busting CI cache

* Reverting workflow change

* Fixing dataclasses

* Reverting back to master

* linting?

* Reverting installation.rst

* Reverting package-lock.json

* Addressing feedback

* Blacking

* Lazy logging strings

* UPDATING.md note
2020-08-12 13:28:41 -07:00
Ville Brofeldt 85c0cad816
fix: add None checking to cast_to_num (#10584)
* fix: add None checking to cast_to_num

* fix doctest
2020-08-12 19:58:14 +03:00
Jason Davis c0bb86d0d6
feat: slack integration for SQL-based alerts (#10566)
* add slack functionality

* deleted unused variable

* updated test

* black

* fix rebase

* added nits

* added slack no screenshot integration

* isort

* added namedtuple for screenshot

* added test

* fix precommit

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-11 11:15:31 -07:00
Bogdan 0071d374da
chore: move load examples to the fixture (#10545)
* Move load examples to the fixture

* Update tests/celery_tests.py

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

* Address feedback

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-10 13:20:19 -07:00
Bogdan 101e5b670b
chore: clean up csv tests (#10556)
* Clean up csv tests

* Update tests/base_tests.py

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

* Update tests/base_tests.py

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

* import optional

* Fix mypy error

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-10 11:22:38 -07:00
Jason Davis 8b9292ed05
fix: add retry to SQL-based alerting celery task (#10542)
* added retry and minimized sqlalchemy object lives

* pylint

* added try catch

* adjusted naming

* added scoped session

* update tests for dbsession

* added requested changes

* nit todo

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-10 10:20:43 -07:00
Ville Brofeldt 08358d623b
fix: handle query exceptions gracefully (#10548)
* fix: handle query exceptions gracefully

* add more recasts

* add test

* disable test for presto

* switch to SQLA error
2020-08-07 17:37:40 +03:00
Ville Brofeldt 363abfa1a5
fix: remove unnecessary exception when exploring non-legacy viz plugins (#10538)
* fix: remove unnecessary exception when exploring non-legacy viz plugins

* lint
2020-08-07 08:41:39 +03:00
Erik Ritter fd2d1c58c5
Revert "chore: Cleanup database sessions (#10427)" (#10537)
This reverts commit 7645fc85c3.
2020-08-06 15:33:48 -07:00
Bogdan 62b873e3da
feat: welcome presto to the suite of tested databases (#10498)
* Add presto to the CI

Sample test data

Datetime conversion

Sample test data

Fix tests

* TODO to switch to timestamps

* Address feedback

* Update requirements

* Add TODOs

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-06 12:07:22 -07:00
Jason Davis 9c5b0e1c86
fix: refactored SQL-based alerts to not pass sqlalchemy objects as args (#10506)
* refractored alerting to not pass sqlalchemy obj as args

* updated to pass only alert id as arg

* used object id instead of argument

* updated alerts_tests.py to reflect change

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-04 09:52:32 -07:00
Bogdan ab404ea2cf
Sample test data (#10487)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-03 09:08:49 -07:00
Jesse Yang ce10e13ec3
test: schedules test refactor (#10492) 2020-07-31 12:05:39 -07:00
Ville Brofeldt 9d9c34835a
fix: support non-string groupbys for pie chart (#10493)
* chore: add unit tests to pie chart

* refine logic for floats and nans and add more tests
2020-07-31 11:19:21 +03:00
John Bodley 7645fc85c3
chore: Cleanup database sessions (#10427)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-30 23:07:56 -07:00
Jesse Yang 7ff1757448
build: optimize GitHub Actions for building speed and stability (#10485) 2020-07-30 22:28:56 -07:00
Jason Davis 7a329c25e9
feat: add test email functionality to SQL-based email alerts (#10476)
* added test email functionality

* formatting changes

* more formatting

* applied requested changes

* mypy

Co-authored-by: Jason Davis <@dropbox.com>
2020-07-30 13:27:22 -07:00
Hossein Torabi 259a344fd1
test: upload excel (#10467) 2020-07-29 12:50:39 -07:00
ʈᵃᵢ 78cad9a4a8
refactor(listviews): use correct filter endpoints for charts and datasets (#10442) 2020-07-29 11:00:19 -07:00
Daniel Vaz Gaspar 671461d0d0
feat(api): database schemas migration to new API (#10436)
* fix(log): log crashes if expired or not authenticated

* fix lint and rison

* add tests

* more tests

* perm fix

* fix test not found

* JS lint

* fix Jest test
2020-07-29 09:33:15 +01:00
Jason Davis d065633c81
fix: Implement updates to SQL-based email alerts (#10454)
* implemented updates to alerting

* fixed imports and teardown

* changed unittest to pytest conventions

* add app_context to tests

Co-authored-by: Jason Davis <@dropbox.com>
2020-07-28 16:48:42 -07:00
Beto Dealmeida 4f678272d6
fix(presto): Handle ROW data stored as string (#10456)
* Handle ROW data stored as string

* Use destringify

* Fix mypy

* Fix mypy with cast

* Bypass pylint
2020-07-28 16:05:58 -07:00
Ville Brofeldt fc28c92f57
feat: support non-numeric columns in pivot table (#10389)
* fix: support non-numeric columns in pivot table

* bump package and add unit tests

* mypy
2020-07-28 10:40:53 +03:00
ʈᵃᵢ 6f56cd5e9d
feat(listviews): SIP-34 filters for charts, dashboards, datasets (#10335) 2020-07-27 10:14:11 -07:00
Daniel Vaz Gaspar 562012c586
fix(permissions): alpha role has all full features (#10241)
* fix(permissions): alpha role is inconsistent

* reverse and allow Alpha to access manager menu

* Bump FAB to 3.0.1rc1 to include del permission fix

* add docs, tests and UPDATING

* EOL

* Fix query view for Alpha
2020-07-27 10:32:30 +01:00
Ville Brofeldt 5b6ff4944c
fix: incorrect filter operator emitted by Filter Box (#10421)
* fix: equals operator in filter box

* fix time range endpoint schema

* fix test

* bump packages

* fix tests

* lint
2020-07-26 12:40:03 +03:00
Daniel Vaz Gaspar 2fd37b18e3
fix(api): fixes perf on charts and introduces sorting by database on datasets (#10392) 2020-07-23 11:19:05 -07:00
Daniel Vaz Gaspar 98a11e7cf2
fix(api): fixes openapi spec errors and adds a test to validate all spec (#10393) 2020-07-23 10:43:41 +01:00
Daniel Vaz Gaspar 961108625e
fix(datasets): sort and humanized modified by (#10380)
* fix(datasets): sort and humanized modified by

* size xl on changed_on_delta_humanized

* Fix, tests

* Fix, tests

* Fix, frontend tests

* remove debug flag
2020-07-22 11:34:47 +01:00
Maxime Beauchemin 85169f2f1c
chore: remove QueryView (ModelView) (#10162)
* chore: deprecate QueryView (ModelView)

* lint

* fix unit tests
2020-07-21 09:14:15 -07:00
Erik Ritter 5fa4680447
feat: update timeout error UX (#10274) 2020-07-20 15:32:17 -07:00
Bogdan 7075c2ff69
Pin slack client, breaking change (#10345)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-20 09:20:05 -07:00
Ville Brofeldt 7af8b2b3f8
feat: add optional prophet forecasting functionality to chart data api (#10324)
* feat: add prophet post processing operation

* add tests

* lint

* whitespace

* remove whitespace

* address comments

* add note to UPDATING.md
2020-07-20 18:46:51 +03:00