Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Embedded dashboard configuration #19364

Merged
merged 29 commits into from
Mar 30, 2022

Conversation

suddjian
Copy link
Member

@suddjian suddjian commented Mar 25, 2022

SUMMARY

Related to #17187.

This adds UI to make a dashboard embeddable. To support this I also wrote a backend model and some crud endpoints. The migration to create the table for this model was already done in #18561.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2022-03-25.at.10.03.11.PM.mov

TESTING INSTRUCTIONS

Turn on the EMBEDDED_SUPERSET feature flag, mark a dashboard as embedded, and embed it using the SDK.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@suddjian
Copy link
Member Author

suddjian commented Mar 28, 2022

  • check feature flag on endpoints
  • change the embedded page route to use the new model
  • check permissions on the frontend
  • fix linting and maybe tests

@suddjian suddjian changed the title feat: [WIP] Embedded Dashboard setup UI feat: Embedded Dashboard setup UI Mar 29, 2022
@suddjian suddjian changed the title feat: Embedded Dashboard setup UI feat: Embedded Dashboard configuration UI Mar 29, 2022
@suddjian suddjian changed the title feat: Embedded Dashboard configuration UI feat: Embedded dashboard configuration Mar 29, 2022
@suddjian suddjian requested a review from lilykuang March 29, 2022 17:06
superset/embedded/view.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #19364 (62b16f8) into master (0968f86) will increase coverage by 0.01%.
The diff coverage is 65.27%.

@@            Coverage Diff             @@
##           master   #19364      +/-   ##
==========================================
+ Coverage   66.55%   66.57%   +0.01%     
==========================================
  Files        1670     1675       +5     
  Lines       63824    64092     +268     
  Branches     6510     6519       +9     
==========================================
+ Hits        42481    42672     +191     
- Misses      19654    19729      +75     
- Partials     1689     1691       +2     
Flag Coverage Δ
hive 52.70% <61.40%> (-0.23%) ⬇️
javascript 51.25% <14.70%> (-0.08%) ⬇️
mysql 81.91% <85.38%> (+0.04%) ⬆️
postgres 81.95% <85.38%> (+0.04%) ⬆️
presto 52.55% <61.40%> (-0.23%) ⬇️
python 82.39% <85.38%> (+0.04%) ⬆️
sqlite 81.72% <85.38%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../components/Header/HeaderActionsDropdown/index.jsx 67.79% <0.00%> (-3.64%) ⬇️
...ontend/src/dashboard/containers/DashboardRoute.tsx 0.00% <0.00%> (ø)
superset-frontend/src/embedded/index.tsx 0.00% <0.00%> (ø)
superset-frontend/src/preamble.ts 0.00% <ø> (ø)
superset/common/query_context_processor.py 90.65% <0.00%> (ø)
superset/dashboards/commands/export.py 83.78% <0.00%> (-1.15%) ⬇️
superset/views/dashboard/views.py 65.51% <ø> (ø)
...rc/dashboard/components/DashboardEmbedControls.tsx 8.16% <8.16%> (ø)
...frontend/src/dashboard/components/Header/index.jsx 60.92% <50.00%> (-0.46%) ⬇️
...rset-frontend/src/hooks/apiResources/dashboards.ts 36.36% <50.00%> (+3.03%) ⬆️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0968f86...62b16f8. Read the comment docs.

Copy link
Member

@lilykuang lilykuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@suddjian suddjian merged commit 8e29ec5 into apache:master Mar 30, 2022
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 1, 2022
* embedded dashboard model

* embedded dashboard endpoints

* DRY up using the with_dashboard decorator elsewhere

* wip

* check feature flags and permissions

* wip

* sdk

* urls

* dao option for id column

* got it working

* Update superset/embedded/view.py

* use the curator check

* put back old endpoint, for now

* allow access by either embedded.uuid or dashboard.id

* keep the old endpoint around, for the time being

* openapi

* lint

* lint

* lint

* test stuff

* lint, test

* typo

* Update superset-frontend/src/embedded/index.tsx

* Update superset-frontend/src/embedded/index.tsx

* fix tests

* bump sdk

(cherry picked from commit 8e29ec5)
@villebro villebro added the lts-v1 label Apr 1, 2022
villebro pushed a commit that referenced this pull request Apr 3, 2022
* embedded dashboard model

* embedded dashboard endpoints

* DRY up using the with_dashboard decorator elsewhere

* wip

* check feature flags and permissions

* wip

* sdk

* urls

* dao option for id column

* got it working

* Update superset/embedded/view.py

* use the curator check

* put back old endpoint, for now

* allow access by either embedded.uuid or dashboard.id

* keep the old endpoint around, for the time being

* openapi

* lint

* lint

* lint

* test stuff

* lint, test

* typo

* Update superset-frontend/src/embedded/index.tsx

* Update superset-frontend/src/embedded/index.tsx

* fix tests

* bump sdk

(cherry picked from commit 8e29ec5)
villebro pushed a commit that referenced this pull request Apr 4, 2022
* embedded dashboard model

* embedded dashboard endpoints

* DRY up using the with_dashboard decorator elsewhere

* wip

* check feature flags and permissions

* wip

* sdk

* urls

* dao option for id column

* got it working

* Update superset/embedded/view.py

* use the curator check

* put back old endpoint, for now

* allow access by either embedded.uuid or dashboard.id

* keep the old endpoint around, for the time being

* openapi

* lint

* lint

* lint

* test stuff

* lint, test

* typo

* Update superset-frontend/src/embedded/index.tsx

* Update superset-frontend/src/embedded/index.tsx

* fix tests

* bump sdk

(cherry picked from commit 8e29ec5)
@sadpandajoe
Copy link
Contributor

🏷️ preset:2022.11

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* embedded dashboard model

* embedded dashboard endpoints

* DRY up using the with_dashboard decorator elsewhere

* wip

* check feature flags and permissions

* wip

* sdk

* urls

* dao option for id column

* got it working

* Update superset/embedded/view.py

* use the curator check

* put back old endpoint, for now

* allow access by either embedded.uuid or dashboard.id

* keep the old endpoint around, for the time being

* openapi

* lint

* lint

* lint

* test stuff

* lint, test

* typo

* Update superset-frontend/src/embedded/index.tsx

* Update superset-frontend/src/embedded/index.tsx

* fix tests

* bump sdk
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels lts-v1 preset:2022.11 size/XXL 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants