Commit graph

3361 commits

Author SHA1 Message Date
Alejandro Fernández Haro
7de4733f72
[FullStory] Update snippet (#153570)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-18 04:06:05 -07:00
Alejandro Fernández Haro
823cc3f49b
[getSavedObjectsCount] Use soClient instead of .kibana searches (#155035)
## Summary

As part of #154888, we need to stop making direct requests to the index
`.kibana`, and use the SO Clients instead.

This PR changes the utility `getSavedObjectsCount` to use aggregations
in the SO client.

### 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

### For maintainers

- [x] 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)

I'm pointing to `main` because it's an improvement we needed anyway.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-18 10:15:35 +02:00
Yara Tercero
9a095602f8
[Security Solution][Exceptions] - Fix exception operator logic when mapping conflict (#155071)
## Summary

Addresses https://github.com/elastic/kibana/issues/154962 .
2023-04-17 17:05:55 -04:00
Ying Mao
5a818176ef
[Response Ops] [Alerting] Excluding ECS fields of type constant_keyword from ECS field map (#155075)
Fields mapped as `constant_keyword` can cause issues when used in the
alerts as data mapping where multiple types of sources are combined into
one index. These fields were previously excluded from the ECS field
mapping used by alerts as data. We included them because we wanted to
use ECS as closely as possible but it is causing downstream issues so
we'll continue excluding them until we decide we need them at some point
in the future.

## To verify:
1. Start ES & Kibana
2. Inspect the `.alerts-ecs-mappings` component template mapping and
verify there are no fields with type `constant_keyword`
2023-04-17 15:31:18 -04:00
Luke
153994d810
[Security Solution] Move datatable to package (#150899)
## Summary

[Related issue](https://github.com/elastic/kibana/issues/150603)

This PR extracts the DataTableComponent, related redux infrastructure
and some helpers into standalone package.

### Checklist

Delete any items that are not applicable to this PR.

- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
2023-04-17 21:02:28 +02:00
Zacqary Adam Xeper
0bd81d8da1
[SharedUX] Export timezone list from Core UI (#154742)
## Summary

Exports the list of valid Kibana timezones from the Core UI package, so
that it can be used in the snooze scheduler UI.

Previously we were using the same moment.tz list, but didn't have the
compatibility filter from Core UI. This will ensure the list of valid
timezones is synced up everywhere we need to show them.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-17 10:01:23 -07:00
Sébastien Loix
406fe97016
[Table list view] Fix sort by label (#154922) 2023-04-17 08:51:16 -07:00
Anton Dosov
4edb583c18
[Content Management] Remove dep from content_management -> saved_object_finder (#155013)
## Summary

Follow up https://github.com/elastic/kibana/pull/154819, 
@mattkime pointed out a problem that cm can't depend on
saved_object_finder
https://github.com/elastic/kibana/pull/154819/files#diff-635bc20df585b656afebba3ebf338ff997e735df933f704cc5f253a74b3503ddR17
2023-04-17 16:25:58 +02:00
Jean-Louis Leysens
caa9231aef
[HTTP] Update versioned router to follow spec (#154823)
## Summary

Update the versioned router based on current Elastic API spec.

Laundry list of changes:

1. Public versions must be specified as `^[0-9]{4}-[0-9]{2}-[0-9]{2}$`
e.g. 2023-12-12
2. For unsupported versions we respond with `400`
3. For incorrectly formatted versions we must respond with `400` and an
appropriate error message
4. Server must add the `Elastic-Api-Version` header to responses that
hit a versioned API
5. On serverless, a request WITHOUT a version header must default to
LATEST (TODO in follow up)
  a. For Kibana, on prem must default to OLDEST

## Future work

Some way to toggle the handler resolution strategy from `oldest` to
`newest`. This could be Kibana config.


### 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
2023-04-17 02:27:59 -07:00
Michael Dokolin
a9ea301a8a
[Migrations] Remove migrationVersion mappings (#154711) 2023-04-17 09:53:22 +02:00
Rachel Shen
e35e924d92
[Reporting] Generate CSV Package (#151801)
## Summary

Partially resolves https://github.com/elastic/kibana/issues/150392 

This PR creates reporting related packages geared towards `Generate CSV`
functionality
- @kbn/generate-csv
- @kbn/generate-csv-types
- @kbn/reporting-common
- updated Readme.md for the @kbn/reporting plugin

### 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]
[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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
2023-04-13 10:27:35 -07:00
Pierre Gayvallet
b75d89a2d8
Config loader: remove unecessary properties (#154902)
- Updates the logic of `ensureDeepObject` to remove unnecessary
properties when expanding the object
- We had three versions of this helper, centralized it within `@kbn/std`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-13 11:16:51 -05:00
Michael Dokolin
768fe1af31
[Migrations] Add migrationVersion property to the Saved Objects API output (#154364) 2023-04-13 12:05:58 +02:00
Sébastien Loix
42a893db40
[Content Management] Maps onboard (#153304) 2023-04-13 10:32:39 +01:00
Jill Guyonnet
14222e6f03
[Fleet] Update Fleet API doc link + remove beta badge (#154442)
### Summary

This PR adds and updates documentation links and removes `beta` badges
for the GA of Fleet API in 8.8.0.

This includes the following changes:
1. Elastic Agent integration settings page, `API reference` tab:
* Update the documentation link to
https://www.elastic.co/guide/en/fleet/master/fleet-api-docs.html.
  * Remove the `beta` badge.
2. `Preview API request` flyout:
  * Add a link to the documentation to the title (cf. screenshots).
  * Remove the `beta` badge.

Closes https://github.com/elastic/kibana/issues/152966

### Screenshots

#### Elastic Agent integration settings page, `API reference` tab -
Before

![Screenshot 2023-04-05 at 15 01
21](https://user-images.githubusercontent.com/23701614/230091121-c14e02ce-47d4-4748-9152-84b12597243e.png)

#### Elastic Agent integration settings page, `API reference` tab -
After

![Screenshot 2023-04-05 at 15 00
23](https://user-images.githubusercontent.com/23701614/230091160-cd750443-e42c-4b8b-97a1-c6c89dbf6dda.png)

#### `Preview API request` flyout - Before

![Screenshot 2023-04-11 at 15 56
36](https://user-images.githubusercontent.com/23701614/231193937-7d03e1eb-0781-4983-916a-1e0ab7b63462.png)

#### `Preview API request` flyout - After

![Screenshot 2023-04-11 at 12 53
27](https://user-images.githubusercontent.com/23701614/231193976-cb91c575-bbd5-4c04-85ac-e3564a4121d9.png)

### Steps to test locally

On this branch, start Kibana in dev.

1. Elastic Agent integration settings page, `API reference` tab:
1. Go to
`<localKibanaUrl>/app/integrations/detail/elastic_agent-1.7.0/api-reference`.
2. Check that the `beta` badge is removed and that the `Learn more` link
point to
https://www.elastic.co/guide/en/fleet/master/fleet-api-docs.html.
2. `Preview API request` flyout:
1. Create a new agent policy: give it a name and click `Preview API
request`.
2. Check that the `beta` badge is removed and that the title has a
`Learn more about Fleet API` link that points to
https://www.elastic.co/guide/en/fleet/master/fleet-api-docs.html.
3. Do the same checks when updating an agent policy, creating a package
policy and updating a package policy.

### Checklist

- [ ] 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))
- [ ] 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)
2023-04-12 17:05:02 +02:00
Coen Warmer
26f65b3262
[Observability] Add Observability Shared app (#154716)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-11 21:51:59 +02:00
Zacqary Adam Xeper
56796db2c0
[RAM] [FE] Add conditional actions UI for timeframe (#153944)
## Summary

Adds the conditional timeframe to the actions UI. **Currently only
enabled in the Security Solution alerts UI using the
`showActionAlertsFilter` prop**

Part of https://github.com/elastic/kibana/issues/152026 and
https://github.com/elastic/kibana/issues/152611

<img width="880" alt="Screenshot 2023-03-29 at 4 15 24 PM"
src="https://user-images.githubusercontent.com/1445834/228567116-a0fa80ac-7664-411f-9757-41aa81b52857.png">

### UPDATED UI
<img width="857" alt="Screenshot 2023-03-31 at 3 58 12 PM"
src="https://user-images.githubusercontent.com/1445834/229140790-11aeea9b-6db9-46bc-8f35-47f9afabb606.png">


### 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] 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))

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-11 12:13:54 -07:00
Sloane Perrault
b8d251e639
[Enterprise Search] ML Inference - ELSER Call Out (#154603)
## Summary

- adds (optionally) dismissable call out for new ELSER model
- includes ELSER call out as a dismissable call out in the ml inference
pipeline card
- includes ELSER call out as a non-dismissable call out in the add
inference pipeline fly out
- only shows the ELSER call out if `text_expansion` isn't an option yet

<details>
<summary>🖼️ Screenshots</summary>

![Screen Shot 2023-04-11 at 09 22
37](https://user-images.githubusercontent.com/1699281/231176400-3bdc39b9-b200-4638-b9f4-4b98316aa73b.png)

![Screen Shot 2023-04-11 at 09 22
41](https://user-images.githubusercontent.com/1699281/231176415-b4e433bb-6023-41b1-8b7c-b93a012f2d88.png)


</details>

### Checklist

Delete any items that are not applicable to this PR.

- [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] 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)

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2023-04-11 08:17:08 -07:00
Dario Gieselaar
79c493c69a
[APM] Make sure scoring is applied by ES (#154627) 2023-04-11 15:02:36 +02:00
Kevin Delemme
450e19598e
chore(slo): require customkql timestamp field (#154654) 2023-04-11 08:31:53 -04:00
Kevin Delemme
a727ba183a
fix(slo): fulltext search on name (#154666) 2023-04-11 08:31:27 -04:00
Cee Chen
31b50a3906
Upgrade EUI to v77.0.0 (#154379)
> ⚠️ Synthetic failures are not related to any EUI changes and are
likely already failing on main. Please ignore the failing CI status when
reviewing.

## [`77.0.0`](https://github.com/elastic/eui/tree/v77.0.0)

**Bug fixes**

- Fixed named `EuiBadge` colors to reflect custom theme overrides
([#6659](https://github.com/elastic/eui/pull/6659))
- Fixed user-defined SCSS variables failing to override variables
defined in Amsterdam typography overrides.
([#6665](https://github.com/elastic/eui/pull/6665))
- Fixed bold `EuiCode` tokens to actually be bold
([#6666](https://github.com/elastic/eui/pull/6666))

**Breaking changes**

- Success- and accent-colored `EuiBadge`s and `EuiButton`s have had
their fill colors tinted slightly on light mode to be more readable
([#6659](https://github.com/elastic/eui/pull/6659))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2023-04-10 17:06:26 -05:00
Tiago Costa
66ac756b98
fix(NA): external plugins development flow with the new modern package plugins in place (#153562)
This PR fixes the 3rd party external plugin development workflow by
introducing a dev step for plugins that allows for development usages of
those with Kibana.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-06 18:00:24 +01:00
Philippe Oberti
fef2cbd0db
[Security Solution] expanded flyout using dynamic width (#154114) 2023-04-05 22:45:09 -05:00
Vadim Kibana
f442a0dd6b
[CM] Event Stream service (#153211)
## Summary

This PR implements the Event Stream service for Content Management.

For high-level overview see:

- [Event Stream technical
summary](https://docs.google.com/document/d/1nyMhb0p4gNV43OVF6cLJkxhMf2V4V1BIjPsnACxe_t0/edit#heading=h.typ7x7sxmeye)
(a bit old, but still good as general overview read)

Implementation details in this PR:

- This PR introduces the `EventStreamService` high-level class, which is
the public interface to the Event Stream, holds any necessary state, and
follows plugin life-cycle methods.
- On a lower level the actual event storage is defined in the
`EventStreamClient` interface.
- There are two `EventStreamClient` implementations:
- `EsEventStreamClient` is the production implementation, which stores
events to Elasticsearch.
- `MemoryEventStreamClient` is used for testing and could be used for
demo purposes.
- The same test suite `testEventStreamClient` is reused for
`EsEventStreamClient` and `MemoryEventStreamClient`, which should help
with verifying that both implements work correctly and the same. For
`EsEventStreamClient` it is executed as Kibana integration test, but for
`MemoryEventStreamClient` it is executed as a Jest test.
- In `EventStreamService` events are buffered for 250ms or up to 100
events before they are flushed to the storage.
- Events are stored in the `.kibana-event-stream` data stream.
- The data stream and index template are create during plugin
initialization "start" life-cycle, similar to how it is done in the
Event Log and in the Reporting index.
- The mappings define a `meta` field, which is currently unused, but
will allow to add more fields in the future without needing to change
the schema of the data stream.
- The mappings define a transaction ID `txId` field, which can be used
to correlate multiple related events together or to store the
transaction ID.
- Events are written to Elasticsearch using the `_bulk` request API.



### 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

### For maintainers

- [x] 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: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2023-04-05 11:35:09 +02:00
Pierre Gayvallet
c3e4662080
SO migration: recognize document_parsing_exception as incompatible mapping exceptions (#154411)
## Summary

Fix https://github.com/elastic/kibana/issues/154278
Caused by an upstream change:
https://github.com/elastic/elasticsearch/issues/85083
2023-04-05 10:58:09 +02:00
Ying Mao
3b951e16cb
[Response Ops][Alerting] Enable framework alerts as data by default (#154076)
## Summary

Setting `xpack.alerting.enableFrameworkAlerts` to true by default. This
causes alerts-as-data resource installation to be handled by the
alerting plugin and not the rule registry. We're keeping the feature
flag in case we run into issues but eventually we'll clean up the code
to remove the feature flag and clean up the rule registry code that
relies on the feature flag. Changing this default setting early will
allow us to identify issues before the 8.8 FF where we can revert if
needed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-04 12:05:14 -07:00
Sébastien Loix
56c28af1f5
[CM] Improve CRUD & RPC interfaces (#154150) 2023-04-04 08:20:11 -07:00
claracruz
cb3a42a880
Filter guided onboarding solutions based on cloud discovery questions… (#153367)
Related to #148911

This PR updates the guided onboarding landing page to filter solutions
based on user selected use case in cloud discovery questions. The value
will be passed as querystring parameter `?cloudDiscoveryUseCase=[value]`
from Cloud UI.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-04 12:15:42 +01:00
Jean-Louis Leysens
ed56403817
[HTTP] Expose versioned router (#153858)
## Summary

Now that we merged https://github.com/elastic/kibana/pull/153543, this
PR exposes the versioned router for teams to start using. The versioned
router will be available on `IRouter` under a new `versioned` property.

Primary benefit of this approach is that plugin developers will not need
to do anything other than "get" the `versioned` property to get a
versioned router.

Drawback is that this precludes us from passing in additional
configuration, like a version, to scope the versioned router instance.
For that we would need some kind of `createVersionedRouter({ version:
... })`. At this point it is not clear this is necessary, we could
revisit this decision based on actual usage. Plugin developers could
also do something like:

```ts
// common const
const MY_API_VERSION: ApiVersion = '1';

// in routes
import {MY_API_VERSION} from '../from/common';
router.versioned.get({ path: ... })
  .addVersion({ version: MY_API_VERSION });
```

In this way they could get many of the same benefits of a version-scoped
version router, with the drawback that they need to pass this in for
every route.

### TODO

- [x] Add an integration test for the versioned router

### Future work

* We still need to consider revisiting some of the router design to
better support internal cases like adding support for registering a
handler for a version range and adding a default version to continue
supporting on-prem where introducing versions will be a breaking change

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-03 09:13:12 -07:00
Aleh Zasypkin
a1fccfd880
Support generating legacy URL aliases for objects that change IDs during import. (#149021) 2023-04-03 10:54:23 +02:00
Pierre Gayvallet
54df909741
DocumentMigration: implement downward transformation of documents (#153921)
## Summary

Fix https://github.com/elastic/kibana/issues/150301

Implements `DocumentMigrator.transformDown` and the associated
transformation pipeline.

Note: The feature is currently unused, and will only be when we'll start
https://github.com/elastic/kibana/issues/150312

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-03 01:02:38 -07:00
Luke Elmers
9517d067b5
Adds support for event loop utilization to the core metrics service (#153717) 2023-03-29 14:35:55 -07:00
Garrett Spong
e41cc7ad1c
[RAM] Adds revision to alerts schema (#151388)
## Summary

Follow up from https://github.com/elastic/kibana/pull/147398, which adds
`revision` to the alerts schema so the rule's current revision is
included when creating alerts.

In Security Solution:
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/227386305-c8afe295-b79b-4b28-838a-cc3bed0f3eda.png"
/>
</p>

In Observability:
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/227577019-05307860-e0e3-4e1e-b4cf-604bdb52afdf.png"
/>
</p>



Note: this was originally a branched off
https://github.com/elastic/kibana/pull/147398, so the large commit list
is resulting from there as Github doesn't seem to re-write after after a
rebase w/ `main` and a force push.


### Checklist

Delete any items that are not applicable to this PR.

- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~
* Base docs to be added for
https://github.com/elastic/kibana/pull/147398
- [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
2023-03-29 19:28:02 +00:00
Philippe Oberti
c283ca5fc1
[Security Solution] add expandable flyout description section to overview tab (#153706) 2023-03-29 14:19:26 -05:00
Coen Warmer
0ee23684e3
Remove Playwright e2e test from Observability (#153934) 2023-03-29 17:01:35 +02:00
Coen Warmer
6b6a8dfecb
[Observability] Copy Exploratory View into a separate app (#153852) 2023-03-29 10:30:58 +02:00
Stratoula Kalafateli
c48098d8da
[Unified search] Fixes the comma delimeter copy paste on multifields (#153772)
## Summary

It fixes the problem with copying pasting comma delimeter values on the
unified search fiters.


![uni](https://user-images.githubusercontent.com/17003240/228158378-44c768d3-967f-4131-a01f-2fb5707fd026.gif)
2023-03-29 11:00:15 +03:00
Cee Chen
c2910f9ac5
Add EuiSkipLink to Kibana header (#153810)
## Summary

This PR adds a "skip to main content" button, AKA a [skip
link](https://webaim.org/techniques/skipnav/) via
[EuiSkipLink](https://elastic.github.io/eui/#/utilities/accessibility#skip-link).

For initial behavior, this PR attempts to find a `main` tag (which will
succeed for all plugins using `KibanaPageTemplate`, followed by a
`.euiPageContent` className (which will succeed for plugins using the
old/deprecated `KibanaPageTemplate`), and as a worst case scenario for
plugins not using any EUI or Kibana page templates, targets the
`.kbnAppWrapper` app root which should be present on all pages.

At some point Kibana may want to consider adding a UI API for allowing
individual apps/plugins to set a custom `destinationId`.

## QA

- [x] Go to a plugin that uses the new KibanaPageTemplate, e.g.
Observability or Security, and confirm that the skip link correctly
targets the main content:

![1](https://user-images.githubusercontent.com/549407/228051255-0a94c95d-baf2-4ab4-8aef-e9b479de70ec.gif)

- [x] Go to a plugin that uses the old deprecated KibanaPageTemplate,
e.g. Canvas (http://localhost:5601/xyz/app/canvas), and confirm that the
skip link correctly targets the page content:

![2](https://user-images.githubusercontent.com/549407/228051148-6b0089e6-ba62-429f-90de-523f3e90e630.gif)

- [x] Go to a plugin that does not use any Kibana page template, e.g.
Maps (http://localhost:5601/xyz/app/maps) and confirm that the skip link
correctly targets the app wrapper on that plugin:

![3](https://user-images.githubusercontent.com/549407/228051161-bec401a3-e21a-41da-9911-dc95745b1d99.gif)

### 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] 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)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-03-28 11:46:47 -07:00
Pierre Gayvallet
3ff906d0ae
Implement the second part of the ZDT migration algorithm (#153031)
## Summary

Part of https://github.com/elastic/kibana/issues/150309
Follow-up of https://github.com/elastic/kibana/pull/152219

Implement the second part of the zero-downtime migration algorithm: the
document conversion.

### Schema

because a schema is worth a thousand words:

<img width="650" alt="Screenshot 2023-03-22 at 08 33 44"
src="https://user-images.githubusercontent.com/1532934/226832339-d74d8349-9969-4c51-a5fe-f77558f17b67.png">


### TODO / notepad

- ~check that all types have model versions in INIT~ will do later when
we'll start have real types using MVs
- [x] Optimize to skip document migration when creating new index
- [x] documentsUpdateInit: extract remaining logic to utilities
- [x] outdatedDocumentsSearchRead: cleanup corrupted doc logic
- [x] outdatedDocumentsSearchTransform: cleanup corrupted doc logic
- [x] tests for /zdt/actions/wait_for_delay.ts ?
- ~support for coreMigrationVersion~ added as a follow-up in the parent
issue
- [x] init -> equal -> check if aliasActions is empty

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-03-28 11:39:44 -07:00
Bhavya RM
23b7137904
Updating axe-core to latest (#144940) 2023-03-29 00:06:25 +05:30
Jeramy Soucy
2cc12ceef5
[Saved Objects] Documents intended use of removeReferencesTo (#153711)
## Summary
Updates comments for `removeReferencesTo` (SO Repository) and
`authorizeRemoveReferences` (SO Security Extension) methods with remarks
regarding the intended use and authorization.

Currently the only use case for `removeReferencesTo` is the delete
method of the tags client. If the authorization check is changed to
authorize an update for each referencing object, lingering references in
objects which the user is not authorized to update may be left behind
when a tag is deleted. We will leave the current implementation in place
until a decision about if & how to manage referential integrity occurs.

This PR documents the current intended use case for `removeReferencesTo`
as: "to provide clean up of any references to an object which is being
deleted (e.g. deleting a tag)."

See issue #135259 and discussion
[here](https://github.com/elastic/kibana/issues/135259#issuecomment-1482515139),
for background.
2023-03-28 09:31:02 -04:00
Jean-Louis Leysens
e8055e8a58
[HTTP] Versioned router implementation (#153543)
## Summary

Implements the designs from
https://github.com/elastic/kibana/pull/151596

* Move `packages/versioning/*` into `packages/core/http` to follow
existing structure more closely
* Implements the first iteration of the versioned router as a
wrapper/layer around the existing router
* Adds some integration tests
* Future work needed! Once we have a the versioned spec we should
implement it in this wrapper layer
* Validation is a little bit tricky because of when the
`CoreKibanaResponse` object is instantiated, the approach taken here is
to replace body, params, query on the route-level's request object

Closes https://github.com/elastic/kibana/issues/149286

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-03-28 03:11:36 -07:00
Michael Dokolin
17876df41a
[Saved Objects] Update the migrationVersion property to hold a plain string value (#150075)
* Update document migrator to rely on `typeMigrationVersion` instead of `migrationVersion`.
* Refactor document migrator to extract migration pipeline logic.
* Add `core` migration type.
2023-03-24 13:45:30 +01:00
Trevor Pierce
6d55dd9fdd
Upgrade EUI to v76.3.0 (#153341)
## Summary

eui@76.0.2  eui@76.3.0

## [`76.3.0`](https://github.com/elastic/eui/tree/v76.3.0)

- Updated `EuiSkipLink`'s `fallbackDestination` prop to support an array
of query selector strings
([#6646](https://github.com/elastic/eui/pull/6646))

**Bug fixes**

- Fixed `EuiFlyout` to preserve body scrollbar width on open
([#6645](https://github.com/elastic/eui/pull/6645))
- Fixed `EuiImage`'s full screen mode to not scroll jump & to preserve
body scrollbar width on open
([#6645](https://github.com/elastic/eui/pull/6645))
- Fixed `EuiCodeBlock`'s full screen mode to not scroll jump & to
preserve body scrollbar width on open
([#6645](https://github.com/elastic/eui/pull/6645))

## [`76.2.0`](https://github.com/elastic/eui/tree/v76.2.0)

- Added new `renderCustomGridBody` escape hatch rendering prop to
`EuiDataGrid` ([#6624](https://github.com/elastic/eui/pull/6624))

**Bug fixes**

- Fixed visual listbox focus ring bug on non-searchable `EuiSelectable`s
([#6637](https://github.com/elastic/eui/pull/6637))
- Added a legacy `alert` alias for the `warning` `EuiIcon` type
([#6640](https://github.com/elastic/eui/pull/6640))
- Fixed a type definition incorrectly coming from a dev dependency,
which was causing issues for some consuming projects
([#6643](https://github.com/elastic/eui/pull/6643))

## [`76.1.0`](https://github.com/elastic/eui/tree/v76.1.0)

- Added more detailed screen reader instructions to `EuiSelectable`,
`EuiSuggest`, `EuiSelectableTemplateSitewide`, `EuiRange`, and
`EuiDualRange`. ([#6589](https://github.com/elastic/eui/pull/6589))
- Added new `placeholder` prop to `EuiSuperSelect`
([#6630](https://github.com/elastic/eui/pull/6630))
- Added new `setCellPopoverProps` parameter callback to `EuiDataGrid`'s
`renderCellPopover` prop
([#6632](https://github.com/elastic/eui/pull/6632))

**Bug fixes**

- Fixed an ARIA attribute in `EuiSelectableList`
([#6589](https://github.com/elastic/eui/pull/6589))
- Fixed `EuiSelectable` to no longer show active selection state or
respond to the Up/Down arrow keys when focus is inside the selectable
container, but not on the searchbox or listbox.
([#6631](https://github.com/elastic/eui/pull/6631))

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2023-03-23 14:25:12 -07:00
Steph Milovic
f0b3519aa4
[Security solution] More grouping cleanup (#153382) 2023-03-23 10:57:35 -06:00
Jon
be71713035
Upgrade typescript-eslint to 5.54.0 (#152358)
We're seeing infrequent but reliable build failures due to parse errors
when linting -
https://buildkite.com/elastic/kibana-on-merge/builds/27649#01869780-fb18-4a4d-990e-b8d5a05a701a/225-792.

Looking into bug fixes upstream.
2023-03-23 10:52:41 -05:00
Kevin Delemme
c0453af53b
feat(slo): Add timestampField additional settings (#153395) 2023-03-23 07:03:33 -07:00
Dario Gieselaar
97bca5019a
[APM] Migrate tx latency chart and group stats to rollups/service metrics (#153162)
Migrates the transaction latency chart and the transaction group
statistics table to use service overview metrics/rollups when
appropriate.

Part of https://github.com/elastic/kibana/issues/152693 and
https://github.com/elastic/kibana/issues/146683 (the work is split up to
prevent a huge PR).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2023-03-23 11:30:20 +01:00
Julia Rechkunova
ecd2b914f4
Migrate drag and drop logic from Lens plugin to its own package (#151836)
Closes https://github.com/elastic/kibana/issues/151702

## Summary

This PR migrates drag and drop logic from Lens plugin to a new package
so we can reuse it on Discover page later. At this point there should be
no visual changes. If you notice something, please comment on the PR.

- [x] Migrate drag&drop code to its own package `@kbn/dom-drag-drop`
- [x] Clean up i18n strings
- [x] Clean up styles
- [x] Adjust tests 
- [x] Make telemetry optional  
- [x] Configurable `data-test-subj`

Please test by using your mouse and also by using keyword shortcuts.

# Next steps

- Redesign for field list item (smaller button, a separate handle icon,
pill styles)
- Redesign for draggable buttons in the Lens layer panels (smaller
buttons)
-
[Figma](https://www.figma.com/file/SvpfCqaZPb2iAYnPtd0Gnr/KUI-Library?node-id=674%3A198901&t=OnQH2EQ4fdBjsRLp-0)
- https://github.com/elastic/kibana/issues/151703

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-03-23 11:09:17 +01:00