Commit Graph

6283 Commits

Author SHA1 Message Date
ʈᵃᵢ 6fcda5dac1
feat: add cron picker to AlertReportModal (#12032)
* humanize cron display in list view
2020-12-14 22:29:31 -08:00
ʈᵃᵢ fda3a2fe7c
fix: disable browser autocomplete for DeleteModal (#12043) 2020-12-14 14:10:55 -08:00
Hugh A. Miles II 3d56f58ef5
fix: Explore "Change Dataset" UX Enhancements (#12006) 2020-12-14 13:17:20 -05:00
Lily Kuang d5b16bcd85
fix schema datasource modal (#12018) 2020-12-14 08:44:47 -08:00
adam-stasiak-polidea 6311a9ec8c
feat: Added setup for running Cypress tests in docker locally (#11207)
* Working configuration

* Fixes

* Set database volume directory. Added info in CONTRIBUTING how to avoid malformed database in tests.
2020-12-14 08:06:19 -08:00
Geido 1afe91579e
refactor: Existing Antd Collapse to enhanced (#12013)
* Move ProgressBar to Antd

* Remove trailing space

* Fix linting issues

* Export enhanced Progress only

* Move existing antd Collapse to enhanced Collapse

* Move enhanced props up to Collapse only

* Add stories for enhanced Collapse

* Add 100% height for overflow

* Improve text light story
2020-12-13 22:57:08 -08:00
Evan Rusackas fee9bbe57b
style: Restoring menu highlights (#12024)
* restoring highlights

* fixing copypasta
2020-12-13 22:48:26 -08:00
Srini Kadamati 3e22668f8d
docs: restored page on roles in security, executed other touchups, and… (#11978)
* Restored docs page on roles in security, executed other touchups, and renamed docs readme.txt to readme.md

* missed a url anchor on the security page

* fixed licensing issue and limited char width to 80

* fixed licensing issue and limited char width to 80

* whitespace experiments

* removed 2 periods

* staging whitespace

* addressed Robs feedback

* implemented robs second round of feedback on public_role_like
2020-12-13 14:06:14 -08:00
Victor Malai 022d755640
refactor : Change menu name and reorder items (#11993)
* Change menu name and reorder items

* change type

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-12 21:58:57 -08:00
Victor Malai 90ed3267e4
fix: Change url & add check for active item in menu (#11915)
* Change url & add check for active item in menu

* Refactor to pass lint validation

* Fix lint

* Revert back and remove underline
2020-12-11 20:25:29 -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
Beto Dealmeida 9277a54a12
feat: add confirmation dialog for imports (#11983)
* feat: add confirmation dialog for imports

* Small fixes

* Clean return
2020-12-11 17:23:43 -08:00
Moriah Kreeger 696308715d
feat: alerts/reports add/edit modal (#11770) 2020-12-11 15:50:08 -08:00
Beto Dealmeida 5d8ecc01b7
fix: add default position to dash export (#12007)
* fix: add default position to dash export

* Add constants
2020-12-11 11:55:33 -08:00
Beto Dealmeida 2769de3731
chore: remove generic type (#12003)
* chore: remove generic type

* Make resourceName type stricter

* Fix type

* Fix type

* Fix lint
2020-12-11 10:52:26 -08:00
Daniel Vaz Gaspar 916f7e923a
fix(dataset): fetch metadata on dataset creation may raise broad exceptions (#11973)
* fix(dataset): fetch metadata on dataset creation may raise broad driver exceptions
2020-12-11 11:07:43 +00:00
Victor Malai 12d9d1eccb
refactor : Transform SaveModal to typescript (#11951)
* Transform SaveModal to typescript

* Revert title

* Resolve code review

* Refactor

* Refactor

* Change

* Call method

* Fix test

* ShouldPersist default false

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-10 23:02:03 -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
Grace Guo 0fdf026cbc
feat: add invisible layer on loading chart (#11994) 2020-12-10 16:15:10 -08:00
Lily Kuang df6efb6aa2
feat: alert/report execution log list view (#11937) 2020-12-10 15:15:13 -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
Beto Dealmeida 9e07e10055
chore: move passwords needed message (#12002) 2020-12-10 11:47:54 -08:00
Michael S. Molina 3a6254184a
refactor: Removes hard coded colors (#11977)
* Removes hard coded colors

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

* Use theme context for Select styles

* Includes Theme Provider in tests with Select
2020-12-10 11:43:57 -08:00
Beto Dealmeida 9256b6fb3d
chore: consolidate common code in importers (#11936)
* chore: consolidate common code in importers

* Small fixes

* Small fixes
2020-12-10 10:11:58 -08:00
Victor Malai 38bb6f3f20
fix : Fix style for header (sqllab) (#11980)
* Fix style for header

* flex

* Refactor

* Remove styled from import

* Change width of container

* Add tooltip and set fixed width of sidebar

* Fix lint

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-09 23:34:43 -08:00
Mayur Newase 8cc566792a
fix(explore): changing metric aggregate doesn't update label (#11946)
* fix: [chart]heatmap selecting metrics does not update the query results
fixes issue #11866
title's label is overriding metric label.

* Using custom label to decide label of metrics.

* lint

* Tests fixed

* early metric label check while saving from ui

* early custom label check

* removed extra space

* no state mutations

* simplify

* removed log

* nned to fix linting issue

* Lint fixed
2020-12-10 09:30:57 +02:00
Evan Rusackas c73904b02e
fixing rounded corners (#11990) 2020-12-09 21:07:23 -08:00
Victor Malai 5435064807
refactor : Transform FilterScopeModal to Typescript (#11964)
* Transform from jsx to tsx

* replace any with void

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-09 15:46:06 -08:00
Victor Malai e62cf0d84d
fix : adhoc filter dropdown (#11963)
* Add z-index to popover

* Fix prettier

* Fix closing popover on select from dropdown

* Fix prettier

* Fix visibility change

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-09 15:44:20 -08:00
Kamil Gabryjelski 6fe1f9d78a
Debounce TextControl if change runs immediately after input (#11985) 2020-12-09 15:41:44 -08:00
Kamil Gabryjelski a4b06d23fd
Change paddings on ListView and SubMenu (#11975) 2020-12-09 15:08:59 -08:00
Elizabeth Thompson 3c177e550b
add user to sql lab state (#11986) 2020-12-09 14:53:15 -08:00
Beto Dealmeida 36976d17f7
fix: make "DELETE" confirmation work in other languages (#11987)
* Confirm delete i18n

* Make DELETE a parameter
2020-12-09 14:40:07 -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
David Aaron Suddjian 6270fa2026
refactor: Upgrade Redux (#11967)
* upgrade redux and react-redux, adjust types

* first round of test fixes

* fix rest of unit tests

* lint

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
2020-12-09 11:58:42 -08:00
Jesse Yang 9121482479
refactor: move enums to the beginning of utiuls/core.py (#11883) 2020-12-09 11:04:09 -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
Maxime Beauchemin 150c8e36b1
fix: always fetch database list on bootstrap payload (#11934)
There was this weird bug happening only when `SQLLAB_BACKEND_PERSISTENCE
= False` where if no database had been selected, there would be some
issue.

This makes sure that the store is populated consistently with the list
of database connections regardless of `SQLLAB_BACKEND_PERSISTENCE`. It
also uses the DAO to fetch database and will apply the RBAC-related
filters if any, the same way that the API does.
2020-12-09 09:36:18 -08:00
Hugh A. Miles II cc44a2c01b
feat: Sqllab to Explore UX improvements (#11755)
* create boiler modal component

* hello world modal

* setup modal flow

* setup savemodal for components

* flake8

* fix onclick reference

* working create datasource boiler

* saving spot for callback on text input

* working dataset with input box

* working redirect on completion

* get data for owners dropdown

* fix build with pull from master

* fix the filteroption

* 💯

* move state to upper component

* add overwrite state

* hacked overwrite process

* linting

* fix filter

* cleaning up the coe

* Delete preset.code-workspace

* remove unused code

* remove visualize

* update default value

* remove unneeded vars

* checkout package-lock.json

* linting

* get user id

* remove page filter

* setup proper call for updating columns in dataset

* add move to explore flow

* linting

* add param for overriding columns

* linting

* change title

* fix some tings

* cleanup

* linting

* add types in some places

* save toast

* use moment

* add error toast

* create enum for radio states

* initial state for saving query

* add tpying

* addressing concerns

* update propTypes

* add functionality for CTAS explor btn

* handle CTAS state

* fix onclick to reference upper level component

* formatting

* reset state after closing

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

* remove unneeded todo

* remove styling

* move async calls to api directory

* remove console.log

* add user id param

* typing

* littty

* move put to seperate file

* save

* dsf

* fix typing errors

* adding more types

* fix typing erros

* linting

* add basic spec test

* create dataset modal

* add components reference

* Rename SaveDatasetModal_spec.jsx to SaveDatasetModal_spec.tsx

* remove sinon for now

* fix typing errors on modal files

* fix linting

* address comments

* attempt to fix linting

* add props

* fix test

* fix the linting

* yerp

* fix this references

* spaces

* handleOverwriteCancel reference cleanup

* rename bool value for shouldOverwriteDataset

* fix typing for onChange

* you still the best in the world

* fix spec

* align branches

* push

* fix key names

* fix dataset reference

* lowercase

* fix save bug with tiem

* fixed styling

* fix date state after push to explore

* add disabling states

* plz refactor this

* this is working fully now

* do some renaming

* renaming

* remove console.logs

* still refactoring

* remove unneeded code

* remove unneeded variables

* still cleaning

* added interface

* fix typing issues

* cleanup unused code

* fix npm lnit

* fix initial problems

* add props to test

* remove unneeded files

* skip linting

* saving

* this works

* remove old test

* remove old test

* fix linting

* fix broken test

* remove jsx file

* refactoring

* cleanup

* remove comments

* reset user object

* fix functions

* fix this

* reverting CTAS btn flow

* remove onclick

* save frontend work

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

* use enum

* fix linting

* style alignment

* get rid of .then

* add function to compute default value with tiem

* lit

* remove ts-error

* fix typing
2020-12-08 17:29:41 -08:00
Jesse Yang 8164aeafb1
build: cancel previous github action runs (#11940) 2020-12-08 15:27:08 -08:00
Daniel Vaz Gaspar 7e6f04fce4
fix(alerts, thumbnails): celery tasks using flask-sqlalchemy sessions (#11950)
* fix(alerts, thumbnails): celery tasks using flask-sqlalchemy sessions

* selenium user is case sensitive
2020-12-08 13:03:32 +00:00
Victor Malai 05258ebc6c
fix(event-flow-viz): handle null metadata selection (#11885)
* Initialize object with empty array if is multiselect, fix 500 BE error

* modify data coming
2020-12-08 08:53:26 +02:00
Beto Dealmeida 8f1ac7ead1
feat: add modal to import dashboards (#11924) 2020-12-07 21:26:14 -08:00
Beto Dealmeida 33325f9fa6
feat: add modal to import charts (#11956)
* WIP

* Splat props
2020-12-07 18:33:59 -08:00
Beto Dealmeida fbb458fa8b
feat: add modal to import datasets (#11910) 2020-12-07 16:20:25 -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
Krist Wongsuphasawat a7bba92469
chore: bump nvd3 plugin version (#11947) 2020-12-07 12:19:03 +07:00
Daniel Vaz Gaspar 14ea444e58
fix(charts): screenshot API declaring an unnecessary rison arg (#11931) 2020-12-05 08:57:44 +00:00
Daniel Vaz Gaspar f98ae014fa
feat(releasing): support changelog csv export (#11893)
* feat(releasing): support changelog csv export

* fix lint and type annotations
2020-12-05 08:55:31 +00:00
Kamil Gabryjelski 41738df77d
feat: Results table on Explore view (#11854)
* Upgrade react-split

* Implement split on ExploreChartPanel

* Implement tabs with collapse

* Fix run query button

* Fix copy to clipboard button

* Move table controls to separate file

* Make component more generic to handle samples

* Remove samples from DisplayQueryButton

* Move data tables to separate file

* Make split dynamically controlled

* Fix unit test

* Fix arrow not centered

* fixup! Fix arrow not centered

* Change copy button paddings

* Use translations

* Fix grammar in a comment

* Fix imports

* Use grid units

* Convert new files to typescript

* Fix after rebase

* Remove forceRender

* Fix big_number test

* Delay making request until panel is opened

* White background in south panel

* fixup! White background in south panel

* Lint fix

* Lint fix

* Remove redundant prop types

* Remove console log

* Delay loading samples until user switches tab

* Add debounce to filter input

* Use gridUnit for gutter sizes

* Change types object to Record<string, any>
2020-12-04 19:49:24 -08:00