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

Imported Dashboards and Visualizations with custom IDs cannot be exported on-demand. #281

Closed
inf17101 opened this issue Jan 18, 2022 · 3 comments
Assignees
Labels
bug Something isn't working untriaged v1.3.0

Comments

@inf17101
Copy link

inf17101 commented Jan 18, 2022

Describe the bug
If you import a saved objects file via API or Opensearch Dashboard WebUI and set a custom ID for visualizations and the dashboard itself, then the "Reporting" Submenu for on-demand exports is greyed out. So you can click onto "Reporting" on a dashboard view, but the export buttons inside the submenu are greyed out. A report definition can still be created and a report can be downloaded if it was created via reporting definitions, but on-demand report generation does not work like described before.

To Reproduce
Steps to reproduce the behavior:

  1. Export an existing dashboard via saved objects API or saved objects menu of the WebUI.
  2. Set unique but custom IDs in the ndjson file for every visualization, index pattern and dashboard.
  3. Import the changed saved objects file via saved objects API or saved objects menu of the WebUI.
  4. Open the dashboard in the WebUI and click on "Reporting".
  5. Verify that the custom ID is set (check the browser URI).
  6. Now you can see that alle reporting options are unavailable.
  7. Clone the imported dashboard via WebUI "Clone" button and save a copy as new dashboard.
  8. Now open the cloned dashboard in the WebUI: you can see that a new auto-genearted ID is set for the cloned dashboard and if you click on "reporting", now the buttons are not greyed out anymore and you can export it.

Expected behavior
I expect that on-demand export of dashboards and visualizations with custom unique IDs set is supported.
Needed for automation purposes.

Screenshots
image

Host/Environment (please complete the following information):
Linux Ubuntu Server 20.04

Thank you in advance.
Best regards.

@inf17101 inf17101 added Beta bug Something isn't working untriaged labels Jan 18, 2022
@zhongnansu zhongnansu removed the Beta label Jan 19, 2022
@zhongnansu
Copy link
Member

@inf17101 It seems like a bug, thx for providing the steps to reproduce. We'll follow and try. Meanwhile, I have a question, is this type of issue only for pdf/png report? Do you experience the same thing with saved searches?

@inf17101
Copy link
Author

@zhongnansu Yes I think too, for saved searches its the same.

image

@joshuali925
Copy link
Member

The code is assuming that saved object ids follows UUID format, causing this issue:
https://github.com/opensearch-project/dashboards-reports/blob/main/dashboards-reports/public/components/context_menu/context_menu.js#L129

will need to update the regex to extract custom object id

inf17101 added a commit to inf17101/dashboards-reports that referenced this issue Feb 25, 2022
fix opensearch-project#281
changes regex to allow additional customized ids instead of ids in uuid format only.
@inf17101 inf17101 mentioned this issue Feb 25, 2022
6 tasks
@zhongnansu zhongnansu self-assigned this Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged v1.3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants