apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.8k stars 13.87k forks source link

"embed dashboard" button does not show up #28494

Open segundoayllon opened 6 months ago

segundoayllon commented 6 months ago

Bug description

My superset instance is installed in a virtual environment (venv) inside WSL in Windows 11. I had the same setup but in a windows 10 machine as a host and didn't have this problem.

I have set the necessary permissions for my user.

I have set the required flags in both my custom superset_config.py file and my default config.py file as:

EMBEDDED_SUPERSET: True
EMBEDDABLE_CHARTS: True

I have also tried

FEATURE_FLAGS = { "EMBEDDED_SUPERSET": True,
                    "EMBEDDABLE_CHARTS": True }

and it doesn't work. The embed dashboard button isn't visible.

However, the 'share' options for Charts include an 'embed code' button.

All the other configurations specified in the custom superset_config.py files are applied.

How to reproduce the bug

  1. Add "EMBEDDED_SUPERSET: True EMBEDDABLE_CHARTS: True" to the superset_config.py file inside the app folder.
  2. Run superset with the command superset run --debugger.
  3. Login with an admin user.
  4. Check that the current user has the necessary permissions to embed dashboards
  5. Go to a dashboard.
  6. Click the options button in the top right corner.
  7. Embed dashboard button does not show.

Screenshots/recordings

Captura de pantalla 2024-05-14 095511 Captura de pantalla 2024-05-14 100229 Captura de pantalla 2024-05-14 100929

Superset version

4.0.1

Python version

3.10

Node version

18 or greater

Browser

Chrome

Additional context

My superset_config.py file includes the following flags: EMBEDDED_SUPERSET: True EMBEDDABLE_CHARTS: True PUBLIC_ROLE_LIKE_GAMMA = True PREVIOUS_SECRET_KEY = "xxxxxxxxxxxxxxx" SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxt"

Checklist

dosubot[bot] commented 6 months ago

To address the issue with the "embed dashboard" button not appearing in your Superset instance, let's focus on the most relevant areas for troubleshooting:

  1. Feature Flags and Configuration: Ensure there are no typos or errors in your superset_config.py and config.py files regarding the EMBEDDED_SUPERSET and EMBEDDABLE_CHARTS flags. These flags should correctly enable the embedding features.

  2. User Permissions: Verify again that the user account has the correct permissions for dashboard embedding. This is crucial for the embed button to be visible.

  3. Frontend Build: If you've modified configuration files after the initial frontend build, you might need to rebuild the frontend assets. Changes in configuration files do not automatically update the frontend, so a rebuild could be necessary.

  4. Version Compatibility and Dependencies: Ensure there are no compatibility issues with Python version 3.10 or Node version 18. Also, check if additional dependencies required for the "embed dashboard" feature are installed and up to date.

  5. Error Logs: Review any error messages in your browser's console or server logs for clues that could indicate what's preventing the embed button from appearing.

By focusing on these areas, you should be able to narrow down the cause of the issue. If after checking these points the problem persists, providing specific error messages or logs could help further diagnose the problem.

#### Details **Sources** - [Embedded Dasboard option is not coming even after setting EMBEDDED_SUPERSET=true in config.py](https://github.com/apache/superset/discussions/23989) - [superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx) - [CHANGELOG/1.5.0.md](https://github.com/apache/superset/blob/master/CHANGELOG/1.5.0.md) - [superset/models/embedded_dashboard.py](https://github.com/apache/superset/blob/master/superset/models/embedded_dashboard.py) - [superset-embedded-sdk/src/index.ts](https://github.com/apache/superset/blob/master/superset-embedded-sdk/src/index.ts) - [superset/embedded/api.py](https://github.com/apache/superset/blob/master/superset/embedded/api.py)
**About Dosu** This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a šŸ‘ if this is helpful and šŸ‘Ž if it is irrelevant.

To continue the conversation, mention @dosu.