Commit Graph

56 Commits

Author SHA1 Message Date
cccs-Dustin
02ef9ca4cd feat(sqllab): Add a configuration option to disable data preview (#19104) 2022-03-17 15:22:57 +02:00
Ville Brofeldt
299635c580 docs: add password example to dataset import API (#18580) 2022-02-07 09:38:55 +02:00
Adam Dobrawy
dad6f78419 refactor: extract json_required view decorator (#18170)
* refactor: extract json_required view decorator

* chore: rename json_required to requires_json

* refactor: add requires_form_data decorator and use it

* fix: fix lint issue, raise InvalidPayloadFormatError for invalid payload
2022-01-31 08:53:48 -03:00
Hugh A. Miles II
e5fe18660c fix: Show sqllab state when deleting databases (#17331)
* saving

* fix ts

* update test

* update test

* log unit

* updated test
2021-11-04 20:17:08 -04:00
Shiva Raisinghani
ef3afbde82 refactor: Repeated boilerplate code between upload to database forms (#16756)
* abstract boilerplate code into class and rename csv to file

* add db migration

* fix some stuff

* more renaming of csv to file

* rename in translations

* update down revision

* update down revision

* bump chart version

* switch to alter column name approach in db migration

* fix db migration for MySQL

* db migration conflict
2021-10-25 13:53:06 +03:00
AAfghahi
904c506591 fixing db connection (#16899) 2021-09-29 10:02:34 -07:00
AAfghahi
aa747219ad feat: Add Private Google Sheets to dynamic form (#16628)
* first pass private gsheets

* made encrypted extra into string, refactored onParametersChanged

* private sheets working, credential_info errors

* all but test connection working

* first pass private gsheets

* made encrypted extra into string, refactored onParametersChanged

* private sheets working, credential_info errors

* all but test connection working

* Regenerate package-lock.json

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-09-28 17:08:50 -07:00
John Bodley
1669947bcd chore(pylint): Reenable too-many-lines check (#16287)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-09-13 13:22:19 -07:00
John Bodley
7e4c940314 chore(pylint): Enable useless-suppression check (#16388)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-24 03:58:41 +12:00
John Bodley
be7065faf8 chore(pylint): Reenable raise-missing-from check (#16266)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 10:26:10 +12:00
Peter Kosztolanyi
02032ee8a4 feat: cancel db query on stop (#15403)
* feat: cancel db query on stop

* fix pylint

* Add unit tests

* Do not bind multiple times

* Stop only running queries

* Postgres to cancel only the required query

* Remove extra log

* Add docstring

* Better types, docstring and naming

* Use python3 format strings

* Update superset/sql_lab.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Add cancel_query_on_windows_unload option to database

* Return cancel_query as bool

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-07-13 12:09:22 -04:00
Hugh A. Miles II
f67e40236d update db for expose in sqllab param (#15609) 2021-07-09 10:08:17 -07:00
Beto Dealmeida
301b94f49a fix: available endpoint showing specs without drivers (#15587) 2021-07-08 09:20:52 -07:00
Hugh A. Miles II
d4480f5c9a feat: Database Connection UI (#14881) 2021-07-01 14:40:27 -07:00
Beto Dealmeida
90d9097841 fix: validate DB-specific parameters (#15155)
* fix: validate DB-specific parameters

* Fix lint

* Update test

* Fix lint/test

* Fix lint

* Update superset/databases/api.py
2021-06-14 18:44:18 -07:00
Beto Dealmeida
53df152362 feat: show spinner on exports (#15107)
* feat: show spinner on exports

* Set cookie only if token is passed

* Use iframe

* Small fixes

* Fix lint

* Remove stale test

* Add explicit type
2021-06-11 17:25:00 -07:00
Beto Dealmeida
2313e3ef4f fix: show error on invalid import (#14851)
* fix: show error on invalid import

* Add unit test

* Remove unused imports

* Fix tests
2021-05-27 14:46:41 -07:00
Beto Dealmeida
8b1a117d24 feat: return parameters only for DB with default driver (#14803)
* WIP

* Fix sorting of DBs
2021-05-25 14:46:54 -07:00
Beto Dealmeida
f1ea1d74a7 fix: OpenAPI boolean type (#14827) 2021-05-25 14:46:41 -07:00
Hugh A. Miles II
6d33432b58 feat: Create BigQuery Parameters for DatabaseModal (#14721) 2021-05-23 12:45:48 -04:00
Hugh A. Miles II
4160e45398 feat: Add headers for DatabaseModal (#14647)
* update styles sheets

* save this

* add backend

* update backend reference

* update styles

* my style updates

* sticky header
2021-05-19 13:20:02 -04:00
Hugh A. Miles II
ec0a7922fe feat: Add Parameters fields to GET Database (#14653) 2021-05-19 10:25:20 -04:00
AAfghahi
4f5c537250 feat: Configuration Method and expanded parameters for Database Model (#14451)
* db migration for dbs

* first draft at logic

* added unit tests

* revisions

* use strings for db values

* lint and revisions to tests

* changed test back

* added revisions for testing

* Update superset/databases/commands/update.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/databases/schemas.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/models/core.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/databases/commands/update.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* got rid of extra imports added new test

* Update superset/databases/schemas.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-05-14 18:19:17 -07:00
Hugh A. Miles II
3a81e6aee8 change name to Basic instead of Base (#14625) 2021-05-13 15:05:37 -04:00
Beto Dealmeida
31f406a526 feat: API endpoint to validate databases using separate parameters (#14420)
* feat: new endpoint for validating database parameters

* Rebase

* Remove broken tests
2021-05-12 18:32:10 -07:00
Sam Faber-Manning
11260b3117 chore: add stack trace to all calls of logger.error (#14382) 2021-04-30 09:22:05 -07:00
Beto Dealmeida
e7ad03d44f feat: add endpoint to fetch available DBs (#14208)
* feat: add endpoint to fetch available DBs

* Fix lint
2021-04-23 10:51:47 -07:00
Beto Dealmeida
a82d72fef6 feat: initial work to make v1 API compatible with SIP-40 and SIP-41 (#13960)
* WIP

* Use errorhandler

* Add response schema

* Fix status on HTTPException

* s/found/encountered/g

* Fix test

* Fix lint

* Fix lint and test
2021-04-06 22:06:32 -07:00
AAfghahi
6137a200a3 test: changing logger.exception to logger.errors in databases api (#13751) 2021-03-24 13:13:10 -04:00
Beto Dealmeida
db57f90a34 feat: better error message when adding DBs (#13601)
* WIP

* Adding tests

* Add unit tests

* Show error message

* Fix lint

* Fix after rebase
2021-03-17 20:29:26 -07:00
Beto Dealmeida
9fc03f0424 fix: API to allow importing old exports (JSON/YAML) (#13444)
* fix: fix API to allow importing old exports (JSON/YAML)

* Fix test

* Fix lint

* Add description to API schema
2021-03-04 17:18:27 -08:00
Beto Dealmeida
ab3f4bd94b feat: add separate endpoint to fetch function names for autocomplete (#12840)
* WIP

* Add unit test for API

* Add spec

* Fix unit test

* Fix unit test

* Fix test

* Fix test

* Add period to error message
2021-02-02 18:01:01 -08:00
Beto Dealmeida
7bef5ab4d2 fix: ignore system files on import (#12526) 2021-01-15 15:53:55 -08:00
Daniel Vaz Gaspar
0f731f27e4 fix(api): prefix class names on events actions (#12354)
* fix(api): prefix class names on events actions

* fix bulk delete
2021-01-12 10:52:35 +00:00
Daniel Vaz Gaspar
c685c9ea8f refactor: test connection raises only command exceptions (#12307)
* refactor: test connection raises only command exceptions

* fix tests

* fix tests

* fix tests

* lint fix
2021-01-08 13:10:11 +00:00
Daniel Vaz Gaspar
2b6a58780a fix(database): OpenAPI spec for test_connection (#12274)
* fix(database): OpenAPI spec for test_connection

* updated OpenAPI spec on superset docs

* EOL
2021-01-06 10:29:05 +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
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
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
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
Maxime Beauchemin
0504cf1a00 chore: improve analytics (#11714)
* chore: improve analytics

* lint

* log more events, add note in UPDATING.md

* handling base class

* more events\!

* get ref through

* right before @expose

* fix context

* touchups
2020-11-25 08:45:02 -08: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
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
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
Daniel Vaz Gaspar
bf3e41d006 fix(api): don't log db conn failures on db create/update (#11503) 2020-10-30 12:52:52 +00:00
John Bodley
8ee6493233 chore: Update testconn logic (#11315)
* chore: Update testconn logic

* [databases] Address @dpgaspar's comments

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-27 09:15:05 +00: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
Yongjie Zhao
5099dbef6b fix: babel script broken by format string (#10902) 2020-09-16 13:35:35 -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