Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.33k stars 1.05k forks source link

Search query becomes ineffective after exporting search to dashboard #17619

Closed thll closed 9 months ago

thll commented 9 months ago

Expected Behavior

Exporting a search to a dashboard should keep the query applied to the widgets.

Current Behavior

After exporting a search to a dashboard, the query is set for the widgets, but it's not effective. Only after modifying it, e.g. by adding a space at the end, the widgets are updated with the result of the applied query.

https://github.com/Graylog2/graylog2-server/assets/886541/0e214490-4c98-4679-a0ee-edb404fb9924

Steps to Reproduce (for bugs)

  1. On the search page, enter a search query
  2. Export the search to a dashboard
  3. Observe that the query is not applied
  4. Modify the query by editing a widget
  5. Observe that the query is now applied

Context

[HS-2092769340]

Your Environment

T100D commented 9 months ago

We have reported this, if the search comes from a saved search in the search page, the query is removed in the saved search and the search time is kept, happens in 5.0, 5.1 & 5.2.

luk-kaminski commented 9 months ago

It seems to be a front-end issue. When exporting, it seems that FE sends a new search save request without queries part populated.

export_to_dashboard_problem

Because of that original search is modified (the query part is gone), which should not be the case, and the new dashboard does not work as expected. The fact that we see the query in the widget of the dashboard seems to be some FE caching mechanism or error... When you save that dashboard and enter it once again, the query will be gone (it is never stored permanently in DB).