Skip to content

Commit

Permalink
[8.x] [Infra][Lens] Fix prop drilling error in passing down lastReloa…
Browse files Browse the repository at this point in the history
…dRequestTime (elastic#206591) (elastic#206831)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Infra][Lens] Fix prop drilling error in passing down
lastReloadRequestTime
(elastic#206591)](elastic#206591)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gonçalo Rica Pais da
Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-15T17:00:30Z","message":"[Infra][Lens]
Fix prop drilling error in passing down lastReloadRequestTime
(elastic#206591)\n\n## Summary\r\n\r\nSmall fix to correctly pull in the right
prop for propagating\r\n`lastReloadRequesTime` down to the lens API.
Fixes the issue of the\r\nauto-refresh not working for flyouts for the
infrastructure page.\r\n\r\nCloses elastic#203446\r\n\r\n## How to
test\r\n\r\n* Go to infrastructure inventory page, click on a host to
open a flyout.\r\n* Click the datepicker and set the auto-refresh to
occur every N\r\nseconds.\r\n* The KPIs and other charts should visibly
load & update
periodically.","sha":"ad8ede6156b5ad3960950cf325aabea79910c394","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-infra_services"],"title":"[Infra][Lens]
Fix prop drilling error in passing down
lastReloadRequestTime","number":206591,"url":"https://github.com/elastic/kibana/pull/206591","mergeCommit":{"message":"[Infra][Lens]
Fix prop drilling error in passing down lastReloadRequestTime
(elastic#206591)\n\n## Summary\r\n\r\nSmall fix to correctly pull in the right
prop for propagating\r\n`lastReloadRequesTime` down to the lens API.
Fixes the issue of the\r\nauto-refresh not working for flyouts for the
infrastructure page.\r\n\r\nCloses elastic#203446\r\n\r\n## How to
test\r\n\r\n* Go to infrastructure inventory page, click on a host to
open a flyout.\r\n* Click the datepicker and set the auto-refresh to
occur every N\r\nseconds.\r\n* The KPIs and other charts should visibly
load & update
periodically.","sha":"ad8ede6156b5ad3960950cf325aabea79910c394"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206591","number":206591,"mergeCommit":{"message":"[Infra][Lens]
Fix prop drilling error in passing down lastReloadRequestTime
(elastic#206591)\n\n## Summary\r\n\r\nSmall fix to correctly pull in the right
prop for propagating\r\n`lastReloadRequesTime` down to the lens API.
Fixes the issue of the\r\nauto-refresh not working for flyouts for the
infrastructure page.\r\n\r\nCloses elastic#203446\r\n\r\n## How to
test\r\n\r\n* Go to infrastructure inventory page, click on a host to
open a flyout.\r\n* Click the datepicker and set the auto-refresh to
occur every N\r\nseconds.\r\n* The KPIs and other charts should visibly
load & update
periodically.","sha":"ad8ede6156b5ad3960950cf325aabea79910c394"}}]}]
BACKPORT-->

Co-authored-by: Gonçalo Rica Pais da Silva <[email protected]>
  • Loading branch information
kibanamachine and Bluefinger authored Jan 15, 2025
1 parent 6735744 commit 1fb8ded
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const DEFAULT_DISABLED_ACTIONS = [
export type LensChartProps = BaseChartProps &
Pick<EuiPanelProps, 'borderRadius'> & {
toolTip?: React.ReactElement<TooltipContentProps>;
reloadRequestTime?: number;
description?: string;
} & {
lensAttributes: UseLensAttributesParams;
Expand All @@ -55,7 +54,7 @@ export const LensChart = React.memo(
onFilter,
overrides,
toolTip,
reloadRequestTime,
lastReloadRequestTime,
disableTriggers = false,
height = MIN_HEIGHT,
loading = false,
Expand All @@ -71,7 +70,7 @@ export const LensChart = React.memo(
timeRange: dateRange,
query,
filters,
lastReloadRequestTime: reloadRequestTime,
lastReloadRequestTime,
});

const handleBeforeBadgesRender = useCallback((messages: UserMessage[]) => {
Expand Down Expand Up @@ -141,7 +140,7 @@ export const LensChart = React.memo(
query={query}
overrides={overrides}
onBrushEnd={onBrushEnd}
lastReloadRequestTime={reloadRequestTime}
lastReloadRequestTime={lastReloadRequestTime}
onFilter={onFilter}
onBeforeBadgesRender={handleBeforeBadgesRender}
/>
Expand Down

0 comments on commit 1fb8ded

Please sign in to comment.