Commit ab5cbc5
[Metrics][Discover] use lastReloadRequestTime from fetchParam (elastic#244761)
part of [239158](elastic#239158)
## Summary
This PR is a follow-up from the changes made for
[239158](elastic#239158).
`lastReloadRequestTime` was receiving `Date.now()` and this was causing
the chart to reload whenever it returned to the viewport. `fetchParams`
provides a `lastReloadRequestTime` attribute, which is safer to use
### How to test
- Start a local Kibana instance and point it to an oblt cluster
```yml
feature_flags.overrides:
metricsExperienceEnabled: true
```
- Navigate to Discover and Switch to ESQL mode
- After the grid loads, scroll up or down. The charts should not try to load data.
---------
Co-authored-by: kibanamachine <[email protected]>1 parent 368ebbe commit ab5cbc5
File tree
3 files changed
+16
-3
lines changed3 files changed
+16
-3
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
src/platform/packages/shared/kbn-unified-metrics-grid/src/components/chart/hooks/use_lens_props.ts
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
90 | 93 | | |
91 | | - | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
| |||
186 | 194 | | |
187 | 195 | | |
188 | 196 | | |
| 197 | + | |
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
| 201 | + | |
192 | 202 | | |
193 | 203 | | |
194 | 204 | | |
| |||
197 | 207 | | |
198 | 208 | | |
199 | 209 | | |
| 210 | + | |
200 | 211 | | |
201 | 212 | | |
202 | 213 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
0 commit comments