Commit graph

81579 commits

Author SHA1 Message Date
Alejandro Fernández Haro
3e1d62ebc4
[Config Service] Use stripUnknownKeys when checking enabled flags (#201579)
## Summary

Resolves #201442.

The underlying issue is that `isEnabledAtPath` validates the entire
config object when it only cares about `.enabled`. This PR performs that
check using `stripUnknownKeys: true`, as we'll perform the actual
validation later on.


### 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-12-02 10:30:09 -06:00
Julia Bardi
5731fb3ca4
[Fleet] replace selectors with getByTestId for speed (#202489)
## Summary

Relates https://github.com/elastic/kibana/issues/199204

Replace getByRole and getByText selectors with getByTestId for speed.
2024-12-02 10:26:39 -06:00
Marco Vettorello
526ef51a12
[Lens] Fix gauge responsive overflow and test unskip (#202323)
## Summary

Fixing the missing overflow in Major Arc/Circle gauge.
Unskipped tests.

close https://github.com/elastic/kibana/issues/193548
fix https://github.com/elastic/kibana/issues/193946
close https://github.com/elastic/kibana/issues/202174
relates to https://github.com/elastic/kibana-operations/issues/199
2024-12-02 17:18:39 +01:00
Sandra G
4eaaf76cdb
[Data Usage] add option for data streams route to return data streams with no size (#201817)
## Summary
- update data_streams route to accept includeZeroStorage flag to make
testing easier. the metering api only collects data once every 30s and
that might be changed to being longer so we can't wait for data to be
aggregated. We can potentially surface this option to the user in the
future.
- unskip data stream api test. will enable in MKI after manual
confirmation it passes with a followup PR.

---------

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
2024-12-02 11:15:54 -05:00
Bena Kansara
c4dc230f2e
[Synthetics TLS certificate] Fix error when opening rule flyout (#202386)
Fixes https://github.com/elastic/kibana/issues/188828
2024-12-02 10:11:12 -06:00
Alejandro Fernández Haro
d2a60cb262
Fix link to the deprecation service docs (#202338)
## Summary

I noticed that the link to Core's deprecation service was broken. This
PR fixes it.


### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
2024-12-02 09:58:26 -06:00
Kibana Machine
35994a4159 skip failing test suite (#196153) 2024-12-03 02:55:42 +11:00
José Luis González
41e8de6e0f
[Search][Ent Search deprecation] Removing VersionMismatchPage (#202407)
## Summary

This PR removes the consumption of the
[VersionMismatchPage](https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx)
component. Where we were informing about version mismatching versions
between Kibana and Enterprise Search. Due to Enterprise Search node will
go away in 9.0 and as a part of this epic:
https://github.com/elastic/search-team/issues/8231


![image](https://github.com/user-attachments/assets/43341d94-8443-4fe3-9126-253ee34b5e92)
2024-12-02 16:51:26 +01:00
Kibana Machine
fc8ca4f3b8
Unauthorized route migration for routes owned by kibana-data-discovery (#198332)
### Authz API migration for unauthorized routes

This PR migrates unauthorized routes owned by your team to a new
security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```

### What to do next?
1. Review the changes in this PR.
2. Elaborate on the reasoning to opt-out of authorization.
3. Routes without a compelling reason to opt-out of authorization should
plan to introduce them as soon as possible.
2. You might need to update your tests to reflect the new security
configuration:
  - If you have snapshot tests that include the route definition.

## Any questions?
If you have any questions or need help with API authorization, please
reach out to the `@elastic/kibana-security` team.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <lukas@elastic.co>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
2024-12-02 08:46:33 -07:00
Alejandro Fernández Haro
5ed54ec93c
[deprecations/dataviews]: Check in all spaces (#202354)
## Summary

In order to show all potential deprecations, the SO request should
include all spaces by appending `namespaces: ['*']`.

This PR adds that, although it doesn't change the test (which, IMO,
should include the offending space). Feel free to commit to this PR or
to create a follow-up (whatever you prefer).

Related: https://github.com/elastic/kibana/issues/202341
2024-12-02 16:40:16 +01:00
Alexey Antonov
6b7d6478b0
fix: [Search:AppSearch:Engines:Documents page]Customize document search modal dialog missing title from announcement (#202452)
Closes: #202427

## Description
Dialog modal visible title should be announced for the users, especially
using assistive technology to know what dialog modal, flyout opened.

## Changes made:

1. aria-labelledby={modalTitleId} attribute was added for mentioned
EuiModal

## Screen
<img width="1135" alt="Screenshot 2024-12-02 at 14 43 16"
src="https://github.com/user-attachments/assets/ce319c22-1ae9-49e1-99e1-7670e5d97993">
2024-12-02 17:27:03 +02:00
Shahzad
93eedff53c
[Synthetics] Sub-feature for managing private locations !! (#201100)
## Summary

Fixes https://github.com/elastic/kibana/issues/200899

Added Synthetics Sub-feature for managing private locations !!

User can configure a sub feature in a role under synthetics to allow
managing private locations ,

with role API it will be with 
```
{
      kibana: [
        {
          feature: {
            uptime: [
              'minimal_all',
              'can_manage_private_locations',
            ],
          },
          spaces: ['*'],
        },
      ],
    }
```



<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6">

Create/delete actions on UI will be disabled 

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75">

## Release note
If you have already modified sub feature for the synthetics/uptime
feature to disable user access for using elastic managed location,
addition of this feature means, they will also will not be able to
manage(add/delete) private locations. Though this will not impact usage
of private locations in monitors. If you want those users to have
ability to add/delete new private locations, you can enable that by
toggle this feature in role ui or via api.
2024-12-02 15:53:26 +01:00
Agustina Nahir Ruidiaz
3daaaa5b8c
[Security Solution] [Onboarding] t1_analyst role blocked from interacting with cards due to missing integration privileges (#202413)
## Summary

This PR temporarily fixes the #201799 issue for Serverless.



https://github.com/user-attachments/assets/604128cb-49b0-4a93-9a15-2a5a0c511883



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] [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-12-02 15:23:56 +01:00
Alejandro Fernández Haro
97dab1030d
[deprecations/test plugin]: Check in all spaces (#202356) 2024-12-02 16:44:40 +03:00
Dzmitry Lemechko
783a97cda0
[renovate] move ownership for faker to team:kibana-visualizations (#202329)
## Summary

@markov00 opened PR to
[migrate](https://github.com/elastic/kibana/pull/201105) from `faker`,
but it probably will take extra time and to keep track let's move its
ownership to `team:kibana-visualizations`

---------

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
2024-12-02 14:39:48 +01:00
Dzmitry Lemechko
1a864ace2f
[chore] update appex-qa owned dependencies (#202360)
## Summary

This PR updates some dev dependencies owned by appex-qa.
[PR](https://github.com/elastic/kibana/pull/200791) by renovate is
trying to update to many things at once 🚋

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-02 14:38:03 +01:00
Søren Louv-Jansen
a63441d461
[Obs AI Assistant] It should be possible to clear the user-specific system prompt (#202279)
I noticed that I was not able to clear the user-specific system prompt.
I had initially entered "Please speak in Swedish" and saved. Afterwards
I wanted to clear this but the save button is disabled if the text
content is empty.

![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)
2024-12-02 14:33:59 +01:00
Irene Blanco
1b1c41506b
[Infra] Display "Add metrics" callout for all containers without metrics (#202220)
## Summary

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

In this PR, we removed the restriction that prevented the "Add metrics"
callout from appearing on containers that aren't Docker or Kubernetes,
even if they didn’t have metrics.

Previously, this was done to only show the callout on Docker/Kubernetes
containers with available metrics. Now, the callout will be displayed
for all containers lacking metrics, ensuring a more consistent user
experience across different container types, regardless of the
underlying technology.


|View|Before|After|
|-|-|-|
|Overview|![Screenshot 2024-11-29 at 13 35
23](https://github.com/user-attachments/assets/b3d916e6-ee2b-4f1f-8d93-90c8ae595ac1)|![Screenshot
2024-11-29 at 13 33
15](https://github.com/user-attachments/assets/23bb44cf-41bc-4274-b204-8a3c9ceecea5)|
|Metrics|![Screenshot 2024-11-29 at 13 35
30](https://github.com/user-attachments/assets/3fbfb81e-d61c-4f28-b9a4-55b8009df8e1)|![Screenshot
2024-11-29 at 13 33
09](https://github.com/user-attachments/assets/1fb48b2f-457e-4453-8758-41f3ceadf794)|

The PR also addresses an issue with the onboarding link used in the
callout, where the `url` parameter was not properly preselecting any
options.
|Before|After|
|-|-|
|![Screen Recording 2024-11-29 at 13 37
05](https://github.com/user-attachments/assets/37f04535-ba4a-428b-b988-2ac4d5c0449a)|![Screen
Recording 2024-11-29 at 13 33
26](https://github.com/user-attachments/assets/b52b5b55-a387-40c8-80cd-54aedc9acfc7)|
2024-12-02 14:21:32 +01:00
Alberto Blázquez
6aaecd0d8f
Replace inline styles with css prop in src/ folder (#201563)
## Summary

Part of the resolution of this issue: 
- https://github.com/elastic/kibana/issues/149246

Removes the `style` prop in React components and elements to avoid using
inline styles. Instead, it uses now the `emotion.css` prop to
dynamically attach all styles to the native `class` attribute.

### Motivation

Using inline styles at scale causes a performance penalty at rendering
time. It's way more efficient to attach styles to a single or several
classnames instead.

### How to review

From [Emotion's official
docs](https://emotion.sh/docs/css-prop#style-precedence):

> [!NOTE]
> Any component or element that accepts a `className` prop can also use
the `css` prop. The styles supplied to the `css` prop are evaluated and
the computed class name is applied to the `className` prop.

Components that are safe to migrate from `style` to `css`:
- React elements
- React components exposed by EUI (they all support a `className` prop
and the [Babel
plugin](https://www.npmjs.com/package/@emotion/babel-preset-css-prop) is
enabled throughout Kibana)

Components where styling might break:
- Custom component we wrote that currently don't accept a `className`
prop.
- Specific 3P components that pass in a `style` prop to our components
i.e. `react-window` (it calculates the dynamic position of all
virtualized elements and hides the ones outside the visible fold)
- Specific 3P components that expect a `style` prop to be styled i.e.
charts, etc.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Main risk is breaking the UI by not applying or incorrectly applying the
styling. This was explained in the "How to review" section above. The
risk has **low severity** though. The mitigation plan will simply be
reverting the commit asap not to affect production and test locally
until it's fixed./
2024-12-02 14:16:23 +01:00
Nicolas Chaulet
f21fdaf563
[Fleet] Support input variable for integrations package (#202362) 2024-12-02 08:12:42 -05:00
Kurt
8f12d52138
Adding telemetry for the fips config (#201282)
## Summary

Adding telemetry for the `fipsMode.enabled` config
2024-12-02 07:50:40 -05:00
José Luis González
7fe25036d4
[Search][Ent Search deprecation] Removing Callouts (#202401)
## Summary

This PR removes all the CallOuts regarding Enterprise Search due to this
node will not be available in 9.0 as a part of this initiative:
https://github.com/elastic/search-team/issues/8231


![image](https://github.com/user-attachments/assets/290aac33-4dc7-455f-bf77-e8d872727a27)


![image](https://github.com/user-attachments/assets/90b17deb-b779-4c27-b837-b399b086d6ac)
2024-12-02 13:18:44 +01:00
Julia Bardi
16f2d7af9e
fix flaky tests (#202289)
## Summary

Changes in https://github.com/elastic/kibana/pull/201443 with some
tweaks

Closes https://github.com/elastic/kibana/issues/201210
Closes https://github.com/elastic/kibana/issues/200786
Closes https://github.com/elastic/kibana/issues/191804
Closes https://github.com/elastic/kibana/issues/199204
2024-12-02 06:16:22 -06:00
Cauê Marcondes
99463c7a0d
Revert "[Infra][ECO] Fix RBAC issue in hosts view" (#202418)
Reverts elastic/kibana#199841
2024-12-02 06:03:24 -06:00
Marco Liberati
a18be1fb17
[Lens][Embeddable] Expose the parentApi via the embeddable API (#202006)
## Summary

Fixes #199736

This PR exposes the `parentApi` when it satisfy the
`PresentationContainer` type: this allows api consumers (i.e. dashboard
actions) to access the full container context for complex evaluation of
an action (i.e. are there other panels? what types are they made of?
etc...).

I've limited it to `PresentationContainer` as this was the original
intent of the feature request (and avoids type casting). If it needs to
be extended more another follow up can be done.
2024-12-02 12:53:34 +01:00
Bharat Pasupula
f6fa94f476
[Automatic Import] Reject CEF logs in Auto Import until it is supported (#201792)
## Release Note

Restrict and Reject CEF logs in Automatic Import and redirect to CEF
integration instead.

## Summary

Currently Automatic Import does not handle CEF logs properly and gives
wierd errors.

This PR identifies the CEF logs and sends an error popup to
alternatively go for CEF integration instead.

<img width="1229" alt="image"
src="https://github.com/user-attachments/assets/59037dd4-323a-476a-9747-950fbc6e384d">

## Testing

Tested this with different types of CEF logs

```
<14>Nov 22 16:19:13 ABQ-ZTA-VRNS-3 CEF:0|Varonis Inc.|DatAdvantage|8.6.51|6000|Folder permissions added|3|rt=Nov 22 2024 16:19:09 cat=Alert cs2=Permissions granted to Global Access Groups cs2Label=RuleName cn1=132 cn1Label=RuleID end=Nov 22 2024 16:19:05 duser=zta.local\\Dani Lulli (ADMIN) dhost=10.100.20.12 filePath=E:\\Share\\Share\\Finance fname=Finance act=Folder permissions added dvchost= outcome=Success msg=Read & Execute permissions for This folder, subfolders and files (not inherited) was added to  Everyone on E:\\Share\\Share\\Finance cs3= cs3Label=AttachmentName cs4= cs4Label=ClientAccessType deviceCustomDate1= fileType= cs1= cs1Label=MailRecipient suser= cs5= cs5Label=MailboxAccessType cnt= cs6=Read & Execute cs6Label=ChangedPermissions oldFilePermission=None filePermission=Read & Execute dpriv=Everyone start=
<14>Nov 22 16:44:31 ABQ-ZTA-VRNS-3 CEF:0|Varonis Inc.|DatAdvantage|8.6.51|1|File opened|2|rt=Nov 22 2024 16:44:31 cat=Alert cs2=Dani Test - access of credentials cs2Label=RuleName cn1=184 cn1Label=RuleID end=Nov 22 2024 16:34:33 duser=zta.local\\Dani Lulli (ADMIN) dhost=10.100.20.12 filePath=E:\\Share\\Share\\B4\\Project mgmt\\U3 projects11.txt:Zone.Identifier fname=U3 projects11.txt:Zone.Identifier act=File opened dvchost= outcome=Success msg= cs3= cs3Label=AttachmentName cs4= cs4Label=ClientAccessType deviceCustomDate1= fileType= cs1= cs1Label=MailRecipient suser= cs5= cs5Label=MailboxAccessType cnt= cs6=None cs6Label=ChangedPermissions oldFilePermission=None filePermission=None dpriv= start=
```

```
CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Web request|low|eventId=3457 requestMethod=POST slat=38.915 slong=-77.511 proto=TCP sourceServiceName=httpd requestContext=https://www.google.com src=89.160.20.156 spt=33876 dst=192.168.10.1 dpt=443 request=https://www.example.com/cart
CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Authentication|low|eventId=123 src=89.160.20.156 spt=33876 dst=89.160.20.156 dpt=443 duser=alice suser=bob destinationTranslatedAddress=10.10.10.10 fileHash=bc8bbe52f041fd17318f08a0f73762ce oldFileHash=a9796280592f86b74b27e370662d41eb
CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Authentication|low|spriv=user dpriv=root
CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Authentication|low|message=This event is padded with whitespace dst=192.168.1.2 src=192.168.3.4
```

```
<163>Apr  1 05:14:15 192.0.2.1 CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Web request|low|msg=rfc3164
Apr  1 05:14:15 192.0.2.1 CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Web request|low|msg=rfc3164
<164>1 2021-04-01T05:14:15.000003-05:00 192.0.2.1 rfc5424App 8710 - - CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Web request|low|msg=rfc5424
2021-04-01T05:14:15.000003-05:00 192.0.2.1 rfc5424App 8710 - - CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Web request|low|msg=rfc5424
<165>1 2021-04-01T05:14:15.000003Z 192.0.2.1 rfc5424App 8710 - - CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Web request|low|msg=rfc5424
2021-04-01T05:14:15.000003Z 192.0.2.1 rfc5424App 8710 - - CEF:0|Elastic|Vaporware|1.0.0-alpha|18|Web request|low|msg=rfc5424
```

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
- [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] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](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-12-02 12:46:04 +01:00
Cristina Amico
76c2f31a3a
[Fleet][Spacetime] Replace promise.all with pMap across Fleet (#201628)
Part of https://github.com/elastic/ingest-dev/issues/4517
Closes https://github.com/elastic/kibana/issues/167160


## Summary

Replace `promise.all` with `pMap` across Fleet. The reason for this
refactor is introducing concurrency control in those cases when we are
running multiple requests towards ESclient.
Most of the refactor in this PR occurs around the packages install area,
as packages can have high numbers of assets, data streams or backing
indices so I focused on addressing those.


### Checklist

Check the PR satisfies following conditions. 

- [ ]
[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
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks
As this PR can have impacts in key areas of Fleet (package installs,
policies etc), I'm not going to merge right away but I'll take some time
to test properly and I'll merge next week.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-02 12:45:50 +01:00
Pierre Gayvallet
742854f8bc
[NL-to-ESQL] correctCommonEsqlMistakes: add timespan literals auto-correct (#202190)
## Summary

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

Fixes bad grammar regarding using string literals instead of timespan
literals for `DATE_TRUNC` and `BUCKET` functions.

This PR also paves the way for additional AST-based grammar corrections


**Example**

*Input*
```esql
FROM logs
| EVAL trunc_year = DATE_TRUNC("1 year", date)
| EVAL trunc_month = DATE_TRUNC("month", date)
| STATS hires = COUNT(*) BY hour = BUCKET(hire_date, "3 HOUR")
```
*Output*
```esql
FROM logs
| EVAL trunc_year = DATE_TRUNC(1 year, date)
| EVAL trunc_month = DATE_TRUNC(1 month, date)
| STATS hires = COUNT(*) BY hour = BUCKET(hire_date, 3 hour)
```
2024-12-02 12:37:02 +01:00
Jesus Wahrman
9b99070470
[docs] Remove experimental message from saved objects import and export apis (#202173)
## Summary

resolves https://github.com/elastic/kibana/issues/159454

Remove experimental message from saved objects import and export apis.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-02 12:05:52 +01:00
Marco Antonio Ghiani
d13904eb65
[Dataset Quality] Fix tests for degraded fields flyout (#202288)
## 📓 Summary

Closes #198849 
Closes #200287 
Closes #201273 
Closes #201975 

The above issues were raised with similar conditions which converged in
the following assumptions:
- They are raised due to timeout identifying a visual element on the
degraded fields flyout.
- They are raised due to a missing UI element, which is part of a common
sub-tree conditionally rendered when the data analysis is completed.
- They are raised in serverless tests, where the latency might be
randomly higher.

Given the nature of these tests, which locally always pass correctly
given the fastest nature of a local setup, I assume these random
failures are due to latency on the common request gating the rendering
of these sections.

As a fix, I added a wait on the global loading indicator before the
assertions, which should wait for the data loading to be completed
before running the assertions on the UI elements.

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
2024-12-02 12:04:48 +01:00
Robert Jaszczurek
aa4c39c119
[ML] Adds action to add log rate analysis to a case (#201549)
## Summary

Follow up to [#197247](https://github.com/elastic/kibana/issues/197247)

Adds action to add Log Rate Analysis Embeddable to a case.



https://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-02 11:59:54 +01:00
Kibana Machine
2af799b11a
[api-docs] 2024-12-02 Daily api_docs build (#202408)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/909
2024-12-02 04:56:38 -06:00
Gerard Soldevila
397314c952
Sustainable Kibana Architecture: Update tooling to take into account the new folders (#202327)
## Summary

Otherwise we're going to be removing APIs of relocated modules.
2024-12-02 04:04:35 -06:00
Cauê Marcondes
d8f3f4cb3c
[Inventory][ECO] Entity type Remove Control groups filter (#202177)
closes https://github.com/elastic/kibana/issues/201584

- Removes control group entity types filter
- Adds multi-select entity types filer
- Add kuery to url
- Remove unified entities page
- Adding telemetry when entity type is filtered
- Refactoring...



https://github.com/user-attachments/assets/98fb11ab-76e7-497b-af86-86378c6bfd7f

---------

Co-authored-by: Irene Blanco <irene.blanco@elastic.co>
2024-12-02 09:14:35 +00:00
Tre
10f50564ac
[Ownership] Add quick check to prevent test files from being added without an owner (#201979)
## Summary

Add quick check to prevent test files from being added without an owner

Resolves: #192979

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
2024-12-02 10:12:56 +01:00
Vadim Kibana
378002f9f6
[ES|QL] AST node synthesizer (#201814)
## Summary

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

Adds ability to create ES|QL AST nodes from plain strings and compose
them.

Create an integer literal:

```js
const node = expr `42`;
```

Create any expression:

```js
const node = expr `nested.field = fn(123)`;
```

Compose AST nodes:

```js
const value = expr `123`;
const node = expr `nested.field = fn(${value})`;
```

## Usage

You can create an assignment expression AST node as simle as:

```ts
import { synth } from '@kbn/esql-ast';

const node = synth.expr `my.field = max(10, ?my_param)`;
// { type: 'function', name: '=', args: [ ... ]}
```

To construct an equivalent AST node using the `Builder` class, you would
need to
write the following code:

```ts
import { Builder } from '@kbn/esql-ast';

const node = Builder.expression.func.binary('=', [
  Builder.expression.column({
    args: [Builder.identifier({ name: 'my' }), Builder.identifier({ name: 'field' })],
  }),
  Builder.expression.func.call('max', [
    Builder.expression.literal.integer(10),
    Builder.param.named({ value: 'my_param' }),
  ]),
]);
// { type: 'function', name: '=', args: [ ... ]}
```

You can nest template strings to create more complex AST nodes:

```ts
const field = synth.expr `my.field`;
const value = synth.expr `max(10, 20)`;

const assignment = synth.expr`${field} = ${value}`;
// { type: 'function', name: '=', args: [ 
//     { type: 'column', args: [ ... ] },
//     { type: 'function', name: 'max', args: [ ... ] }
// ]}
```

Use the `synth.cmd` method to create command nodes:

```ts
const command = synth.cmd `WHERE my.field == 10`;
// { type: 'command', name: 'WHERE', args: [ ... ]}
```

AST nodes created by the synthesizer are pretty-printed when you coerce
them to
a string or call the `toString` method:

```ts
const command = synth.cmd ` WHERE my.field == 10 `; // { type: 'command', ... }
String(command); // "WHERE my.field == 10"
```


## Reference

### `synth.expr`

The `synth.expr` synthesizes an expression AST nodes. (*Expressions* are
basically any thing that can go into a `WHERE` command, like boolean
expression,
function call, literal, params, etc.)

Use it as a function:

```ts
const node = synth.expr('my.field = max(10, 20)');
```

Specify parser options:

```ts
const node = synth.expr('my.field = max(10, 20)', { withFormatting: false });
```

Use it as a template string tag:

```ts
const node = synth.expr `my.field = max(10, 20)`;
```

Specify parser options, when using as a template string tag:

```ts
const node = synth.expr({ withFormatting: false }) `my.field = max(10, 20)`;
```

Combine nodes using template strings:

```ts
const field = synth.expr `my.field`;
const node = synth.expr `${field} = max(10, 20)`;
```

Print the node as a string:

```ts
const node = synth.expr `my.field = max(10, 20)`;
String(node); // 'my.field = max(10, 20)'
```


### `synth.cmd`

The `synth.cmd` synthesizes a command AST node (such as `SELECT`,
`WHERE`,
etc.). You use it the same as the `synth.expr` function or template
string tag.
The only difference is that the `synth.cmd` function or tag creates a
command
AST node.

```ts
const node = synth.cmd `WHERE my.field == 10`;
// { type: 'command', name: 'where', args: [ ... ]}
```



### Checklist

Delete any items that are not applicable to this PR.

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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
2024-12-02 03:12:36 -06:00
Kibana Machine
6ef4912c65
[ES|QL] Update function metadata (#202395)
This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.
2024-12-02 08:10:32 +01:00
Kibana Machine
e2a99ca01b
[api-docs] 2024-12-01 Daily api_docs build (#202391)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/908
2024-12-01 01:50:41 -06:00
Sander Philipse
0854996ba1
[ES3] Enable AI assistant knowledge base (#202210)
## Summary

This enables the knowledge base for the Serverless Search AI assistant.
It also renames a few options to align naming, including a rename for
the settings page in Observability's Serverless deployment to remove a
reference to Search.
2024-11-30 14:52:39 +01:00
Ash
b4f015d470
[DataUsage][Serverless] Log more info on autoops 503 errors (#202350)
## Summary

Adds error info from auto ops when we see 503 errors while making a
request to autoops service.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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
- [ ] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2024-11-30 06:38:02 -06:00
Kibana Machine
b39a5aa624
[api-docs] 2024-11-30 Daily api_docs build (#202379)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/907
2024-11-30 01:16:07 -06:00
Tiago Costa
c4375a6460
skip flaky suite (#176524) 2024-11-30 03:31:06 +00:00
Tiago Costa
d1962036e0
skip flaky suite (#201876) 2024-11-30 03:29:07 +00:00
Tiago Costa
53a3b1a9ce
skip flaky suite (#202115) 2024-11-30 03:26:34 +00:00
Kerry Gallagher
b0122f547d
[Discover / Logs] Add new "Saved Search component" (#199787)
## Summary

Implements
https://github.com/elastic/logs-dev/issues/111#issuecomment-2446470635.

This adds a new "Saved Search component". The component is a wrapper
around the current Saved Search Embeddable, but uses
`ReactEmbeddableRenderer` directly to render the embeddable outside of
Dashboard contexts. It monitors changes to things like `index`,
`filters` etc and communicates these changes through the embeddable API.

For this PoC two locations were changed to use this component 1) Logs
Overview flyout 2) APM Logs tab (when the Logs Overview isn't enabled
via advanced settings).

The component itself is technically beyond a PoC, and resides in it's
own package. ~I'd like to get eyes from the Discover folks etc on the
approach, and if we're happy I can fix the remaining known issues (apart
from the mixing of columns point as I believe this exists on the roadmap
anyway) and we can merge this for the initial two replacement points.~
[Thanks Davis
👌](https://github.com/elastic/logs-dev/issues/111#issuecomment-2475350199).

`nonPersistedDisplayOptions` is added to facilitate some configurable
options via runtime state, but without the complexity of altering the
actual saved search saved object.

On the whole I've tried to keep this as clean as possible whilst working
within the embeddable framework, outside of a dashboard context.

## Known issues

- ~"Flyout on flyout" in the logs overview flyout (e.g. triggering the
table's flyout in this context).~ Fixed with `enableFlyout` option.
- ~Filter buttons should be disabled via pills (e.g. in Summary
column).~ Fixed with `enableFilters` option.
- Summary (`_source`) column cannot be used alongside other columns,
e.g. log level, so column customisation isn't currently enabled. You'll
just get timestamp and summary. This requires changes in the Unified
Data Table. **Won't be fixed in this PR**

- We are left with this panel button that technically doesn't do
anything outside of a dashboard. I don't *think* there's an easy way to
disable this. **Won't be fixed in this PR**
![Screenshot 2024-11-20 at 11 50
43](https://github.com/user-attachments/assets/e43a47cd-e36e-4511-ba88-c928a4acd634)


## Followups

- ~The Logs Overview details state machine can be cleaned up (it doesn't
need to fetch documents etc anymore).~ The state machine no longer
fetches it's own documents. Some scaffolding is left in place as it'll
be needed for showing category details anyway.

## Example

![Screenshot 2024-11-20 at 12 20
08](https://github.com/user-attachments/assets/3b25d591-e3e2-4e8a-98a8-1bfc849d3bc1)
![Screenshot 2024-11-20 at 12 23
34](https://github.com/user-attachments/assets/a2d28036-98c5-4404-934e-2298cf4a66bf)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-11-29 23:09:24 +00:00
Samantha Tan
50a2ffa7f2
Set min-width for DistributionBar and added README for storybook (#202247)
## Summary
- This pull request resolves
[elastic/kibana#200881](https://github.com/elastic/kibana/issues/200881)
by setting a min-width of 10px for the DistributionBar component to
prevent it from shrinking too small, ensuring a consistent and readable
visual representation for better usability.
- Additionally, added a README file with instructions for running
Storybook to visually inspect the DistributionBar, as the folder had no
documentation before, improving the developer experience.

## Screenshots:
**Before**
- The min-width of 10px was set, but small segments were not visible in
the DistributionBar.
![Screenshot 2024-11-27 at 5 08
13 PM](https://github.com/user-attachments/assets/6b74580d-28a4-429a-9029-0d212100d2a5)

- The original mockStatsFindings with 'passed' set to 90 and 'failed'
set to 10 did not visually reflect the min-width of 10px in the
DistributionBar. The smallest segment was still not visible.
![Screenshot 2024-11-27 at 5 09
49 PM](https://github.com/user-attachments/assets/01be2f80-77e3-4805-b301-f05dc6e3436c)

**After**:

- Temporarily modified the `mockStatsFindings` in
`distribution_bar.stories.tsx` to simulate the DistributionBar with
extreme values by setting the count for 'passed' to 9000 (highest) and
'failed' to 1 (lowest):
![Screenshot 2024-11-27 at 5 10
49 PM](https://github.com/user-attachments/assets/7278f81b-174e-4df0-8209-6fb6a7a70f18)

- After the modification, the DistributionBar displayed correctly with
even the smallest segments visible, confirming that the min-width is
working as expected.
![Screenshot 2024-11-27 at 5 10
23 PM](https://github.com/user-attachments/assets/95cfc3d4-d1aa-4a69-9d13-17143445dc7f)

- These results were captured in a screenshot for the PR, and no changes
were saved to the `distribution_bar.stories.tsx` file.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-11-29 12:34:26 -08:00
seanrathier
3520e696f4
[Cloud Security] Remove Add integration button from agent policy details page when the agent policy supports_agentless (#202211) 2024-11-29 12:33:03 -06:00
Tim Rühsen
94f4f66917
[Profiling] Switch to 19Hz sampling frequency (#202278)
With 9.0.0, profiling switches to 19Hz default sampling frequency.
2024-11-29 11:59:23 -06:00
Sergi Massaneda
89d4011764
[SecuritySolution] Onboarding page centralize duplicated styles (#202229)
## Summary

There is no visual change, just a refactor to remove duplicate code from
cards to centralized places.
2024-11-29 11:47:16 -06:00
Carlos Crespo
bedc0660d8
[Infra] Unskip infra serverless tests (#202146)
fixes [191809](https://github.com/elastic/kibana/issues/191809)

## Summary

Unskip infra e2e serverless tests
2024-11-29 11:45:48 -06:00