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

Fixing relative time range used by RecentMessageLoader. #4513

Merged
merged 1 commit into from Jan 24, 2018

Conversation

Projects
None yet
2 participants
@dennisoelkers
Member

dennisoelkers commented Jan 24, 2018

Description

Motivation and Context

The RecentMessageLoader component is trying to limit the range of the
search request it used to get the last received message of an input to
the last hour. For this, it uses the range parameter. This is the
correct parameter name for the backend, but the web interface uses a
small conversion helper that expects the parameter to be named
relative for relative time ranges, according to the naming in the old
web interface.

To make the fix as small as possible for a point release, this change
just uses the relative parameter. For master and subsequent releases
we should either switch over to the range parameter or use it in case
the relative parameter is not present. This way we do not discourage
consumers of the UniversalSearchStore to use the actually correct
parameter naming.

Fixes #4510.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Fixing relative time range used by RecentMessageLoader.
The RecentMessageLoader component is trying to limit the range of the
search request it used to get the last received message of an input to
the last hour. For this, it uses the `range` parameter. This is the
correct parameter name for the backend, but the web interface uses a
small conversion helper that expects the parameter to be named
`relative` for relative time ranges, according to the naming in the old
web interface.

To make the fix as small as possible for a point release, this change
just uses the `relative` parameter. For `master` and subsequent releases
we should either switch over to the `range` parameter or use it in case
the `relative` parameter is not present. This way we do not discourage
consumers of the `UniversalSearchStore` to use the actually correct
parameter naming.

Fixes #4510.

@dennisoelkers dennisoelkers added this to the 2.4.2 milestone Jan 24, 2018

@dennisoelkers dennisoelkers added the bug label Jan 24, 2018

@dennisoelkers dennisoelkers removed their assignment Jan 24, 2018

@bernd bernd self-assigned this Jan 24, 2018

@bernd

bernd approved these changes Jan 24, 2018

@bernd bernd merged commit 9229fd3 into 2.4 Jan 24, 2018

4 of 5 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 2211 has failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 953 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@bernd bernd deleted the issue-4510 branch Jan 24, 2018

@wafflebot wafflebot bot removed the ready-for-review label Jan 24, 2018

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