Commit Graph

1416 Commits

Author SHA1 Message Date
Diego Medina 3fe53f735e
fix: Unable to export multiple Dashboards with the same name (#20383) 2022-06-15 00:27:24 -06:00
Elizabeth Thompson 5a137820d0
fix: catch some potential errors on dual write (#20351)
* catch some potential errors on dual write

* fix test for sqlite
2022-06-13 17:30:13 -07:00
Reese 11b33de61b
feat(api): Added "kind" to dataset/<pk> endpoint (#20113) 2022-06-10 13:03:48 -07:00
Craig Rueda d1c24f81f2
chore(migrations): Renaming migration files so that they're easier to keep track of (#20284)
* Renaming migration files so that they're easier to keep track of

* Fixing broken import

* Fixing broken import again

* Fixing broken tests
2022-06-07 10:30:09 -07:00
AAfghahi c131f025f8
chore: add event logger to reports/alerts CRUD (#20249)
* add event logger to report CRUD

* added assert metric to tests

* added unique name to action

* testing

* with inline log context
2022-06-06 16:13:22 +02:00
John Bodley b08e21efd9
[requirements] Resolve rebase conflicts (#20152)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-06-03 15:27:35 -07:00
Elizabeth Thompson 32bb1ce3ff
feat!: pass datasource_type and datasource_id to form_data (#19981)
* pass datasource_type and datasource_id to form_data

* add datasource_type to delete command

* add datasource_type to delete command

* fix old keys implementation

* add more tests
2022-06-02 16:48:16 -07:00
Diego Medina 8638f59b4c
fix: Box Plot Chart throws an error when the average (AVG) / SUM is being calculated on the Metrics (#20235)
* fix: Box Plot Chart throws an error when the average (AVG) / SUM is being calculated on the Metrics

* add test
2022-06-02 10:00:04 +08:00
Beto Dealmeida 05a138a191
feat: query datasets from SQL Lab (#15241)
* feat: Jinja2 macro for querying datasets

* Add docs

* Address comments
2022-06-01 15:18:40 -07:00
Smart-Codi 74c5479926
fix: datatype tracking issue on virtual dataset (#20088)
* Fix datatype tracking issue on virtual dataset

* fix pytest issue on postgresql
2022-06-01 13:43:11 -06:00
Yongjie Zhao 1530c34792
fix: failed samples should throw exception (#20228) 2022-06-01 18:24:01 +08:00
John Bodley 97ce920d49
fix(csv): Ensure df_to_escaped_csv handles NULL (#20151)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-05-31 09:56:25 -07:00
Daniel Vaz Gaspar 77ccec50cc
feat: add statsd metrics for notifications (#20158)
* feat: add statsd metrics for notifications

* fix import

* fix lint

* add decorator arg for custom prefix

* add tests
2022-05-26 15:43:05 +01:00
Ville Brofeldt 64c4226817
fix(temporary-cache): when user is anonymous (#20181)
* fix(temporary-cache): fail on anonymous user

* make exceptions generic

* fix test

* remove redundant bool return

* fix unit tests
2022-05-26 14:45:20 +03:00
Phillip Kelley-Dotson 0501ad25e8
fix: always create parameter json field (#19899)
* fix: always create parameter json field

* ensure validation for empty catalog

* check engine instead of name

* put validation in be

* fix test

* fix test

* remove test
2022-05-25 14:23:25 -07:00
Yongjie Zhao 40abb44ba1
feat: add samples endpoint (#20170) 2022-05-25 18:18:58 +08:00
cccs-tom b0c6935f06
fix: Allow dataset owners to see their datasets (#20135) 2022-05-25 09:58:15 +01:00
Hugh A. Miles II f8ea7788a9
feat: Add Certified filter to Datasets (#20136) 2022-05-23 17:58:15 -04:00
Daniel Vaz Gaspar b9a98aae79
fix: None dataset and schema permissions (#20108)
* fix: None dataset and schema permissions

* fix pylint

* add migration and test

* fix migration
2022-05-20 09:40:10 +01:00
Ville Brofeldt e2f11d3680
fix(presto,trino): use correct literal dttm separator (#20123)
* fix(presto,trino): use correct literal dttm separator

* remove redundant tests
2022-05-19 20:42:31 +03:00
Hugh A. Miles II 660af409a4
feat: Save column data into json_metadata for all Query executions (#20059)
* add save_metadata function to QueryDAO

* use set_extra_json_key

* added test

* Update queries_test.py

* fix pylint

* add to session

* add to session

* refactor

* forgot the return
2022-05-18 13:11:14 -04:00
AAfghahi e69f6292c2
chore: Set limit for a query in execute_sql_statement (#20066)
* test for query limit

* fixed tests
2022-05-16 17:56:46 -04:00
cccs-RyanS ddc01ea781
feat(business-types): initial implementation of SIP-78 (#18794)
* add BUSINESS_TYPE_ADDONS to config with example callback

* Removing uneeded whitespace

* [Work in progress] Modifying cidr function to allow for  single ip and adding port outline

* Added test REST endpoint, added some more ports

I've thrown in a test.py script as well that will try to connect to the
business_type endpoint.

* Moving code from config.py into the business api

Very simple api is exposed that will allow someone to call a checkport
endpoint and get back a response.

* Removing commented out bits.

* Adding fucntion dict back to the config

* Moving business_type endpoint to charts

* Adding schema for get endpoint

* Removing imports, updating docstring, fixing typo

Just some small changes as described in the title.  I've updated the
test.py as well so it functions with the endpoint changes.

* Adding translation dict

* Fixing ops

* Adding check for list

* Modifying changes to add quotes where needed

Also changed BusinessTypeResponse to resp.

* Adding in some code to call the filter config

If a column starts with "cidr_" it will call the code in config.py to
try to translate the filter.  Nothing is changed in the JSON being
executed, just some information is dumped to console.

* Porting Ryan's changes

* Adding migration script (as per Ryan's PR)

* Fixing typo

* Prettier fixes

* [CLDN-1043] Adding rough version of filter changes for business types

* fix down migration

* Fixing bugs after merge

* adding functionality to appy filters in back end

* Fixing linting issues

* fix down revision

* Changing conversion callback to handle multiple values at once

* Adding string representation of values

* Code cleanup plus fixing debouce to only be called once for each entry

* Removing non needed logginh

* Changing operator list to use sting values

* Using text value operators

* Removing clear operator call

* Moving business type endpoints

* fix down revision

* Adding port functions

* update migration

* fix bad rebase and add ff

* implement validator

* dont add invalid values to response

* [CLDN-1205] Added a new exception type for a business type translation error. Added the error message in the display_value field within the business type response. Modified the IP and Port business types to populate the error message field in the response if an error occurs

* [CLDN-1205] Added meaningful error message for port translation errors

* Removing status field from businesstype Response and adding in error message

* [CLDN-1205] Added check to make sure the port business type is within the valid range of ports, if it is not, it will populate the error message

* [CLDN-1205] Fixed the if statement that checks to see if the string_value is in the valid range of port numbers. It did not corrently verify this before now.

* [CLDN-1205] Fixed an error where it was trying to use string_value in <= statements. I just casted string_value to an integer if it is numeric, which allows <= operators to be used on it

* [CLDN-1207] Added unit tests for the cidr_func and port_translation_func functions which are located in /superset/config.py

* [CLDN-1207] removed the assertRaises line as it does not work with the cidr_func and port_translation_func functions

* [CLDN-1207] Added the skeleton of the test_cidr_translate_filter_func unit test, still need to update what the expected response from the function will be.

* [CLDN-1207] Added the remainder of the back-end unit tests for the business types

* [CLDN-1207] Fixed the syntax error which caused the test_cidr_translate_filter_func_NOT_IN_double unit test to fail

* [CLDN-1207] Removed the logging that was added for debugging purposes

* [CLDN-1207] Formatted the commands_tests.py file to make it nicer to look at/read through

* [CLDN-1207] Fixed the code so that it conformed to the pylint requirements (i.e., pylint no longer complains about the code in commands_tests.py)

* [CLDN-1207] Modified some of the docstrings so they made better use of the 100 character per line, line limit

* [CLDN-1207] Added the beginnings of the unit tests for the
business types API

* [CLDN-1207] Added a comment to the top of the commands_tests.py file explaining how to run the unit tests. This prevents the next person who tries to run them from having to waste time trying the different forms of testing that Superset supports (e.g., pytest, tox, etc.)

* [CLDN-1207] Added a grammar fix to the comments describing how to run the unit tests

* [CLDN-1207] Modified the description of the business_type API endpoints as they did not represent what the API was actually doing

* [CLDN-1207] Added further instructions on how to run the unit tests that are within the business_type/api_tests.py file

* add request validation

* disable request if business type missing

* [CLDN-1207] Unit tests for the business type API are now working, however, they need to be modified to make use of @mock as we don't want to have to run the server to be able to run the unit tests

* Removing businesss types deffinitons from config

* Adding select to only show valid business types

* Fixed Enzyme tests

* Added scalfolding for selecting filter dropdown

* Adding intigration tests

* fix revision

* fix typos and unnecessary requests

* break out useBusinessTypes

* Added front-end RTL unit tests for the business type API endpoint

* Fixed error from unit tests

* Added a unit test to ensure the operator list is updated after a business type API response is received

* Removing elect compoenet for business types

* Adding feature flag and allowing saving when no business type present

* fixing useEffect hooks

* Adding feature flag to model

* Changing behavior such that an empty string returns a default response

* add form validation

* Modified comments in unit test as command to run test has changed

* Modified comments in unit test as filename to run test has changed

* Modified the api_tests.py file to conform to the linting requirements

* Changed the name of one of the tests to reflect what the test is actually testing

* Added cypress back to the package.json

* Added informative comments

* Updated comments in files as well as removed imports which were not being used

* Changes made by npm run prettier

* Fixed spelling mistakes

* Updated models.py to remove placeholder comments used in development

* Added feature flag mocking in unit test

* Fixing open api failure

* Fixing business types to pass unit tests

* Reverting unsafe connections back to false

* Removing print statement

* Adding business tpye to export test

* setting default feature flag to false for business type

* Reverting pre commit

* Reverting pre commit and running pre commit

* Reverting pre commit and running pre commit

* Fixing formatting

* Adding license

* Fixing Linting

* Protecting api enpoints

* updating model

* Fixing code path when business type exists

* Linting

* Linting

* Fixing linting

* Fixing spelling

* Fixing schemas

* Fixing app import

* fixing item render

* Added RTL test to make sure business type operator list is updated after API response

* Fixing linting

* fix migration

* Changing unit tests

* Fixing import and DB migration after rebase

* Renaming to advanced types

* Fixing Linting

* More renaming

* Removing uneeded change

* Fixing linting and test errors

* Removing unused imports

* linting

* Adding more detailed name for migration

* Moving files to plugins

* more renaming

* Fixing schema name

* Disabling feature flag that should not be enabled by default

* Adding extra cehck

* NameChange

* formatting

* Fixing equals check

* Moveing all advanced type classes and types to one file, and converting tests to functional

* Adding advanced type to test and fix linitng

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Dan Parent <daniel.parent@cse-cst.gc.ca>
Co-authored-by: GITHUB_USERNAME <EMAIL>
Co-authored-by: cccs-Dustin <96579982+cccs-Dustin@users.noreply.github.com>
2022-05-16 17:58:21 +03:00
thinhnd2104 85315460cb
fix: Athena timestamp literal format (#19970)
* Fix Athena timestamp literal format

related: [#19969]

* Update test_athena.py

Update test

* Update athena.py

* Resolving CI/CD

* lint

Co-authored-by: Thinh Nguyen Duc <thinhnd.it@tripi.vn>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2022-05-16 09:50:20 +03:00
Jesse Yang 6139057dcf
test: make tabbed dashboard a little more complex (#19966) 2022-05-13 17:31:23 -07:00
Hugh A. Miles II 21c5b26fc8
feat(sip-68): Add DatasourceDAO class to manage querying different datasources easier (#20030)
* restart

* update with enums

* address concerns

* remove any
2022-05-13 12:28:57 -04:00
John Bodley 89a844a40f
fix(reports): Clear last value when state is WORKING (#19941)
* fix(reports): Clear last value when state is WORKING

* Update cbe71abde154_fix_report_schedule_and_log.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-05-12 21:54:23 -07:00
John Bodley 449d08b25e
fix: Refactor SQL username logic (#19914)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-05-12 21:03:05 -07:00
Beto Dealmeida f2881e5bbd
feat: RLS for SQL Lab (#19999)
* feat: RLS for SQL Lab

* Small fixes

* Pass username to security manager

* Update docstrings

* Add tests

* Remove type from docstring
2022-05-12 11:03:01 -07:00
AAfghahi fd611d7653
refactor: Refactor reports for Charts and Dashboards (#19130)
* bumping shillelagh

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Arash/new state report (#16987)

* code dry (#16358)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor(reports): Arash/refactor reports (#16855)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* report pickup

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor(reports):  Arash/again refactor reports (#16872)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* it is still not working

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* next changes

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor: Reports code clean 10-29 (#17424)

* Add delete functionality

* Report schema restructure progress

* Fix lint

* Removed console.log

* fix(Explore): Remove changes to the properties on cancel (#17184)

* Remove on close

* Fix lint

* Add tests

* fix(dashboard): don't show report modal for anonymous user (#17106)

* Added sunburst echart

* fix(dashboard):Hide reports modal for anonymous users

* Address comments

* Make prettier happy

Co-authored-by: Mayur <mayurp@kpmg.com>

* fix(explore): Metric control breaks when saved metric deleted from dataset (#17503)

* Add functionality is now working (#17578)

* Preset io ch28954 refactor reports (#19129)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Arash/new state report (#16987)

* code dry (#16358)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor(reports): Arash/refactor reports (#16855)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* report pickup

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor(reports):  Arash/again refactor reports (#16872)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* it is still not working

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* next changes

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor: Reports code clean 10-29 (#17424)

* Add delete functionality

* Report schema restructure progress

* Fix lint

* Removed console.log

* fix(Explore): Remove changes to the properties on cancel (#17184)

* Remove on close

* Fix lint

* Add tests

* fix(dashboard): don't show report modal for anonymous user (#17106)

* Added sunburst echart

* fix(dashboard):Hide reports modal for anonymous users

* Address comments

* Make prettier happy

Co-authored-by: Mayur <mayurp@kpmg.com>

* fix(explore): Metric control breaks when saved metric deleted from dataset (#17503)

* Add functionality is now working (#17578)

* refactoring reports

* ready for review

* added testing

* removed user reducer

* elizabeth suggestions

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Mayur <mayurnewase111@gmail.com>
Co-authored-by: Mayur <mayurp@kpmg.com>
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>

* deleted additional folder

* fixing tests

* all but styling

* bumping shillelagh

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Arash/new state report (#16987)

* code dry (#16358)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor(reports): Arash/refactor reports (#16855)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* report pickup

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor(reports):  Arash/again refactor reports (#16872)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* it is still not working

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* next changes

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor: Reports code clean 10-29 (#17424)

* Add delete functionality

* Report schema restructure progress

* Fix lint

* Removed console.log

* fix(Explore): Remove changes to the properties on cancel (#17184)

* Remove on close

* Fix lint

* Add tests

* fix(dashboard): don't show report modal for anonymous user (#17106)

* Added sunburst echart

* fix(dashboard):Hide reports modal for anonymous users

* Address comments

* Make prettier happy

Co-authored-by: Mayur <mayurp@kpmg.com>

* fix(explore): Metric control breaks when saved metric deleted from dataset (#17503)

* Add functionality is now working (#17578)

* Preset io ch28954 refactor reports (#19129)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Arash/new state report (#16987)

* code dry (#16358)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor(reports): Arash/refactor reports (#16855)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* report pickup

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor(reports):  Arash/again refactor reports (#16872)

* pexdax refactor (#16333)

* refactor progress (#16339)

* fix: Header Actions test refactor (#16336)

* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* code dry (#16358)

* Fetch bug fixed (#16376)

* continued refactoring (#16377)

* refactor: Reports - ReportModal (#16622)

* refactoring progress

* removed consoles

* Working, but with 2 fetches

* it is still not working

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* next changes

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>

* refactor: Reports code clean 10-29 (#17424)

* Add delete functionality

* Report schema restructure progress

* Fix lint

* Removed console.log

* fix(Explore): Remove changes to the properties on cancel (#17184)

* Remove on close

* Fix lint

* Add tests

* fix(dashboard): don't show report modal for anonymous user (#17106)

* Added sunburst echart

* fix(dashboard):Hide reports modal for anonymous users

* Address comments

* Make prettier happy

Co-authored-by: Mayur <mayurp@kpmg.com>

* fix(explore): Metric control breaks when saved metric deleted from dataset (#17503)

* Add functionality is now working (#17578)

* refactoring reports

* ready for review

* added testing

* removed user reducer

* elizabeth suggestions

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Mayur <mayurnewase111@gmail.com>
Co-authored-by: Mayur <mayurp@kpmg.com>
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>

* deleted additional folder

* fixing tests

* all but styling

* fixed tests

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Mayur <mayurnewase111@gmail.com>
Co-authored-by: Mayur <mayurp@kpmg.com>
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
2022-05-11 14:19:51 -04:00
Daniel Vaz Gaspar 87a4379d0a
feat: deprecate /superset/validate_sql_json migrate to api v1 (#19935)
* feat: deprecate /superset/validate_sql_json migrate to api v1

* use new error handling

* migrate SQLLAb frontend and add tests

* debug test

* debug test

* fix frontend test on sqllab

* fix tests

* fix frontend test on sqllab

* fix tests

* fix tests

* fix tests

* fix tests
2022-05-10 21:25:39 +01:00
Jesse Yang 7b88ec7e25
refactor(ReportModal): simplify state reducer and improve error handling (#19942) 2022-05-05 10:06:40 -07:00
Elizabeth Thompson 060b5c0e17
chore: remove druid datasource from the config (#19770)
* remove druid datasource from the config

* remove config related references to DruidDatasource

* Update __init__.py

* Update __init__.py

* Update manager.py

* remove config related references to DruidDatasource

* raise if instance type is not valid
2022-05-04 12:48:48 -07:00
Daniel Vaz Gaspar 4fdf230a56
feat: deprecate /superset/extra_table_metadata migrate to api v1 (#19921)
* feat: deprecate /superset/extra_table_metadata migrate to api v1

* use can_read to table_extra_metadata

* troubleshoot sqlite

* fix test

* fix test

* fix test

* fix frontend test on sqllab
2022-05-04 14:55:52 +01:00
Yeachan Park 8b72354654
fix(sqllab/charts): casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp (#18873)
* fix casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp from sqllab and charts

* Add unittests

* Lint changes and parameter variable rename

* Fix linting
2022-05-04 09:47:12 +03:00
David Aaron Suddjian 7f8279b4b3
chore: get embedded user with roles and permissions (#19813)
* feat: get user roles endpoint

* add tests

* fix test

* get user with permission and roles with full user

* frontend

* type juggling

* the hash slinging slasher

* user reducer and action

* make it happy

* result

* lint

Co-authored-by: Lily Kuang <lily@preset.io>
2022-05-03 12:58:06 -07:00
Beto Dealmeida 90130e4b4f
feat: simplify SQLite time grain (#19745) 2022-05-03 07:13:33 -07:00
Ville Brofeldt 99f1f9ec61
fix(sqla): replace custom dttm type with literal_column (#19917) 2022-05-03 07:19:36 +03:00
Beto Dealmeida 1ebdaac487
fix: memoize primitives (#19930) 2022-05-02 14:50:56 -07:00
Beto Dealmeida aff10a7fad
feat: simplify memoized_func (#19905) 2022-04-29 15:55:58 -07:00
Hugh A. Miles II 8b15b68979
fix: Alpha should not be able to edit datasets that they don't own (#19854)
* fix api for checking owners

* fix styles for disabling

* fix styles for disabling

* fix lint

* fix lint

* add owners key

* plzz

* remove

* update test

* add tooltip

* add type

* fix test

* fix user reference

* lit

* fix test

* work
2022-04-29 14:21:05 -07:00
Phillip Kelley-Dotson ad715429f9
chore: simplify error messaging in database modal (#19165)
* testing for dbconn modal error message

* remove consoles and error alert mapping

* lint fix

* update url message

* add modal fix

* update comments

* fix err msg bugs

* fix pylint

* fix line

* fix tests

* fix assertions
2022-04-21 12:44:21 -07:00
Yongjie Zhao 3c28cd4625
feat: add renameOperator (#19776) 2022-04-20 19:48:12 +08:00
Jesse Yang 231716cb50
perf: refactor SIP-68 db migrations with INSERT SELECT FROM (#19421) 2022-04-19 18:58:18 -07:00
Hugh A. Miles II a6f46013d9
feat: 10/15/30 min grain to Pinot (#19724)
* add new grains to pinot

* update test
2022-04-19 11:16:48 -07:00
Hugh A. Miles II 7e92340c70
fix: Fix migration for removing time_range_endpoints 3 (#19767)
* fix migration

* so dumb

* update test

* add code change

* retest
2022-04-19 09:49:50 -07:00
AAfghahi 57157c8b15
fix: remove expose (#19700)
* bumping shillelagh

* remove expose
2022-04-16 22:02:23 -07:00
David Aaron Suddjian ae70212df3
fix: deactivate embedding on a dashboard (#19626)
* fix tests

* commit it properly

* unnecessary commit, correct type in docstring

* unused import
2022-04-15 16:15:27 -07:00
Hugh A. Miles II 86642025ba
fix: Removetime_range_endpoints from query context object pt 2 (#19728) 2022-04-15 13:17:05 -04:00
Yongjie Zhao 9425dd2cac
fix: drop the first level of MultiIndex (#19716) 2022-04-14 23:40:38 +08:00