## Summary
This PR implements a standard way to have different static settings for
the serverless and ess (stateful) environments. It centralizes flags,
which were set using different approaches previously, in a single
configuration.
This aims to make it easier for developers to enable/disable parts of
the application in serverless projects.
Default:
```
sideNavEnabled: true,
ILMEnabled: true,
ESQLEnabled: true,
```
Serverless:
```
xpack.securitySolution.offeringSettings: {
sideNavEnabled: false, # Internal security side navigation disabled, the serverless global chrome navigation is used instead
ILMEnabled: false, # Index Lifecycle Management (ILM) functionalities disabled, not supported by serverless Elasticsearch
ESQLEnabled: false, # ES|QL disabled, not supported by serverless Elasticsearch
}
```
### Consume the settings
#### Server
- Plugin parsed `ConfigType`:
`this.config.settings.ESQLEnabled`
#### UI
- Plugin attribute:
`this.configSettings.ESQLEnabled`.
- Components can access it from Kibana services:
`useKibana().services.configSettings.ESQLEnabled;`
---------
Co-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com>
closes https://github.com/elastic/kibana/issues/166977
## Summary
This PR creates a feature flag to disable logs UI features in
serverless.
_Serverless_
**Frontend routes**
<img width="1466" alt="image"
src="a856055b-f78b-4d47-b27e-678e19bdfae4">
`/logs/stream`
<img width="1714" alt="image"
src="83d50be2-ed3a-4441-b31c-1afe6f8fd0b9">
`/logs/log-categories`
<img width="1714" alt="image"
src="85cd369d-55b2-46a2-a61a-135c5f18e299">
`/logs/anomalies`
<img width="1714" alt="image"
src="d68e6f91-fe29-483f-931d-d05f4303effa">
**Server routes**
These will return 404
```
POST kbn://api/infra/log_analysis/results/log_entry_anomalies_datasets
POST kbn://api/infra/log_analysis/results/log_entry_anomalies
POST kbn://api/infra/log_analysis/results/log_entry_categories
POST kbn://api/infra/log_analysis/results/latest_log_entry_category_datasets_stats
POST kbn://api/infra/log_analysis/results/log_entry_category_datasets
POST kbn://api/infra/log_analysis/results/log_entry_category_examples
POST kbn://api/infra/log_analysis/results/log_entry_examples
POST kbn://api/infra/log_analysis/results/log_entry_datasets
POST kbn://api/infra/log_analysis/results/log_entry_rate_indices
POST kbn://api/infra/log_alerts/chart_preview_data
```
_Stateful_
<img width="1716" alt="image"
src="4406434f-78e4-437f-b3b5-1b03dc23f3c0">
**Server routes**
These will return 400 - currently there is no way to pass `version` via
dev tools
```
POST kbn://api/infra/log_analysis/results/log_entry_anomalies_datasets
POST kbn://api/infra/log_analysis/results/log_entry_anomalies
POST kbn://api/infra/log_analysis/results/log_entry_categories
POST kbn://api/infra/log_analysis/results/latest_log_entry_category_datasets_stats
POST kbn://api/infra/log_analysis/results/log_entry_category_datasets
POST kbn://api/infra/log_analysis/results/log_entry_category_examples
POST kbn://api/infra/log_analysis/results/log_entry_examples
POST kbn://api/infra/log_analysis/results/log_entry_datasets
POST kbn://api/infra/log_analysis/results/log_entry_rate_indices
POST kbn://api/infra/log_alerts/chart_preview_data
```
### How to test
### How to test
- Start a local es instance: `yarn es serverless --kill --clean
--license trial --ssl`
- Enable `infra` in the `serverless.oblt.dev.yml` file:
- `xpack.infra.enabled: true`
- Start a local kibana instance: `yarn serverless-oblt --ssl`
- Verify the items listed above both on serverless and stateful
Closes#167142Closes#157126
## Summary
Fortifies the rendering service tests by introducing a retry loop to get
injected metadata after navigation. The `kbn-injected-metadata` tag that
we're relying on in this test gets removed some time after navigation
(e.g. to `.../render/core`). It appears that occasionally this test
fails to read the tag before it is removed.
Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3363
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
- Resolves https://github.com/elastic/kibana/issues/166906
## Summary
This PR adds field tokens to column header for the grid.
There are also additional necessary changes:
- field utils (name, description, icon) were moved from
`@kbn/unified-field-list` and `@kbn/discover-utils` to its own new
package `@kbn/field-utils`
- Unified Data Table and Unified Doc Viewer got a new prop `columnTypes`
which allows to render correct field icons for ES|QL searches (before
types were derived from the data view fields which could be misleading
in text-based searches as users can customize field names via query)
<img width="600" alt="Screenshot 2023-09-25 at 19 30 21"
src="388de9bb-94f7-4d3e-878a-ca0da99fcec2">
### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
## Summary
This PR copies, with limited modifications, functional test suites from
`test/functional` and `x-pack/test/functional`
## Lens Smoke tests
- [x] Smokescreen tests
(x-pack/test/functional/apps/lens/group1/smokescreen.ts)
- [x] Basic vega tests
(test/functional/apps/visualize/group6/_vega_chart.ts)
- [x] Sanity checks for TSDB functionality in Lens
x-pack/test/functional/apps/lens/group4/tsdb.ts
## Convert to Lens
These tests outside of serverless, assume the following vis types are
accessible via the **Visualize editor**, however all the following types
are designated **readonly** in serverless and thus the fn tests fail.
In place of these tests I created the identical visualizations, added
them to a dashboard and exported the SOs. These dashboard and dependent
visualizations are loaded in each respective test, and the assertions
are run on the `Convert to Lens` option from the dashboard. All
assertions are mostly unchanged or achieve the same effect.
- ✅ Agg based -
`x-pack/test/functional/apps/lens/open_in_lens/agg_based`
- ✅ TSVB - `x-pack/test/functional/apps/lens/open_in_lens/tsvb`
- ❌ Dashboard -
`x-pack/test/functional/apps/lens/open_in_lens/dashboard/config.ts`
- Not applicable to serverless env and/or duplicate of other tests.
Closes#162346
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Closes https://github.com/elastic/kibana/issues/167320
flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3278
Flakiness caused by https://github.com/elastic/kibana/pull/166991. Cause
of flakiness is not waiting for dashboard-picker to finish loading
options after setting the search value.
Flaky test highlights 3 other problems with
`SavedObjectSaveModalDashboard` component that are resolved in this PR:
1) Dashboard select not disabled when "New" or "None" is selected.
Regression from https://github.com/elastic/kibana/pull/166991
2) There is no form validation message giving visual feedback when users
click "Save" with "Existing" and no selected dashboard.
3) https://github.com/elastic/kibana/pull/166991 switched dashboard
selector from `EuiComboBox` to `EuiSelectable`. This changed the
behavior of selecting the same item. With the `EuiComboBox`
implemenation, selecting the same item retained the selection while
selecting the same item with the `EuiSelectable` implementation
unselected the item.
<img width="300" alt="Screenshot 2023-09-29 at 12 51 29 PM"
src="edd8d647-b8b6-4ecc-8f91-d1ad9e916a95">
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/167175
flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3292
Test failing because actions buttons are not visible. Screen shot from
failed test shows cell did not get selected. PR adds retry around
getting action button logic to ensure cell is clicked again in the event
the action button is not found
Notice how cell is not selected in screen shot below.
<img width="500" alt="Screenshot 2023-10-03 at 10 57 23 AM"
src="51432ea8-1a75-4182-bb1c-49f87a3d1070">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/166612
## Summary
- Adds a `customThresholdAlertsEnabled` feature flag
- Based on the feature flag shows an additional menu item in the alerts
dropdown
- Adds flyout component for rendering the custom alerts flyout
**Serverless**
<video
src="4fc79427-1e0c-4692-8525-b3b35e8a04e9"
controls="controls"></video>
**Traditional**

## How to test
- Checkout locally and run in serverless mode (infra plugin on)
- Make sure you see the "Create custom threshold alert" menu item in the
"Alerts and rules" dropdown
- Click on the item and make sure you can create an alert
- Run Kibana in traditional mode and make sure the dropdown item is not
there
closes https://github.com/elastic/kibana/issues/163280
## Summary
Disables OSquery in serverless.
<img width="1670" alt="image"
src="0ece0503-a5f3-46a1-a99b-29285088526c">
<img width="1670" alt="image"
src="5d20aaa4-7bdc-47e5-b9c2-469ecf62ab1f">
<img width="1670" alt="image"
src="97874aee-be98-4f0a-984a-562abbd4187d">
Osquery is now only used in the Asset Details flyout/full-page view. The
header component in the Asset Details now checks the feature flag object
to show/hide the OSquery tab.
### How to test
- Start a local es instance: `yarn es serverless --kill --clean
--license trial --ssl`
- Enable `infra` in the `serverless.oblt.dev.yml` file:
- `xpack.infra.enabled: true`
- Start a local kibana instance: `yarn serverless-oblt --ssl` and see if
the side nav contains the Infrastructure item
- Navigate to `https://0.0.0.0:5601/ftw/app/metrics` and open the Asset
Details flyout from Inventory and Hosts View. Navigate to the details
view and check that Osquery tab isn't present.
- Confirm if OSquery tab is present in stateful.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
closes https://github.com/elastic/kibana/issues/166900
Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3295
Flaky test because `await appsMenu.clickLink('Dashboard', { category:
'kibana' });` is opening dashboard application. Looking at the screen
shot, kibana stays on home page. Looking at the logs, the context menu
is opened and Dashboard link is clicked. PR resolves flakiness by adding
retry around appsMenu.clickLink.
<img width="600" alt="Screenshot 2023-10-02 at 3 52 19 PM"
src="5f3535c0-94d2-48c4-8d9b-15c4433bfe81">
<img width="600" alt="Screenshot 2023-10-02 at 3 52 42 PM"
src="9fc890e2-9f98-4078-87a1-d5cec8cee0e6">
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Moves the Dashboard view mode from session storage to local storage. This means that users will only need to enter edit mode **once** if they are an editor, and any subsequent Dashboards they open will already be in edit mode.
## Summary
This PR wraps up the work the @elastic/kibana-presentation team has done
to finish the MVP of [Phase
1](https://github.com/elastic/kibana/issues/154354) of the `Link`
embeddable, which enables users to add panels to their dashboard that
contain links to other dashboards + external links - with respect to
dashboard links, we give the author control over which pieces of context
should be kept across dashboards so that things like filter pills,
queries, and time ranges are not lost. This marks a huge improvement in
dashboard navigation overall, which was previously only available via a
variety of different workarounds including (but not limited to):
- Creating (essentially) a `noop` dashboard-to-dashboard drilldown
- Using markdown panels with hard Dashboard links, which are prone to
break across updates
- Avoiding navigation all together, which resulted in large,
slow-to-load dashboards.
As an added benefit, because these panels contain **references** to each
dashboard rather than hard links, (1) unlike markdown links, they should
not break after updates and (2) if a links panel is exported and
imported into another space or instance, all of the dashboards it links
to will also be imported.
1a86b713-47e7-4db9-8a04-29d41b13681a
> **Note**
> 🔉 The above video has audio! Turn on your sound for the best
experience.
### Note about this PR
- A majority of this work was done on a feature branch, with thorough
reviews from @andreadelrio on behalf of @elastic/kibana-design along the
way. Therefore, while feedback on the design is encouraged, any large
concerns brought up in this PR should be filed as separate issues and
addressed in follow-up PRs.
- This PR contains work for giving embeddables control over their own
panel size / default positioning on the dashboard. This was especially
important for the links panel, since we assume that (a) most links
panels would be located somewhere near the top of the dashboard and (b)
the horizontal links panel should have a different default "shape"
(longer than it is tall) than the vertical panel (taller than it is
long).
- This PR also contains work for caching dashboard saved objects, which
makes navigation much more seamless.
### Flaky Test Runner
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3251

### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~ This will
be addressed in a follow up:
https://github.com/elastic/kibana/issues/166750
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios - ~Units tests
are added, functional tests are forthcoming~ Edit: All tests are in.
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### 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: Nick Peihl <nick.peihl@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
Closes#163282
## Summary
This PR:
* Adds a `featureFlags.metricsExplorerEnabled` property to the Infra
plugin config to enable and disable Metrics Explorer depending on the
offering type
* Prevents `MetricsExplorerViewsService` initialization for serveless
based on the feature flag
* Prevents creating Metrics Explorer frontend routes when in serverless
* Prevents registration of the MetricsExplorerViews saved object when in
serverless
* Prevents initialization of the `metrics_explorer_views` API routes
when in serverless
**Trying to access Metrics Explorer in serverless**
<img width="1829" alt="CleanShot 2023-09-22 at 12 59 35@2x"
src="2b039925-0f0b-4c07-be29-bbe910de7a34">
**Trying to access views API**
<img width="1829" alt="CleanShot 2023-09-22 at 13 00 00@2x"
src="15269ec2-becd-4ee3-9b5e-d916df28a7b8">
**`infra/metrics_explorer` API still works as per ticket requirements**
<img width="1829" alt="CleanShot 2023-09-22 at 13 00 06@2x"
src="fb23f912-c6fd-46c8-9084-c17c51e5b064">
## How to test
* Checkout locally
* Enable Infra in `serverless.oblt.yml`: `xpack.infra.enabled: true`
* Run Kibana in serverless mode
* Try accessing `/app/metrics/explorer` route and make sure it's not
available
* Make sure other Infra routes (`/app/metrics/inventory` and
`/app/metrics/hosts`) still load as expected
* In Kibana dev console make sure you get 404 for `GET
kbn:/api/infra/metrics_explorer_views`
* Also check that you don't see `metrics-explorer-view` saved object in
the response for `GET
kbn:/api/kibana/management/saved_objects/_allowed_types`
* Run Kibana in non-serverless mode and make sure Metrics Explorer is
accessible and works as usual
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes#167075
## Summary
Adds a public asset client available in the `setup` lifecycle hook for
plugins that depend on this one. `getHosts` is the only method available
on this client for now.
TODO, before merge:
- [x] Add docs for the server client
- [x] Add docs for the public client
- [x] Remove REST docs from plugin docs, not needed
- [x] Add unit tests for public client
### Testing this PR
One way of testing this new client is to apply the attached
test-assets.patch file locally, adjust the date range in the getHosts
query that is added in the infra plugin, and then start Kibana and
navigate to the infra app. You should see print out in the browser
console.
[test-assets.patch](12718693/test-assets.patch)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR introduces the new color mapping feature into Lens.
The color mapping feature is introduced as a standalone sharable
component available from `@kbn/coloring`. The
[README.md](ddd216457d/packages/kbn-coloring/src/shared_components/color_mapping/README.md)
file describes the components and the logic behind it.
The Color Mapping component is also connected to Lens and is available
in the following charts:
- XY (you can specify the mappings from a breakdown dimension
- Partition (you can specify the mappings from the main slice/group by
dimension)
- Tag cloud (you can specify the mappings from the tags dimension)
This MVP feature will be released under the Tech Preview flag.
This PR needs to prove the user experience and the ease of use. UI
styles, design improvements and embellishments will be released in
subsequent PRs.
The current MVP-provided palettes are just a placeholder. I'm
coordinating with @gvnmagni for a final set of palettes.
close https://github.com/elastic/kibana/issues/155037
close https://github.com/elastic/kibana/issues/6480
fix https://github.com/elastic/kibana/issues/28618
fix https://github.com/elastic/kibana/issues/96044
fix https://github.com/elastic/kibana/issues/101942
fix https://github.com/elastic/kibana/issues/112839
fix https://github.com/elastic/kibana/issues/116634
## Release note
This feature introduces the ability to change and map colors to break
down dimensions in Lens. The feature provides an improved way to specify
colors and their association with categories by giving the user a
predefined set of color choices
or customized one that drives the user toward a correct color selection.
It provides ways to pick new colors and generate gradients.
This feature is in Tech Preview and is enabled by default on every new
visualization but can be turned off at will.

## Summary
This PR removes the feature flag and enables the new index details page
by default. The index details page was implemented in following PRs:
- https://github.com/elastic/kibana/pull/163521
- https://github.com/elastic/kibana/pull/163955
- https://github.com/elastic/kibana/pull/164741
- https://github.com/elastic/kibana/pull/165027
- https://github.com/elastic/kibana/pull/165038
- https://github.com/elastic/kibana/pull/165456
In this PR we completely remove now obsolete code for the old index
details flyout: react components and corresponding redux code. All
related tests are updated and cleaned up. The config value for Index
Management plugin `xpack.index_management.dev.enableIndexDetailsPage` is
deprecated as unused and can be removed in v9.0.
### How to test
1. Start ES and Kibana with `yarn es snapshot` and `yarn start`
3. Navigate to Index Management and create an index
4. Click the index name in the table and check the tabs of the details
page
### Screenshots
#### Stateful
Overview
<img width="1387" alt="Screenshot 2023-09-27 at 14 41 57"
src="e58b15e7-d10c-4473-873c-d0f128392404">
Mappings
<img width="1392" alt="Screenshot 2023-09-27 at 14 42 05"
src="441157cb-5a26-47c3-8da0-b4df51ebec5d">
Settings
<img width="1385" alt="Screenshot 2023-09-27 at 14 42 13"
src="da66a2eb-1f21-44c1-9356-484c66caab88">
Statistics
<img width="1380" alt="Screenshot 2023-09-27 at 14 42 22"
src="ec93d85c-e754-4c21-88ab-0124dc114fc9">
Error loading data
<img width="1333" alt="Screenshot 2023-09-26 at 19 05 37"
src="fc1804b3-6aa0-4019-bae6-e7bb40113b28">
<img width="1327" alt="Screenshot 2023-09-26 at 19 06 07"
src="ca711697-cc74-4ba8-b17c-ec9b01f3026e">
<img width="1329" alt="Screenshot 2023-09-26 at 19 06 28"
src="0cb46b09-8542-452a-8845-40d060057e95">
<img width="1331" alt="Screenshot 2023-09-26 at 19 06 48"
src="87de8d3d-b6e5-4e8f-b27c-18a1c6e950d8">
Error saving index settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 07 31"
src="e6e4b3d0-c237-4d0a-995a-4562bc78f88e">
### Serverless
Overview
<img width="1336" alt="Screenshot 2023-09-26 at 19 51 47"
src="6c76c23b-4be6-4ab3-ae1d-c7ae751e100d">
Mappings
<img width="1336" alt="Screenshot 2023-09-26 at 19 23 51"
src="625fa703-506f-4389-9df0-86441a655074">
Settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 24 02"
src="c496ab09-f2db-4c1b-9fb6-1e9b64b1c142">
# Release note
Index details can now be viewed on a new index details page in Index
Management.
<img width="1387" alt="Screenshot 2023-09-27 at 14 41 57"
src="b90c706d-8b15-49e4-8f6a-cb66f3ed1822">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Removed `isServerless` flag which lived in our global context and had to
be passed about to the various components which create their own version
of the context using `getMlGlobalServices`
This PR adds a new context which contains flags for all of the features
which can be toggled when in serverless mode.
Flags added:
```
showNodeInfo
showMLNavMenu
showLicenseInfo
isADEnabled
isDFAEnabled
isNLPEnabled
```
The enabled features flags are now read from the config file client
side, rather than using capabilities.
Additional changes:
- Changes the wording of the awaiting ML node callout in serverless.
- In the search project, the default ML page is the trained models list
and not Overview
- Reenables the Memory Usage page for all projects
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
We're breaking https://github.com/elastic/kibana/pull/166813 up into
smaller PRs in the interest of getting PRs through sooner for type
fixes. These are the changes for Kibana Presenation.
Redesigns the copy to dashboard modal and the Dashboard picker element to fix some UX issues they were causing.
Makes panels copied with the `copy panel to` dialog retain their original sizes.
A bunch of tests on dashboards are customising some of the panels
settings and providing custom time ranges:
<img width="409" alt="image"
src="c869c1a3-f7db-4ccd-ad00-c5403f2b4201">
Currently, the logic is not waiting for the quick toggle animation to
complete, before proceeding to select a time range.
This can cause a flaky behavior if the logic tries to customize the
range before the button is actually available, as seen on [this failed
test](018a4c46-0e7a-4b69-9a3d-9c54c27165b0_4fcbc47e71644919129e320eea8bb3bc.html?response-content-type=text%2Fhtml&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQPCP3C7LZWZ5UB5F%2F20230901%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230901T094837Z&X-Amz-Expires=600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEB0aCXVzLWVhc3QtMSJGMEQCIGCyKcVLGPUawZubNzZdt5oZNb5v0saiIuPqXwI7rmwlAiAsOj%2Fiep94v%2BYZJtLY3Gw0m%2FmK5mJw2IcIBdNKFXgK%2BCr6Awjm%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDAzMjM3OTcwNTMwMyIMXOd1Hm6ks%2FNE37V0Ks4DgMUso7syv87hnPcC%2BB1soxvFFnj4JnNZc6ZgkLUe93z99iPFBUsqH%2BRbUTfSbjVOEJYBKGYuvp32xvSWsYNVPXKmcej18LC0yNi%2BBzoG2X%2Bj80g%2BbGMm6YfTncjPhOE0CHHqOWXts9nQ8WpDy8XOl0zfMtuiPjzOXHo9lvw2mgYDZIJIMV72FYB9JGg8FPbLQtD3rysLGNE0VDKgl5LCnYwhY1pwRCRHnVW41QfV0pwK%2FbjNf9HjdK31LQvMY%2FGPuB3M6O2CUZLsvLGfWBeGYHtkqb0hrL9ijO1Uo28ZSS1FytPftEdF0e1kAC9C5zD56HtYm55aktOWtaaC0XPWLdWWGUq%2FKQzhxSCiXK6ovATU3zI3yPNoZs92YBYmIPMOpEI40dCCpksjPwAMCiQd%2F9gMNKP5Qp5CbYd2Khy%2FeXaT8J7HOZCueN63O0j%2FtX1tbwfznhbr74lAcRQjueRYmwboZaGSDZUQ33lSSmyZk1V9WF9eJyt88oHvIx0q9bIjvOlW05DiNKfEFWYwfBywdGuvRU6eGMs1QcDNu33Lb%2BhymudM2JZmQKIjZOcb2l3Fzctp614owH4JcRlmF4%2BIa4xHeBdRlTMysS8bTIsgMK7axacGOqYBzIpC1wgZWJ1kZ0agLWCNaMIdUl%2B4xrr7w%2Fz0843WWMhRrvbJhDTHqk5UclF%2FSROAMe0FH2XEXiQ65ILyUPlrUMels5tfQ3Pp%2FJWPi9NsQJUQ1n9uLN%2BFPDOoMo8Uxg4%2FkG2O7yTkrIdArfA6pWN9I21gFMW%2BFZy9BMYltt5T65ZKOyYAIFGpLhgfBySIBCUMgwR1kusfDhf1%2FRTvtDKD2sJKN5a0IA%3D%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=35fabe908aa7514e4a92de0ed12973af85ccfb439984fc3bdd7ef3bb8fe3419b).
(part of this [failed CI
build](https://buildkite.com/elastic/kibana-pull-request/builds/155285#018a4c46-0e7a-4b69-9a3d-9c54c27165b0))
The goal of this PR is to add a small waiting period, to make sure the
toggle animation has completed, and that the time range controls are
visible and clickable.
I used the opportunity to cleanup some "await delay millis" calls,
reusing existing logic instead.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>