Commit graph

3466 commits

Author SHA1 Message Date
Bhavya RM
c3006ebc9c
Update axe-core to the latest version - 4.8.2 (#171055)
Updating axe-core validation engine to 4.8.2
2023-11-15 15:08:35 -05:00
Brad White
d09e47abbc Revert "Add mock identity provider for serverless (#170852)"
This reverts commit 1fb0313a52.
2023-11-15 12:20:16 -07:00
Rachel Shen
4a0b967e38
Reporting packages for export types (#162845)
## Summary
This PR refactors the export type classes into their own packages to be
then instantiated in the reporting plugin. This will reduce bloat in the
central reporting plugin.

**Main packages**
- `kbn/reporting-export-types-{png,pdf,csv}` are server packages with
export type declarations
- `kbn/reporting-export-types-{png,pdf,csv}-common` are shared common
packages with type declarations and constants

**Other changes**
 - Remove `reporting.getScreenshots()`
 - Remove duplicated `schema_utils.ts`
 - Consolidate `JOB_STATUS` declaration as an enum

<img width="1063" alt="image"
src="bced8321-93c5-4ebd-b31e-1fd946166241">

### 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: Timothy Sullivan <tsullivan@elastic.co>
2023-11-15 10:48:00 -07:00
Thom Heymann
1fb0313a52
Add mock identity provider for serverless (#170852)
Related to [#166340](https://github.com/elastic/kibana/issues/166340)

## Summary

Add mock identity provider and utils to test serverless user roles.

## Screenshot

### 1. Login selector

<img width="767" alt="Screenshot 2023-11-08 at 15 18 18"
src="82b4a29f-65b4-45d2-bed3-6d9f74043c48">

### 2. Single sign on screen

<img width="437" alt="Screenshot 2023-11-09 at 12 30 46"
src="3d5b6f26-5409-4169-a627-bcf6d09836d9">

### 3. User profile page

<img width="1041" alt="Screenshot 2023-11-08 at 17 36 22"
src="50bd4a5a-f9a8-4643-9384-9a352701b011">

## Testing

SAML is only supported by ES when running in SSL mode. 

1. To test the mock identity provider run a serverless project in SSL
mode using:

```bash
yarn es serverless --ssl
yarn start --serverless=es --ssl
```

2. Then access Kibana and login in using "Continue as Test User".

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2023-11-15 08:39:57 +00:00
Alejandro Fernández Haro
cedaa3feec
[Telemetry] Skip collection when navigated by Synthetics monitors (#171054) 2023-11-14 09:11:51 +01:00
Julia Rechkunova
145cc8f13b
[Discover] Show "unsaved changes" label when in unsaved state of saved search (#169548)
- Resolves https://github.com/elastic/kibana/issues/135887

## Summary

This PR adds "Unsaved changes" badge to Discover for modified saved
searches. It also removes "Reset search" button from the histogram area.
Code for the badge is added to a new package
`@kbn/unsaved-changes-badge`.

<img width="600" alt="Screenshot 2023-10-23 at 18 05 34"
src="ad200a28-79e1-4cc5-8e28-6352d4b85322">

![Oct-23-2023
18-06-39](cacf4ff2-525c-4759-aba9-34ce75089ddd)


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-13 13:36:25 +01:00
mohamedhamed-ahmed
65e65a834e
[Dataset quality] Creating initial plugin (#171009)
Related to https://github.com/elastic/kibana/issues/169759.

## Summary

This PR creates the initial plugin for Dataset Quality.
The plugin has the basic boilerplate that allows us to continue working
on the UI and Server sides in parallel.

Further configs are to be added along with upcoming commits like:
1. Storybook 
2. FTR configs

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-10 16:02:12 +01:00
Jorge Sanz
3fae0b9d73
[EMS] Update to ems-client@8.5.1 (#170966)
## Summary

Related to https://github.com/elastic/ems-client/pull/208

Update to a version of `ems-client` that supports Node 20.

I'm creating new PRs for:

* `@elastic/ems-client@8.4.1` in Kibana `8.11` branch
* `@elastic/ems-client@7.17.1` for Kibana `7.17` branch

Sorry for the small overhead on reviewing; this way, it seems faster to
get CI running in parallel for the three releases and unblock the
operations team on this issue.
2023-11-09 21:37:00 +01:00
Tim Sullivan
09f4708de4
Functional tests for KibanaErrorBoundary (#170569)
Part of https://github.com/elastic/kibana-team/issues/646

This PR adds an example plugin in `examples/error_boundary` that shows
usage of KibanaErrorBoundary.

The example plugin is used in a functional test to ensure errors are
caught in the appropriate way, and error messages include a working
Refresh button.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-08 11:23:19 -07:00
Marta Bondyra
3a784106df
[testing] replace testing-library/dom package with testing-library/react (#170594)
## Summary

Removes `testing-library/dom` from dependencies. As all the utilities
from`dom` are available already in `testing-library/react`, there's no
need to have both `dom` and `react` libraries available in our
package.json.

Following the [@testing-library/react
documentation:](https://testing-library.com/docs/react-testing-library/intro)

> [React Testing
Library](https://github.com/testing-library/react-testing-library)
builds on top of DOM Testing Library by adding APIs for working with
React components.

Let's just import everything from `testing-library/react`, this way we
won't need to worry about inconsistencies between `testing-library/dom`
we have in our `package.json` and the one that is
`testing-library/react` dependency.
2023-11-08 15:53:48 +01:00
Efe Gürkan YALAMAN
8c26f7cfe9
[Enterprise Search] Update Kea to 2.6 (#170027)
## Summary

First step to update KeaJS to 3.x series. Currently we are using 2.4.2.
For a better jump ahead we should first update to 2.6.


### Checklist

Delete any items that are not applicable to this PR.

- [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-11-08 14:48:37 +01:00
Tomasz Ciecierski
3a4e761cf3
[EDR Workflows] Remove cypress-react-selector from Osquery (#170607) 2023-11-06 13:46:32 -07:00
Cee Chen
d079e9573d
Upgrade EUI to v90.0.0 (#170179)
`v89.1.0``v90.0.0`

The majority of changes in this PR come from:

- **EuiContextMenu** being converted to Emotion
(https://github.com/elastic/eui/pull/7312). If your usage of
`EuiContextMenu` was significantly affected, we recommend pulling down
this PR and QAing it locally.

- `defaultProps` being removed from some very widespread components,
particularly **EuiButton**, in anticipation of React's upcoming
deprecation.
(b7dc9b4e89)
**NOTE**: This only affected Enzyme snapshots, and did not affect
production behavior.

[Commits](https://github.com/elastic/kibana/pull/170179/commits) have
been broken up by component changes as well as types of changes.

---

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

- Updated the `eventColor` prop on `EuiCommentEvent` to apply the color
to the entire comment header.
([#7288](https://github.com/elastic/eui/pull/7288))
- Updated `EuiBasicTable` and `EuiInMemoryTable` to support a new
controlled selection API: `selection.selected`
([#7321](https://github.com/elastic/eui/pull/7321))

**Bug fixes**

- Fixed controlled `EuiFieldNumbers` not correctly updating native
validity state ([#7291](https://github.com/elastic/eui/pull/7291))
- Fixed `EuiListGroupItem` to pass `style` props to the wrapping `<li>`
element alongside `className` and `css`. All other props will be passed
to the underlying content.
([#7298](https://github.com/elastic/eui/pull/7298))
- Fixed `EuiListGroupItem`'s non-transitioned transform on hover/focus
([#7298](https://github.com/elastic/eui/pull/7298))
- Fixed `EuiDataGrid`s with `gridStyle.stripes` sometimes showing buggy
row striping after being sorted
([#7301](https://github.com/elastic/eui/pull/7301))
- Fixed `EuiDataGrid`'s `gridStyle.rowClasses` API to not conflict with
`gridStyle.stripes` if dynamically updated
([#7301](https://github.com/elastic/eui/pull/7301))
- Fixed `EuiDataGrid`'s `gridStyle.rowClasses` API to support multiple
space-separated classes
([#7301](https://github.com/elastic/eui/pull/7301))
- Fixed `EuiInputPopover` not calling `onPanelResize` callback prop
([#7305](https://github.com/elastic/eui/pull/7305))
- Fixed `EuiDualRange` incorrectly positioning highlights when rendered
with `showInput="inputWithPopover"`
([#7305](https://github.com/elastic/eui/pull/7305))
- Fixed `EuiTabs` incorrectly wrapping text when it should instead
either scroll or truncate
([#7309](https://github.com/elastic/eui/pull/7309))
- `EuiContextMenu` now renders text colors correctly when used within an
`EuiBottomBar` ([#7312](https://github.com/elastic/eui/pull/7312))
- Fixed the width of `EuiSuperDatePicker`'s Absolute date picker
([#7313](https://github.com/elastic/eui/pull/7313))
- Fixed `EuiDataGrid` cells visually cutting off overflowing content a
little too quickly ([#7320](https://github.com/elastic/eui/pull/7320))

**Deprecations**

- Deprecated `EuiBasicTable` and `EuiInMemoryTable`'s ref `setSelection`
API. Use the new `selection.selected` API instead.
([#7321](https://github.com/elastic/eui/pull/7321))

**Breaking changes**

- Removed `EuiPageTemplate_Deprecated`, `EuiPageSideBar_Deprecated`, and
`EuiPageContent*_Deprecated`
([#7265](https://github.com/elastic/eui/pull/7265))
- Removed the `ghost` color option from `EuiButton`, `EuiButtonEmpty`,
and `EuiButtonIcon`. Use an `<EuiThemeProvider colorMode="dark">`
wrapper and `color="text"` instead.
([#7296](https://github.com/elastic/eui/pull/7296))

**Dependency updates**

- Updated `refractor` to v3.6.0
([#7127](https://github.com/elastic/eui/pull/7127))
- Updated `rehype-raw` to v5.1.0
([#7127](https://github.com/elastic/eui/pull/7127))
- Updated `vfile` to v4.2.1
([#7127](https://github.com/elastic/eui/pull/7127))

**Accessibility**

- `EuiContextMenu` now correctly respects reduced motion preferences
([#7312](https://github.com/elastic/eui/pull/7312))
- `EuiAccordion`s no longer attempt to focus child content when the
accordion is externally opened via `forceState`, but will continue to
focus expanded content when users click the toggle button.
([#7314](https://github.com/elastic/eui/pull/7314))

**CSS-in-JS conversions**

- Converted `EuiContextMenu`, `EuiContextMenuPanel`, and
`EuiContextMenuItem` to Emotion; Removed `$euiContextMenuWidth`
([#7312](https://github.com/elastic/eui/pull/7312))
2023-11-03 10:19:31 -07:00
Anton Dosov
3249c1a116
Consolidate <CodeEditor/> (#170313)
## Summary

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

- Remove duplicate of code_editor code from `kibana_react` and apply
recent changes to the version in `packages/`
- Fix code_editor styles in `packages/`
https://github.com/elastic/kibana/pull/170313#discussion_r1378839369
- Revert setting default height to 100px (as it breaks in some places)
https://github.com/elastic/kibana/pull/170313#discussion_r1378838788


### Risks

Ideally we should smoke check the code editor in all the places, I
checked bunch of them.
As of special custom features, I tested: 
- The theme switch
- The placeholder 
- The a11y hint
- Fullscreen mode
2023-11-03 09:30:58 -07:00
Anton Dosov
c2f6fc4336
Consolidate ExitFullScreenButton (#170404)
## Summary

close https://github.com/elastic/kibana/issues/168696

- Remove old copy from `kibana_react`
- Remove -types and -mocks packages, move them into a single package
(not needed since we don't use bazel now)

### Risks

No Risks, since old copy was not used
2023-11-03 09:50:02 +01:00
Tiago Costa
ecdd1f090b
Remove webpack compression plugin on v4 (#170203)
Closes https://github.com/elastic/kibana/issues/170202

This PR fixes a problem with brotli generated assets when creating an
external plugin by replacing the brotli assets generated by webpack with
the ones created separately with gulp brotli.
2023-11-02 17:11:48 +00:00
Dzmitry Lemechko
2d5a62c386
[chore] update chromedriver to 119.0.0 (#170386)
## Summary

Updating Chromedriver to match recently released Chrome 119
2023-11-02 13:06:55 +01:00
Jeramy Soucy
e17988c3d8
Upgrades axios@1.4.0→1.6.0 (#170070)
## Summary

Upgrades the `axios` dependency from v1.4.0 to v1.6.0 wherever possible.
We have lingering dependencies on older versions 0.21.4 and 0.26.1 via
`@slack/webhook`@5.0.4 and `openai`@3.3.0 respectively.
2023-10-30 14:40:50 -04:00
Dmitrii Shevchenko
3a18916b31
[Security Solution] Migrate Rules schema to OpenAPI (#167999)
**Parent meta ticket:
https://github.com/elastic/security-team/issues/7491**

Resolves: https://github.com/elastic/security-team/issues/7582
Resolves: https://github.com/elastic/security-team/issues/7580
Resolves: https://github.com/elastic/security-team/issues/7581

## Summary

This PR migrates the rules schema to OpenAPI, Zod, and code generation.

The following APIs now have complete OpenAPI specifications and are
enabled for code generation:

| Method | Endpoint | OpenAPI spec | Fully migrated |
| ------ |
---------------------------------------------------------------- |
------------ | -------------- |
| POST | /api/detection_engine/rules |  |  |
| GET | /api/detection_engine/rules |  |  |
| PUT | /api/detection_engine/rules |  |  |
| PATCH | /api/detection_engine/rules |  |  |
| DELETE | /api/detection_engine/rules |  |  |
| POST | /api/detection_engine/rules/\_bulk_create |  |  |
| PUT | /api/detection_engine/rules/\_bulk_update |  |  |
| PATCH | /api/detection_engine/rules/\_bulk_update |  |  |
| DELETE | /api/detection_engine/rules/\_bulk_delete |  |  |
| POST | /api/detection_engine/rules/\_bulk_delete |  |  |

### Rule schemas are now forward-compatible

We now allow extra fields in schemas for forward compatibility, but we
remove them from the payload during parsing. So from now on, extra
fields are simply ignored and won't lead to validation errors.
2023-10-27 18:00:10 +02:00
Vadim Kibana
9a9a51b454
Remove unused sharedux avatar components (#168686)
## Summary

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-25 03:07:55 -07:00
Pierre Gayvallet
e398e7bc51
[Core plugin system] Add dynamic contract resolving (#167113)
### Summary

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

Implements dynamic contract resolving for plugins, allowing to retrieve
contracts after their respective lifecycle is completed, and therefore
working around cyclic dependencies.

In term of workflow execution, we're basically going from

<img width="842" alt="Screenshot 2023-09-27 at 08 09 27"
src="251637d1-ec97-4071-a445-2f59512ce187">
 
to:

<img width="1092" alt="Screenshot 2023-09-27 at 08 09 32"
src="de466cda-7e43-4fd3-81ec-4339d05d279d">

### API

This functionality is exposed by the now publicly exposed `plugins`
service contracts:

```ts
setup(core) {
  core.plugins.onSetup<{pluginA: SetupContractA, pluginB: SetupContractA}>('pluginA', 'pluginB')
      .then(({ pluginA, pluginB }) => {
        if(pluginA.found && pluginB.found) {
          // do something with pluginA.contract and pluginB.contract
        }
      });
}
```  

```ts
start(core) {
  core.plugins.onStart<{pluginA: StartContractA, pluginB: StartContractA}>('pluginA', 'pluginB')
      .then(({ pluginA, pluginB }) => {
        if(pluginA.found && pluginB.found) {
          // do something with pluginA.contract and pluginB.contract
        }
      });
}
```

**remark:** the `setup` contract exposed both `onSetup` and `onStart`,
while the `start` contract only exposed `onStart`. The intent is to
avoid fully disrupting the concept of lifecycle stages.

### Guardrails

To prevent developer from abusing this new API, or at least to add some
visibility on its adoption, plugins can only perforn dynamic contract
resolving against dependencies explicitly defined in their manifest:
- any required dependencies (*existing concept*)
- any optional dependencies (*existing concept*)
- any runtime dependencies (**new concept**)

Runtime dependencies must be specified using the new
`runtimePluginDependencies` field of a plugin's manifest.

```json
{
  "type": "plugin",
  "id": "@kbn/some-id",
  "owner": "@elastic/kibana-core",
  "plugin": {
    "id": "some-id",
    "...": "...",
    "runtimePluginDependencies" : ["someOtherPluginId"]
  }
}

```

Using the contract resolving API will throw at call time when trying to
resolve the contract for an undeclared dependency.

E.g this would throw at invocation time (not returning a rejected
promise - throw).

```ts
setup(core) {
  core.plugins.onSetup<{undeclaredDependency: SomeContract}>('undeclaredDependency');
}
```  

The reasoning behind throwing is that these errors should only occur
during the development process, and an hard fail is way more visible
than a promise rejection that should be more easily shallowed.

### Code reviews

This PR defines @elastic/kibana-core as codeowner of all `kibana.jsonc`
files in the `src/plugins` and `x-pack/plugins` directories, so that a
code review will be triggered whenever anyone changes something in any
manifest. The intent is to be able to monitor new usages of the feature,
via the addition of entries in the `runtimePluginDependencies` option of
the manifest.

### Remarks

Exposing this API, and therefore making possible cyclic dependencies
between plugins, opens the door to other questions.

For instance, cross-plugin type imports are not technically possible at
the moment, given that plugins are referencing each others via TS refs,
and refs forbid cyclic dependencies. Which means that to leverage this
to address cyclic dependency issues, the public types of **at least one
of the two** plugins will have to be extracted to a shared place (likely
a package).

Resolving, or trying to improve the developer experience around this
issue, is absolutely out of scope of the current PR (and the issue it
addresses).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-24 02:32:09 -07:00
Tim Sullivan
53c83e789b
KibanaErrorBoundary initial implementation (#168754)
## Summary

* Meta issue: https://github.com/elastic/kibana/issues/166584
* This PR implements tasks in:
https://github.com/elastic/kibana/issues/167159
* [Technical doc [Elastic
internal]](https://docs.google.com/document/d/1kVD3T08AzLuvRMnFrXzWd6rTQWZDFfjqmOMCoXRI-14/edit)

This PR creates the `ErrorBoundary` component and its provider for
services. It implements the wrapper around a few management apps owned
by Appex-SharedUX.

### Screenshots

Updated 2023-10-18

**Server upgrade scenario:** In this case, the caught error is known to
be recoverable via window refresh:
* <img width="1413" alt="image"
src="7f34fbab-0e67-4c67-a4a1-989464d5b0d0">

**Unknown/Custom error:** In this case, the error is something outside
of known cases where the fix is to refresh:
* <img width="1413" alt="image"
src="7c39b5df-d4da-4e33-aeca-9ea447010762">

### Testing

1. Use a script proxy in between the browser and the Kibana server.
    * Try **https://github.com/tsullivan/simple-node-proxy**
* or
**https://chrome.google.com/webstore/detail/tweak-mock-and-modify-htt/feahianecghpnipmhphmfgmpdodhcapi**.
2. Script the proxy to send 404 responses for the Reporting plugin
bundle, and for a bundle of some Management app.
3. Try the Share > CSV menu in Discover. It should be blocked, and
handled with a toast message. Buttons in the toast should work.
4. Try the SharedUX management apps that use the wrapper. It should be
blocked, and handled with an EuiCallout. Refresh button and EuiAccordion
should work.

### Checklist
- [x] Ensure the package code is delivered to the browser in the initial
loading of the page (c2559e83d2)
- [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
- [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2023-10-23 07:47:30 -07:00
renovate[bot]
0fd5ff51e5
Update dependency elastic-apm-node to ^4.1.0 (main) (#169470)
[![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) |
[`^4.0.0` ->
`^4.1.0`](https://renovatebot.com/diffs/npm/elastic-apm-node/4.0.0/4.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/elastic-apm-node/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/elastic-apm-node/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/elastic-apm-node/4.0.0/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/elastic-apm-node/4.0.0/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/apm-agent-nodejs (elastic-apm-node)</summary>

###
[`v4.1.0`](https://togithub.com/elastic/apm-agent-nodejs/releases/tag/v4.1.0)

[Compare
Source](https://togithub.com/elastic/apm-agent-nodejs/compare/v4.0.0...v4.1.0)

For more information, please see the
[changelog](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-4.x.html#release-notes-4.1.0).

##### Elastic APM Node.js agent layer ARNs

|Region|ARN|
|------|---|

|af-south-1|arn:aws:lambda:af-south-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-east-1|arn:aws:lambda:ap-east-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-northeast-1|arn:aws:lambda:ap-northeast-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-northeast-2|arn:aws:lambda:ap-northeast-2:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-northeast-3|arn:aws:lambda:ap-northeast-3:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-south-1|arn:aws:lambda:ap-south-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-southeast-1|arn:aws:lambda:ap-southeast-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-southeast-2|arn:aws:lambda:ap-southeast-2:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ap-southeast-3|arn:aws:lambda:ap-southeast-3:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|ca-central-1|arn:aws:lambda:ca-central-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|eu-central-1|arn:aws:lambda:eu-central-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|eu-north-1|arn:aws:lambda:eu-north-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|eu-south-1|arn:aws:lambda:eu-south-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|eu-west-1|arn:aws:lambda:eu-west-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|eu-west-2|arn:aws:lambda:eu-west-2:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|eu-west-3|arn:aws:lambda:eu-west-3:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|me-south-1|arn:aws:lambda:me-south-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|sa-east-1|arn:aws:lambda:sa-east-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|us-east-1|arn:aws:lambda:us-east-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|us-east-2|arn:aws:lambda:us-east-2:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|us-west-1|arn:aws:lambda:us-west-1:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

|us-west-2|arn:aws:lambda:us-west-2:267093732750:layer:elastic-apm-node-ver-4-1-0:1|

</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://developer.mend.io/github/elastic/kibana).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 03:03:25 -04:00
Jon
b95fcf00e2
[ci] Add node scripts/yarn_deduplicate check (#169165)
- Adds an entrypoint, `node scripts/yarn_deduplicate` for fixing
duplicated packages via npm package `yarn-deduplicate`
- Fixes existing duplicated packages
- Adds a CI check verifying no duplicated packages have been added.  

There are currently two exclusions - all types packages which causes
other checks to break, and axe-core, which does not follow semver.

Closes https://github.com/elastic/kibana/issues/125712
2023-10-19 18:13:48 -05:00
Cee Chen
feab0c6597
Upgrade EUI to v89.1.0 (#169135)
`v89.0.0``v89.1.0`

This upgrade also contains an EuiDataGrid refactor
(https://github.com/elastic/eui/pull/7255) not listed in the changelog
(as no end-user functionality or props changed as a result of the
refactor). The unlisted changes should only affect DOM and `className`
usages in Kibana (primarily CSS overrides and test selectors).

---

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

- Added `tokenVectorSparse` token and updated `tokenDenseVector` token
(now named `tokenVectorDense`).
([#7282](https://github.com/elastic/eui/pull/7282))

**CSS-in-JS conversions**

- Reduced default CSS prefixes generated by Emotion to only browsers
supported by EUI (latest evergreen browsers). This can be customized by
passing your own Emotion cache to `EuiProvider`.
([#7272](https://github.com/elastic/eui/pull/7272))
2023-10-19 11:41:06 -07:00
Kurt
8fd827f868
Upgrade babel/traverse to 7.23.2 (#169174)
## Summary

Upgrading `@babel/traverse` form 7.21.2 to 7.23.2

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-18 16:59:15 -04:00
Dario Gieselaar
980e0cc704
[OpenAI Connector] Track token count for streaming responses (#168440)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-18 14:04:21 +02:00
Maryam Saeidi
6d88fb5f54
Add alerting_test_data package and a script to create rules for manual testing (#168493)
Closes https://github.com/elastic/actionable-observability/issues/140

## Summary

Add alerting_test_data package to create custom threshold and APM rules
for manual testing.

More information about the usage:
https://github.com/elastic/actionable-observability/pull/156

---------

Co-authored-by: almudenasanz <almudena.sanz@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-18 12:00:09 +02:00
Jorge Sanz
6caf0327ad
[EMS] Update EMS Client with serverless version and header (#163098)
Part of #157094
Fixes #161790

## Summary

* Upgrade to `@elastic/ems-client@8.5.0`
* Updates the instantiation of the EMS Client to pass the version and
HTTP header on Serverless builds.

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

## Testing

The serverless update to EMS Tile Service is ready in Production.
Running Kibana in serverless mode, you can check for requests to
`https://tiles.maps.elastic.dev/latest/manifest` and the associated
`elastic-api-version` header being accepted.

EMS File Service already accepts the `latest/manifest` endpoint in our
production environment.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-17 04:46:14 -07:00
Coen Warmer
6fcf8c9efe
Add ESLint rule for Translations (#168001)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@budzenski.me>
2023-10-16 18:34:50 +02:00
Thomas Watson
217929a636
Bump Node.js from 18.17.1 to 18.18.2 (#168914) 2023-10-16 09:50:15 -04:00
Shahzad
caa4028cec
[Synthetics] Update package to 1.5.0 (#168941) 2023-10-16 04:36:43 -07:00
Tiago Costa
02392fe9a2
chore(NA): upgrade chromedriver to v117 (#168627)
This PR upgrades chromedriver into the latest version available.
2023-10-11 23:21:22 +01:00
Cee Chen
770881430d
Upgrade EUI to v89.0.0 (#168396)
`v88.5.4``v89.0.0`

---

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

- Added new `pushAnimation` prop to push `EuiFlyout`s, which enables a
slide in animation ([#7239](https://github.com/elastic/eui/pull/7239))
- Updated `EuiComboBox` to use `EuiInputPopover` under the hood
([#7246](https://github.com/elastic/eui/pull/7246))
- Added `inputPopoverProps` to `EuiComboBox`, which allows customizing
the underlying popover
([#7246](https://github.com/elastic/eui/pull/7246))
- Added a new beta `EuiTextBlockTruncate` component for multi-line
truncation ([#7250](https://github.com/elastic/eui/pull/7250))
- Updated `EuiBasicTable` and `EuiInMemoryTable` to support multi-line
truncation. This can be set via `truncateText.lines` in the `columns`
prop. ([#7254](https://github.com/elastic/eui/pull/7254))

**Bug fixes**

- Fixed `EuiFlexGroup` and `EuiFlexGrid`'s `m` gutter size
([#7251](https://github.com/elastic/eui/pull/7251))
- Fixed focus trap rerender issues in `EuiFlyout` with memoization
([#7259](https://github.com/elastic/eui/pull/7259))
- Fixed a visual bug with `EuiContextMenu`'s animation between panels
([#7268](https://github.com/elastic/eui/pull/7268))

**Breaking changes**

- EUI's global body font-size now respects the `font.defaultUnits`
token. This means that the global font size will use the `rem` unit by
default, instead of `px`.
([#7182](https://github.com/elastic/eui/pull/7182))
- Removed exported `accessibleClickKeys`, `comboBoxKeys`, and
`cascadingMenuKeys` services. Use the generic `keys` service instead
([#7256](https://github.com/elastic/eui/pull/7256))
- Removed `EuiColorStops` due to low usage
([#7262](https://github.com/elastic/eui/pull/7262))
- Removed `EuiSuggest`. We recommend using `EuiSelectable` or
`EuiComboBox` instead
([#7263](https://github.com/elastic/eui/pull/7263))
- Removed `euiHeaderAffordForFixed` Sass mixin, and `$euiHeaderHeight`
and `$euiHeaderHeightCompensation` Sass variables. Use the CSS variable
`--var(euiFixedHeadersOffset, 0)` instead.
([#7264](https://github.com/elastic/eui/pull/7264))

**Accessibility**

- When using `rem` or `em` font units, EUI now respects, instead of
ignoring, browser default font sizes set by end users.
([#7182](https://github.com/elastic/eui/pull/7182))
2023-10-11 14:36:52 -05:00
Jeramy Soucy
5d328feb7f
Upgrade zod@3.21.4→3.22.3 (#168041)
## Summary

Upgrades `zod` from v3.21.4 to v3.22.3.
2023-10-06 09:41:06 -07:00
Julia Rechkunova
4f9e2bdf19
[Discover] Show field tokens in the grid header (#167179)
- Resolves https://github.com/elastic/kibana/issues/166906

## Summary

This PR adds field tokens to column header for the grid.

There are also additional necessary changes:
- field utils (name, description, icon) were moved from
`@kbn/unified-field-list` and `@kbn/discover-utils` to its own new
package `@kbn/field-utils`
- Unified Data Table and Unified Doc Viewer got a new prop `columnTypes`
which allows to render correct field icons for ES|QL searches (before
types were derived from the data view fields which could be misleading
in text-based searches as users can customize field names via query)

<img width="600" alt="Screenshot 2023-09-25 at 19 30 21"
src="388de9bb-94f7-4d3e-878a-ca0da99fcec2">


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2023-10-05 14:02:13 +02:00
Cee Chen
038ac89c1c
Upgrade EUI to v88.5.4 (#167555)
`v88.5.0``v88.5.4`

This EUI upgrade helps unblock the Shared UX team with some beta
serverless nav updates not listed in the below changelog
(https://github.com/elastic/eui/pull/7228 and
https://github.com/elastic/eui/pull/7248).

---

## [`88.5.4`](https://github.com/elastic/eui/tree/v88.5.4)

- This release contains internal changes to a beta component needed by
Kibana.

## [`88.5.3`](https://github.com/elastic/eui/tree/v88.5.3)

**Bug fixes**

- Fixed `EuiComboBox` search input width not resetting correctly on
selection ([#7240](https://github.com/elastic/eui/pull/7240))

## [`88.5.2`](https://github.com/elastic/eui/tree/v88.5.2)

**Bug fixes**

- Fixed broken `EuiTextTruncate` testenv mocks
([#7234](https://github.com/elastic/eui/pull/7234))

## [`88.5.1`](https://github.com/elastic/eui/tree/v88.5.1)

- Improved the performance of `EuiComboBox` by removing the
`react-autosizer-input` dependency
([#7215](https://github.com/elastic/eui/pull/7215))

**Dependency updates**

- Updated `react-element-to-jsx-string` to v5.0.0
([#7214](https://github.com/elastic/eui/pull/7214))
- Removed unused `@types/vfile-message` dependency
([#7214](https://github.com/elastic/eui/pull/7214))
2023-10-04 12:32:03 -07:00
Tiago Costa
cce24cac64
chore(NA): bump version to 8.12.0 (#168023)
Usually bump from 8.11.0 to 8.12.0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-10-04 20:10:05 +01:00
renovate[bot]
554fbdfdbc
Update APM (main) (#167982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-04 11:40:29 -04:00
Brad White
2ff938e0ac
Remove KUI Framework (#167833)
## Summary

Closes #46410

Removes the deprecated `@kbn/ui-framework`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-04 07:55:03 -07:00
Rachel Shen
5c72df1d47
Reporting Puppeteer update v21.3.5 (#167554)
## Summary

Update the chromium version to 21.3.5 



### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
(tested locally on arm64 and win surface laptop locally)
2023-10-03 15:55:52 -07:00
Jeramy Soucy
60f66eaf06
Upgrade postcss@8.4.14→8.4.31 (#167815)
## Summary

Upgrades dev-only dependency `postcss` where possible (v8.4.14 to
v8.4.31).
2023-10-03 14:16:42 -04:00
renovate[bot]
b0a39cdeb7
Update dependency @elastic/charts to v60 (main) (#166799)
[![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) |
[`59.1.0` ->
`60.0.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/59.1.0/60.0.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fcharts/60.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fcharts/60.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fcharts/59.1.0/60.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fcharts/59.1.0/60.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v60.0.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6000-2023-09-20)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v59.1.0...v60.0.0)

##### Bug Fixes

- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^88.2.0
([#&#8203;2161](https://togithub.com/elastic/elastic-charts/issues/2161))
([6609a19](6609a19231))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^88.3.0
([#&#8203;2163](https://togithub.com/elastic/elastic-charts/issues/2163))
([624f43a](624f43a0f8))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v85
([#&#8203;2113](https://togithub.com/elastic/elastic-charts/issues/2113))
([1b3fa7c](1b3fa7c34a))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v87
([#&#8203;2145](https://togithub.com/elastic/elastic-charts/issues/2145))
([312c32c](312c32cb71))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v88
([#&#8203;2154](https://togithub.com/elastic/elastic-charts/issues/2154))
([4070da0](4070da0c1f))
- **tooltip:** rendering in react v18
([#&#8203;2169](https://togithub.com/elastic/elastic-charts/issues/2169))
([f30df54](f30df5444f))
- update font family
([#&#8203;2165](https://togithub.com/elastic/elastic-charts/issues/2165))
([be07b0c](be07b0c216))
- **waffle:** remove alpha artifacts
([#&#8203;2139](https://togithub.com/elastic/elastic-charts/issues/2139))
([8eb4ede](8eb4edecf8))
- Wait a tick before reporting render status
([#&#8203;2131](https://togithub.com/elastic/elastic-charts/issues/2131))
([fd2bca4](fd2bca4ee2))
- **xy:** disable legend extra on ordinal
([#&#8203;2114](https://togithub.com/elastic/elastic-charts/issues/2114))
([3ddfb18](3ddfb1816b))

##### Features

- add locale prop to Settings
([#&#8203;2164](https://togithub.com/elastic/elastic-charts/issues/2164))
([0bb3ab1](0bb3ab1f3a))

##### BREAKING CHANGES

- **xy:** when using the `ScaleType.Ordinal` for the X scale the legend
extra value, representing the last and current hovered value, will not
be shown.

</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://developer.mend.io/github/elastic/kibana).

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Drew Tate <drew.tate@elastic.co>
2023-10-02 11:42:24 -04:00
Pierre Gayvallet
b05397366e
Add test utilities for model version testing (#167501)
## Summary

Create utilities allowing to simulate a model version cohabitation
period, by creating two SO repositories of different versions so that
type/test owners can use it to assert the behavior of documents created
by one version and read by the other, or vice-versa.


### Usage example

```ts
describe('myIntegrationTest', () => {
  const testbed = createModelVersionTestBed();
  let testkit: ModelVersionTestKit;

  beforeAll(async () => {
    await testbed.startES();
  });

  afterAll(async () => {
    await testbed.stopES();
  });

  beforeEach(async () => {
    testkit = await testbed.prepareTestKit({
      savedObjectDefinitions: [{
        definition: mySoTypeDefinition,
        modelVersionBefore: 1,
        modelVersionAfter: 2,
      }]
    })
  });

  afterEach(async () => {
    if(testkit) {
      await testkit.tearsDown();
    }
  });

  it('can be used to test model version cohabitation', async () => {
    // last registered version is `1`
    const repositoryV1 = testkit.repositoryBefore;
    // last registered version is `2`
    const repositoryV2 = testkit.repositoryAfter;

    // do something with the two repositories, e.g
    await repositoryV1.create(someAttrs, { id });
    const v2docReadFromV1 = await repositoryV2.get('my-type', id);
    expect(v2docReadFromV1.attributes).toEqual(something);
  })
})
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-02 16:06:08 +02:00
Alejandro Fernández Haro
b58e06b2a9
chore(deps): Update LaunchDarkly clients (#167765) 2023-10-02 15:58:46 +02:00
Anton Dosov
07f1c36df7
[Drift] Enable chat globally + A/B test for pages where the chat was available before (#167069)
## Summary

Close https://github.com/elastic/kibana/issues/159691

[Requirements](https://docs.google.com/document/d/1uXgyDIGuIqkYXmavdMTpBgQEiOP07ObJYb7GNq5GiSE/edit#heading=h.okl11rz12ytg)
[A/B test
description](https://docs.google.com/document/d/1yzfZF8mtlRNH4X6HjosD6Exh24zAhN__LR_zh3DOzKw/edit?usp=sharing)

[Figma](https://www.figma.com/file/WGhmfgyy9FBOltLtycfGPE/Getting-started?type=design&node-id=92-44804&mode=design&t=mwbIexn5Fs754HQz-0)
Testing - see _testing_ section below for more details
(https://dosant-pr-167374-d-2023-06-14-global-drift-with-experiment.kbndev.co/.
elastic/changeme)

This PR enables cloud chat (Drift) globally. This is done by adding a
custom chat button in the Kibana header which manually toggles Drift
widget. We attempt to manually position the widget to the top of the
screen so it pops up close to the chat button that triggered it.

Previously Drift chat was available only on specific pages like
Solutions onboarding pages, integrations, setup guides as a regular chat
widget with the floating chat bubble in the bottom right corner. We
couldn't enable it on all pages, because on a lot of them the floating
chat bottom would have overlapped the application UI.

We also were asked to add [an a/b
test](https://docs.google.com/document/d/1yzfZF8mtlRNH4X6HjosD6Exh24zAhN__LR_zh3DOzKw/edit?usp=sharing):
 - A: The chat button appears in the header for all pages (new)
- B: The chat button appears as floating action button in the
bottom-right corner on pages where Drift was previously available
(solutions onboarding pages, integrations, setup guides)

### Screenshots / Videos

#### Global Chat in the header

![Screenshot 2023-09-25 at 10 30
41](dba3b3da-4e90-4d6c-a5d2-99123aa8c753)
![Screenshot 2023-09-25 at 10 30
45](752d05e4-cc85-458e-8216-f75529c2bac7)

#### The tour on the first appearance 

![Screenshot 2023-09-25 at 10 55
42](c0958095-f724-4b69-a149-04a0aec8e083)

#### (Part of A/B test) Drift in the header on new pages and as floating
action button on old pages


0386ccbd-ab6c-4eb2-a57b-f9324fcf73eb

### Implementation notes

- **We still enable Drift only for trial users + gap window**
- We exposed additional APIs from drift iframe to manually control its
visibility and react to more events
https://github.com/elastic/cloud/pull/118761. This changes are required
for the code in this PR to work. ~The updated frame code wasn't deployed
yet.~ the changes were deployed
- We use [`playbookFired` event
](https://devdocs.drift.com/docs/drift-events#playbook-fired) to know if
Drift chat should be visible for the current user. We show the button in
the header only when it fires.
- To react to the event and to display the button, we have to kick of
Drift iframe initialization first
- This means Drift codes loads before we show the button and before user
interacts with it (Only when Drift is enabled, meaning, only for trial
users + gap window)
- Subsequent launches or opens of the same playbook will not re-trigger
the `playbookFired` event, I used local storage flag to workaround this
and show the live chat button, but it also has it's own edge case. As an
alternative we can always show the chat button and don't rely on the
playbook event, more details here:
https://docs.google.com/document/d/1j313mVOIz19Rkoj8TDFWaLc7Pgk_ByBBKJFNIC-jbyc/edit?usp=sharing.
For now was decided to rely on the `playbookFired` event.
- A/B: **to support for both new and old implementation, I had to
refactor the old one from drop-in chat to global chat that is controlled
by list of hardcoded URLs.** This is not ideal, but this allows two
implementations to co-exist with much tech-debt and we plan to get rid
of this after the a/b test.
- When we navigate between pages with different implementations, Drift
re-initializes itself (just like in old implementation), this
performance debt should go away when we get rid of the a/b test.
- When end-to-end testing the a/b experiment, I found a bug in the a/b
test setup in Kibana https://github.com/elastic/kibana/issues/167240
this needs to be addressed separately for a/b test to work properly.
- When the user receives a message from Drift - the custom "Live Chat"
button doesn't indicate that there is a new message. This needs a follow
up, @Dosant to create an issue


### Testing

Version with the experiment where on old pages Drift appears as a
floating chat bubble -
https://dosant-pr-167374-d-2023-06-14-global-drift-with-experiment.kbndev.co/
elastic/changeme

> [!NOTE]  
> If the live chat button doesn't appear, it is likely because the
playbook was recently activated by someone else. you can workaround this
for testing by creating a different user or by setting
`cloudChatPlaybookFiredOnce : true` to localstorage. This issue and
mitigation is described in details in the "implementation details"
section


#### To test locally: 

```
xpack.cloud.id: 'some-id'
xpack.cloud.trial_end_date: '2023-09-21T00:00:00.000Z'
xpack.cloud_integrations.chat.trialBuffer: 45
xpack.cloud.chat.enabled: true

xpack.cloud.chatIdentitySecret: <pls react out> 
xpack.cloud.chat.chatURL: https://elasticcloud-production-chat-us-east-1.s3.amazonaws.com/drift-iframe.html

xpack.cloud_integrations.experiments.flag_overrides:
  "cloud-chat.chat-variant": "bubble" or "header"

```
2023-10-01 16:07:11 +02:00
Patryk Kopyciński
924664fc79
Bump cypress@13.3.0 (#162383)
## Summary

Bump Cypress-related dependencies to the latest versions and update
`renovate.json` to do it automatically in the future

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2023-10-01 10:55:01 +02:00
Elena Stoeva
d37d8ae85c
[serverless] Add Advanced Settings page (#167383)
## Summary

This PR adds a Settings application component for rendering the Advanced
Settings page in serverless.

### How to test:
1. Start Es with `yarn es serverless` and Kibana with `yarn
serverless-{es/oblt/security}`
2. Go to Management -> Advanced Settings
3. Verify that the settings can be changed and saved.

### Advanced Settings page:
<img width="1495" alt="Screenshot 2023-09-28 at 20 56 25"
src="374b3bbd-7bf6-4de7-8129-8b293dd1698e">

### Added an Advanced Settings card to the Management landing page:
<img width="1575" alt="Screenshot 2023-09-28 at 12 24 23"
src="c08b8b36-ff40-4772-87d6-597629d78342">




<!--- ### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

-->

---------

Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
2023-09-29 08:48:37 -07:00
Hannah Mudge
9e8312f2e4
[Dashboard Navigation] Make links panel available under technical preview (#166896)
## Summary
This PR wraps up the work the @elastic/kibana-presentation team has done
to finish the MVP of [Phase
1](https://github.com/elastic/kibana/issues/154354) of the `Link`
embeddable, which enables users to add panels to their dashboard that
contain links to other dashboards + external links - with respect to
dashboard links, we give the author control over which pieces of context
should be kept across dashboards so that things like filter pills,
queries, and time ranges are not lost. This marks a huge improvement in
dashboard navigation overall, which was previously only available via a
variety of different workarounds including (but not limited to):
- Creating (essentially) a `noop` dashboard-to-dashboard drilldown 
- Using markdown panels with hard Dashboard links, which are prone to
break across updates
- Avoiding navigation all together, which resulted in large,
slow-to-load dashboards.

As an added benefit, because these panels contain **references** to each
dashboard rather than hard links, (1) unlike markdown links, they should
not break after updates and (2) if a links panel is exported and
imported into another space or instance, all of the dashboards it links
to will also be imported.



1a86b713-47e7-4db9-8a04-29d41b13681a

> **Note**
> 🔉 The above video has audio! Turn on your sound for the best
experience.

### Note about this PR
- A majority of this work was done on a feature branch, with thorough
reviews from @andreadelrio on behalf of @elastic/kibana-design along the
way. Therefore, while feedback on the design is encouraged, any large
concerns brought up in this PR should be filed as separate issues and
addressed in follow-up PRs.
- This PR contains work for giving embeddables control over their own
panel size / default positioning on the dashboard. This was especially
important for the links panel, since we assume that (a) most links
panels would be located somewhere near the top of the dashboard and (b)
the horizontal links panel should have a different default "shape"
(longer than it is tall) than the vertical panel (taller than it is
long).
- This PR also contains work for caching dashboard saved objects, which
makes navigation much more seamless.

### Flaky Test Runner
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3251


![image](7616443e-0cb0-43ce-a1d0-41f8bee6cbfc)


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~ This will
be addressed in a follow up:
https://github.com/elastic/kibana/issues/166750
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios - ~Units tests
are added, functional tests are forthcoming~ Edit: All tests are in.
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
2023-09-29 08:25:51 -06:00
Clint Andrew Hall
76b832e12e
[feature] Implement Setting Categories in Advanced Settings in serverless (#167447)
## Summary

This PR follows #166460 by adding Category panels to the Form.

<img width="1807" alt="Screenshot 2023-09-27 at 3 36 16 PM"
src="2abe8cf5-5822-473f-affd-148fb7949316">

## Notes
This PR is divided into several commits, the first few being
prerequisite codemods. I recommend reviewing each commit separately, as
the codemods might obscure the actual component work.

- [e78586f - Make SettingType pre-defined to clean up
references](e78586fe44)
- This makes the `SettingType` optional, to clean up areas where the
generic need not be specific.
- [80a9988 - [codemod] Make onFieldChange and onInputChange more
distinct](80a9988516)
- The `onChange` handlers weren't very clear as you work your way up the
component tree. This makes the implementation and usage easier to
understand, (and easier to [replace with state
management](https://github.com/elastic/kibana/issues/166579)).
- [5d0beff - [fix] Fix logged errors in form
tests](5d0beff00c)
- This fixes some logged errors in the Form from `Monaco` and from some
missing `act` and `waitFor` calls.
2023-09-28 10:24:15 -07:00