* feat: have user go to explore after dataset creation
* change flow to create chart
* fix lint
* update with suggestions and add store for toasts
* fix ts
* fix test
* lint
- Since our DatabaseConnectionForm is wrapped in a AntD Form, we need to ensure our custom design is applied in the upload input instead of AntD default one for file input type=file.
* feat(dashboard): Use react-router for transition to Explore + cmd click to open in new tab
* Update tooltip
* Add a feature flag
* Update edit chart onclick event
* Fix lint
* Fix tests
* Change feature flag name
* Add tooltip to Edit chart
* feat: truncate long values, a per-column setting
* fix: lint
* fix: removed width for column control
* fix: removed truncate option for time, bool, and numeric columns
* prevent extra div if not truncating
* add flow for dbconnmodal to datasetmodal
* fix bug
* second part
* fix dataset to sql lab
* fix lint
* more lint
* add key value
* fix type
* add new styling
* remove undefined from types
* Save Dataset Modal:
- Use our Select component as substitute of the Autocomplete one so options are loaded initially without the user having to trigger a search and we are mosre consistent with the rest of the app
- Changing datasetId to lowercase so when custom props get into the DOM we don't get warning related to invalid formatting
- We extracted the dropdown out of the radio because it causes invalid click handling when an option is selected
- Updated tests
* Save Dataset Modal:
- Update missing test for DatasourceControl
* Save Dataset Modal:
- Remove conditional from load options function since only guest users dont have userId, and if that is the case they wont reach this part of the application
* Save Dataset Modal:
- Remove unused comment
* Save Dataset Modal:
- Add getPopupContainer as prop for Select component
* Save Dataset Modal:
- Add tests for our new getPopupContainer prop in Select component. So if passed it gets called.
* Save Dataset Modal:
- use lowercased property when calling post form data
* Save Dataset Modal:
- Update tests so there is no need to define a null returning func
* Save Dataset Modal:
- Including getPopupContainer from PickedSelectProps instead
- Updating definition in SelectFilterPlugin
* Respecting max/min opacities, and adding tests.
* revising tests
* Adding missing test case for maximum coverage :)
* removing unnecessary logic and test
* adding another unit test for (hopefully) full coverage.
* no more ternary operator
* New approach with Math.min - take THAT codecov.
* one more stab at making codecov happy... ignoring the file next.
* lint fixes
* Database Modal:
- Add missing invocation to onDatabaseAdd after importing DB from file
- Add keys to our IconButtons
* Database Modal:
- Reduce if clause so it's more concise
* feat(explore): Denormalize form data in Calendar Heatmap
* feat(explore): Denormalize form data in Bubble
* feat(explore): Denormalize form data in Chord
* Dimensions -> Dimension for single selection
* feat(explore): Denormalize form data in Country Map
* feat(explore): Denormalize form data in Heatmap
* feat(explore): Denormalize form data in Histogram
* feat(explore): Denormalize form data in Handlebars
* feat(explore): Denormalize form data in Percent Change
* Use new standardized form data interface
* chore: Restructure explore redux state
* fixes
* fix tests
* add new tests
* Fix type
* Address comments
* Fix bug
* Fix import
* Add new test
* Move unsaved chart id to a constant
* Add todo
Recent commit to sort alphanumeric columns via case insensitive
comparison broke the multi-column sort option. React-table only sorts
by the second (or third...) column if the first column matches.
Since the alphanumeric sort only returned -1 or 1, it never would move
to the subsequent columns when the earlier column values matched.
* git commit -m 'Convert QueryAutoRefresh to functional component [sc-48362]'
* addressing PR comments [sc-48362]
Removes unneeded props and state tracking of offline, adds finally block to simplify clearing pending request, simplifies value comparison in array by using includes in place of indexOf
* Address PR comment to use enum for QueryState [sc-48362]
Original implementation had string literals used in multiple places representing Query.state value options. This commit creates a formal TypeScript enum for QueryState so we can remove string literals and ensure better consistency
* Address PR comments for object type validation [sc-48362]
This commit resolves an issue why the TypeScript typing for queryList was marked as a Query[] but was actually a Dictionary (associative array) or Queries. A new type QueryDictionary has been added and the QueryAutoRefresh code was adjusted to use QueryDictionary instead of Query[] in appropriate places as well as unit tests. Commit also removes QueryAutoRefreshContainer by making the once component using QueryAutoRefresh (which is already redux connected) pass the needed values on props. this simplifies the code base and reduce files that need unit testing while keeping QueryAutoRefresh out of needing a redux connection directly.
* Addresses PR comment to add QueryState.SCHEDULED to runningQueryStateList [sc-48362]
In previous implementation 'scheduled' was not included int he list of Query States. Further investigation shows it should be added to as a running state.
* Fix prettier lint error [sc-48362]
* Adjust unit tests for props update hoisting callbacks out of actions wrapper object [sc-48362]
* Update with changes from master [sc-48362]
Merges in updates from master and resolves conflicts from relocation of some of the Query TypeScript definitions into core
* Removes logic setting user offline and relying on results panel error message [sc-48362]
* Fixes bad import after some TypeScript definitions were relocated to core [sc-48362]
* Fixes TypeScript errors [sc-48362]
* Modified SQL Lab so it uses the default viz to explore a new dataset with
* Added a comment to the config file
* Remove trailing whitespace
* [CLDN-1312] Removed the 'viz_type' variable so that when it is undefinded in the back-end, it gets set to the default viz
* [CLDN-1312] Only sets the 'all_columns' variable if the default viz type is a 'table'
* Will only pop 'selectedColumns' out of 'form_data' if it is present
* [CLDN-1312] Updated files so that the default viz is now being used again in SQL Lab Explore
* fix(home): make to update the css style of links
* fix(home): make to fix lint issue
* fix(home): make to remove underline when tab is active
* fix(homes): make to fix the issue of tab
* fix(home): make to move styles to a tag
* Update dataset selection help text.
* Update 'Create a new chart' flow styles.
* Add support for linking directly to Create Dataset modal via URL hash.
* Add support for linking directly to Create Dataset modal via URL hash.
* Update dataset help text to not include spaces in translated strings and only include an 'Add dataset' link when user has permission to add dataset.
* Clean up test file
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
* move postForm to superset client
* lint
* fix lint
* fix type
* update tests
* add tests
* add test for form submit
* add test for request form
* lint
* fix test
* fix tests
* more tests
* more tests
* test
* lint
* more test for postForm
* lint
* Update superset-frontend/packages/superset-ui-core/test/connection/SupersetClientClass.test.ts
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
* update tests
* remove useless test
* make test cover happy
* make test cover happy
* make test cover happy
* make codecov happy
* make codecov happy
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
* fix(cosmetic): cannot find m-r-10 class in superset.less
* fix: remove .m-r-10 class and use emotion instead
* Update superset-frontend/src/components/Datasource/CollectionTable.tsx
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
* Update superset-frontend/src/components/Datasource/DatasourceEditor.jsx
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
* add icons
* Implement fast viz switcher component
* Remove unnecessary keys from ControlsPanelContainer
* Rename icons
* Add unit tests
* Add licenses
* Fix test
* Change BigNumberWithTrendline to BigNumber
* fix test
* fix test
* Add currently rendered viz tile
* Move View all charts to the right side
* Add license
* Fix imports
* Fix e2e test
* fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
* include onDatabaseAdd on successful import
* feature: When editing the label/title in the Metrics popover, hitting Enter should save what you've typed
* Apply emotion templating to input/input labels
* feat(echarts): [feature-parity] support extra control
* add extra control for plugin
* refactor: extract ExtraControl
* fix: lint
* fix some problems
* 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
* 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
This commit fixes a dynamic height assignment issue where the SQL Editor results panel would be clipped offscreen and user could not see bottom of results, the height got assigned to zero after toggling online, then offline, and height would be calculated wrong if the result set rows returned message above the results table was long enough for a line wrap.
* more changes that didn't make it into the last commit somehow.
* Allow modals to be short, but reach a max height and scroll
* now with template literals
* feat(plugin-chart-echarts): add support for generic axis to mixed chart
* fix tests + add new tests
* address review comments
* simplify control panel
* fix types and tests
* fix(chart & alert): make to show metrics properly
* fix(chart & alert): make to remove duplicate metrics
* fix(chart & alert): make to restore metrics control alert slice
* fix(chart & alert): make to fix lint issue
* 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>
* feat(explore): Show confirmation modal if user exits Explore without saving changes
* Fix calling cleanup func unnecessarily
* Fix comparing AdhocMetric instance with JSON object
* Replace sliceFormData with the initial form data
* fix(chart & filters): make to padding between textarea and buttons
* fix(chart & filters): make to change static pixel to them.gridUnit
* fix(chart & filters): make to fix lint issue
* 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
* fix(chart & table): make to allow highlight in case of numeric column
* fix(chart & table): make to use emitFilter directly
* fix(chart & table): make to use styled component instead of inline style
* 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
* 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