opendistro-for-elasticsearch / kibana-reports

Kibana Reports
https://opendistro.github.io/
39 stars 31 forks source link

Cannot download as CSV when Store URLs in session storage is active #343

Closed mxmorin closed 3 years ago

mxmorin commented 3 years ago

When Store URLs in session storage option is set in Advanced Settings, cannot download saved query as CSV. Js errors is thrown : Uncaught TypeError: Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method. at _nonIterableRest (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at _slicedToArray (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at getTimeFieldsFromUrl (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at contextMenuCreateReportDefinition (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at HTMLButtonElement.<anonymous> (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at HTMLDocument.dispatch (:5601/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:404) at HTMLDocument.m.handle (:5601/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:404)

getTimeFieldsFromUrl function is waiting for a timestamp in the url which is not present when Store URLs in session storage is active

alexz00 commented 3 years ago

I experienced the same issue with the same error.

zhongnansu commented 3 years ago

We'll take a look. This advanced setting is something that we were not aware of.

zhongnansu commented 3 years ago

This issue is moved to https://github.com/opensearch-project/dashboards-reports/issues/19