Commit b22fe1a
[Controls] Do not ignore invalid selections (#174201)
Fixes #164633
## Summary
Improves dashboard performance by not ignoring invalid Controls
selections.
This improves Dashboard performance as panels do not wait until Controls
selections are validated. Prior to this, the Controls would run
validations to find selections that would result in No Data. These
"invalid selections" would be ignored and not applied to the filters.
With this PR, all selections whether valid or invalid are applied to the
filters. This means all controls and panels can be loaded immediately
which improves the performance of the Dashboard.
Since this can be considered a breaking UI change, I've added a
suppressible toast warning users about the change.
The screenshots below show the same dashboard with invalid selections.
In the "Before" screenshot, the "Agent version" control selection is
validated before the rest of the panels are loaded. Once validated, the
invalid selection is ignored and the panels load based only on valid
selections.
In the "After" screenshot the "Agent version" control selection is
immediately applied to the filters and the rest of the dashboard is
loaded. The control selections are checked for validity only after the
filters are applied and highlighted. The warning popover notifies the
user that invalid selections are no longer ignored. Clicking the "Do not
show again" button updates the browser's localStorage so that future
warnings are suppressed.
Before:

After:

@amyjtechwriter Can you please review the text in the warnings? We want
to make users aware of the change as it could abruptly change the data
in their dashboards.
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: Hannah Mudge <[email protected]>
Co-authored-by: Hannah Mudge <[email protected]>1 parent 37a1920 commit b22fe1a
File tree
34 files changed
+779
-376
lines changed- src/plugins/controls
- public
- control_group
- component
- embeddable
- state
- options_list
- components
- embeddable
- range_slider
- components
- embeddable
- services
- core
- storage
- test/functional/apps/dashboard_elements/controls
- common
- options_list
34 files changed
+779
-376
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
Lines changed: 112 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | | - | |
36 | 45 | | |
37 | | - | |
38 | 46 | | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| |||
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
50 | 66 | | |
51 | 67 | | |
52 | 68 | | |
| |||
61 | 77 | | |
62 | 78 | | |
63 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
64 | 161 | | |
65 | 162 | | |
66 | 163 | | |
| |||
117 | 214 | | |
118 | 215 | | |
119 | 216 | | |
| 217 | + | |
120 | 218 | | |
121 | 219 | | |
122 | 220 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
Lines changed: 37 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
13 | 49 | | |
14 | 50 | | |
15 | 51 | | |
| |||
258 | 294 | | |
259 | 295 | | |
260 | 296 | | |
261 | | - | |
262 | | - | |
| 297 | + | |
263 | 298 | | |
264 | 299 | | |
265 | 300 | | |
| |||
Lines changed: 48 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| 91 | + | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| 135 | + | |
| 136 | + | |
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
| |||
153 | 161 | | |
154 | 162 | | |
155 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
156 | 168 | | |
157 | 169 | | |
158 | 170 | | |
| |||
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
167 | 205 | | |
168 | 206 | | |
169 | 207 | | |
| |||
201 | 239 | | |
202 | 240 | | |
203 | 241 | | |
204 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
205 | 245 | | |
206 | 246 | | |
207 | 247 | | |
| |||
211 | 251 | | |
212 | 252 | | |
213 | 253 | | |
| 254 | + | |
214 | 255 | | |
215 | 256 | | |
216 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
217 | 262 | | |
218 | 263 | | |
219 | 264 | | |
| |||
284 | 329 | | |
285 | 330 | | |
286 | 331 | | |
287 | | - | |
| 332 | + | |
288 | 333 | | |
289 | 334 | | |
290 | 335 | | |
291 | 336 | | |
292 | 337 | | |
293 | 338 | | |
| 339 | + | |
294 | 340 | | |
295 | 341 | | |
296 | 342 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
0 commit comments