Commit Graph

4347 Commits

Author SHA1 Message Date
Jinghuayao
e44163ef55
test(Native filter): add cypress test user can add time grain filter (#18669)
* add new test time grain filter
2022-02-11 08:12:24 -08:00
Hesoyam
d409d68e7f
refactor: migrate DeleteComponentButton to TypeScript (#18136)
* refactor: migrate DeleteComponentButton to TypeScript

* chore: fix typings

* chore: onDelete default value

* chore: removed props export

* chore: removed onDelete default value

* refactor: functional component
2022-02-11 16:12:19 +02:00
Meitong Qu
9f678e55b9
chore: migrate QueryTable component from jsx to tsx (#17944)
* 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>
2022-02-11 06:54:42 -06:00
Holger Bruch
97d918b692
fix(deck.gl): update view state on property changes (#17720) (#17826)
* Update viewstate on property changes

* Compare props via isEqual
2022-02-11 13:19:42 +02:00
Adam Dobrawy
7c69a1bc60
chore: improve React import reference consistency (#18608) 2022-02-10 21:03:16 -08:00
Hugh A. Miles II
78e20e21ab
feat: add prop to setDBEngine in DatabaseModal (#18653)
* saving this now

* remove for testing

* added test

* remove this

* remove set

* remove log

* Update index.test.jsx
2022-02-10 16:12:52 -08:00
Jinghuayao
7670f3a208
test(native filter): add test for time range filter (#18647)
* add native filter test for time range filter
2022-02-10 08:08:24 -08:00
Geido
f565230d8d
fix(Explore): Force different color for same metrics in Mixed Time-Series (#18603)
* Force different color for same metrics

* Conform to chart labels suffix

* Simplify
2022-02-10 16:21:47 +02:00
Adam Dobrawy
bd0b9f25e4
refactor: migrate SliderControl to TypeScript & added story (#18120)
* refactor: migrate SliderControl to TypeScript & added story

* fix: Set default onChange in SliderControl
2022-02-10 14:21:48 +01:00
Stephen Liu
82129753b0
fix: dataset modal doesn't work in dev mode (#18658)
* fix: dataset modal in dev mode

* remove cache

* add comment
2022-02-10 15:17:16 +02:00
Emmanuel Bavoux
00eb6b1f57
feat: editable title xl certified badge (#18626)
* Add size to EditableTitle certified badge

* Lint EditableTitle file

Co-authored-by: Emmanuel Bavoux <emmanuel.bavoux@free2move.com>
2022-02-09 17:09:20 -08:00
Michael S. Molina
f03b4dbedb
feat: Improves key expiration handling in Explore (#18624)
* feat: Improves key expiration handling in Explore

* Sets use_slice_data equals true

* Shows toast when recovering
2022-02-09 13:20:21 -03:00
simcha90
bcad1acec2
feat: Dynamic dashboard component (#17208)
* fix:fix get permission function

* feat: dynamic loading of dashboard components

* fix: revert image

* fix: fix py

* fix: fix py

* fix: pass state to dynamic component

* lint: add typing

* lint: fix lint

* lint: fix lint

* refactor: re-run pipeline

* fix: fix CR notes

* fix: fix CR notes

* move types and interfaces to core

* reorder exports

* rename Scope and Target

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2022-02-09 17:44:40 +02:00
Kamil Gabryjelski
830f2e71d3
feat(explore): Allow using time formatter on temporal columns in data table (#18569)
* 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
2022-02-09 10:29:11 +01:00
Hoàng Minh Quân
28e729b835
fix(histogram): display correct percentile value instead of formula (#18084)
Co-authored-by: quanhm <quanhm@vng.com.vn>
2022-02-08 20:30:20 -08:00
Christopher C Fleming
51f716f573
refactor(ExploreCtasResultsButton): convert to functional component (#17939)
* 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>
2022-02-08 13:23:45 -08:00
Michael S. Molina
fdf57cc22a
chore: Rename and reposition native filter modal fields (#18558)
* chore: Rename and reposition native filter modal fields

* Fixes collapse initial state

* Changes the button to sentence case
2022-02-08 16:36:40 -03:00
Phillip Kelley-Dotson
9c08bc0ffc
fix: change database database selector (#18609)
* fix: change database selector

* fix lint
2022-02-08 12:22:20 -05:00
EugeneTorap
cdfcbbaf30
refactor: migrate ExploreResultsButton component to FC & tsx (#18143)
* Move ExploreResultsButton to FC & tsx

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Fix test
2022-02-08 10:57:08 -05:00
Adam Dobrawy
fa8c81e1b1
chore: upgrade BoundsControl to TS (#18200)
* chore: upgrade BoundsControl to TS,FC, add storybook

* chore: improve React import reference consistency
2022-02-08 14:45:10 +02:00
Phillip Kelley-Dotson
4e2bdd49c4
chore: allow sqla docs to use supersettext (#18585)
* chore: allow sqla docs to use supersettext

* Update SqlAlchemyForm.tsx
2022-02-07 12:45:42 -08:00
EugeneTorap
85c8d0183b
refactor: remove redundant propTypes in ColumnElement (#18144)
* Remove redundant propTypes

* Refactoring

* Refactoring
2022-02-07 13:25:07 -05:00
Ville Brofeldt
cebff83d0c
fix(jest): add superset-frontend to testRegex (#18601) 2022-02-07 19:11:48 +02:00
Yongjie Zhao
aa21a963a6
feat: smart tooltip in datasourcepanel (#18080) 2022-02-07 22:48:23 +08:00
Phillip Kelley-Dotson
151d30bea4
fix: sqllab schema select error msg (#18564)
* fix: sqllab schema select error msg

* remove console logs

* fix lint
2022-02-04 10:21:18 -08:00
Kamil Gabryjelski
6cad7b1d05
chore(explore): make adhoc columns available without UX BETA ff (#17921)
* chore(explore): make adhoc columns available without UX BETA ff

* Remove redundant imports
2022-02-04 14:01:16 +01:00
Ville Brofeldt
8b0634c9ed
fix(listview): add nowrap to view mode container (#18246) 2022-02-04 07:42:10 +02:00
Grace Guo
a80efa609c
fix: new alert should have force_screenshot be true (#18182)
* fix: new alert should have force_screenshot be true

* fix comments
2022-02-02 17:00:05 -08:00
Kamil Gabryjelski
70969821de
feat(explore): Keep or reset chart config after datasource change (#18215)
* 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
2022-02-02 21:28:35 +01:00
Ville Brofeldt
2929bb1680
fix(plugin-chart-echarts): fix forecasts on verbose metrics (#18252)
* fix(plugin-chart-echarts): fix forecasts on verbose metrics

* oops! 🙊

* check for DTTM_ALIAS
2022-02-02 13:51:51 +02:00
Adam Dobrawy
341d85589c
refactor: upgrade ControlHeader to TSX & FC and add storybook (#18188)
* refactor: upgrade ControlHeader to TSX & FC and add storybook

* fix: Add story for error in ControlHeader

* apply review comments
2022-01-31 10:03:39 -08:00
Lyndsi Kay Williams
c40b337978
feat: Added success toasts for database, dataset, chart, dashboard, and query imports (#18190)
* Added imports toasts

* Removed generic import toast

* Remove addSuccessToast from props

* Added addSuccessToast back to prop type

* Made success toast strings translatable
2022-01-28 15:29:44 -06:00
Erik Ritter
7f3453f3ea
fix: Add mexico back to country map (#18219) 2022-01-28 13:04:53 -08:00
Michael S. Molina
4b61c76742
fix: Explore long URL problem (#18181)
* 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
2022-01-28 17:42:16 -03:00
Josue Lugaro
a06e043d7f
refactor: sqleditorleftbar to typescript (#17926)
* 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
2022-01-28 12:07:32 -08:00
Ville Brofeldt
cec4677971
fix(plugin-chart-echarts): use verbose x-axis name when defined (#18217) 2022-01-28 16:45:57 +02:00
Kamil Gabryjelski
37430d4044
fix(explore): Pie chart label formatting when series is temporal (#18216) 2022-01-28 15:14:40 +01:00
Yongjie Zhao
ea2d6681dd
chore: move controlPanel into time_table (#18160) 2022-01-28 12:13:12 +08:00
Stephen Liu
7c937ca182
fix(native-filters): values is not sorted when setting sort option (#18145)
* fix(native-filters): values is not sorted when setting sort option

* fix: revert

* pass sortComparator
2022-01-27 19:15:53 -07:00
Geido
a4e93afdbf
Fix default value (#18180) 2022-01-27 17:40:32 +01:00
Yongjie Zhao
20b4ae1ef9
fix: null value and empty string in filter (#18171) 2022-01-27 22:58:06 +08:00
Ville Brofeldt
dbe0a8b519
chore: bump echarts to 5.3.0 (#18162)
* chore: bump echarts to 5.3.0

* change to official 5.3.0 and reintroduce bold effect
2022-01-27 11:26:00 +02:00
Stephen Liu
a2bad7551e
fix(dashboard): support input undo when editing chart title (#18137) 2022-01-27 14:53:46 +08:00
Hugh A. Miles II
e6bb0fc7ad
feat: Add toast for successful table or schema refreshes in Sqllab (#18169)
* save

* add use redux to test

* update test for db selector

* add condition for refresh only
2022-01-26 20:26:50 -05:00
Phillip Kelley-Dotson
ac564ea6b7
feat: add success message for database modal (#18183) 2022-01-26 15:52:15 -08:00
David Aaron Suddjian
4ad5ad045a
feat: embedded dashboard core (#17530)
* 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>
2022-01-25 16:41:32 -08:00
Lyndsi Kay Williams
2491b89f29
Columns tab name field no longer editable, calculated columns rows now vertically aligned (#18164) 2022-01-25 14:34:56 -06:00
Stephen Liu
7bb867407a
fix(textarea-control): ace editor input exception (#18146) 2022-01-25 16:57:12 +01:00
Kamil Gabryjelski
c77d24cda3
fix: undefined error when adding extra sequential color scheme (#18152) 2022-01-24 19:20:49 +01:00
Kamil Gabryjelski
e632193eb0
feat(explore): more toast feedback on user actions in Explore (#18108)
* 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
2022-01-24 11:42:24 +01:00