Commit Graph

70 Commits

Author SHA1 Message Date
anoojkinaginlsn 09141d2a8f
fix(build): update webpack jsx paths (#18685) 2022-02-11 14:28:00 -08:00
Kamil Gabryjelski a7d505db41
feat: Implement EmptyState components (#18676)
* feat: Implement EmptyState components

* Fix title in storybook

* Add licenses

* Add max widths
2022-02-11 17:43:09 +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
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
Ville Brofeldt 8dea7f500b
fix(generator): more cleanup to plugin framework (#18027)
* fix(generator): more cleanup to plugin framework

* fix typo and package name

* add docs

* fix typo

* Update superset-frontend/webpack.config.js

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>

* fix generator reference

* add steps to tutorial and fix package version

* refine docs/readme

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
2022-01-17 10:23:35 +02:00
Erik Ritter 79b6dc251e
fix: package.json local file dependencies (#17957) 2022-01-07 13:44:27 +08:00
Yongjie Zhao ceecc7047b
chore: remove unused eslintrc (#17860)
* chore: remove unused eslintrc

* remove unused lint

* add comments

* change comments
2022-01-05 19:31:12 +08:00
Yongjie Zhao 97a78d3301
refactor(storybok): upgrade to webpack5 in storybook of plugins (#17909)
* refactor: use webpack5 in plugins storybook

* remove ./src from packages.json
2022-01-05 10:39:33 +08:00
Yongjie Zhao 9840fbf49b
refactor(monorepo): update plugin dependencies (#17837)
* refactor(monorepo): use local dependencies in packages.json

* add prettier ignore

* update commit message

* fix release workflow

* refine release script
2021-12-22 16:26:12 +08:00
Ville Brofeldt 19daf65b54
chore(generator-superset): migrate to monorepo (#17829)
* chore(generator-superset): migrate to monorepo

* add todo and remove webpack reference from template

* fix linting errors

* remove redundant test file
2021-12-21 11:44:21 +02:00
Yongjie Zhao 3c41ff68a4
refactor(monorepo): move superset-ui to superset(stage 2) (#17552) 2021-11-30 08:29:57 +08:00
Evan Rusackas ef01cbb625
fix: reenabling terser plugin for webpack (#17205)
* fix: reenabling terser plugin

* undoing accidental commit inclusion

* prettier 

* moving the dots.
2021-10-25 15:47:09 -06:00
Erik Ritter 2757b93fea
fix: Use production build config for cypress tests (#16978)
* fix: Use production build config for cypress tests

* set usedExports to global
2021-10-05 11:13:33 -07:00
Ville Brofeldt 739d8418a7
fix(build): make npm linking work pt. 2 (#16958)
* fix(build): make npm linking work pt. 2

* remove explicit symlinks conf
2021-10-04 19:47:07 +03:00
Michael S. Molina 05632b9804
chore: Moves the stylesheets folder to the assets folder (#16880)
* chore: Moves the stylesheets folder to the assets folder

* Changes {src} to src
2021-09-30 09:28:38 -03:00
Ville Brofeldt 9ac55d9afa
fix(build): enable hot reloading of linked packages (#16867) 2021-09-28 16:21:17 +02:00
Michael S. Molina 99d15b25b0
chore: Moves the images folder to the assets folder (#14429)
* chore: Moves the images folder to the assets folder

* Rebases
2021-09-22 10:28:51 -03:00
Kamil Gabryjelski 486e0d412c
chore: Upgrade Webpack to v5 (#16701)
* Upgrade Webpack to v5

* Remove mapbox hack

* Replace url-loaders and file-loaders with asset modules

* Remove 1 rule

* Change --colors to --color

* Remove invalid option (--no-progress)

* Remove url-loader, bump plugin

* Fix AnnotationLayer formula check

* Remove redundant tests

* Bump cypress packages

* Remove old comment

* Fix tests

* Remove checks for number of scripts in markdown test

* Cosmetic changes

* Add tests

* Fix test

* Fix test

* Fixes test warnings

* disable flaky test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Michael S. Molina <michael.s.molina@gmail.com>
2021-09-22 14:24:54 +03:00
Maxime Beauchemin 79e8d77acc
chore: remove TerserPlugin step for build (#16163) 2021-08-10 17:09:40 +08:00
Elizabeth Thompson e0576786c3
add feature flag to header bar (#16031) 2021-08-02 10:57:29 -07:00
David Aaron Suddjian 257385e888
feat(explore): Upgraded viz select gallery (#15303)
* add modal layout with description, rework styles

* thirty percent

* test correctly

* avoid any changes in modal height

* typescriptify

* feat(viz): add categories to the viz picker (#15304)

* feat(viz): add categories to the viz picker

* fix test types

* add a catch-all category

* tweak layout

* upgrade superset-ui to get new metadata

* do i look like i know what a jpeg is

* fix tests

* lint

* remove script count test requirement

* fix e2e test

* feat(explore): Viz picker search improvements (#15399)

* upgrade superset-ui, install fuse.js

* add metadata to plugin context

* get search working

* layout improvements

* fix tests

* Update superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* use typography size instead of grid unit

* comments

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* feat(explore): Examples image gallery in the viz type control (#15489)

* feat(explore): add section for example images in viz type control

* fix jpg webpack config

* formatting

* feat(Explore): Viz gallery component tweaks (#15520)

* separate viz gallery from the modal

* use gallery directly in add slice view

* more formatting on the add slice container

* restyle the thumbnail list

* explicit thumbnail width and height

* remove crappy hack

* remove useless line

* comment

* sort categories

* comments

* tweak search behavior

* fix tests

* open gallery to the currently selected viz type

* null safety

* show all plugins when searching empty string

* get the new metadatas

* adjust categories scrolling behavior

* add time series table metadata

* upgrade superset-ui

* attempt fixing tests

* upgrade descriptions

* fix unit test

* attempt fixing e2e again

* max width for viz gallery

* update package lock

* undo unnecessary webpack changes

* don't show search results until something is entered

* force modal to open to selected viz type

* tweaks to search behavior

* gallery layout tweaks

* enshrine pivot table v2 in a place of honor

* feat(viz): Clear viz gallery when navigating between categories (#15577)

* start viz gallery with null selection, clear when switching categories

* fix AddSliceContainer tests

* show a message when there is no viz type selected

* composition > inheritance

* clarify searching code

* comment

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
2021-07-12 10:59:10 -07:00
Erik Ritter 7a1223ca7d
Revert "build(webpack): use [contenthash] instead of [chunkhash] (#14942)" (#15285)
This reverts commit 821519fcfa.
2021-06-23 09:41:19 -07:00
Matan Borenkraout 14598d4d5d
chore: add dry false config to CleanWebpackPlugin (#14691) 2021-06-21 10:21:45 +03:00
ʈᵃᵢ 98ec365374
feat(webpack): configure publicPath via ASSET_BASE_URL env var (#15105) 2021-06-14 18:55:58 -06:00
ʈᵃᵢ 821519fcfa
build(webpack): use [contenthash] instead of [chunkhash] (#14942) 2021-06-09 13:59:17 -06:00
Michael S. Molina 1b47902e47
chore: Removes react-bootstrap and react-bootstrap-slider (#14641) 2021-05-17 10:22:22 -07:00
Jesse Yang 23014e9233
chore: upgrade @emotion (#14454) 2021-05-04 15:26:16 -07:00
David Aaron Suddjian 21cf12a480
chore(dashboard): Integrate dashboard app into the SPA bundle (#14356)
* chore(dashboard): Integrate dashboard app into the SPA bundle

* fix url params

* change variable name

* change title correctly

* custom css

* lint

* remove unused file

* remove content assertions from dashboard tests

* fix case with missing bootstrap data

* fix: respect crud views flag

* crud views -> spa

* remove unused dashboard templates

* fix: remove unused variable

* fix: missed a spot with the crudViews -> spa

* router link to dashboard from dashboard list page

* link using the router when in card mode

* lint

* fix tests, add memory router

* remove  dashboard app files

* split up the bundle a little more

* use webpack preload
2021-05-04 08:51:17 -07:00
Jesse Yang a75e4af99b
fix(viz): bump superset-ui to fix bugs in table and graph chart (#14438) 2021-05-03 16:23:42 -07:00
Hugh A. Miles II 44c09b5383
feat: Setup `supersetText` configuration to overwrite errors (#14256)
* Setup error message overwrite config`

* fix

* bad reabse

* bad rebase 2

* remove unneeded comment

* working dynamic importing

* saveeee

* working textUtil file

* add ignore tslint

* fix linting

* fix linting

* import order

* setup guard statements

* linting again

* linting again

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2021-04-27 15:03:35 -04:00
Michael S. Molina ec79b7be1f
chore: Moves the staticPages folder to the assets folder (#14167) 2021-04-20 08:47:24 -07:00
Sam Faber-Manning 0318b6d4ae
feat: Add error pages (#13144)
* add custom error pages for 404 and 500 responses

* refactor error page styles into separate template

* move error pages to superset-frontend

* fix whitespace on error pages

* refactor error pages to be generated by jinja

* generate static error pages with webpack
2021-03-04 09:58:16 -08:00
Jesse Yang eec78560f2
build: fix emotion theme errors when npm link @superset-ui/core (#12510) 2021-01-14 10:20:13 -08:00
Jesse Yang 9acf48fd1e
chore: upgrade eslint, babel, and prettier (#12393) 2021-01-10 17:26:35 -08:00
Jesse Yang bcb8db621c
build: improve webpack configs for npm link (#12313) 2021-01-06 23:36:24 -08:00
Jesse Yang d2da25a621
refactor: remove queryFields in QueryObject and update chart control configs (#12091)
* Clean up queryFields

* Clean up unused vars

* Bump chart plugins

* Bringing changes in #12147
2020-12-22 17:10:19 -08:00
Evan Rusackas 871a98abe2
refactor: Load fonts from packages rather than local binaries (#11718)
* removing binaries

* adding npm packages

* nixing unused specimen sheet

* deleting specimen sheets

* using imported css sheets from npm

* package lock

* fixing webpack issue with font loading

* raising specificity on ACE editor fonts

* linting 
2020-11-16 17:10:48 -08:00
Jesse Yang 4f21dea55f
feat(dev): dont override asset manifest in dev-server (#11648)
Override manifest.json only when `npm run dev`, not `npm run
dev-server`.  This allows developers to compare between the
current version of Superset with what they are working on
without switching back and forth between branches.

All they need to do is to first start the current version with
production build:

```
npm run build
superset run -p 8088
```

Then start the dev server in another window:

```
npm run dev-server
```
2020-11-11 13:14:45 -08:00
Jesse Yang eb389ba8d4
build: update webpack for npm linking plugins (#11253) 2020-10-13 16:54:06 -07:00
ʈᵃᵢ 269644d18e
style: override ace edit error icon (#11139) 2020-10-02 09:45:36 -07:00
Kamil Gabryjelski ccfd293227
ESLint: no-restricted-syntax (#10889)
* Enable no-restricted syntax rule

* Fix webpack.config.js

* Remove unused function from utils/common.js

* Refactor triple nested for loop

* Fix loops in src/explore components

* Fix loops in SqlLab components

* Fix loops in AlteredSliceTag

* Fix loops in FilterableTable

* Add fixtures and uinit tests for findControlItem

* Add license
2020-09-18 09:05:57 -07:00
Jesse Yang 0129c4253d
feat: move ace-editor and mathjs to async modules (#10837)
Follow up on #10831, move brace and mathjs to async modules so that the initial page load for dashboards most pages can be faster.
2020-09-15 14:12:06 -07:00
Jesse Yang d80f406239
build: optimize webpack code split (#10831) 2020-09-10 15:11:21 -07:00
ʈᵃᵢ 45fee60b62
fix: remove FAB rendered menu in favor of react based one (#10401) 2020-08-21 17:19:00 -07:00
ʈᵃᵢ 7301a363c1
feat: setup react page with submenu for datasources listview (#10642) 2020-08-20 11:42:17 -07:00
Evan Rusackas b0380befa1
feat: Allow tests files in /src (plus Label component tests) (#10634)
* allow tests in jest confg

* sample stories for Label component

* passing tests

* stories to tsx!

* excluding knobs exports from published stories

* ts fix

* ts fix

* Label test to TS

* explicitly ignoring test files in webpack bundling

* linting stuff

* adding comment about test file exclusions
2020-08-19 12:54:26 -07:00
Maxime Beauchemin 0d3caf08e5
chore: npm audit fix as of 2020-08-15 (#10613)
* chore: npm audit fix as of 2020-08-15

* --force

* fixing copy-webpack-plugin

* lint

* resolve conflicts
2020-08-17 15:27:01 -07:00
Natalie Ruhe 51a88cb19b
feat: Add antd to the codebase (#10508) 2020-08-05 13:50:30 -07:00
Evan Rusackas ca71d4d6ee
feat: adding Storybook to Superset (#10383)
* Storybook added!

* starting to configure junk....

* Storybook works!!!

* Now with theme!

* apache boilerplate

* more apache comments

* lots o' knobs for the Button.... taking stock of the codebase

* more classes, but killing the knob for now.

* nixing unused module

* linting

* fresh package-lock

* now with tooltip!

* adding path and zlip because the linter told me to

* upgrading storybook packages from devdeps

* linting

* removing cruft

* killing an annoying (and old?) lint issue

* lint fix, take 2.

* removing zlib/path

* package lock reset from master

* re-adding new packages for this here PR

* nixing console log, simplifying

* nixing comment TODOs (done enough!)

* basic docs.
2020-07-22 10:21:25 -07:00
ʈᵃᵢ 0eee6785a8
feat(listviews): SIP-34 Bulk Select (#10298) 2020-07-16 16:07:49 -07:00