Commit graph

5843 commits

Author SHA1 Message Date
Khristinin Nikita
af399c1177
Add intended timestamp (#191717)
## Add new field to alert


Add optional `kibana.alert.intended_timestamp`. For scheduled rules it
has the same values as ALERT_RULE_EXECUTION_TIMESTAMP
(`kibana.alert.rule.execution.timestamp`)

for manual rule runs (backfill) it - will get the startedAtOverridden 

For example if i have event at 14:30

And if we run manual rule run from 14:00-15:00, then alert will have
`kibana.alert.intended_timestamp` at 15:00

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-09 21:45:08 +02:00
Lisa Cawley
9833f0f598
[OAS][DOCS] Add example for import saved objects API (#192291) 2024-09-09 12:17:31 -07:00
Quynh Nguyen (Quinn)
1919efa17a
[ES|QL] Improve ES|QL autocomplete suggestions for case() expressions (#192135)
## Summary

This PR addresses https://github.com/elastic/kibana/issues/177258 and
improves autocomplete support for `case()` expressions

After:

- `case( / )` suggest any field/to boolean function in this position as
first argument
- `case( field /)` suggest comparison operators at this point to
converge to a boolean
- `case( field > / )` suggest field/function of the same type of the
right hand side to complete the boolean expression
- `case( field > 0, / )` suggest normal fields and functions



https://github.com/user-attachments/assets/64c87441-0e55-439b-8e84-697cbefe06f4


https://github.com/user-attachments/assets/79544f76-12ae-47c9-8e1a-82476b646ae7


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-09 11:55:23 -05:00
Davis McPhee
dc808a4568
[Discover] [Unified Data Table] Conditionally use overscanRowCount when Document column isn't visible (#192332)
## Summary

Part of #191249 included using the `overscanRowCount` property of EUI
data grid to render some additional data grid rows off screen, which
greatly reduces pop in when scrolling through the grid. While the
performance cost of this low in most cases, it has an impact in certain
situations such as when documents have many fields and the Document
column is visible (e.g. Discover's `many_fields` performance journey).
This is because the Document column can render _many_ DOM elements in
each of its cells, which EUI data grid struggles to handle.

This PR updates Unified Data Table to only use `overscanRowCount` when
the Document column isn't visible, so we'll still benefit from the
scrolling improvements when columns are selected, but won't take the
performance hit for the Document column.

Perf journey run:
https://buildkite.com/elastic/kibana-single-user-performance/builds/14355.

<img width="842" alt="Screenshot 2024-09-09 at 14 07 46"
src="https://github.com/user-attachments/assets/b074fd7a-ef8a-4917-ac5e-0675b0e60b7d">


### Checklist

- [ ] 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)

### 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)
2024-09-09 11:45:36 -03:00
Katerina
78dc7a54e3
[APM][ECO] Include ERROR in the error.log.level filter (#192269)
## Summary

closes #192158 

 

https://github.com/user-attachments/assets/8d79ef8b-2957-4870-98f4-d2eb5804b1b2
2024-09-09 07:33:43 -05:00
Anton Dosov
fccfd4cf75
[react@18] Implicit children type fixes (#192011)
## Summary

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

in @types/react@18 types [have become more
strict](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210).
This PR addresses a bunch of easy fixes. The most common are:

### 1 Removal of implicit children

For components that do implement children but relied on their implicit
declaration from React.FunctionComponent or React.Component:

```diff
 interface Props {
+  children?: React.ReactNode;
 }

 class SomeClassComponents React.Component<Props> {
   render() {
     return  <div>{this.props.children}</div>
   }
 }
 const SomeFunctionComponent: React.FunctionComponent<Props> = props => <div>{props.children}</div>
```

or 

```diff
- const SomeFunctionComponent: React.FunctionComponent<Props> = props => <div>{props.children}</div>
+ const SomeFunctionComponent: React.FunctionComponent<React.PropsWithChildren<Props>> = props => <div>{props.children}</div>
```


*Note 1:*
The most common change occurs in unit tests where `renderHook` and
`wrapper` are used. I had to re-type the props so that `children` were
there

```diff
const { result } = renderHook(
         () => {
           return useLicense();
         },
         {
-           wrapper: ({ children }) => (
+           wrapper: ({ children }: React.PropsWithChildren<{}>) => (
             <TestProviders license={license}>{children}</TestProviders>
           ),
         }
       );
```

```diff
- const { result } = renderHook<GetCasesColumn, UseCasesColumnsReturnValue>(
+ const { result } = renderHook<React.PropsWithChildren<GetCasesColumn>, UseCasesColumnsReturnValue>(
       () => useCasesColumns(defaultColumnArgs),
       {
         wrapper: ({ children }) => <TestProviders>{children}</TestProviders>,
       }
     );
```



*Note 2:*
With @types/react@17 the components that don't have any props apart from
`children` I had to use `React.PropsWithChildren<{}>`, whereas in
@types/react@18 the argument becomes optional, so it can be omitted, and
type simpler with `React.PropsWithChildren` without an argument



### 2 `this.context` becomes `unknown` (was `any`)

In a couple of places where `this.context` is used, I had to type it

### 3 `ComponentType` from enzyme is no longer compatible with
`ComponentType` from react

This one is a bummer, but where `wrappingComponent` with enzyme is used
I had to cast it to type from `enzyme`

```diff
- import { mount } from 'enzyme'
+ import { mount, ComponentType } from 'enzyme'

 wrapper = mount(<ClosureOptions {...props} />, {
-       wrappingComponent: TestProviders,
+       wrappingComponent: TestProviders as ComponentType<{}>,
});
```
2024-09-09 13:56:02 +02:00
Jatin Kathuria
a602eed54f
[Security Solution] Fixes mis-alignment in the labels of Filter controls on Alerts Page. (#192094)
## Summary

As stated in #192092 , the labels of filter controls were mis-aligned.
This was due to some changes in EUI were conflicting with our custom
styling. This PR removes the custom styling.

### Before


![grafik](https://github.com/user-attachments/assets/f167f909-6fff-442e-9ed8-a9781bb52bd1)

### Issues with Error state

It looks like recent PR #190636 on 03-Sept made the controls compact but
the error state was left out. This PR fixes that. I would request
@elastic/kibana-presentation team to review it once.
 
<img width="1920" alt="grafik"
src="https://github.com/user-attachments/assets/4025c79f-2602-4221-a136-436b6759096f">


### After

Below video shows fixes in success, loading and error states.
@elastic/response-ops team, Could you please check in other areas as
well where these filters are used. Thanks.



https://github.com/user-attachments/assets/7e0f6035-171c-4a4b-99c6-116ad577a019
2024-09-09 06:41:54 -05:00
Jean-Louis Leysens
abe016c0b4
[HTTP] Router validation discrimination (#190300)
## Summary

Help TS better discriminate between types in our Router validation
union.
2024-09-09 05:04:37 -05:00
Vadim Kibana
ec90430d4b
[ES|QL] Correctly format column nodes (#192343)
## Summary

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


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-09-09 04:48:10 -05:00
Drew Tate
361176d62b
[ES|QL] Fix grok and dissect behavior (#192230)
## Summary
Fix https://github.com/elastic/kibana/issues/192140



https://github.com/user-attachments/assets/c2fc5539-0416-4c0a-82ef-b61b179d53dc



### 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
2024-09-09 04:41:02 -05:00
Luke Elmers
b6287708f6
Adds AGPL 3.0 license (#192025)
Updates files outside of x-pack to be triple-licensed under Elastic
License 2.0, AGPL 3.0, or SSPL 1.0.
2024-09-06 19:02:41 -06:00
Philippe Oberti
d968cc0929
[Security Solution][Alert Details] - push and overlay expandable flyout (#182615)
## Summary

This PR adds a new functionality to the `kbn-expandable-flyout` package
and its usage in the Security Solution application.

The package's flyout now support to be rendered in `overlay` or `push`
mode, following [EUI's
recommendation](https://eui.elastic.co/#/layout/flyout#push-versus-overlay).
A gear icon button is rendered in the top right corner, next to the
close button. When clicked, a menu appears where users can select `push`
or `overlay` values. `overlay` is the default value. If `push` is
selected, a `Reset to default` empty button can be used to reset to
`overlay`.

Overlay option selected (by default)
![Screenshot 2024-09-04 at 12 10
34 PM](https://github.com/user-attachments/assets/87f57238-9b44-4d29-9516-9eb329c49bb2)

Push option selected
![Screenshot 2024-09-04 at 12 10
42 PM](https://github.com/user-attachments/assets/80e7879a-b238-46ba-9c13-2c8e236e138f)

The flyout should be toggled between `overlay` and `push` mode in all
the pages it's been currently used in:
- alerts page
- rule creation page
- explore pages (host, users...)
- case detail page


https://github.com/user-attachments/assets/b4cec138-802c-430d-8f37-01258e6afef3

But the flyout cannot be set to `push` mode when opened from Timeline.
Timeline is a modal (an EUI Portal to be precise), and getting the
portal as well as the overlay mask to correctly resize according to the
flyout's width (which is dynamic, changes with the screen size and also
changes if the flyout is in collapsed or expanded mode) is very
difficult.
A future PR might add this functionality to TImeline. At this time, the
flyout offers the option to disable the `push/overlay` toggle as well as
an icon to show a tooltip to explain why.


https://github.com/user-attachments/assets/e00961c8-cc75-4eb9-b34d-544bc4391d5c

#### Notes

The package also offers a way to hide the gear icon entirely. In the
future, we might need a bit more flexibility if we want to be able to
show the gear icon with options others than the `push/overlay` entry.

Finally the state of the flyout type (`overlay` vs `push`) is saved in
local storage so that users don't have to set the value over and over
again. This state is persisted within the `kbn-expandable-flyout`
package so that developers don't have to worry about setting it up. The
package uses its internal `urlKey` to guarantee that the key used to
save in localStorage is unique. This means that `memory` flyouts cannot
persist the `push` or `overlay` states, this is expected.


500315b5-07d4-4498-aab9-ee2e2be0253b

### Notes

The package's README has been updated.
New Storybook stories have been added to reflect the new push/overlay
functionality.

https://github.com/elastic/kibana/issues/182593
2024-09-06 15:16:47 -05:00
Jon
37dff6429e
Revert "[Docs] Refresh dashboards docs (#191129)" (#192295)
This reverts commit 6d87f5f5e7.


https://buildkite.com/elastic/docs-build-pr/builds/139739#0191c867-8422-4698-a8a5-d800f6abac8d
2024-09-06 13:31:51 -05:00
florent-leborgne
6d87f5f5e7
[Docs] Refresh dashboards docs (#191129)
## Summary

This PR updates the structure of the Dashboards docs and refreshes some
outdated parts of the content.
More updates will be made in future PRs to refresh screenshots and to
refresh the content more in depth.

This new structure and edits:
- distribute the pages in more user-oriented identified themes, for
better findability, scanning, and to ease possible integration of some
of these pages into in-app documentation.
- are more future proof to evolve along with upcoming features.

~I'll leave this PR as a draft until I resolve some link dependencies
coming from other docs sources and check some additional bits of
content.~

Preview available on demand on Slack.

Closes: https://github.com/elastic/platform-docs-team/issues/408 (I'll
create separate issues for remaining items)
Closes: https://github.com/elastic/platform-docs-team/issues/413
Closes: https://github.com/elastic/platform-docs-team/issues/418
2024-09-06 17:18:46 +02:00
Julia Rechkunova
c8ecc31760
[Discover][UnifiedDataTable] Fix Display settings popover when sample size is not a multiple of 10 (#192152)
- Closes https://github.com/elastic/kibana/issues/192147

## Summary

This PR fixes the bug with `EuiRange` usage in Display settings popover.

### Testing

Set a random value to `discover:sampleSize` like `9995`. Reload the page
and navigate to Discover. Now it should not crash when user presses
Display settings button.

<img width="1222" alt="Screenshot 2024-09-05 at 08 40 46"
src="https://github.com/user-attachments/assets/07145546-0220-4599-b02b-9ade1ab08eee">


### 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
2024-09-06 09:20:10 -05:00
Marshall Main
3cc7029197
[Security Solution] Quickstart script tooling for Detections and Response (#190634)
## Summary

Creates CLI script tooling for building data, rules, exceptions, and
lists in any (local, cloud, serverless) environment for manual testing.
The initial commits here add generated clients for accessing security
solution, exceptions, and lists APIs and a placeholder script where
those clients are set up for use. See README for more details.

Much of the code in this PR is auto-generated clients. The hand written
code is intended to be primarily in `quickstart/modules/`, where we can
add wrapper code to simplify the process for common test environment
setup. For example, `createValueListException` takes an array of items
and some metadata and automatically creates a new value list and an
exception that references that value list. `/modules/data/` contains
functions to generate documents of arbitrary size, and we can add more
functions to create various other types of documents.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-09-06 06:41:57 -07:00
Carlos Crespo
7ad92ba86f
[Infra] Attempt to fix flaky test (#192091)
fixes [#191806](https://github.com/elastic/kibana/issues/191806)

## Summary

It was a weird problem that could only be reproduced by running the
host_view test after the node_details test. The cause was that the
synthtrace data was not fully cleaned in between tests
2024-09-06 06:08:03 -05:00
Milton Hultgren
b9319a6ad4
[EEM] Migrate to using @kbn/server-route-repository (#191102)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-09-06 04:11:28 -05:00
Mykola Harmash
8a429b5953
[Onboarding] AWS Firehose Flow (#187904)
Closes https://github.com/elastic/kibana/issues/187249
Closes https://github.com/elastic/kibana/issues/190792
Closes https://github.com/elastic/kibana/issues/190793

This change adds a new Firehose quickstart flow and replaces the old one
in the onboarding recommendations.

The new card is only visible on Cloud deployments, but you can still
access the flow locally via `app/observabilityOnboarding/firehose` path
if needed.

![CleanShot 2024-08-02 at 16 23
35@2x](https://github.com/user-attachments/assets/aaba2aec-e17e-410d-87b5-a183586c2ac0)

### How to test

You going to need an AWS account. You can use just a personal one or
"Elastic Observability" account which you can access through Okta (type
"AWS" in Okta's search and you should see "AWS - Elastic
Observability").

In case you decide to use the shared "Elastic Observability" account,
make sure it does not already has
`Elastic-CloudwatchLogsAndMetricsToFirehose` CloudFormation stack left
from the previous tester. Feel free to delete it if it's there.

You also need to [install and setup AWS
CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
In case you use "Elastic Observability" account here is [the instruction
to get CLI
credentials.](https://github.com/elastic/observability-dev/blob/main/docs/how-we-work/aws-onboarding.md#programmatic-access-for-developers).

1. In AWS account, create a few entities that generate logs and put them
into a CloudWatch log group (see instructions below for a few services).
2. Generate some logs by accessing the entities that you've created and
make sure they appear in CloudWatch (mind that there is a ~1 minute
delay). **If you don't see anything in CloudWatch, there is no point in
proceeding further, make sure to fix your AWS setup before starting the
flow in Kibana.**
3. Go to the [serverless Kibana instance deployed from this
PR](https://issue-serverless-skhgw-pr187904-e0f30a.kb.eu-west-1.aws.qa.elastic.cloud)
4. Add Data → Collect and analyze logs → View AWS Collection → Firehose
quickstart
5. Open the Firehose flow and copy the command snippet
6. Run the command in your terminal. It should succeed and output the
new Stack ID.
7. Wait for the stack to finish creating. The quickstart flow screen in
Kibana has a command to check current status or you can monitor it
directly in AWS.
8. Generate some some logs by accessing the AWS services you've created.
9. Go back to the Kibana screen, after a minute or so incoming logs
should be detected and corresponding AWS service will be highlighted.
10. Expand one of the detected services and navigate the the suggested
dashboard, make sure you see some data there.


### Example AWS Services Configs

**Before creating any resources, make sure you're in the same region
(top right corner in AWS Console) you've used while configuring AWS
CLI.**

#### API Gateway

1. [Create an IAM
role](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html#set-up-access-logging-permissions)
to grant API Gateway permissions to write into a CloudWatch log groups
1. Copy the ARN of the created role
1. Open "CloudWatch" in AWS and select "Log groups" in the sidebar
1. Create a new log group with default parameters
1. Copy the ARN of the new group
1. Open **API Gateway** in AWS
1. Navigate to "Settings" in the sidebar
1. In the "Logging" section click "Edit" and paste the ARN of the IAM
role you created in step 1. Hit "Save changes"
1. Now go back to "APIs" in the sidebar and click "Create API"
1. In "REST API" click "Build"
1. Select "Example API" and click "Create API"
1. Click on "Deploy API"
1. For "Stage" dropdown select "New stage", give it any name and click
"Deploy"
1. You will now see "Invoke URL", you can use it later to access this
API and generate logs
1. Scroll to "Logs and tracing" section and click "Edit"
1. In the dropdown select "Full request and response logs"
1. Toggle "Custom access logging"
1. Paste the ARN of the CloudWatch log group you've created in step 4.
But make sure to not include ":*" symbols at the end.
1. In the log format input paste [this format from our
docs](https://www.elastic.co/docs/current/integrations/aws/apigateway#data-streams)
and click "Save"
```
{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","caller":"$context.identity.caller","user":"$context.identity.user","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength","apiId":"$context.apiId","domainName":"$context.domainName","stage":"$context.stage"}
```
1. Now when you access this API, you should see logs coming into the
CloudWatch group.

#### WAF

**This sets up WAF for an API Gateway, see above if you don't have one
already.**

1. Open WAF in AWS
3. Click "Web ACLs" in the sidebar
4. Click "Create web ACL"
5. Select the region where you've created your API Gateway and give ACL
any name
6. In the "Associated AWS resources" section click "Add AWS resources"
7. Select you API Gateway and click "Add"
8. Click "Next"
9. Create some basic rule, for example to block requests that have a
specific parameter in the URL
10. Click through the other configuration step leaving everything as is
and then finally click "Create web ACL"
11. Select the created ACL and click on the "Logging and metrics" tab
12. Click "Edit" in "Logging" section 
13. Click "Create new" in the "Amazon CloudWatch Logs log group" section
14. Create a new log group. **The log group name should start with
`aws-waf-logs-`**.
15. Select the new group in the dropdown and click "Save"
16. Now you should have logs generated and saved into the log group when
you access your API gateway

#### VPC

1. [Create an IAM
role](https://docs.aws.amazon.com/vpc/latest/tgw/flow-logs-cwl.html#flow-logs-iam)
to write flow logs to CloudWatch log groups.
3. Create and EC2 instance and configure there some HTTP server like
Nginx. Using Docker would probably be the fastest way.
4. Create a CloudWatch log group with default parameters
5. Open "VPC" in AWS and select the VPC where you've created the EC2
instance.
6. Click the "Flow logs" tab and click "Create flow logs"
7. In "Maximum aggregation interval" select 1 minute to see logs faster
8. In "Destination log group" select the log group you've created in
step 3
9. In "IAM role" select the role you've created in step 1
10. Click "Create flow log"
11. Now when you access your EC2 instance, you should see logs in the
CloudWatch log group
2024-09-06 04:11:11 -05:00
Tre
666ab3dcfb
[FTR] Refactor SuperTest provider to the kbn-ftr-common-functional-services pkg (#191999)
Move supertest from global folder to specific package.

Resolves: https://github.com/elastic/kibana/issues/191970
2024-09-05 20:05:45 +01:00
Quynh Nguyen (Quinn)
6778a00a7e
[ES|QL] Add all (*) item in list of suggestions for COUNT (#192205)
## Summary

Part of https://github.com/elastic/kibana/issues/176033. This PR adds
`All (*)` item in list of suggestions for `STATS ... COUNT(/)`



https://github.com/user-attachments/assets/e303817a-3664-4838-aec6-843d1ef75e1f


### 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
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
2024-09-05 13:03:08 -05:00
Janki Salvi
acd1897f4e
[ResponseOps][Cases] Allow users to select template in the case action (#190701)
## Summary

Resolves https://github.com/elastic/kibana/issues/187203

This PR allows users to select cases template while creating case
action. It will help users to create cases with specific templates for a
rule.

<img width="620" alt="Screenshot 2024-08-30 at 13 17 37"
src="https://github.com/user-attachments/assets/9a9225f2-3af4-4922-a935-fae3cfe0cb8e">


### How to verify

- Create a template in `cases > settings`
- Create a rule
- Add case action and select the template
- Save rule
- Verify the case generated by case action is as per template
- Also verify case generated by case action without any template works
as before.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))

### For maintainers

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


### Release notes:
Allow users to select template while adding a case action in the rule.
2024-09-05 17:19:27 +01:00
Maxim Palenov
3c4e50249d
[HTTP/OAS] Sort OpenAPI tags by x-displayName when it is set (#191732)
**Relates to:** https://github.com/elastic/kibana/issues/186356

## Summary

This PR implements proper tags sorting when a custom tag's `x-displayName` property is set. It allows to display tags properly at the API reference documentation page where `x-displayName` instead of tag's name when it's presented.
2024-09-05 10:48:01 -05:00
Samiul Monir
fbe2da03b9
[Semantic Text] Adding icon for Semantic Text (#191004)
## Summary

1. Adding Icon for Semantic Text`.
2. Additionally updating the icon in the Documents view tab in the
`indices` page for both `dense vector` and `sparse vector`

### Screenshots
Documents Tab in Indices:
![Screenshot 2024-09-04 at 2 37
53 PM](https://github.com/user-attachments/assets/38ad7dce-6196-43e7-8a12-3691c576ce17)

Single Document flyout
![Screenshot 2024-09-04 at 2 23
52 PM](https://github.com/user-attachments/assets/efdbd000-ea12-48b7-b505-5df39f63ef9b)

Discover:
![Screenshot 2024-09-04 at 2 20
40 PM](https://github.com/user-attachments/assets/c8d59704-24cf-4bd6-bbab-f1fe9c819473)



### Checklist

Delete any items that are not applicable to this PR.

- [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)
2024-09-05 11:08:34 -04:00
Marta Bondyra
9e8244f470
[Lens] Chart switch redesign (#187475)
## Summary

1. The main change is chart switch redesign:

<img width="401" alt="Screenshot 2024-08-26 at 15 08 50"
src="https://github.com/user-attachments/assets/a2da17d5-b068-4eeb-9723-0b64cc6cbcf0">

2. Toolbar changes for most of the visualization (refer to design files)

<img width="930" alt="Screenshot 2024-08-26 at 15 09 14"
src="https://github.com/user-attachments/assets/7f76aed3-99d8-438b-b304-91042c99381d">

<img width="942" alt="Screenshot 2024-08-26 at 15 08 56"
src="https://github.com/user-attachments/assets/5bed1916-8723-42b5-8f7d-4b363c5736c9">



#### Subtasks
- reorders the elements in the charts switch
- redesigns chart switch visually
- adds deprecated group (metric)
- changes the add subtype layer menu
- adds description to chart switch
- subselect for bar/gauge visualizations
- adds border to workspace panel
- changes `boxesHorizontal` icon to `boxesVertical`

Resolves https://github.com/elastic/kibana/issues/179260 also fixes
https://github.com/elastic/kibana/issues/182677
switching between chart types
2024-09-05 12:32:45 +02:00
Eyo O. Eyo
8627a57d6f
prefer attribute selector for selecting element ids (#191632)
## Summary

This PR fixes an error that was discovered ahead of the react 18
upgrade(https://github.com/elastic/kibana/issues/138222).

Why are we concerned about this? Whilst `useId` isn't directly used in
our codebase, it is utilized by EUI's `useGeneratedHtmlId` hook, see
https://github.com/elastic/eui/blob/v95.8.0/packages/eui/src/services/accessibility/html_id_generator.ts#L73-L74,
the useId hook returns a string that is bounded by colons; if passed to
`document.querySelector` as an ID selector, they would cause errors (see
https://github.com/facebook/react/issues/26839). As a result, instances
where these IDs are being used with `querySelector` have been modified
to instead use an attribute selector equivalent to the corresponding ID
selector.

<!-- ### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-05 04:46:24 -05:00
Tre
69665cecd0
[FTR] Refactor test/common/services/* -> packages/kbn-ftr-common-functional-[ui-]services/* (#191805)
## Summary

Moving common services to respective new homes.

This PR is revived from a previously
[merged](09a365850e)
and [reverted PR](https://github.com/elastic/kibana/pull/191765) as
[detailed
here](https://github.com/elastic/kibana/pull/189051#issuecomment-2318999361).
- This was due to "extra" tests being applied to
https://github.com/elastic/kibana/pull/191708
- These "extra" tests were applied as
https://github.com/elastic/kibana/pull/191708 changes files within
`x-pack/plugins/observability_solution/` as configured
[here](https://github.com/elastic/kibana/blob/main/.buildkite/scripts/pipelines/pull_request/pipeline.ts#L129)

### Why these failures were not caught in the original
[PR](https://github.com/elastic/kibana/pull/189051)
The pipeline is generated at runtime, and the original
[PR](https://github.com/elastic/kibana/pull/189051) had zero changes
under `x-pack/plugins/observability_solution/`
 
 ## Changes on top of original PR
 - Add `ci:all-cypress-suites` label to run extra tests
- Add `services` stanza to which contains the missing references by
spreading the services from `@kbn/ftr-common-functional-services` &&
`@kbn/ftr-common-functional-ui-services` into the stanza, for the
following:
   - `x-pack/plugins/observability_solution/synthetics/e2e/config.ts`
   - `x-pack/plugins/observability_solution/apm/ftr_e2e/ftr_config.ts` 
-
`x-pack/plugins/observability_solution/observability_onboarding/e2e/ftr_config.ts`
   - `x-pack/plugins/observability_solution/profiling/e2e/ftr_config.ts`
   - `x-pack/plugins/observability_solution/synthetics/e2e/config.ts`
   - `x-pack/plugins/observability_solution/uptime/e2e/config.ts`
 

 
 
Blocked by: https://github.com/elastic/kibana/issues/191961
Resolves: https://github.com/elastic/kibana/issues/188541

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-05 10:00:55 +01:00
Mark Hopkin
8be089be59
[Entity Analytics] MKI test failure fixes (#190182)
## Summary

closes [#10176](https://github.com/elastic/security-team/issues/10176)

I've been looking into a few of our flaky tests and come up with a
couple of actions, I will comment on them individually.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-05 09:43:40 +01:00
Quynh Nguyen (Quinn)
0f30af937f
[ES|QL] Use Kibana's bar target preference for Add date histogram snippet (#192038)
## Summary

This PR updates the `Add date histogram` snippet in the ES|QL text
editor to use Kibana's bar target preference/setting.


https://github.com/user-attachments/assets/812958d0-89f0-4414-b1fb-a600d1620d63


 

### 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
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
2024-09-04 12:12:42 -05:00
Kibana Machine
8cc7791149
[ES|QL] Update grammars (#192106)
This PR updates the ES|QL grammars (lexer and parser) to match the
latest version in Elasticsearch.

---------

Co-authored-by: Drew Tate <andrew.tate@elastic.co>
2024-09-04 11:48:54 -05:00
Kibana Machine
d7e5559730
[ES|QL] Update function metadata (#192099)
This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.
2024-09-04 11:19:21 -05:00
Anton Dosov
8199dd0407
[react@18] (Part 2) fix useCallback breaking type changes (#191659)
## Summary

This is a prep for https://github.com/elastic/kibana/issues/138222 and
follow up to https://github.com/elastic/kibana/pull/182344. These are
post-merge leftovers and new instances from the previous
[run](https://github.com/elastic/kibana/pull/182344)

In React@18 useCallback types have changed that introducing breaking
changes:
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/46691

Found potential issues using:

https://github.com/eps1lon/types-react-codemod?tab=readme-ov-file#usecallback-implicit-any

I tried to do my best to fix the type where possible, but there are some
complicated cases where I kept `any` after some struggling. Please feel
free to push improvements directly.

---------
Co-authored-by: Jatin Kathuria <jtn.kathuria@gmail.com>
2024-09-04 10:00:40 -05:00
Drew Tate
a2dbebca31
[ES|QL] adapt to dev mode grammar gating (#192027)
## Summary

Pulls in the changes ES team introduced in the ES|QL grammar in
https://github.com/elastic/elasticsearch/pull/111995. Nothing should
change as far as our functionality except that commands the ES team
marks with the `DEV_` prefix will no longer show up in our validation
errors.

**Before**
<img width="859" alt="Screenshot 2024-09-03 at 3 11 21 PM"
src="https://github.com/user-attachments/assets/69dee5f1-dd26-4d85-b83b-a0b4689a3c09">

**After**
<img width="848" alt="Screenshot 2024-09-03 at 3 10 35 PM"
src="https://github.com/user-attachments/assets/31c07a0a-4e59-4e11-af72-a1eb7b7f1235">

Successful ES|QL grammar sync run:
https://buildkite.com/elastic/kibana-es-ql-grammar-sync/builds/53
2024-09-04 09:32:40 -05:00
Yngrid Coello
1b2cbf15d8
[Dataset quality] Enable page for synthetics (#191846)
Closes https://github.com/elastic/observability-dev/issues/3457.

This PR enables Dataset quality for being used for synthetics datasets.

### Changes
- Added `synthetics` to `KNOWN_TYPES` array.
- Permissions were updated in `Data_quality` plugin.


https://github.com/user-attachments/assets/e9945012-166b-4704-bb73-11e6fe6eed76
2024-09-04 15:21:17 +02:00
Quynh Nguyen (Quinn)
3e47faff40
[ES|QL] Add named time system suggestions for date expressions (#192012)
## Summary

This PR fixes a regression where named time system suggestions like
(?t_start, ?t_end or Choose from time picker) were not being suggested
for date expressions


https://github.com/user-attachments/assets/cef899d8-b432-49a9-b09c-0fb5f719a721

This might have been introduced in
https://github.com/elastic/kibana/pull/189941/files#diff-2a96c81cce17aff8cb8f0254f313903c2312b770ae08b3f4b938af0824d2e0fcL1149

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-04 07:47:17 -05:00
Sander Philipse
d21d3987e8
Add publicBaseUrl to Elasticsearch config (#191837)
## Summary

This adds a publicBaseUrl to the Elasticsearch plugin config so users
can set a publicly accessible URL for Elasticsearch.

---------

Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
2024-09-04 13:45:27 +02:00
Sébastien Loix
7aae05da09
[Stateful sidenav] Add ML group menu in oblt & search (#190682) 2024-09-04 04:03:14 -05:00
Davis McPhee
2629fa82a8
[Discover] [Unified Data Table] Improve Discover / Unified Data Table performance in ES|QL mode (#191249)
## Summary

This PR includes several performance improvements for ES|QL mode in
Discover:
- Memoize `UnifiedDataTableRenderCellValue` to reduce re-renders.
- Show the loading spinner immediately on state changes that should
trigger a refetch so that changed state isn't applied to the grid before
the fetch completes. This also helps to reduce re-renders on state
changes.
- Replace [`EuiDataGrid` in-memory
sorting](https://eui.elastic.co/#/tabular-content/data-grid-advanced#data-grid-in-memory)
with a custom implementation using the `@kbn/sort-predicates` package
(the same one Lens uses for its data grid). EUI in-memory sorting has a
drastic impact on performance because it renders the entire grid off
screen in order to parse cell values, detect their schema, and then sort
the rows. This can cause rendering delays of several seconds for larger
datasets on each render of the data grid. The new approach will sort in
memory based on actual field values and pass the sorted rows to the data
grid, which is both much more performant as well as improving the
sorting behaviour across field types.
- Use the `overscanRowCount` option from
[react-window](https://github.com/bvaughn/react-window) to render some
additional rows outside of view in the data grid, which minimizes pop-in
of rows while scrolling quickly.

There are also a couple of bug fixes included in the PR as a result of
the new sorting behaviour:
- Numeric columns are now sorted correctly where previously they used
alphabetic sorting.
- The "Copy column" action in data grid columns now correctly copies the
column values in the current sort order instead of copying them unsorted
as it used to.

Before - 66,904 `UnifiedDataTableRenderCellValue` render calls:


https://github.com/user-attachments/assets/04caca0d-35e7-421c-b8e3-5a37a1d65177

After - 424 `UnifiedDataTableRenderCellValue` render calls:


https://github.com/user-attachments/assets/dba1a106-6bd6-4f1b-b60e-4741228c488b

Before profile:
<img width="300" alt="profile_old"
src="https://github.com/user-attachments/assets/44c07f30-55d2-44ab-a9b7-a912fa7beca1">

After profile:
<img width="300" alt="profile_new"
src="https://github.com/user-attachments/assets/d61cfd2a-8ac0-45bb-9afa-d3d97b0d03ce">

Before scrolling:


https://github.com/user-attachments/assets/8d9dbdbd-df3e-48df-af9a-539deda8d5ea

After scrolling:


https://github.com/user-attachments/assets/d6309275-e00d-44ee-a59f-2d1e5d30bb60

### Checklist

- [ ] 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
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)

### 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>
Co-authored-by: Jatin Kathuria <jtn.kathuria@gmail.com>
2024-09-04 00:26:49 -03:00
Achyut Jhunjhunwala
0be5efd71b
[Dataset Quality] Create the basic degraded fields flyout (#191597)
## Summary

Closes - https://github.com/elastic/kibana/issues/190328

Delivered as part of this PR

- [x] Added a new Degraded Field Flyout with a basic List of data point
for the degraded Field
- [x] A new endpoint to display possible values. This endpoint will
query to get the latest values, maximum 4
- [x] URL supports Flyout state
- [x] API Tests for the new endpoint
- [x] E2E tests for the flyout


## Screenshot

<img width="1903" alt="image"
src="https://github.com/user-attachments/assets/9bc20d15-d52b-4d1e-827f-ab1444e27128">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-09-03 12:25:09 -05:00
Clint Andrew Hall
c9c9054ed9
[46622] Fix advanced setting text for dark mode. (#191756)
Fixes #46622.
2024-09-03 10:42:37 -05:00
Kevin Delemme
326b305271
feat(rca): update items and investigation params (#191766) 2024-09-03 11:17:39 -04:00
Eyo O. Eyo
4bf2f97451
fix archive path for chromium download (#191953)
## Summary

This PR is a follow up to the work that's been done to make it
relatively straight forward to backport puppeteer updates to the 7.17
branch in https://github.com/elastic/kibana/pull/188390.

This change ensures the archive path for chromium doesn't get installed
outside of the kibana directory, the previous expression resulted in an
archive path outside of the kibana directory which unfortunately could
result in a resolution of a path that kibana has no permissions to write
to, depending on where kibana is being executed from.

## How to test
 
- Pull this PR and delete the `.chromium` directory, for whatever
platform this PR is is been tested on we should get no errors about
installing the chromium and we should see the appropriate chromium
archive for the os platform available in the `.chromium` that would get
created.


<!--

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
-->
2024-09-03 16:51:51 +02:00
mohamedhamed-ahmed
913b8f342d
[Synthtrace] Support Non-ECS Logs (#191086)
closes [3759](https://github.com/elastic/observability-dev/issues/3759)


## 📝  Summary

This PR creates a new scenario with different non ECS fields  as below :
- log.level-> severity
- message -> msg
- service.name -> svc
- host.name -> hostname
- New field:
thisisaverylongfieldnamethatevendoesnotcontainanyspaceswhyitcouldpotentiallybreakouruiinseveralplaces

The above fields are applied with different variances as below :

- In DSNS data stream with @timestamp
- Outside of DSNS with @timestamp (e.g. cloud-logs-*, etc.)
- Outside of DSNS without @timestamp (replaced by “date”)

## 🎥 Demo

`node scripts/synthtrace simple_non_ecs_logs.ts`


https://github.com/user-attachments/assets/d86cadeb-fd2a-4c42-8dfe-0375ecfd9622
2024-09-03 09:11:17 -05:00
Thom Heymann
d14432eb63
[Observability Onboarding] Split Agent config into multiple files (#191241)
Resolves #191917

## Summary

Splits up the Agent config generated during auto-detect based onboarding
into multiple files.

This makes it easier for users to make changes following the initial
onboarding.

The backup feature has also been updated to include files inside
`inputs.d` directory.

## Example

Before this change the auto-detect script would write all settings to
`elastic-agent.yml` file.

After this change the script writes one separate config file for each
integrations that was detected, for example:

1. `elastic-agent.yml` - Contains global settings
2. `inputs.d/system.yml` - Contains inputs config for System integration
3. `inputs.d/docker.yml` - Contains inputs config for Docker integration

## Screenshot

<img width="1039" alt="Screenshot 2024-08-23 at 16 49 34"
src="https://github.com/user-attachments/assets/17bb7b01-d40e-4491-8bb5-20daf115938a">
2024-09-03 12:12:05 +01:00
Tomasz Ciecierski
bac95ead5b
[EDR Workflows] Explicitly export type in open api autogenerated ZOD types (#191830) 2024-09-03 09:53:57 +02:00
Ryan Keairns
3a352bcf7f
[ES|QL] [Discover] Design changes for error messages (#191320)
Closes #177547 

## Summary

Improve the UI for error messages when working with Discover and the
ES|QL editor.
Desired outcome: users correctly determine the error is with the query
not the application itself

Changes included:
- Apply different `EuiEmptyPrompt` props to arrive at something less
red/heavy
- Provide a contextually-relevant link to the ES|QL reference docs
- Changed the popover in the editor footer to be more code-editor like
(compact)
- With the overall amount of whitespace, add subdued background color
the unified field list
- Use a plain text treatment in the field list empty state instead of a
yellow, warning callout

### Before and after

_New empty prompt design (changes EUI props)_
_Change field list empty state from yellow callout_
_Add background color to field list_

**ES|QL mode**
![CleanShot 2024-08-27 at 10 48
07@2x](https://github.com/user-attachments/assets/44ad591e-da8f-4ec4-a3b3-68a6bd409978)

**Classic mode**
![CleanShot 2024-08-26 at 15 04
58@2x](https://github.com/user-attachments/assets/c7f8d276-035a-4057-b807-8c5c9f3de567)

_Apply code-editor styles to popover in info bar/footer (more compact;
remove header and arrow)_

![CleanShot 2024-08-27 at 10 46
10@2x](https://github.com/user-attachments/assets/ebb72524-c2ef-4e44-8fed-9a20dfc4214b)


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-09-03 09:51:27 +02:00
Julia Rechkunova
00174635b0
[Discover] Context aware Single Document & Surrounding Documents pages (#190540)
- Closes https://github.com/elastic/kibana/issues/188178

## Summary

This PR makes sure to resolve profiles on:
- [x] Single document page (also added doc viewer extension support)
- [x] Surrounding documents page (also added cell renderes support)

### 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: Davis McPhee <davis.mcphee@elastic.co>
2024-09-02 06:23:54 -05:00
Drew Tate
c873e721b0
[ES|QL] add comments to ES|QL theme (#191872)
## Summary

Close https://github.com/elastic/kibana/issues/191865
Close https://github.com/elastic/kibana/issues/190357
2024-08-30 20:52:04 -06:00
Cee Chen
a88cfc825d
Upgrade EUI to v95.9.0 (#190752)
`v95.7.0`  `v95.9.0`

> [!CAUTION]
> This PR contains the final set of Emotion conversions for all EuiForm
components.
> If your plugin contains any custom CSS/styling to **EuiFormRow,
EuiFormControlLayout, EuiCheckbox, EuiRadio, or EuiSwitch**, ⚠️ make
sure to QA your UI to ensure no visual regressions have occurred! ⚠️

---

## [`v95.9.0`](https://github.com/elastic/eui/releases/v95.9.0)

- Updated `EuiSearchBar`'s optional `box.schema` prop with a new
`recognizedFields` configuration. This allows specifying the phrases
that will be parsed as field clauses
([#7960](https://github.com/elastic/eui/pull/7960))
- Updated `EuiIcon` with a new `tokenSemanticText` glyph
([#7971](https://github.com/elastic/eui/pull/7971))
- Added support for TypeScript 5
([#7980](https://github.com/elastic/eui/pull/7980))

**Bug fixes**

- Fixed `EuiSelectableTemplateSitewide` styles when used within a
dark-themed `EuiHeader`
([#7977](https://github.com/elastic/eui/pull/7977))

## [`v95.8.0`](https://github.com/elastic/eui/releases/v95.8.0)

- Updated `EuiHeaderLinks`'s mobile menu to set a slight popover padding
by default ([#7961](https://github.com/elastic/eui/pull/7961))
- This can be overridden via `popoverProps.panelPaddingSize` if needed.
- Updated `EuiHeaderLink` to default to a size of `s` (down from `m`)
([#7961](https://github.com/elastic/eui/pull/7961))

**Accessibility**

- Updated the `aria-label` attribute for the `EuiFieldSearch` clear
button ([#7970](https://github.com/elastic/eui/pull/7970))

**Bug fixes**

- Fixed a visual bug with `<EuiDualRange showInput="inputWithPopover"
/>` form controls ([#7957](https://github.com/elastic/eui/pull/7957))

**Deprecations**

- Deprecated `EuiFormRow`'s `columnCompressedSwitch` display prop. Use
`columnCompressed` instead, which will automatically account for child
`EuiSwitch`es ([#7968](https://github.com/elastic/eui/pull/7968))
- Deprecated `EuiFormRow`'s `rowCompressed` display prop. Use `row`
instead for vertical forms, or `centerCompressed` for inline forms
([#7968](https://github.com/elastic/eui/pull/7968))
- (Styling) Updated `EuiFormRow`'s `hasEmptySpaceLabel` prop to no
longer attempt to automatically align its content to a vertical center.
Use the `display="center"` prop for that instead
([#7968](https://github.com/elastic/eui/pull/7968))

**CSS-in-JS conversions**

- Converted `EuiFormControlLayout` to Emotion
([#7954](https://github.com/elastic/eui/pull/7954))
- Removed `.euiFormControlLayout--*icons` classNames and
`--eui-form-control-layout-icons-padding` CSS var. Use
`--euiFormControlRightIconsCount` or `--euiFormControlLeftIconsCount`
instead
- Converted `EuiFormLayoutDelimited` to Emotion
([#7957](https://github.com/elastic/eui/pull/7957))
- Fixed `cloneElementWithCss` throwing an error when used multiple times
without a `key` prop ([#7957](https://github.com/elastic/eui/pull/7957))
- Updated `cloneElementWithCss` utility to support a third argument that
allows prepending vs. appending the cloned Emotion css className
([#7957](https://github.com/elastic/eui/pull/7957))
- Removed `@euiFormControlLayoutClearIcon` Sass mixin
([#7959](https://github.com/elastic/eui/pull/7959))
- Converted `EuiDescribedFormGroup` to Emotion
([#7964](https://github.com/elastic/eui/pull/7964))
- Converted `EuiForm`, `EuiFormHelpText`, and `EuiFormErrorText` to
Emotion ([#7966](https://github.com/elastic/eui/pull/7966))
- Converted `EuiFormLabel` and `EuiFormLegend` to Emotion; Removed
`@euiFormLabel` mixin
([#7967](https://github.com/elastic/eui/pull/7967))
- Converted `EuiFormRow` to Emotion
([#7968](https://github.com/elastic/eui/pull/7968))
- Converted `EuiCheckbox` to Emotion
([#7969](https://github.com/elastic/eui/pull/7969))
- Converted `EuiRadio` to Emotion
([#7969](https://github.com/elastic/eui/pull/7969))
- Converted `EuiSwitch` to Emotion
([#7969](https://github.com/elastic/eui/pull/7969))
- Removed the following Sass variables:
([#7969](https://github.com/elastic/eui/pull/7969))
  - `$euiFormCustomControlDisabledIconColor`
  - `$euiFormCustomControlBorderColor`
  - `$euiRadioSize`
  - `$euiCheckBoxSize`
  - `$euiCheckboxBorderRadius`
  - `$euiSwitchHeight` (and compressed/mini variants)
  - `$euiSwitchWidth` (and compressed/mini variants)
  - `$euiSwitchThumbSize` (and compressed/mini variants)
  - `$euiSwitchIconHeight`
  - `$euiSwitchOffColor`
- Removed the following Sass mixins:
([#7969](https://github.com/elastic/eui/pull/7969))
  - `euiIconBackground`
  - `euiCustomControl`
  - `euiCustomControlSelected`
  - `euiCustomControlDisabled`
  - `euiCustomControlFocused`

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
2024-08-30 17:47:17 -07:00
Quynh Nguyen (Quinn)
70a33f4eb2
[ES|QL] Improve suggestions based on previous function arguments and date suggestions for bucket (#190828)
This PR improves logic for autocomplete suggestions to suggest new
function args based on previous values. For example:


https://github.com/user-attachments/assets/b597cd52-1ca9-479c-b7f0-67ed464b5659


It also adds a new snippet 'Add date histogram' for `stats ... by <>`




https://github.com/user-attachments/assets/994cbc5a-1760-446e-80e5-d9faeae2ba73



As part of this PR, test cases for eval functions were also updated to
cover all possible arguments while avoiding running the same test cases
repetitively. For example:

        'st_contains( / )',
        'st_contains(cartesianPointField,  / )',
        'st_contains(cartesianPointField, cartesianPointField,  / )',
        'st_contains(cartesianPointField, cartesianShapeField,  / )',
        'st_contains(cartesianShapeField,  / )',
        'st_contains(cartesianShapeField, cartesianPointField,  / )',
        'st_contains(cartesianShapeField, cartesianShapeField,  / )',
        'st_contains(geoPointField,  / )',
        'st_contains(geoPointField, geoPointField,  / )',
        'st_contains(geoPointField, geoShapeField,  / )',
        'st_contains(geoShapeField,  / )',
        'st_contains(geoShapeField, geoPointField,  / )',
        'st_contains(geoShapeField, geoShapeField,  / )'

        'mv_slice( / )',
        'mv_slice(booleanField,  / )',
        'mv_slice(booleanField, integerField,  / )',
        'mv_slice(booleanField, integerField, integerField,  / )',
        'mv_slice(cartesianPointField,  / )',
        'mv_slice(cartesianPointField, integerField,  / )',
'mv_slice(cartesianPointField, integerField, integerField, / )',
        'mv_slice(cartesianShapeField,  / )',
        'mv_slice(cartesianShapeField, integerField,  / )',
'mv_slice(cartesianShapeField, integerField, integerField, / )',
        'mv_slice(dateField,  / )',
        'mv_slice(dateField, integerField,  / )',
        'mv_slice(dateField, integerField, integerField,  / )',
        'mv_slice(doubleField,  / )',
        'mv_slice(doubleField, integerField,  / )',
        'mv_slice(doubleField, integerField, integerField,  / )',
        'mv_slice(geoPointField,  / )',
        'mv_slice(geoPointField, integerField,  / )',
        'mv_slice(geoPointField, integerField, integerField,  / )',
        'mv_slice(geoShapeField,  / )',
        'mv_slice(geoShapeField, integerField,  / )',
        'mv_slice(geoShapeField, integerField, integerField,  / )',
        'mv_slice(integerField,  / )',
        'mv_slice(integerField, integerField,  / )',
        'mv_slice(integerField, integerField, integerField,  / )',
        'mv_slice(ipField,  / )',
        'mv_slice(ipField, integerField,  / )',
        'mv_slice(ipField, integerField, integerField,  / )',
        'mv_slice(keywordField,  / )',
        'mv_slice(keywordField, integerField,  / )',
        'mv_slice(keywordField, integerField, integerField,  / )',
        'mv_slice(longField,  / )',
        'mv_slice(longField, integerField,  / )',
        'mv_slice(longField, integerField, integerField,  / )',
        'mv_slice(textField,  / )',
        'mv_slice(textField, integerField,  / )',
        'mv_slice(textField, integerField, integerField,  / )',
        'mv_slice(versionField,  / )',
        'mv_slice(versionField, integerField,  / )',
        'mv_slice(versionField, integerField, integerField,  / )'


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-30 15:01:07 -05:00