[Fix][Infrastructure UI] Incorrect payload in time range when landing on the Hosts View#147390
Merged
jennypavlova merged 2 commits intoelastic:mainfrom Dec 13, 2022
jennypavlova:146581-infrastructure-ui-incorrect-payload-in-time-range-when-landing-on-the-hosts-view
Conversation
Contributor
|
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
…n-time-range-when-landing-on-the-hosts-view
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
To update your PR or re-run it, just comment with: |
neptunian
approved these changes
Dec 12, 2022
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Dec 13, 2022
… on the Hosts View (elastic#147390) Closes elastic#146581 ## Summary This PR fixes the initial `from` date range calculation. The idea is to convert first the initial range of minutes to milliseconds. Then in order to get the date of `CALCULATED_DATE_RANGE_TO` - (the calculated initial range in milliseconds) and call `getTime()` to receive the calculated `from` date as timestamp. To test that you can open the host page without the time range in the URL. Then check the `from` value as in the screenshot attached to the story and you can use an [Unix timestamp converter](https://www.unixtimestamp.com/) to verify that the calculation is correct (cherry picked from commit 29841da)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Dec 13, 2022
…anding on the Hosts View (#147390) (#147424) # Backport This will backport the following commits from `main` to `8.6`: - [[Fix][Infrastructure UI] Incorrect payload in time range when landing on the Hosts View (#147390)](#147390) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"jennypavlova","email":"dzheni.pavlova@elastic.co"},"sourceCommit":{"committedDate":"2022-12-13T09:43:15Z","message":"[Fix][Infrastructure UI] Incorrect payload in time range when landing on the Hosts View (#147390)\n\nCloses #146581 \r\n\r\n## Summary\r\n\r\nThis PR fixes the initial `from` date range calculation. The idea is to\r\nconvert first the initial range of minutes to milliseconds. Then in\r\norder to get the date of `CALCULATED_DATE_RANGE_TO` - (the calculated\r\ninitial range in milliseconds) and call `getTime()` to receive the\r\ncalculated `from` date as timestamp.\r\n\r\nTo test that you can open the host page without the time range in the\r\nURL. Then check the `from` value as in the screenshot attached to the\r\nstory and you can use an [Unix timestamp\r\nconverter](https://www.unixtimestamp.com/) to verify that the\r\ncalculation is correct","sha":"29841da10b140d8bb0e24d5af4c55e64b6f473c9","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Infra Monitoring UI","backport:prev-minor","v8.7.0"],"number":147390,"url":"https://github.com/elastic/kibana/pull/147390","mergeCommit":{"message":"[Fix][Infrastructure UI] Incorrect payload in time range when landing on the Hosts View (#147390)\n\nCloses #146581 \r\n\r\n## Summary\r\n\r\nThis PR fixes the initial `from` date range calculation. The idea is to\r\nconvert first the initial range of minutes to milliseconds. Then in\r\norder to get the date of `CALCULATED_DATE_RANGE_TO` - (the calculated\r\ninitial range in milliseconds) and call `getTime()` to receive the\r\ncalculated `from` date as timestamp.\r\n\r\nTo test that you can open the host page without the time range in the\r\nURL. Then check the `from` value as in the screenshot attached to the\r\nstory and you can use an [Unix timestamp\r\nconverter](https://www.unixtimestamp.com/) to verify that the\r\ncalculation is correct","sha":"29841da10b140d8bb0e24d5af4c55e64b6f473c9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147390","number":147390,"mergeCommit":{"message":"[Fix][Infrastructure UI] Incorrect payload in time range when landing on the Hosts View (#147390)\n\nCloses #146581 \r\n\r\n## Summary\r\n\r\nThis PR fixes the initial `from` date range calculation. The idea is to\r\nconvert first the initial range of minutes to milliseconds. Then in\r\norder to get the date of `CALCULATED_DATE_RANGE_TO` - (the calculated\r\ninitial range in milliseconds) and call `getTime()` to receive the\r\ncalculated `from` date as timestamp.\r\n\r\nTo test that you can open the host page without the time range in the\r\nURL. Then check the `from` value as in the screenshot attached to the\r\nstory and you can use an [Unix timestamp\r\nconverter](https://www.unixtimestamp.com/) to verify that the\r\ncalculation is correct","sha":"29841da10b140d8bb0e24d5af4c55e64b6f473c9"}}]}] BACKPORT--> Co-authored-by: jennypavlova <dzheni.pavlova@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #146581
Summary
This PR fixes the initial
fromdate range calculation. The idea is to convert first the initial range of minutes to milliseconds. Then in order to get the date ofCALCULATED_DATE_RANGE_TO- (the calculated initial range in milliseconds) and callgetTime()to receive the calculatedfromdate as timestamp.To test that you can open the host page without the time range in the URL. Then check the
fromvalue as in the screenshot attached to the story and you can use an Unix timestamp converter to verify that the calculation is correct