* fix errors with rison and useQueryParams
* add test for encode/decode
* add rison link and make test case more readable
Co-authored-by: Corbin Robb <corbin@Corbins-MacBook-Pro.local>
* add sorting for query results grid and add natural order sort
* modify tests for natural/original order state
* clean up setState
Co-authored-by: Corbin Robb <corbin@Corbins-MacBook-Pro.local>
* feat(dashboard): Implement empty states for dashboard
* Add empty state to native filters
* Add missing license
* Remove redundant string types from EmptyState
* chore: fix misspelling of button
* changed QuerySearch/index.jsx to index.tsx
* updated Query type at src/SqlLab/types.ts/Query and extended it into QueryTable
* updated defaultQueryLimit to be optional at ResultSetProps of superset-frontend/src/SqlLab/components/ResultSet/index.tsx
* moved statusAttributes into useMemo hook so that it will not make the dependencies of useMemo Hook change on every render and statusAttributes is only used within useMomo hook
* reset package-lock.json and package.json at frontend
* Acquired redux rootestate type for SqlLab, to be used at useSelector(state)
* updated query to be Query type and added a comment for q.status on line 178
* updated queryTable for typescript conversion
* updated actions type on QueryHistory and QuerySearch
* updated type for actions in SouthPane
* created type for SqlLab redux
Co-authored-by: David Woolner <davidwoolner@gmail.com>
Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
* feat(explore): Allow using time formatter on temporal columns in data table
* Fix data table loading
* Return colnames and coltypes from results request
* Fix types
* Fix tests
* Fix copy button
* Fix df is none
* Fix test
* Address comments
* Move useTimeFormattedColumns out of useTableColumns
* Make reducer more readable
* chore: fix misspelling of button
* Feat: Update ExploreCtasResultsButton to functional component
* Fix pull request
* Fix index.tsx
* Fix prettier issues and actions
* Streamline the onClick so it calls visualize directly
* Update MSP and MDP to arrow functions
* Test destructured props
* Fix props destructuring error
* Simplify with optional chaining on line 94 and clean up buildVizOptions
Co-authored-by: David Woolner <davidwoolner@gmail.com>
Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
* feat(explore): Keep or reset chart config after datasource change
* Update copy
* Remove useDispatch
* fix test
* Fix bugs
* Remove ts ignore
* Scroll top when datasource changes
* Fix crashing when switching viz type
* fix: Explore long URL problem
* Fixes lint problems
* Fixes default value
* Removes duplicated test
* Fixes share menu items
* Fixes tests
* Debounces form_data updates
* Rewrites debounce function
* Moves history update outside the functional component
* Mocks lodash function in tests
* Fixes Cypress test
* Fixes Cypress test #2
* Creating draft PR to address bug
* Still working on solving re rendering bug
* Cleaning up in preparation for push
* Starting conversion to TypeScript
* Working on conversion
* Continued working on typescript conversion, referenced other files for different types, still a rough version of final product
* Added type assertion to actions in props, and added types to some component functions
* Progress on typescript conversion
* Fixed typing issue on collapseStyles
* Fixed styling on div, child of StyledScrollbarContainer
* Attempting to address issues with the actions passed into the TableElement
* Resolved typescript warning on actions of the TableElement component
* Made changes suggested by Arash
* Tested the component without dbId, cleaned up lingering comments
* Made more changes suggested by Arash, removed offline from the SqlEditorLeftBarProps interface
* Made change suggested by Hugh
* Changed the expanded type from any to boolean
* 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>
* feat(explore): add toasts feedback when user copies chart url
* Show toast message when updating chart properties
* Change toast type to success when saving chart
* Use success toast from props
* Fix tests
* Use withToasts instead of dispatch
* Use PropertiesModalProps instead of any
* Working on converting sqleditorleftbar to functional component
* Creating draft PR to address bug
* Still working on solving re rendering bug
* infinite rerender fix
* Creating draft PR to address bug
* Cleaning up in preparation for push
* Made changes suggested by Elizabeth
* Fixed issues as per Lindsey's comment
Co-authored-by: Arash <arash.afghahi@gmail.com>
* a lot of console logs
* testing
* test
* added saved_query to remoteId
* created useEffect so that title properly changes in modal
* Update superset-frontend/src/SqlLab/actions/sqlLab.js
Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
* fix: fix update slug name
* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
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>
* Update existing tests
* Add backend test
* feat: add force option to report screenshots
* Add tests
* Rebase fixes
* Do not force screenshot on dashboard alerts
* feat: bypass cache on screenshots for alerts
* Update existing tests
* Add tests
* feat: configure force_screenshot
* Update existing tests
* Add backend test
* feat: add force option to report screenshots
* Add tests
* Rebase fixes
* Do not force screenshot on dashboard alerts
* fix: Select component sort function sorting by label instead of value on numbers
* fix: change select component default sorting to sort by the initial index rather than a property like value or label
* fix: select sorting add sortOptions to select components using sortByProperty
* fix: change select component back, add order to options coming in from SelectControl
* fix: select component options intitial sort bug
* fix: add test cases for select fix
Co-authored-by: Corbin Robb <corbin@Corbins-MacBook-Pro.local>
* 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
* Floating nums now sorting correctly with parseFloatingNums function
* Floating numbers AND strings now sorting correctly, +locale comparison
* Added NULL handling back to sort function
* Moved parseFloatingNums outside of sortResults
* Removed localeCompare and added testing
* Add equality check back to sort function
* Added floatValue nit
* 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
* feat: add single select and inverse selection to numeric range (#16722)
* Ignore invalid eslint errors regarding conditionally called hooks.
* Add license header to new file.
* Flipped the numerical range values for the minimum slider so that the highlighted range value accurately reflects the applied filter.
* Resolved linting errors
* Remove unnecessary important flag from css
* migrate EstimateQueryCostButton component from jsx to tsx
* re-format spaces using prettier
* Update superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
* remove extra onClick and make disabled prop optional
* restore & rename event handler onClick to onClickHandler
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
* Tests are working, type errors are fixed
* Fix filterset
* add license header to the new file
* fix test
* PR comments
* Linting
* test fix
* small fix
* migrate FormattedNumber component from jsx to tsx
* Unset default prop on format
* undo asserting and overriding the type for num
* Add a ts comment to ignore error
* Add conditional to table name tooltip to only show when overflowing
* Remove uneccessary state and useEffect, a little clean up and slight refactoring
Co-authored-by: Corbin Robb <corbin@Corbins-MacBook-Pro.local>
* fix: feature flags typing
* fix tests
* add note in UPDATING.md
* fix frontend
* also move SCHEDULED_QUERIES to top level
* fix test
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
* Fix NULL styling in gridCell
* removed unnecessary imports
* Added null styling back to renderGridCell
* Cleaned up a little code as per Elizabeth
* Found another little cleanup spot
* add support for adhoc columns to api and sqla model
* fix some types
* fix duplicates in column names
* fix more lint
* fix schema and dedup
* clean up some logic
* first pass at fixing viz.py
* Add frontend support for adhoc columns
* Add title edit
* Fix showing custom title
* Use column name as default value in sql editor
* fix: Adds a loading message when needed in the Select component (#16531)
* fix(tests): make parquet select deterministic with order by (#16570)
* bump emotion to help with cache clobbering (#16559)
* fix: Support Jinja template functions in global async queries (#16412)
* Support Jinja template functions in async queries
* Pylint
* Add tests for async tasks
* Remove redundant has_request_context check
* fix: impersonate user label/tooltip (#16573)
* docs: update for small typos (#16568)
* feat: Add Aurora Data API engine spec (#16535)
* feat: Add Aurora Data API engine spec
* Fix lint
* refactor: sql_json view endpoint: encapsulate ctas parameters (#16548)
* refactor sql_json view endpoint: encapsulate ctas parameters
* fix failed tests
* fix failed tests and ci issues
* refactor sql_json view endpoint: separate concern into ad hod method (#16595)
* feat: Experimental cross-filter plugins (#16594)
* fix:fix get permission function
* feat: add cross filter chart in charts gallery under FF
* chore(deps): bump superset-ui to 0.18.2 (#16601)
* update type guard references
* fix imports
* update series_columns schema
* Add changes that got lost in rebase
* Use current columns name or expression as sql editor init value
* add integration test and do minor fixes
* Bump superset-ui
* fix linting issue
* bump superset-ui to 0.18.22
* resolve merge conflict
* lint
* fix select filter infinite loop
* bump superset-ui to 0.18.23
* Fix auto setting column popover title
* Enable adhoc columns only if UX_BETA enabled
* put back removed test
* Move popover height and width to constants
* Refactor big ternary expression
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: joeADSP <75027008+joeADSP@users.noreply.github.com>
Co-authored-by: ofekisr <35701650+ofekisr@users.noreply.github.com>
Co-authored-by: simcha90 <56388545+simcha90@users.noreply.github.com>