* Frontend implementation of create dataset from infobox
* Fixed sl_dataset type
* Fix test
* Fixed sl_dataset type (forgot to save)
* RTL testing
* Adjusted styling/text on infobox and save dataset modal
* Appease lint
* Make infobox invisible and fix tests
* Remove unnecessary placeholder
* Move types to sql lab
* Moved logic into save dataset modal
* Change DatasourceMeta type to Dataset
* Add ExploreDatasource union type to save dataset modal
* Get user info from redux inside save dataset modal
* Addressed comments
* Adjusting to new query type
* Fixed save dataset in explore and union type
* Added testing
* Defined d for queries
* Remove dataset from SaveDatasetModal
* Clarify useSelector parameter
* Fix dndControls union type
* Fix shared-controls union type
* Fix controlPanel union type
* Move ExploreRootState to explore type file
* Remove unnecessary testing playground
* Move datasource type check in DatasourcePanel to a function
* Make all sqllab Query imports reference @superset-ui/core Query type
* Deconstruct query props in ResultSet
* Fix union type in /legacy-plugin-chart-heatmap/src/controlPanel
* Change SaveDatasetModal tests to RTL
* Cleaned datasourceTypeCheck
* Fix infobox styling
* Fix SaveDatasetModal test
* Fix query fixture in sqllab and Query type in SaveDatasetModal test
* Fix Query type and make test query fixture
* Added columns to Query type, separated results property, created QueryResponse union type, and fixed all types affected
* Fixed a couple missed broken types
* Added ExploreDatasource to SqlLab type file
* Removed unneeded Query import from DatasourcePanel
* Address PR comments
* Fix columnChoices
* Fix all incorrect column property checks
* Fix logic on dndGroupByControl
* Dry up savedMetrics type check
* Fixed TIME_COLUMN_OPTION
* Dried savedMetrics type check even further
* Change savedMetricsTypeCheck to defineSavedMetrics
* Change datasourceTypeCheck to isValidDatasourceType
* Fix Query path in groupByControl
* dnd_granularity_sqla now sorts Query types with is_dttm at the top
* Fixed/cleaned query sort
* Add sortedQueryColumns and proper optional chaining to granularity_sqla
* Move testQuery to core-ui, add test coverage for Queries in columnChoices
* Moved DEFAULT_METRICS to core-ui and wrote a test for defineSavedMetrics
* Add license and clean dataset test object
* Change DatasourceType.Dataset to dataset
* 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>
* fix(fonts): Import all necessary font packages
* Make html tags themable
* Set bold font weight to 600, add medium font weight to theme
* Replace hard coded font weights with theme variables
* Change some font weight light elements to normal
* Fix tests
* Fix bug in pivot table
* Address code review comments
* wip
* feat: make 401 responses configurable in SupersetClient
* sort
* guest unauthorized handler
* add toast container to embedded app
* add option for toast presenter to go at the top
* remove confusing comms logging
* lint
* Update superset-frontend/src/embedded/index.tsx
* type correction
* remove ENABLE_REACT_CRUD_VIEWS feature flag
* docs
* deal with problematic tests
* empty test suite
* skip test
* test conditions changed
* removing the tests instead of skipping
* first pass migrating config to ff
* nixing a console log from testing
* adding an entry to `UPDATING.md`
* linting ✨
* Adding ENABLE_JAVASCRIPT_CONTROLS to FEATURE_FLAGS.md
* no longer in need of state!
* Turning the flag back off
* linting... le sigh
* and more linting...
* feat(dashboard): embedded dashboard UI configuration (#17175) (#17450)
* setup embedded provider
* update ui configuration
* fix test
* feat: Guest token (for embedded dashboard auth) (#17517)
* generate an embed token
* improve existing tests
* add some auth setup, and rename token
* fix the stuff for compatibility with external request loaders
* docs, standard jwt claims, tweaks
* black
* lint
* tests, and safer token decoding
* linting
* type annotation
* prettier
* add feature flag
* quiet pylint
* apparently typing is a problem again
* Make guest role name configurable
* fake being a non-anonymous user
* just one log entry
* customizable algo
* lint
* lint again
* 403 works now!
* get guest token from header instead of cookie
* Revert "403 works now!"
This reverts commit df2f49a6d4.
* fix tests
* Revert "Revert "403 works now!""
This reverts commit 883dff38f1.
* rename method
* correct import
* feat: entry for embedded dashboard (#17529)
* create entry for embedded dashboard in webpack
* add cookies
* lint
* token message handshake
* guestTokenHeaderName
* use setupClient instead of calling configure
* rename the webpack chunk
* simplified handshake
* embedded entrypoint: render a proper app
* make the embedded page accept anonymous connections
* format
* lint
* fix test
# Conflicts:
# superset-frontend/src/embedded/index.tsx
# superset/views/core.py
* lint
* Update superset-frontend/src/embedded/index.tsx
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
* comment out origins checks
* move embedded for core to dashboard
* pylint
* isort
Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
* feat: Authorizing guest access to embedded dashboards (#17757)
* helper methods and dashboard access
* guest token dashboard authz
* adjust csrf exempt list
* eums don't work that way
* Remove unnecessary import
* move row level security tests to their own file
* a bit of refactoring
* add guest token security tests
* refactor tests
* clean imports
* variable names can be too long apparently
* missing argument to get_user_roles
* don't redefine builtins
* remove unused imports
* fix test import
* default to global user when getting roles
* missing import
* mock it
* test get_user_roles
* infer g.user for ease of tests
* remove redundant check
* tests for guest user security manager fns
* use algo to get rid of warning messages
* tweaking access checks
* fix guest token security tests
* missing imports
* more tests
* more testing and also some small refactoring
* move validation out of parsing
* fix dashboard access check again
* add more test
Co-authored-by: Lily Kuang <lily@preset.io>
* feat: Row Level Security rules for guest tokens (#17836)
* helper methods and dashboard access
* guest token dashboard authz
* adjust csrf exempt list
* eums don't work that way
* Remove unnecessary import
* move row level security tests to their own file
* a bit of refactoring
* add guest token security tests
* refactor tests
* clean imports
* variable names can be too long apparently
* missing argument to get_user_roles
* don't redefine builtins
* remove unused imports
* fix test import
* default to global user when getting roles
* missing import
* mock it
* test get_user_roles
* infer g.user for ease of tests
* remove redundant check
* tests for guest user security manager fns
* use algo to get rid of warning messages
* tweaking access checks
* fix guest token security tests
* missing imports
* more tests
* more testing and also some small refactoring
* move validation out of parsing
* fix dashboard access check again
* rls rules for guest tokens
* test guest token rls rules
* more flexible rls rules
* lint
* fix tests
* fix test
* defaults
* fix some tests
* fix some tests
* lint
Co-authored-by: Lily Kuang <lily@preset.io>
* SupersetClient guest token test
* Apply suggestions from code review
Co-authored-by: Lily Kuang <lily@preset.io>
Co-authored-by: Lily Kuang <lily@preset.io>
* chart
* index and number-format
* char-composition and color
* connection
* dimension and math-expression
* models
* query
* time-format
* residual modules
* change config of jest and eslint
config
* wip
update package.json
* fix lint
* WithLegend import from superset-ui/core
* Redirect on 401
* Bump FAB
* Format
* Update Cypress save test
* Revert Cypress change
* Bump FAB 3.4.1rc2
* Update test
* Update return statement
* Update api test
* Update datasets api test
* Update datasets api 401s to 403s
* Add typeguard
* Use Promise.resolve
* Update callApiAndParseWithhTimeout test
* Disable parseResponse test
* Try catch
* Handle npm 8 issues
* feat(explore): export csv data pivoted for Pivot Table
* Implement dropdown with download csv options
* Change label to "Original"
* Add tests
* Add form data to query context
* Add form data to query context generator
* Explicitly make form_data optional