[Logs UX] [Obs Exploration] fix incorrect extraction of time range from wrong context#248795
Conversation
|
/ci |
|
@weltenwort @gbamparop Seems like i made a mistake while replacing the Log Stream component which caused this issue to happen. I suspect while replacing the component in multiple place, i copied the logic from another page without realising that the hook relies on a particular context which was not available in the Component Tree for this particular View In Content component. I have fixed this issue in this PR, and tested the whole thing and it works fine. As per my understanding, 8.19 is the last version where we can do fixes and 8.19.11 is the next planned release. Post 8.19 we don't need to support Log Stream, is this understanding correct ? or do we need this in 9.0 ? |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
Is the |
@gbamparop The
I will create another PR to target the current main and backport it all the way back to 9.2 and 9.3 (i don"t see any release for 9.1) to fix the incorrect Discover Link issue which instead of passing the actual dateRange is passing undefined resulting in Gif from 9.1 environment |
UpdateI have created a different PR directly from main backporting all the way back to
cc: @weltenwort This PR needs to be merged due to Locator Definition changes |
|
I could verify that this works in the logs stream on 8.19 and submitted a review over in #248939 |
…context (#248939) ## Summary Original issue - #248795 As part of the original issue it was found that in 8.19 it provides a completely broken experience but 9.1 onwards, we don't access the undefined object inside the react component and straight away were passing it to the Discover Locator which was getting `undefined` for `dateRange` and thus was defaulting to `now to now-15m` With this PR we fix passing the correct `dateRange`. Now when user open `View in Context` and then clicks Open in Discover from the modal, it does passes the actual timerange from the Logs Categories page to Discover ## Release Note Fixes broken links from View In Context Modal to Discover which was not respecting the DateRange
…context (elastic#248939) ## Summary Original issue - elastic#248795 As part of the original issue it was found that in 8.19 it provides a completely broken experience but 9.1 onwards, we don't access the undefined object inside the react component and straight away were passing it to the Discover Locator which was getting `undefined` for `dateRange` and thus was defaulting to `now to now-15m` With this PR we fix passing the correct `dateRange`. Now when user open `View in Context` and then clicks Open in Discover from the modal, it does passes the actual timerange from the Logs Categories page to Discover ## Release Note Fixes broken links from View In Context Modal to Discover which was not respecting the DateRange (cherry picked from commit 6302c6b)
…context (elastic#248939) ## Summary Original issue - elastic#248795 As part of the original issue it was found that in 8.19 it provides a completely broken experience but 9.1 onwards, we don't access the undefined object inside the react component and straight away were passing it to the Discover Locator which was getting `undefined` for `dateRange` and thus was defaulting to `now to now-15m` With this PR we fix passing the correct `dateRange`. Now when user open `View in Context` and then clicks Open in Discover from the modal, it does passes the actual timerange from the Logs Categories page to Discover ## Release Note Fixes broken links from View In Context Modal to Discover which was not respecting the DateRange (cherry picked from commit 6302c6b)
…context (elastic#248939) ## Summary Original issue - elastic#248795 As part of the original issue it was found that in 8.19 it provides a completely broken experience but 9.1 onwards, we don't access the undefined object inside the react component and straight away were passing it to the Discover Locator which was getting `undefined` for `dateRange` and thus was defaulting to `now to now-15m` With this PR we fix passing the correct `dateRange`. Now when user open `View in Context` and then clicks Open in Discover from the modal, it does passes the actual timerange from the Logs Categories page to Discover ## Release Note Fixes broken links from View In Context Modal to Discover which was not respecting the DateRange (cherry picked from commit 6302c6b)
…context (elastic#248939) ## Summary Original issue - elastic#248795 As part of the original issue it was found that in 8.19 it provides a completely broken experience but 9.1 onwards, we don't access the undefined object inside the react component and straight away were passing it to the Discover Locator which was getting `undefined` for `dateRange` and thus was defaulting to `now to now-15m` With this PR we fix passing the correct `dateRange`. Now when user open `View in Context` and then clicks Open in Discover from the modal, it does passes the actual timerange from the Logs Categories page to Discover ## Release Note Fixes broken links from View In Context Modal to Discover which was not respecting the DateRange

Summary
Closes - https://discuss.elastic.co/t/request-for-guidance-on-resolving-the-view-in-context-issue-in-the-logs-stream-menu/384453
While replacing the Log Stream component code in 8.19, i seems to have imported the timeRange from a context which was not present in the React tree for
Open in Contextcomponent. This caused the component to get undefined error resulting in React Boundary Error as shown in the screenshot of the Discuss issue.Hence, this fix takes care of getting the dateRange from a proper available context
Release Notes
Fixed breaking of UI when user clicks on
View in Contextaction on Logs Stream component in 8.19 due to incorrect react context usage