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

Clicking Search nav link when on Search page does not reset query #2379

Closed
coffee-squirrel opened this Issue Jun 17, 2016 · 1 comment

Comments

Projects
None yet
5 participants
@coffee-squirrel

coffee-squirrel commented Jun 17, 2016

Problem description

Clicking the Search navigation link when on the Search page does not reset the search state. The query from the previous search continues to be used.

We would expect clicking the Search navigation link to reset the search state and trigger a new search or, put another way, work the same as clicking the link from a different page (e.g. Streams).

Steps to reproduce the problem

  1. Log in to Graylog as an admin
  2. If needed, create and enable an input (e.g. Random HTTP message generator) to ensure messages are in the system
  3. Click the "Search" link in the top navigation bar
  4. Enter source:invalid_source_yay (or anything that will return no results) as the query and perform the search
  5. Note that, as expected, "Nothing found" is shown
  6. Note that the URL is something like https://mygraylog:8443/search?rangetype=relative&fields=message%2Csource&width=1920&highlightMessage=&relative=300&q=source%3Ainvalid_source_yay
  7. Click the "Search" link in the top navigation bar again
  8. Note the query input is cleared and the URL is now something like https://mygraylog:8443/search, however "Nothing found" is still displayed
  9. Click the "Play" button to trigger automatic updates
  10. Note this makes no difference, and "Nothing found" is still displayed
  11. Click the "Streams" link in the top navigation bar, and then click the "Search" link
  12. Note messages received recently are displayed as expected

Environment

  • Graylog Version: 2.0.2 (4da1379)
  • Elasticsearch Version: 2.2.0
  • MongoDB Version: 2.6.12
  • Operating System: Red Hat Enterprise Linux Server release 6.7
  • Browser version: Firefox 47

@coffee-squirrel coffee-squirrel changed the title from Clicking Search nav link when on Search page does not reset search state to Clicking Search nav link when on Search page does not reset query Jun 17, 2016

@dennisoelkers dennisoelkers added this to the 2.0.3 milestone Jun 17, 2016

@dennisoelkers dennisoelkers added the bug label Jun 17, 2016

@edmundoa edmundoa self-assigned this Jun 20, 2016

@joschi joschi added web S3 P2 labels Jun 20, 2016

edmundoa added a commit that referenced this issue Jun 20, 2016

Update search query on auto refresh
When a search did not return results, clicking on the "Search"
navigation menu, does not reset the search query used for auto-refresh.

Removing the query from the `SearchPage` state fixes the problem, as the
search query is properly updated in the `SearchStore`.

Fixes #2379

edmundoa added a commit that referenced this issue Jun 20, 2016

Update search query on SearchStore component
When a search did not return results, clicking on the "Search"
navigation menu, does not reset the search query being used in
`SearchStore`.

Removing the query from the component state fixes part of problem, as the
search query is now updated when the component refreshes the data.

Refs #2379

edmundoa added a commit that referenced this issue Jun 20, 2016

dennisoelkers added a commit that referenced this issue Jun 20, 2016

Update search query on auto refresh (#2385)
* Update search query on SearchStore component

When a search did not return results, clicking on the "Search"
navigation menu, does not reset the search query being used in
`SearchStore`.

Removing the query from the component state fixes part of problem, as the
search query is now updated when the component refreshes the data.

Refs #2379

* Refresh search data when location changes

Fixes #2379
@coffee-squirrel

This comment has been minimized.

coffee-squirrel commented Jun 20, 2016

Thanks again 👍

@kroepke kroepke added triaged and removed triaged labels Sep 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment