Bug description
The bug is that
- Embed the Superset dashboard.
- Click on Edit dashboard button
- Click on discard button,
Expected: It should redirect me to the embedded dashboard Actual: It shows screen which keeps on loading
Logs does not show any error.
In network trace after this GET call, nothing happens embedded/412a5023-617f-435b-9e08-2e821b581902
In case if anyone came across similar issues, please advice.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
Hey @umeshme! 👋 I'm here to help you with any bugs, questions, or contributions you have for Superset. I'll assist you while we wait for a human maintainer to join the conversation.
The issue you're experiencing with the discard button in the embedded dashboard not functioning as expected could be related to the implementation of the discard functionality or the state management during the transition from edit mode back to view mode. The expected behavior of the discard button is to undo changes and return to the embedded dashboard view [1].
Here are a few things you might want to check or try:
-
State Management: Ensure that the state transition from edit mode to view mode is correctly handled. The
SET_EDIT_MODE
action should be dispatched witheditMode: false
to switch back to view mode [2]. -
Network Requests: Since you mentioned that the network trace shows a GET call with no further activity, it might be worth investigating if there are any missing or failed network requests that should be triggered when the discard button is clicked.
-
JavaScript Console: Check the browser's JavaScript console for any errors or warnings that might provide more insight into what's going wrong.
-
Code Review: Review the implementation of the
discardChanges
function and ensure it is correctly defined and invoked. The function should handle the necessary state updates and UI transitions.
If these steps don't resolve the issue, it might be helpful to look into recent changes or commits related to the embedded dashboard or discard functionality for any potential bugs or regressions.
To continue talking to Dosu, mention @dosu.
Comment From: jamiemac87
Similar issue with version 4.1.1
.
Repro Steps: 1. Make guest role Admin 2. embed dashboard 3. Click on "edit dashboard" within title 4. click "discard" button
Results in following error
{"errors": [{"message": "403 Forbidden: You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.", "error_type": "GENERIC_BACKEND_ERROR", "level": "error", "extra": {"issue_codes": [{"code": 1011, "message": "Issue 1011 - Superset encountered an unexpected error."}]}}]}
Comment From: rusackas
@Vitor-Avila might know better than me, but I didn't think we actually supported edit mode in embedded dashboards?
Comment From: Vitor-Avila
@rusackas technically what's visible/"possible" in embedded mode depends on the permissions assigned to the role set for the guest role. In reality, I think embedded was mostly built for view mode, so I don't think this is expected to work.
Comment From: rusackas
Agreed... the functionality is not intended to work. We're open to PRs that somehow properly detect embedded mode and disable the appropriate button(s), of course. A means to determine embedded state might help us disable a bunch of things that shouldn't be happening/supported in embedded dashboards, actually.