Commit graph

2632 commits

Author SHA1 Message Date
Jean-Louis Leysens
e9197ad359
[Saved Objects] Compatible mappings PR check (#148656)
## Summary

This PR adds a technical control to prevent incompatible mappings
changes. These include:

1. Removing mapped fields. For the foreseeable future we require that
teams only introduce new fields - in short: this avoids the "reindex"
step in our migrations.
2. Changing the type of a field. We leverage ES to determine whether a
given set of mappings can be applied "on top" of another. Similarly,
this avoids the "reindex" step in migrations.

The above checks depend on a snapshot of the mappings from `main`, these
are the "current" mappings and are extracted from plugin code. This PR
will bootstrap `main` with an initial set of mappings extracted from
plugins (bulk of new lines added).

## The new CLI

See the added `README.md` for details on how the CLI works.

## How will it work?

Any new PR that introduces compatible mappings changes will result in a
new snapshot being captured, then merged to main for other PRs to merge
and run the same checks against (currently committing new snapshots
happens in the CI check so there is no manual step of maintaining the
snapshot).

## Additional

We should consider combining this CI check with the existing check in
`src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts`.
Hopefully we can automate the check such that no manual review is needed
from Core, not sure how we might cover the hash of the non-mappings
related fields. We could consider narrowing the Jest test to exclude
mappings.

### 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>
Co-authored-by: spalger <spencer@elastic.co>
2023-04-27 15:42:31 +02:00
Pierre Gayvallet
2250020b81
Bump moment-timezone to the latest version (#155832)
## Summary

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

Bump `moment-timezone` from `0.5.34` to `0.5.43` (latest version) to
include latest timezone changes

## Release Note

Fix a bug causing the latest timezone changes to not be taken into
account for date formatting (e.g Mexico 2023)
2023-04-27 07:44:18 +02:00
Clint Andrew Hall
8e37b38417
[serverless] Create the Serverless Plugin (#155582)
> Derived from https://github.com/elastic/kibana/pull/153274 for
production.

## Summary

This PR creates the `serverless` plugin for Kibana Serverless projects.


![image](https://user-images.githubusercontent.com/297604/233892935-b3713575-a2f7-4e82-a9dd-e8c11823683f.png)


It uses the methodology proven out in the proof-of-concept
(https://github.com/elastic/kibana/pull/153274) and prepares it for
production:

- Adds chrome style and related API to the `chrome` services.
- Creates the `serverless` plugin.
- Invokes the new chrome style API for all serverless projects.
- Alters `yarn` scripts to support all project types, and switching
between them.
- Creates the new "Project Switcher" component for use in the new chrome
header for Serverless.
- Creates a Storybook config for this and future components.
- Adds API endpoint to trigger project switching and `Watcher` restarts.

<img width="1598" alt="Screenshot 2023-04-26 at 10 44 01 AM"
src="https://user-images.githubusercontent.com/297604/234612654-fdcf38ea-8c48-4066-bc85-507f40c984aa.png">


## Next steps

- [x] Creating a PR for enabling/disabling related plugins for
Serverless. (https://github.com/elastic/kibana/pull/155583)
- [ ] Creating product plugin PR based on
https://github.com/elastic/kibana/pull/153274.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-26 11:48:23 -07:00
Sergi Massaneda
202f13f7be
[SecuritySolution] Refactor security packages (#155365)
## Summary

closes: https://github.com/elastic/kibana/issues/155301

Moves _packages/security-solution/_ to
_x-pack/packages/security-solution/_
Moves _x-pack/packages/kbn-securitysolution-*_ into the new
_x-pack/packages/security-solution/_

It contains 3 packages now:
- data_view/
- ecs_data_quality_dashboard/
- side_nav/

Package names and ids have not changed.

## Other

- eslint configured for all the packages in the directory
- i18n prefix `securitySolutionPackages` configured for all packages in
the directory
- generic storybook configuration, run with: `yarn storybook
security_solution_packages`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-26 05:05:36 -07:00
Kurt
b66df8774a
Per User Dark Mode Preference (#151507)
## Summary

Allow user's to set their desired theme on their User Profile

## How to test

Login as a non-cloud user, navigate to User Profile:
<img width="1051" alt="Screenshot 2023-02-28 at 1 40 34 PM"
src="https://user-images.githubusercontent.com/21210601/221948512-a3e9b485-d3fa-4646-ae7d-63a68777cf19.png">

## Release Note
Users can now select their theme preference for Kibana in their User
Profile

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Marcialis <michael.l.marcialis@gmail.com>
2023-04-25 15:19:20 -04:00
Karl Godard
672e9925b0
[Session View] Fixes to slow process event queries + xterm.js updated. (#155326)
## Summary

Issue: https://github.com/elastic/kibana/issues/155183

This PR improves the process_events_route and io_event_route queries. We
now pass in the index and **process.entry_leader.start** time to greatly
improve the loading time of session view. Prior to this change, we were
doing a cross cluster search across the entire
logs-endpoint.events.process datastream. Session view will now use the
index from the entry leader event to limit the scope of the query. It
also ensures a range query is added with the entry leader start time, to
prevent data prior to the session from being hit.

I've also updated the npm package for xterm.js which addresses this
renovate ticket: https://github.com/elastic/kibana/pull/147815

### 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] [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-04-25 09:25:01 -07:00
Oliver Gupte
077245606b
[APM] Create plugin for logs onboarding (#154728)
Closes #154733

Creates a new plugin for logs onboarding with wizard to organize steps
into discrete views.

#### TODO:
- [x] rename plugin to observability_onboarding
- [x] configure: UI and server plugin
- [x] enable/disable new plugin
- [x] remove the link to it from Observability nav

---------

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>
2023-04-25 11:14:21 -04:00
Matthew Kime
273eec0f64
[content management / maps] Create abstract types for saved object usage with content management api (#154985)
## Summary

Abstract types for using Saved Objects with the content management api.
This should significantly reduce the amount of code to use additional
saved object types.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-24 20:58:22 -05:00
Walter Rafelsberger
d6d933a2af
[ML] Moves shared code to @kbn/ml-error-utils. (#155372)
- Moves code from `x-pack/plugins/ml/common/util/errors` that was shared
via `x-pack/plugins/ml/public/shared.ts` to `@kbn/ml-error-utils`.
- `data_visualizer` and `aiops` plugins now use that package instead of
code duplication.
2023-04-22 09:25:37 +02:00
Luke
8a3f5ebbea
[Security Solution] Store expandable flyout state in the url (#154703) 2023-04-21 15:45:37 -05:00
Vadim Kibana
7a36571ce6
Bump "ajv" dependency minor version (#155234)
## Summary

Upgrades `ajv` from `8.11` to `8.12`.
2023-04-19 18:59:49 +02:00
Jonathan Buttner
8d96fc82cf
[Cases] Delete file attachments when files do not exist (#155088)
This PR modifies the bulk delete files API to support deleting the case
attachments even when the file does not exist. We could run into this
scenario if a user deleted the file outside of cases first and then
attempts to delete the case attachment.
2023-04-19 10:10:22 -04:00
Bree Hall
3259647b00
Upgrade EUI to v77.1.1 (#154838)
EUI `77.0.0` ➡️ `77.1.1`

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

- Updated `EuiDatePicker` to display a warning icon and correctly set
`aria-invalid` when `isInvalid` is passed
([#6677](https://github.com/elastic/eui/pull/6677))
- Updated `EuiFilePicker` to display an alert icon when `isInvalid`
([#6678](https://github.com/elastic/eui/pull/6678))
- Updated `EuiTextArea` to display an alert icon when `isInvalid`
([#6679](https://github.com/elastic/eui/pull/6679))
- Updated `EuiTextArea` to support the `isLoading` prop
([#6679](https://github.com/elastic/eui/pull/6679))
- Updated `EuiComboBox` to display a warning icon and correctly set
`aria-invalid` when `isInvalid` is passed
([#6680](https://github.com/elastic/eui/pull/6680))

**Bug fixes**

- Fixed `EuiAccordion` to not set an `aria-expanded` attribute on
non-interactive `buttonElement`s
([#6694](https://github.com/elastic/eui/pull/6694))
- Fixed an `EuiPopoverFooter` bug causing nested popovers within
popovers (note: not a recommended use-case) to unintentionally override
its panel padding size inherited from context
([#6698](https://github.com/elastic/eui/pull/6698))
- Fixed `EuiComboBox` to only delete the last selected item on backspace
if the input caret is present
([#6699](https://github.com/elastic/eui/pull/6699))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2023-04-18 15:51:39 -05:00
renovate[bot]
75c978151a
Update dependency elastic-apm-node to ^3.44.1 (main) (#154971)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [elastic-apm-node](https://togithub.com/elastic/apm-agent-nodejs) |
[`^3.44.0` ->
`^3.44.1`](https://renovatebot.com/diffs/npm/elastic-apm-node/3.44.1/3.44.1)
|
[![age](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.44.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.44.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.44.1/compatibility-slim/3.44.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/elastic-apm-node/3.44.1/confidence-slim/3.44.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS40MC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNDAuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-18 07:16:49 -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
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
James Gowdy
c34dae2a0e
[ML] Creating number utils package for roundToDecimalPlace function (#154910)
`roundToDecimalPlace` is used in ML and data visualiser packages and
soon aiops, so this PR moves it to a shared package.
2023-04-13 10:53:37 -07: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
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
Jeramy Soucy
6431787de1
Bump ssri 6.0.1 to 6.0.2 (#154595)
Bumps the `ssri 6.0.1 `dev dependency to version `6.0.2`.
2023-04-11 13:19:41 -04:00
Walter Rafelsberger
239a981a10
[ML] Random sampler utils package (#154520)
- Refactors individual helpers to manage the `random_sampler`
aggregation into a single reusable wrapper. The helper's factory can be
supplied with either a sample probability right away or a document count
to generate a dynamic sample probability based on it.
- Applies random sampling to the main date histogram chart.
2023-04-11 17:50:06 +02:00
renovate[bot]
4d9c3cd5e9
Update dependency elastic-apm-node to ^3.44.0 (main) (#154693)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-11 03:55:11 -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
Jon
a6642d0efe
Upgrade chromedriver to 112.0.0 (#154652) 2023-04-10 12:49:34 -05:00
Larry Gregory
0e5cab6bc2
Bump nth-check to 2.0.1 (#154565) 2023-04-06 14:23:03 -04:00
renovate[bot]
b8409c9173
Update dependency @elastic/charts to v55 (main) (#153889)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`54.0.0` ->
`55.0.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/54.0.0/55.0.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/55.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/55.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/55.0.0/compatibility-slim/54.0.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/55.0.0/confidence-slim/54.0.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts</summary>

###
[`v55.0.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#&#8203;5500-httpsgithubcomelasticelastic-chartscomparev5400v5500-2023-03-21)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v54.0.0...v55.0.0)

##### Bug Fixes

- **docs:** lint and fix EUI breaking changes
([0d14194](0d1419475f))

##### Features

- **heatmap:** small multiples
([#&#8203;1933](https://togithub.com/elastic/elastic-charts/issues/1933))
([690f568](690f5686c3))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMi4xIiwidXBkYXRlZEluVmVyIjoiMzUuMjIuMSJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Co-authored-by: nickofthyme <nicholas.partridge@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-04-06 13:11:20 +03:00
Maryam Saeidi
6350e146fa
[AO] Metric threshold alert details - custom time range and alert start annotation (#153954)
Closes #153202, closes #153850

## Summary

This PR adds alert start annotation and also uses a custom time range
for the alert details' charts depending on the alert duration. The logic
to calculate the time range was added in a separate package to be used
in other use cases as well.


![image](https://user-images.githubusercontent.com/12370520/228583927-bf90cc13-53d5-4824-9b3b-ed6e6ffd06f5.png)

## 🧪 How to test

Create a metric threshold alert and go to the related alert details
page, verify:
- Alert start annotation
- The time range of the charts should be before the alert was started
(1/8 of the duration was added to each side)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-04 09:08:27 -07: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
James Gowdy
30dbbd05f8
[ML] Adding trained models utils package (#154046)
Creates a package for sharing general trained model util code.
Initially only contains the constants which had been copied in the
enterprise search plugin.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-03 08:15:42 -07:00
Patrick Mueller
cd727fa190
[ResponseOps] move alert UUID generation from rule registry to the alerting framework (#143489)
resolves https://github.com/elastic/kibana/issues/142874

The alerting framework now generates an alert UUID for every alert it
creates. The UUID will be reused for alerts which continue to be active
on subsequent runs, until the alert recovers. When the same alert (alert
instance id) becomes active again, a new UUID will be generated. These
UUIDs then identify a "span" of events for a single alert.

The rule registry plugin was already adding these UUIDs to it's own
alerts-as-data indices, and that code has now been changed to make use
of the new UUID the alerting framework generates.

- adds property in the rule task state
`alertInstances[alertInstanceId].meta.uuid`; this is where the alert
UUID is persisted across runs
- adds a new `Alert` method getUuid(): string` that can be used by rule
executors to obtain the UUID of the alert they just retrieved from the
factory; the rule registry uses this to get the UUID generated by the
alerting framework
- for the event log, adds the property `kibana.alert.uuid` to
`*-instance` event log events; this is the same field the rule registry
writes into the alerts-as-data indices
- various changes to tests to accommodate new UUID data / methods
- migrates the UUID previous stored with lifecycle alerts in the alert
state, via the rule registry *INTO* the new `meta.uuid` field in the
existing alert state.
2023-04-03 09:19:48 -04:00
Walter Rafelsberger
33599ad414
[ML] Transforms: Adding execution context to ES requests. (#153649)
Part of https://github.com/elastic/kibana/issues/147378

- Similar to #148746, adds execution context to transform API endpoints.
- Moves `createExecutionContext` to package `@kbn/ml-route-utils`.
2023-03-31 17:19:18 +02:00
Bree Hall
270f94530a
Upgrade EUI to version 76.4.0 (#153951)
# Summary
eui@76.3.0  eui@76.4.0

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

**CSS-in-JS conversions**

- Converted `EuiKeyPadMenu` (Menu component only) to Emotion
([#6636](https://github.com/elastic/eui/pull/6636))

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-03-30 13:10:03 -04:00
Marco Vettorello
d620e897ef
[APM] Replace react-vis with custom alternative (#153750)
## Summary

This commit removes `react-vis` dependency in favor of a custom
implementation of a simple duration axis.

`react-vis` was used only to render the axis tick labels, and the
vertical grid. I reused the existing xScale and generated the same axis
in a less and more compact way than using a full library.
There was no reason to use elastic-charts in this case because it was
essentially depicting a few labels on an SVG.

I've tested manually the marks (errror/agent) because I didn't find them
in the test data I've generated through `synthtrace` scenarios.

This is the visual output, which should be nearly pixel-perfect with the
previous implementation.

fix #133237
2023-03-30 14:56:06 +02:00
Anton Dosov
d208e0091a
[Reporting] bump puppeteer and chromium (#153033)
## Summary

Part of https://github.com/elastic/kibana/issues/151211

Update puppeteer to 19.7.2 and update to corresponding chromium
(r1095492, v 111.0.5555.0)

We hit an issue that webgl stopped working in headless mode on arm mac
https://github.com/elastic/kibana/pull/153033#issuecomment-1464118444,
turns out this is a known issue - headless uses swiftshader by default
and swiftshader's support for WebGL is currently disabled on Arm pending
the resolution of https://issuetracker.google.com/issues/165000222.
As a workaround, we force hardware GL drivers on arm mac:
 - for the current version we pass `--use-angle` (v111)
 - for the next version we should update it with `--enable-gpu` (v112)




### Testing 

- Tested locally on a Mac 
- Linux with CI deploy tag
- Windows locally


### Release Notes

Reporting: Update Chromium to 111.0.5555.0 (r1095492) and Puppeteer to
19.7.2
2023-03-30 12:16:21 +02:00
Hannah Mudge
cd68d39377
[Dashboard] Fix positioning of sticky top nav (#153610)
Closes https://github.com/elastic/kibana/issues/153582

## Summary

This PR adjusts the styling of the floating navigation bar in Dashboard
to make it **sticky** rather than using fixed positioning - this makes
it so that banners and/or callouts at the top of Kibana no longer cause
the nav bar to behave unexpectedly.


**Before**



https://user-images.githubusercontent.com/8698078/227572446-08963382-e16e-42ac-a83a-348da6b18b93.mov

<br>

**After**


https://user-images.githubusercontent.com/8698078/227573218-03c06ff5-be9a-47ea-a198-364fa89da65b.mov

<br>

While working on this, https://github.com/elastic/kibana/pull/153693 was
opened, which had the potential to cause a lot of conflicts - to resolve
this, I worked with @ThomThomson to merge his changes into this PR as
well. However, due to my lack of a separate graphics card (I have an M1
chip, which has an integrated GPU), the performance improvements that
were noted on his original PR were not nearly as dramatic on my machine.

Specifically, after some research, we found that CSS transforms are
calculated on the graphics card - so, by switching to using CSS
transforms for React Grid Layout, any machines with a graphics card
should see a large performance improvement - however, since I don't have
one, the performance before and after these changes was more-or-less the
same (only `~50ms` were saved in the "performance improved" version).


### Checklist

- [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)
2023-03-29 14:29:26 -06:00
Coen Warmer
6b6a8dfecb
[Observability] Copy Exploratory View into a separate app (#153852) 2023-03-29 10:30:58 +02:00
Bhavya RM
23b7137904
Updating axe-core to latest (#144940) 2023-03-29 00:06:25 +05:30
renovate[bot]
005ba61af6
Update dependency @elastic/charts to v54 (main) (#151759)
Closes https://github.com/elastic/kibana/issues/149681

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`53.1.0` ->
`54.0.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/53.1.0/54.0.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/54.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/54.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/54.0.0/compatibility-slim/53.1.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/54.0.0/confidence-slim/53.1.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts</summary>

###
[`v54.0.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#&#8203;5400-httpsgithubcomelasticelastic-chartscomparev5311v5400-2023-03-09)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v53.1.1...v54.0.0)

##### Bug Fixes

- **annotation:** render annotations correctly based on passed handlers
([#&#8203;1971](https://togithub.com/elastic/elastic-charts/issues/1971))
([4bdedff](4bdedff5a9))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v75
([#&#8203;1964](https://togithub.com/elastic/elastic-charts/issues/1964))
([cf886f5](cf886f5278))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v76
([#&#8203;1987](https://togithub.com/elastic/elastic-charts/issues/1987))
([89dc8a1](89dc8a1cd9))
- **flamegraph:** show tooltip prompt only if pinnable
([#&#8203;1967](https://togithub.com/elastic/elastic-charts/issues/1967))
([1a13d80](1a13d80af7))
- **heatmap:** Expose axis title as debug data
([#&#8203;1970](https://togithub.com/elastic/elastic-charts/issues/1970))
([0a998a5](0a998a55fb))
- **partition:** allow custom sorting for the legend items
([#&#8203;1959](https://togithub.com/elastic/elastic-charts/issues/1959))
([1afa2c4](1afa2c401f))
- **partition:** render legend items with zero values
([#&#8203;1956](https://togithub.com/elastic/elastic-charts/issues/1956))
([a85d1ae](a85d1ae4c0))
- **xy:** respect `integersOnly` prop on axis component
([#&#8203;1958](https://togithub.com/elastic/elastic-charts/issues/1958))
([93f5497](93f549728e))

##### BREAKING CHANGES

- **partition:** The `Layer.fillColor` function now accepts the
following signature: `(key: Key, sortIndex: number, node: ArrayNode,
tree: HierarchyOfArrays) => string;` This exposes a similar set of
information but allows us more control over the internals to
define/generate the legend. The legend for pie/donut/mosaic/treemap
charts is sorted in a hierarchical way even if the legend is flat.
The default highlight strategy used to highlight partition elements when
hovering over the legend item has been changed to `LegendStrategy.Path`.

####
[53.1.1](https://togithub.com/elastic/elastic-charts/compare/v53.1.0...v53.1.1)
(2023-02-10)

##### Bug Fixes

- **partition:** tooltip item series identifier
([#&#8203;1957](https://togithub.com/elastic/elastic-charts/issues/1957))
([06d8b5d](06d8b5dc0c))

###
[`v53.1.1`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#&#8203;5311-httpsgithubcomelasticelastic-chartscomparev5310v5311-2023-02-10)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v53.1.0...v53.1.1)

##### Bug Fixes

- **partition:** tooltip item series identifier
([#&#8203;1957](https://togithub.com/elastic/elastic-charts/issues/1957))
([06d8b5d](06d8b5dc0c))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNDguMCIsInVwZGF0ZWRJblZlciI6IjM1LjkuMCJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
2023-03-28 12:48:54 -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
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
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
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
Hannah Mudge
8fa826d2c5
[Dashboard] Fix React errors (#153320)
Closes https://github.com/elastic/kibana/issues/150641

## Summary

This PR fixes the following React errors that were being thrown in the
Dashboard app:
1. The following React warning was thrown by the `EuiContextMenuPanel`
in `ControlsToolbarButton` when the controls button was clicked because
the `key` prop was one layer too deep, so it thought that it was
missing:
   

![FirstWarning](https://user-images.githubusercontent.com/8698078/226474063-d43cf58e-1f41-46f1-9d39-2b889735b05d.png)
I fixed this by following EUI's guidelines for [pass-through
props](https://github.com/elastic/eui/blob/main/wiki/component-design.md#pass-through-props).

2. The following React warning was thrown by the
`react-remove-scroll-bar` library when both a flyout and a modal were
open at the same time:


![ThirdWarning](https://user-images.githubusercontent.com/8698078/226477555-bbbd3582-e33a-4912-adf4-5f08c609119e.png)
I fixed this by upgrading the dependency, since it was fixed in a later
version of the library.

3. @elastic/kibana-data-discovery The following React warning was thrown
by Discover's saved search embeddable when `totalHitCount` was undefined
because the `FormattedNumber` component did not handle it properly:

     

![SecondWarning](https://user-images.githubusercontent.com/8698078/226475914-1a74c56b-9136-480f-9a9b-3518dd1645b9.png)
I fixed this by ensuring that the `TotalDocuments` component was not
rendered when `totalHitCount` was undefined. While this was not
technically our error to fix, it was simple enough and the error
impacted 2 out of the 3 sample dashboards, so I figured I'd throw that
fix in as well to clean up our console 👍

I tested a bunch of Dashboard behaviour to try to get other React errors
to throw, but I couldn't find any other ones - totally possible I missed
something, but I think it's safe to close the attached issue and open
separate issues for other React errors (if any) that are discovered
after-the-fact.

### 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] 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 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-03-22 08:07:40 -06:00
Jason Rhodes
cae4385744
New asset manager plugin (tech preview, off by default) (#152456)
## Summary

This plugin will contain the asset inventory and topology API in Kibana,
giving Kibana projects access to inventory and topology data via an HTTP
and/or JS API on the server and client.

[Currently proposed API
docs](https://github.com/elastic/o11y-topology-playground/tree/main/docs/api)
will be moved to this repo as well, contained inside this plugin folder,
as a part of this PR.

## Enabling the plugin

This plugin is entirely in "technical preview" and because of this, must
be specifically enabled via config for it to do anything besides being
run by the core plugin framework. To enable the server API layer, as
well as the index template management, put the following line in your
kibana.yml file:

```yml
xpack.assetManager.alphaEnabled: true
```

## Running the API integration tests

Run the functional test server with the asset manager config in place:

```shell
$ node scripts/functional_tests_server --config x-pack/test/api_integration/apis/asset_manager/config.ts
```

Then run the functional test runner with the same config, to target just
these tests:

```shell
$ node scripts/functional_test_runner --config=x-pack/test/api_integration/apis/asset_manager/config.
ts
```

_Note:_ The config file added in this folder enables the tech preview
plugin ([see file
here](https://github.com/elastic/kibana/pull/152456/files#diff-bc00de6c34c9bc131cfbdf3570c487fe9ee947e9a88a84c59d6b139b79d7708eR20)).

### Running the integration tests for verifying that the plugin is
"disabled" by default

There is a small set of tests that confirm that the endpoints return 404
and there is no index template installed if the config value is not set
in the kibana.yml file. To run this suite, use the following config:

```shell
$ node scripts/functional_tests_server --config x-pack/test/api_integration/apis/asset_manager/config_when_disabled.ts
$ node scripts/functional_test_runner --config=x-pack/test/api_integration/apis/asset_manager/config_when_disabled.
ts
```

## Testing this PR with sample data

There are some sample data mechanisms in place inside this PR to allow
us to build out the endpoints.

### View sample docs
```http
GET /api/asset-manager/assets/sample
```

This will return a list of the assets that are included if you elect to
write assets. This is a good endpoint to use to find EAN (Elastic Asset
Name) values that you may want to exclude from writing for a given time
period, to simulate assets appearing/disappearing over time.

### Write sample docs
```http
POST /api/asset-manager/assets/sample
{
  "baseDateTime": "2023-02-28T12:00:00.000Z",
  "excludeEans": ["k8s.cluster:cluster-002"]
}
```

This posts all of the sample asset documents to Elasticsearch using the
`baseDateTime` value as the timestamp. Any valid string or number that
is accepted by `new Date()` should work for `baseDateTime`.

The `excludeEans` value is an array of EAN ("Elastic Asset Name") values
that you don't want to write on this particular run. This way you can
have assets appear (exclude them in the past, don't exclude them during
a later run) or disappear (vice versa) and see how that shows up in
other endpoints.

**Note:** *Remember that when you curl a Kibana server API with a POST
request, you must include a `kbn-xsrf` header with any string value you
want.*

### Get asset docs from ES
```http
GET /api/asset-manager/assets?type=k8s.cluster&from=now-10m
```

This is the primary "real" endpoint available right now. It should
retrieve a list of assets based on the type/from/to/ean filter values
you specify. Once you load the sample data, this endpoint should return
results.

## Debug logging

There are some extra debug logs for ES queries that are running in the
code in this PR. To print those logs to the Kibana server console, run
Kibana using `DEBUG_LOGGER=true`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-03-20 13:31:01 -07:00
Jon
b55baee9f8
Upgrade caniuse-lite db (#153318)
This package starts logging warnings after it's 6 months out of date
2023-03-20 14:53:34 -05:00
Coen Warmer
010ee2e112
ESLint Telemetry Rule (#153108)
Resolves https://github.com/elastic/kibana/issues/144887

## Summary

This PR adds an ESLint Plugin which checks specific `Eui` elements for
the existence of a `data-test-subj` prop. This rule will make having one
for these elements required.

This rule is currently only enabled for Observability apps (APM, Infra,
Observability, Synthetics, Uptime).

The plugin is also able to generate a suggestion based on the context in
which the element is used. In the IDE this suggestion can be applied by
using the autofix capability (see video below).

When opening a PR, the CI will automatically apply the suggestion to
qualifying Eui elements in the branch.



https://user-images.githubusercontent.com/535564/225449622-bbfccb40-fdd2-4f69-9d5a-7d5a97bf62e6.mov



## Why do this?
There is an increased push to move towards data driven feature
development. In order to facilitate this, we need to have an increased
focus on instrumenting user event generating elements in the Kibana
codebase. This linting rule is an attempt to nudge Kibana engineers to
not forget to add this property when writing frontend code. It also
saves a bit of work for engineers by suggesting a value for the
`data-test-subj` based on the location of the file in the codebase and
any potential default values that might be present in the JSX node tree.
Finally, because the suggestion is always of the same form, it can
increase the consistency in the values given to these elements.

## Shape of the suggestion
The suggestion for the value of data-test-subj is of the form:
`[app][componentName][intent][euiElementName]`.

For example, when working in a component in the location:
`x-pack/plugins/observability/public/pages/overview/containers/overview_page/header_actions.tsx`,
and having the code:

```
function HeaderActions() {
  return (
    <EuiButton>{i18n.translate('id', { defaultMessage: 'Submit Form' })}</EuiButton>
  )
}
```

the suggestion becomes:
`data-test-subj=o11yHeaderActionsSubmitFormButton`.

For elements that don't take a `defaultMessage` prop / translation, the
suggestion takes the form: `[app][componentName][euiElementName]`

## Which elements are checked by the ESLint rule?
In its current iteration the rule checks these Eui elements:

*  `EuiButton`
*  `EuiButtonEmpty`
*  `EuiLink`
*  `EuiFieldText`
*  `EuiFieldSearch`
*  `EuiFieldNumber`
*  `EuiSelect`
*  `EuiRadioGroup`
*  'EuiTextArea`

## What types of prop setting does this rule support?
* `<EuiButton data-test-subj="foo">` (direct prop)
* `<EuiButton {...foo}>` (via spreaded object; rule checks for
`data-test-subj` key in object)

## What types of function declarations does this rule support?
* `function Foo(){}` (Named function)
* `const Foo = () => {}` (Arrow function assigned to variable)
* `const Foo = memo(() => {})` (Arrow function assigned to variable
wrapped in function)
* `const Foo = hoc(uponHoc(uponHoc(() => {})))` (Arrow function assigned
to variable wrapped in infinite levels of functions)

## Things to note
* If an element already has a value for `data-test-subj` the rule will
not kick in as any existing instrumentation might depend on the value.
* the auto suggestion is just a suggestion: the engineer can always
adjust the value for a `data-test-subj` before or after committing. Once
a value is present (autofixed or manually set) the rule will not kick
in.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dario Gieselaar <d.gieselaar@gmail.com>
Co-authored-by: Katerina Patticha <kate@kpatticha.com>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2023-03-20 13:31:02 +00:00
Sébastien Loix
e8a20bb258
Object versioning package (#153182) 2023-03-15 17:27:47 +00:00
Jason Stoltzfus
c339ca8394
Upgraded EUI to v76.0.0 (#152506)
👋 Hi all - the biggest breaking change of this PR is around two icon
type changes/renames.

1. ⚠️ **The  `alert` icon is now named `warning`**
- <img width="103" alt=""
src="https://user-images.githubusercontent.com/549407/223561599-8913e88c-676f-47cd-aaed-81b64783bd81.png"
align="middle">
- This change should have been automatically converted on your behalf by
the EUI team, **but if for some reason** we missed making this
conversion in this PR and your icon(s) are now broken, please ping us or
let us know in this PR (or fix yourself after this PR merges).
- In some cases, teams were using this icon for error messages,
alongside the `danger` color. In those cases, we opinionatedly changed
those icon usages to the new `error` icon instead of using the old
alert/warning icon.

2. 🛑 **The `crossInACircleFilled` icon has been removed, and a new
`error` icon added**
- <img width="84" alt=""
src="https://user-images.githubusercontent.com/549407/223561892-4406bdf6-1a55-49ac-85ad-3a11eb7c090d.png"
align="middle">
- The conversion for this breaking change was not straightforward. This
was the path we used to determine what to change `crossInACircleFilled`
usages to:
- If the icon was associated with errors or error messages, we changed
it to the new `error` icon.
- If a "delete" action was associated with this icon, we changed it to
the `trash` icon instead.
- If a "clear" action was associated with this icon, we changed it to
just the `cross` icon, or in some cases `minusInCircleFilled` (if used
alongside `plusInCircleFilled`).
- Again, if we made a mistake during this conversion or missed your
plugin, please feel free to ping us.

## Summary

`eui@75.1.2`  `eui@76.0.2`

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

**Bug fixes**

- Added a legacy `alert` alias for the `warning` `EuiIcon` type
([#6640](https://github.com/elastic/eui/pull/6640))

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

**Bug fixes**

- Fixed broken icons on all `isInvalid` form controls
([#6629](https://github.com/elastic/eui/pull/6629))

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

- Added `pivot` glyph to `EuiIcon`
([#6605](https://github.com/elastic/eui/pull/6605))
- Added the `displayHeaderCellProps` API to `EuiDataGrid`'s columns,
which allows passing custom props directly to column header cells
([#6609](https://github.com/elastic/eui/pull/6609))
- Added the new `headerCellProps`/`footerCellProps` APIs to
`EuiDataGrid`'s control columns, which allows passing custom props
directly to control column header or footer cells
([#6609](https://github.com/elastic/eui/pull/6609))
- Added a new `footerCellRender` API to `EuiDataGrid`'s control columns,
which allows completely customizing control column rendering (previously
rendered an empty cell)
([#6609](https://github.com/elastic/eui/pull/6609))
- Updated the styling of nested ordered lists in `EuiText` to align with
GitHub's list style, which is a popular format used in Markdown or MDX
formatting ([#6615](https://github.com/elastic/eui/pull/6615))
- Added a margin-bottom property exclusively to the direct child `ul`
and `ol` elements of the `EuiText` component
([#6615](https://github.com/elastic/eui/pull/6615))
- Fix issue with badges appearing within an `EuiBadgeGroup`, where the
CSS rule to override the `margin-inline-start` was not being applied
correctly due to the order of appearance in the CSS rules
([#6618](https://github.com/elastic/eui/pull/6618))

**Bug fixes**

- Fixed `EuiDataGrid` footer control columns rendering with cell
expansion popovers when they should not have been
([#6609](https://github.com/elastic/eui/pull/6609))
- Fixed an `EuiSkipLink` bug where main content loading in
progressively/dynamically after the skip link rendered was not being
correctly focused ([#6613](https://github.com/elastic/eui/pull/6613))

**Breaking changes**

- Renamed `EuiIcon`'s `alert` to `warning`
([#6608](https://github.com/elastic/eui/pull/6608))
- Removed `EuiIcon`'s `crossInACircleFilled` in favor of `error`
([#6608](https://github.com/elastic/eui/pull/6608))

---------

Co-authored-by: Davey Holler <daveyholler@hey.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2023-03-14 14:27:40 -05:00
renovate[bot]
0343c634b2
Update dependency @types/selenium-webdriver to ^4.1.13 (main) (#153192)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/selenium-webdriver](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/selenium-webdriver)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`^4.1.12` ->
`^4.1.13`](https://renovatebot.com/diffs/npm/@types%2fselenium-webdriver/4.1.12/4.1.13)
|
[![age](https://badges.renovateapi.com/packages/npm/@types%2fselenium-webdriver/4.1.13/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@types%2fselenium-webdriver/4.1.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@types%2fselenium-webdriver/4.1.13/compatibility-slim/4.1.12)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@types%2fselenium-webdriver/4.1.13/confidence-slim/4.1.12)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-14 12:55:20 -04:00
Aleh Zasypkin
e7de8060d4
Upgrade transitive webpack dependency (5.74.05.76.1). (#153193) 2023-03-14 12:46:29 +01:00