opensearch-project / reporting

Export and automate PNG, PDF, and CSV reports in OpenSearch Dashboards
https://opensearch.org/docs/latest/dashboards/reporting/
Apache License 2.0
29 stars 66 forks source link

Add support for archive and delete on report instances #170

Open camAtGitHub opened 3 years ago

camAtGitHub commented 3 years ago

Describe the bug

Can't interact / delete / archive reports in the report plugin. Deleted reports/searches have broken links.

To Reproduce Steps to reproduce the behavior:

  1. Create saved search
  2. Reporting > Generate CSV
  3. Goto reporting dashboard https://DASHBOARD/app/reports-dashboards#/ Note the line item of the on_demand_report
  4. Goto Discover > Goto Open > Manage Searches
  5. Find and delete the search you previously created
  6. Goto reporting dashboard https://DASHBOARD/app/reports-dashboards#/ All links for the 'on_demand_report' are broken.
  7. No ability to clean up this section

Expected behavior Ability to delete 'reports' as listed in the 'reports' section. Same goes for reports with a source of 'Notebook'

OpenSearch Version 1.0.1

Dashboards Version 1.0.1

Plugins

Standard as per docker 1.0.1 image.

Screenshots image

kavilla commented 3 years ago

Thanks @camAtGitHub, @opensearch-project/admin can you transfer this issue to https://github.com/opensearch-project/dashboards-reports

zhongnansu commented 3 years ago

The current implementation doesn't allow delete report instances from UI. The original purpose is to keep every report(not report definition) as audit trail. But I think the reported issue make sense for a real use case. I am thinking we improve the UX by adding additional checks to see if the saved objects(searches, dashboards, visualiztions) exist, before rendering report details page. If not exist, we show an alert to user. Basically we make sure user doesn't end up with a broken url, not being aware of what was the issue.

@kgcreative any thoughts on this?

zhongnansu commented 3 years ago

relabel it , since this is not a bug, but a feature request

kgcreative commented 3 years ago

@zhongnansu - I think there are valid use cases where we might want to delete reports, either because someone created test reports they want to clean up, or becuase the underlying data has been archived, rolled over, or deleted and the report no longer can be generated. Let's work together on improving this.