## Summary
Closes https://github.com/elastic/kibana/issues/154331
Enables sorting the table in Discover when in SQL (text based) mode.
- sorting is performed on the client (inmemory)
- inmemory sorting configuration is not preserved in the appstate (to
prevent unnecesarry data fetches)
- all fields can be sorted, even the ones that can't be sorted on the
elasticsearch side.
### Checklist
Delete any items that are not applicable to this PR.
- [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
---------
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Addresses the following feedback:
https://github.com/elastic/kibana/pull/154151#discussion_r1158470566
Similar to what has been done for ZDT, the goal of this PR is to extract
the logic of the `runV2Migration()` from the `KibanaMigrator` into a
separate file.
The PR also fixes some incomplete / incorrect UTs and adds a few missing
ones.
## Summary
Part of https://github.com/elastic/kibana/issues/154331
Enables the expanded row view for text based documents for both the
legacy and datagrid modes (the legacy was broken)
<img width="1899" alt="image"
src="edae78a9-6ef5-43db-ba3d-9019ecc72c57">
Note: I am hiding for now the single document view and surrounding
document view. I think that we should think about it more and if it
makes sense for ESQL. With ESQL if there is no @timestamp I see all my
data in the table. If I want to narrow the results I can use where and
limit. How should the surrounding documents work for a query with where
date field and with llimit? Does it make sense? Possibly not, because
with ESQL I can have the surrounding documents view in my main view bu
just changing the query. So I am hiding them for now, until we find a
good use case for that and decide how we want this to work.
### 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
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes#156771
This PR add the correct logic to extract the table column formatter,
when set, and use it within a reference line context. If no formatter is
set then the group/axis formatter is used.
Included required changes directly in this PR to make it reviewable.
<img width="1227" alt="Screenshot 2023-05-31 at 14 53 40"
src="3615ca3a-f9d3-4b0a-b8f1-4c47dcf953dd">
### Checklist
Delete any items that are not applicable to this PR.
- [ ] 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
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### 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: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Peter Pisljar <peter.pisljar@elastic.co>
Closes https://github.com/elastic/kibana/issues/156430
## Summary
The only reason a control embeddable should enter a fatal error state is
if, for some reason, the embeddable actually cannot be created (for
example, trying to create a control with a type that doesn't exist) -
every other error should be considered **recoverable** as much as
possible. So, this PR ensures that both the options list and the range
slider are able to recover from most errors by switching from calling
`onFatalError` to instead handling most errors internally via component
state.
> **Note**
> The time slider control does not have any errors that would be
considered "recoverable" because it is actually **much more difficult**
to enter an error state for this control; so, I did not need to change
anything for this control type.
### Errors:
- **Recoverable error:**
- **Before:**
7737a3e8-1c97-47ba-92ab-55f5e1a6c30a
- **After:**
e4ced721-2b84-497e-8608-965877409bf5
- **Unrecoverable error:**
To test this, I've created a dashboard saved object with a control type
that does not exist:
[controlTypeDoesNotExistDashboard.ndjson.zip](11547128/controlTypeDoesNotExistDashboard.ndjson.zip).
Try importing this dashboard and ensure that you can actually see an
error unlike the "before" state:
- **Before:**

- **After:**

### Flaky Test Runner
- [Options list dashboard interavction
(`test/functional/apps/dashboard_elements/controls/options_list/options_list_dashboard_interaction.ts`)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2316)

- [Range slider
(`test/functional/apps/dashboard_elements/controls/range_slider.ts`)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2317)

### Checklist
- [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)
### 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)
## Summary
`@elastic/eui@80.0.0` ⏩ `@elastic/eui@81.0.0`
---
## [`81.0.0`](https://github.com/elastic/eui/tree/v81.0.0)
- Added ability to set `options.checked` to "mixed" in `EuiSelectable`
([#6774](https://github.com/elastic/eui/pull/6774))
**Bug fixes**
- Portalled components (e.g. `EuiPopover`, `EuiModal`, `EuiFlyout`) will
correctly inherit text color from its nearest `EuiThemeProvider` parent.
`<EuiText color="default">` is no longer needed.
([#6775](https://github.com/elastic/eui/pull/6775))
**Breaking changes**
- `EuiSelectable` no longer renders a `data-test-selected` attribute on
its list items. Use the `aria-checked` property instead
([#6774](https://github.com/elastic/eui/pull/6774))
- Nested `EuiThemeProvider`s now render a wrapping `<span>` element in
order to correctly set the inherited text `color` of all descendants.
`<EuiText color="default">` is no longer needed.
([#6775](https://github.com/elastic/eui/pull/6775))
---------
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
## Summary
This PR moves a lot of business logic from `field_preview_context.tsx`
to the controller. No functionality is changed. This is a step to simply
the code and eventually reduce bugs.
My approach to this change was -
1. Move `useState` calls to controller state, adding necessary setters
2. Move `useCallback` calls to controller methods.
3. Move `useEffect` calls - this one is the most complex - they get
called when state values are set. Sometimes the code is inlined or a new
private method might be created.
The bits that remain are mostly related to form values referred to as
`params`. I'm saving this for a subsequent PR as this PR is large enough
as it is.
Closes https://github.com/elastic/kibana/issues/151243
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Tackles https://github.com/elastic/kibana/issues/155136
When an upgrade fails, a cluster might be on a partially migrated state
(with some indices already updated to the newer version). When rolling
back to the previous version, in ESS, this can cause these indices to be
`write_blocked`.
This PR aims at detecting this situation and failing early, effectively
preventing to `write_block` any indices.
- Closes https://github.com/elastic/kibana/issues/147885
- Closes https://github.com/elastic/kibana/issues/157109
## Summary
**Before:**
Unified Field List plugin has internal routes (wrappers for client code)
which exist only to run api functional tests against them:
- `/api/unified_field_list/existing_fields/{dataViewId}`
- `/api/unified_field_list/field_stats`
Client code does not call these routes directly. So there is no reason
in keeping and versioning them.
**After:**
- Internal routes are removed
- A new "Unified Field List Examples" page was created
http://localhost:5601/app/unifiedFieldListExamples
- API functional tests (which used the routes) were converted to
functional tests against this new example page
- Created a new `unifiedFieldList` page object which is used now in
functional tests (methods are extracted from existing `discover` page
object).
**For testing:**
Steps:
1. Run Kibana with examples: `yarn start --run-examples`
2. Install sample data
3. And navigate to Developer Examples > Unified Field List Examples
page.

### Checklist
- [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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Closes https://github.com/elastic/kibana/issues/154334
This PR:
- make the text based languages to work with adhoc dataviews and not
permanent dataviews. The text based languages will not be related with
dataviews
- enables the timepicker always for text based languages
- the timepicker is disabled if the index pattern doesn't have an
@timestamp field
- the timepicker is enabled if the index pattern has an @timestamp field
- the timepicker is enabled if the index pattern doesn't have an
@timestamp field but there is a dirty state (user is writing the query
and hasn't hit the update button. We do that to give the user the
ability to change the timepicker with the query
- An info text has been added to the editor footer to inform the users
about the @timestamp existence
The timepicker in the disabled state needs to have a disabled status
text (All time) but this is not possible atm. I have created an issue to
eui https://github.com/elastic/eui/issues/6814 to add this property.
This is going to be tackled before the 8.9 FF but we don't want to block
this PR
<img width="1839" alt="image"
src="8fc0a492-1f00-41b6-a4a6-b0527725931f">
### 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
---------
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Related to https://github.com/elastic/kibana/issues/150296
Use a `range` clause for version filtering for the ZDT outdated doc
query, similar to what is already done for the `v2` algo, to avoid
eventually trying to migrate documents from higher versions (which would
result in a migration failure)
## Summary
Addresses: #105371
One can use `--elasticsearch.password ---my-password---`,
`--elasticsearch.password=---mypassword---` or `--elasticsearch.password
\"---mypassword\"` both in these cases. Commander is splitting
single-dash inputs, it can't be prevented, so for those cases, use
quotes or compound options.
The original problem can be reproduced like this:
```shell
yarn start --elasticsearch.password "-some-password"
```
We were using some extra argument parsing prototype extension in
(command.js)[./src/cli/command.js] - this allows for collecting extra
options, but the proprietary logic had a few incorrect assumptions.
(e.g.: extra opts will be already split by `=` by the time we get them,
shorthands will be split to individual flags).
(1) This change makes it explicit in the code, that the single-letter
flags (`-fcz`) are not supported in the extra options.
The core of the problem is now how we treat an ambiguous expression like
this:
```
kibana --password "--kebabs--are--my--favourite--" --somethingElse 283
```
Is the `"--kebabs--are--my--favourite--"` another flag, or is it a value
for the previous option?
Unfortunately, both interpretations will have shortcomings.
- if we treat it as a boolean flag, then values starting with "--" will
be incorrectly treated as flags, and an error will be displayed (in the
case of a very unfortunate random generated string)
- if we treat it as a value always, then incorrectly ordered
options/flags will be consumed in place of values
Maybe the latter one will happen less often. For that, people would have
to incorrectly assume that `--booleanOn` type flags exist, especially
among the non-listed options. Or they'd have to incorrectly parameterize
the command, for that they can review their own usage locally, and see
their error in the ordering.
(2) This change makes it explicit, that extra options will come in
pairs.
Also, added tests for the base use case, and the _dash_ edge case.
### Checklist
- [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] Checked and works on 7.17/7.13 (it was originally reported on
7.13).
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Migrations read 1000 documents by default which works well for most
deployments. But if any batch happens to be > ~512MB we hit NodeJS' max
string length limit and cannot process that batch. This forces users to
reduce the batch size to a smaller number which could severely slow down
migrations.
This PR reduces the impact of large batches by catching
elasticsearch-js' `RequestAbortedError` and reducing the batch size in
half. When subsequent batches are successful the batchSize increases by
20%. This means we'll have a sequence like:
1. Read 1000 docs ✅ (small batch)
2. Read 1000 docs 🔴 (too large batch)
3. Read 500 docs ✅
4. Read 600 docs ✅
5. Read 720 docs ✅
6. Read 864 docs ✅
7. Read 1000 docs ✅ (small batch)
This assumes that most clusters just have a few large batches exceeding
the limit. If all batches exceed the limit we'd have 1 failure for every
4 successful reads so we pay a 20% throughput penalty. In such a case it
would be better to configure a lower `migrations.batchSize`.
Tested this manually:
1. Start ES with more heap than the default, otherwise reading large
batches will cause it to run out of memory
`ES_JAVA_OPTS=' -Xms6g -Xmx6g' yarn es snapshot
--data-archive=/Users/rudolf/dev/kibana/src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip`
2. Ingest lots of large documents of ~5mb
```
curl -XPUT
"elastic:changeme@localhost:9200/_security/role/grant_kibana_system_indices"
-H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
{
"indices": [
{
"names": [
".kibana*"
],
"privileges": [
"all"
],
"allow_restricted_indices": true
}
]
}'
curl -XPOST "elastic:changeme@localhost:9200/_security/user/superuser"
-H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
{
"password" : "changeme",
"roles" : [ "superuser", "grant_kibana_system_indices" ]
}'
curl -XPUT
"superuser:changeme@localhost:9200/.kibana_8.4.0_001/_mappings" -H
"kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
{
"dynamic": false,
"properties": {
}
}'
set -B # enable brace expansion
for i in {1..400}; do
curl -k --data-binary
"@/Users/rudolf/dev/kibana/src/core/server/integration_tests/saved_objects/migrations/group3/body.json"
-X PUT
"http://superuser:changeme@localhost:9200/.kibana_8.4.0_001/_doc/cases-comments:"{$i}"?&pretty=true"
-H "Content-Type: application/json"
done
```
3. Start Kibana with a modest batchSize otherwise we could OOM ES `node
scripts/kibana --dev --migrations.batchSize=120`
<details><summary>Example logs. Note the "Processed x documents" only
logs when the next batch is successfull read, so the order seems wrong.
To improve it we'd need to log progress after a batch is successfully
written instead 🤷 </summary>
```
[.kibana] Processed 120 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 3667ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1740ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1376ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1402ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1311ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1388ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 900ms.
[.kibana] Read a batch that exceeded the NodeJS maximum string length, retrying by reducing the batch size in half to 60.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_READ. took: 1538ms.
[.kibana] Processed 240 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 2054ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1042ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1310ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1388ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 1130ms.
[.kibana] Processed 300 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 2610ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1262ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1299ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1363ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1341ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 572ms.
[.kibana] Processed 372 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 3330ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1488ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1349ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1312ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1380ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1310ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 139ms.
[.kibana] Processed 458 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 3278ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1460ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1370ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1303ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1384ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 1298ms.
[.kibana] Processed 542 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 4ms.
```
</details>
### Checklist
Delete any items that are not applicable to this PR.
- [ ] 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
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risks
### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
## Summary
Fix https://github.com/elastic/kibana/issues/158372
Change the logic of the `zdt` algorithm to be able to re-use an existing
"v2 managed" cluster state (a kibana cluster previously running the v2
migration algorithm) if compatible.
Technically the v2 index state is compatible with zdt after 8.8 (when we
introduced `indexTypeMap` and restricted to compatible mapping changes
only).
See https://github.com/elastic/kibana/issues/158372 for more detailed
explanations.
Addresses https://github.com/elastic/kibana/issues/158201
## Summary
This PR fixes grid row selection in dark mode.
Before:
<img width="300" alt="Screenshot 2023-05-23 at 09 53 11"
src="e447ebb5-ca75-4778-84a7-ec654aca3709">
After:
<img width="300" alt="Screenshot 2023-05-23 at 09 52 44"
src="86f7ccd0-a306-426b-9fcb-91d9131a7da6">
For testing:
Enable dark mode on User Profile page.
## Summary
Adding the following new fields to form lib:
- ButtonGroupField
- MultiButtonGroupField
- DatePickerField
- PasswordField
- HiddenField
I updated the maintenance windows form and the following connector forms
to use the new fields:
- cases_webhook
- email
- servicenow
- swimlane
- torq
- webhook
- xmatters
## Summary
Fixes#137477
The `node.options` file was not being found if `KBN_PATH_CONF` was not
set because the default directory fallback condition was failing.
`kibana.bat` before fix, can see the flag I added in
`config/node.options` is missing and default options are used:

The flag is correctly added after fix:

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Adds build date to `GET kbn:api/status` similar to ES. Example output
running locally:
```json
{
"name": "ES-DMVD5M3",
"uuid": "545ba70c-063e-449b-af21-6c8e7b30f77e",
"version": {
"number": "8.9.0",
"build_hash": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"build_number": 9007199254740991,
"build_snapshot": false,
"build_date": "2023-05-15T23:12:09.000Z"
},
...rest
}
```
### Checklist
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
## Release Note
The status endpoint now returns the build date alongside other build
information.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Adds versioning to all of the transform APIs.
Versions are added to the server side routes and to the client side
functions which call the routes.
Updates API tests to add the API version to the request headers.
All of the APIs are internal and have been given the version '1'.
**Internal APIs**
`/internal/transform/privileges`
`/internal/transform/field_histograms/{dataViewTitle}`
`/internal/transform/privileges`
`/internal/transform/transforms/{transformId}/messages`
`/internal/transform/transforms/_nodes`
`/internal/transform/transforms`
`/internal/transform/transforms/{transformId}`
`/internal/transform/transforms/_stats`
`/internal/transform/transforms/{transformId}/_stats`
`/internal/transform/transforms/{transformId}`
`/internal/transform/transforms/{transformId}/_update`
`/internal/transform/reauthorize_transforms`
`/internal/transform/delete_transforms`
`/internal/transform/reset_transforms`
`/internal/transform/transforms/_preview`
`/internal/transform/start_transforms`
`/internal/transform/stop_transforms`
`/internal/transform/schedule_now_transforms`
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes#154937
This PR is an extension of
[#157802](https://github.com/elastic/kibana/pull/157802) which was
reverted because public Api endpoint versioning problems.

---------
Co-authored-by: Oliver Gupte <oliver.gupte@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
part of https://github.com/elastic/kibana/issues/154307
PR adds ability to put TSVB into read only mode - preventing TSVB
visualizations from being created and edited.
To test:
* start kibana with `yarn start --serverless=es`
* add `vis_type_timeseries.readOnly: true` to kibana.yml
Visualization public plugin changes:
* Removes `hideTypes` from VisualizationSetup contract. Used by Maps
plugin to set "hidden" to true for tile_map and region_map visualization
types. In 8.0, tile_map and region_map visualization type registration
moved into maps plugin so `hideTypes` no longer needed.
* Renamed vis type definition `hidden` to `disableCreate`.
* Added `disableEdit` to vis type definition.
* Hide edit link in dashboard panel options when `disableEdit` is true
* Does not display links and edit action in listing table when
`disableEdit` is true
Visualization server plugin changes:
* Add `readOnlyVisType` registry to set up contract
* Update visualization savedObject.management.getInAppUrl to return
undefined when vis type has been registered as readOnly.
* Prevents "readOnly "visualization types from being displayed in global
search results
* Prevents "readOnly "visualization types from having links in saved
object management listing table.
Timeseries server plugin changes:
* Add `readOnly` yaml configuration
* Expose `readOnly` yaml configuration to public
* When `readOnly` is true, call
VisualizationsServerSetup.registerReadOnlyVisType to mark vis type as
read only
Timeseries public plugin changes:
* Set disableCreate and disableEdit to true when `readOnly` is true
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
## Summary
Data views implements the content management api and associated minor
changes. The bulk of the changes are in
`(common|public|server)/content_management)`
Closes https://github.com/elastic/kibana/issues/157069
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
## Summary
Sets `switchToModelVersionAt` to `8.10.0` for all registered SO types,
forcing them to switch to the model version API once `main` is on
version `8.10.0` (~end of june)
Closes#154937
This PR includes the steps to install standalone elastic agent +
reporting the status from bash script back to kibana.

---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
Co-authored-by: Yngrid Coello <yngrdyn@gmail.com>
The exposed kbnUrlStateStorage property of `DiscoverStateContainer` is removed. It was just used for testing and is replaced with `await new Promise(process.nextTick);`
## Summary
Closes https://github.com/elastic/kibana/issues/158154
Closes https://github.com/elastic/kibana/issues/158048
Closes https://github.com/elastic/kibana/issues/158052
This PR fixes the UI bugs that were created when we added the user
profile dark mode settings.
There are many cases in our visualizations where we are checking if the
uiSetting is in dark mode and apply custom colors. This is not the case
anymore. Now we need to check this flag from the theme$.
There is a bug on the user profile service. When the user profile is set
to Light and the advanced setting is set to dark mode, the dark mode is
applied. I have reported this to the security team.
### Checklist
- [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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>