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

[dashboard] Impossible to edit imported dashboard data #12495

Closed
2 of 3 tasks
agatapst opened this issue Jan 13, 2021 · 6 comments
Closed
2 of 3 tasks

[dashboard] Impossible to edit imported dashboard data #12495

agatapst opened this issue Jan 13, 2021 · 6 comments
Labels
dashboard:import Related to importing dashboards

Comments

@agatapst
Copy link
Contributor

When user exports and then imports a dashboard, it is impossible to change some data, i.e. name of the imported dashboard or name of the filter.

Expected results

It should be possible to edit data of the imported dashboard, the same as it is possible to edit data of the existing dashboard (the one user exports).

Actual results

When user changes some data, it is not presented.
In case of changing the name in all dashboard panel, it is not possible to click "save" in editing modal.

Screenshots

Change name of the imported dashboard
imported_dash_change_name

Change filter name of the imported dashboard
imported_dash_filter

How to reproduce the bug

  1. Export dashboard
  2. Import this dashboard
  3. Try to edit this dashboard - for example name in all dashboard panel or click dashboard name and change filter name

Environment

Last commit: #407b194b15

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

I have noticed, that if I remove last lines from JSON metadata, editing works fine.
imported_dash_json

@agatapst agatapst added the #bug Bug report label Jan 13, 2021
@agatapst agatapst changed the title Dashboard: Impossible to edit imported dashboard data [dashboard: Impossible to edit imported dashboard data Jan 13, 2021
@agatapst agatapst changed the title [dashboard: Impossible to edit imported dashboard data [dashboard] Impossible to edit imported dashboard data Jan 13, 2021
@junlincc junlincc removed #bug Bug report Polidea labels Jan 13, 2021
@junlincc
Copy link
Member

cc @betodealmeida

@rusackas
Copy link
Member

rusackas commented Jan 4, 2023

Seems to be working just fine in newer versions, at least with the VERSIONED_EXPORTS flag enabled. Calling this one complete, but happy to re-open if anyone sees reason.

@rusackas rusackas closed this as completed Jan 4, 2023
@hanslemm
Copy link
Contributor

hanslemm commented Mar 1, 2023

I've had the same problem with Superset 2.0.1-dev in my production environment. Tried to investigate everything, from YAML files to backend, and couldn't explain why only imported dashboards don't allow editing, although they have the slices right.

@pandeypranay
Copy link

pandeypranay commented May 31, 2023

I am facing the same issue, using Superset Version: 2.0.1
@rusackas
Any pointers will be very helpful. I exported and imported dashbaords and since then not able to make any changes in any dashboards or charts. The only way I find is to recreate all the charts and dashbaords.

@hanslemm
Copy link
Contributor

hanslemm commented May 31, 2023

For anyone looking into this, the solution we found was:

  • When importing dashboards from one unstable version (I don't recall which one now) to Superset 2.0.1, the YAML file for the dashboards generated by the unstable version contained this:
metadata:
  color_scheme_domain: []

If you remove color_scheme_domain: [] from the YAML the dashboards become editable again.
If you have multiple YAML files to edit (which most likely you do), you can run the following command to find all YAML files and remove the lines, as long as they are in the same directory:

find /path/to/folder -name "*.yaml" -type f -exec sed -i '/color_scheme_domain: \[\]/d' {} \;

@rusackas
Copy link
Member

rusackas commented Jun 7, 2023

I think it might be reasonable to strip color_scheme_domain automatically on import... though I'm not quite sure the intricacies/dangers in doing so. If anyone wants to open a PR with tests, that would be welcomed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:import Related to importing dashboards
Projects
None yet
Development

No branches or pull requests

5 participants