Commit graph

82723 commits

Author SHA1 Message Date
Elastic Machine
c396e96a09
Merge branch 'main' into renovate/main-@smithy 2025-01-15 15:26:31 +00:00
Nicolas Chaulet
bc47ff03b5
[Fleet] set workerIdleMemoryLimit for jest server tests (#206684) 2025-01-15 10:19:25 -05:00
Philippe Oberti
708789102f
[Security Solution] - remove styled-components and cleanup for event viewer and data table components (#206523)
## Summary

This PR originally aimed at replacing the usages `styled-components`
with `@emotion/react` in the
`security_solution/public/common/components/events_viewer` folder. I
quickly realized removing some of these would require a small refactor.
This lead to making a few more changes, as many properties were actually
unused so a cleanup was welcome.

Only 2 small UI changes are introduced in this PR:
- the inspect icon on the top right corner of the tables are now always
visible instead of only visible on hover. I'm aware that this is a
different behavior from the alerts table in the alerts page, but we also
have other tables (like the one on threat intelligence page) where the
icon is always shown. Waiting on @codearos for confirmation here
- the `Grid view` and `Additional filters` button are reversed due to
the simplification of the code

No other UI changes are introduced. No behavior logic has been changed
either.

The biggest code cleanup are:
- removal of a bunch of unused properties and logic
- deletion of the RightTopMenu component: it was used in both
`StatefulEventsViewerComponent` and `getPersistentControlsHook` but none
of the internal logic was overlapping. I don't know how we got there but
its current implementation was overly complex and completely
unnecessary...

#### Alerts page

![Screenshot 2025-01-13 at 4 33
36 PM](https://github.com/user-attachments/assets/c6c588c1-16f1-49f8-bcc0-246fb05f7e10)

#### Rule creation page

![Screenshot 2025-01-13 at 4 34
14 PM](https://github.com/user-attachments/assets/ea2332c3-425a-4960-8bd6-f2d7395cdf34)

#### Host/User/Network events tab

![Screenshot 2025-01-13 at 4 34
27 PM](https://github.com/user-attachments/assets/4194e406-6bff-4a46-bc99-aadd1aea88d7)

#### Host session view tab

![Screenshot 2025-01-13 at 4 34
42 PM](https://github.com/user-attachments/assets/045b3bb2-2681-4089-a303-a77f797f9b90)

### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-15 09:18:19 -06:00
Philippe Oberti
d9b9425372
[Security Solution] - remove styled-components and cleanup for timeline header actions (#206694)
## Summary

Similar to [this previous
PR](https://github.com/elastic/kibana/pull/206523), this PR originally
aimed at replacing the usages styled-components with @emotion/react in
the security_solution/public/common/components/header_actions folder. I
quickly realized that a lot of props and event components were actually
not used at all, so a cleanup was welcome.

Absolutely no UI or behavior logic changes should be introduced by this
PR.

This PR will impact the tables in timeline, and the markdown use in
osquery.

The biggest code cleanup are:
- removing a couple of components related to the header actions used in
timeline
- removing random unused translations, constants or helper functions

#### Timeline query, correlation and pinned tabs

![Screenshot 2025-01-14 at 5 29
49 PM](https://github.com/user-attachments/assets/8c06c0f3-c323-4dd7-96d1-14357abc551d)

![Screenshot 2025-01-14 at 5 30
05 PM](https://github.com/user-attachments/assets/7332fbe2-8744-46d5-a5e8-bd056fba0375)

![Screenshot 2025-01-14 at 5 30
27 PM](https://github.com/user-attachments/assets/86053a20-f0e4-4f0a-8bdd-0c2678194903)

### 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
2025-01-15 09:14:28 -06:00
Jean-Louis Leysens
ca77772d2a
[Http] Router refactor (#205502) 2025-01-15 16:10:46 +01:00
Marco Antonio Ghiani
6429c53597
[Streams 🌊] Add processors validation and simulation gate (#206566)
## 📓 Summary

Closes https://github.com/elastic/streams-program/issues/66

This work adds changes to prevent invalid processors from being
submitted.
The main rule is that a simulation is performed before any add/edit
submission to guarantee that the processor config is valid.

This work also updates the simulation API to detect whether there is a
non-additive change in any simulated document.

@patpscal error reporting UI for add/edit is different since the
simulator is not visible for edit, I used a callout but we can easily
update this once there is a final design in place.

### Form validation + simulation


https://github.com/user-attachments/assets/f7fc351b-6efc-4500-8490-b7f1c85139bf

### Non-additive processors


https://github.com/user-attachments/assets/47b5b739-c2cf-4a74-93a8-6ef43521c7d4
2025-01-15 16:09:02 +01:00
Maxim Palenov
b4342f44f0
[Security Solution] Add error boundaries to rule upgrade workflow flyout (#204315)
**Partially addresses:** https://github.com/elastic/kibana/issues/202715

## Summary

This PR adds React error boundaries to comparison side, final side readonly and final side edit modes. The goal is mitigating chances of blocking rule upgrade workflow.

## Details

Kibana already has `KibanaErrorBoundary` component to catch thrown errors. Closer look at the component reveals it was designed to be applied at page level. The component doesn't accept any customization.

Obviously Kibana requires an error boundary component to catch thrown errors at section levels. Such error are usually fatal non-recoverable error happening due to unexpected data arrives from the storage. It may block critical workflows.

To mitigate workflow blocking and address section level errors a new `KibanaSectionErrorBoundary` component was added. It accepts `sectionName` property to properly reflect it in messages. On top of that it shared displaying error functionality with `KibanaErrorBoundary`.

`KibanaSectionErrorBoundary`  was applied to the following sections in Rule Upgrade Flyout

- All flyout tabs
- comparison side (Diff View)
- final side readonly mode
- final side edit mode

## Screenshots

**Before:**

![image](https://github.com/user-attachments/assets/c7890b3f-0b6b-478f-a91b-a332e31a4260)

**After:**

<img width="2549" alt="Screenshot 2025-01-02 at 12 26 15" src="https://github.com/user-attachments/assets/3617be5b-c063-4529-9b7f-e931520fbf92" />

<img width="2557" alt="Screenshot 2025-01-02 at 12 24 33" src="https://github.com/user-attachments/assets/da7407af-a263-4e4a-812e-6b76a75b5be9" />

<img width="2556" alt="Screenshot 2025-01-02 at 12 26 57" src="https://github.com/user-attachments/assets/c2faedbe-15a5-4da6-9c9a-a767edb403b0" />

<img width="2556" alt="Screenshot 2025-01-02 at 12 27 08" src="https://github.com/user-attachments/assets/061dd645-f5e4-48ac-957b-50a8fea2d2e7" />

<img width="2556" alt="Screenshot 2025-01-02 at 12 27 27" src="https://github.com/user-attachments/assets/3e8c31de-d251-4eb1-a49f-8622b5640b70" />

## How to test?

- Ensure the `prebuiltRulesCustomizationEnabled` feature flag is enabled
- Allow internal APIs via adding `server.restrictInternalApis: false` to `kibana.dev.yaml`
- Clear Elasticsearch data
- Run Elasticsearch and Kibana locally (do not open Kibana in a web browser)
- Install an outdated version of the `security_detection_engine` Fleet package
```bash
curl -X POST --user elastic:changeme  -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 2023-10-31" -d '{"force":true}' http://localhost:5601/kbn/api/fleet/epm/packages/security_detection_engine/8.14.1
```

- Install prebuilt rules
```bash
curl -X POST --user elastic:changeme  -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 1" -d '{"mode":"ALL_RULES"}' http://localhost:5601/kbn/internal/detection_engine/prebuilt_rules/installation/_perform
```

- Cause some error in the rule upgrade flyout, for example set a negative look-back duration for `Suspicious File Creation via Kworker` rule by patching the rule

```bash
curl -X PATCH --user elastic:changeme -H "Content-Type: application/json" -H "elastic-api-version: 2023-10-31" -H "kbn-xsrf: 123" -d '{"rule_id":"ae343298-97bc-47bc-9ea2-5f2ad831c16e","interval":"10m","from":"now-5m","to":"now-2m"}' http://localhost:5601/kbn/api/detection_engine/rules
```

- Open rule upgrade flyout for `Suspicious File Creation via Kworker` rule
2025-01-15 16:01:21 +01:00
Faisal Kanout
b0973cf26c
[Exploratory View] Audit new EUI Borealis theme (#205212)
## Summary

It fixes #205051 

<del>
Files are excluded because of `euiScrollBar` and `euiScrollBarCorner`
replacement (TBD)
-
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/series_editor/series_editor.tsx

-
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/series_editor/components/filter_values_list.tsx
</del>
  DONE
2025-01-15 15:53:49 +01:00
Irene Blanco
dcc09d40ad
[APM] Wrap Chart component in EuiErrorBoundary for improved error handling (#206753)
## Summary

In this PR we are wrapping the `Chart` component in `EuiErrorBoundary`
to prevent getting a full screen error because some of the charts fail
in the Service Overview screen.

This is now needed because of the [update of `@elastic/charts` from
68.0.4 to 68.1.0](https://github.com/elastic/kibana/pull/206497).

|Before|After|
|-|-|
|![Screenshot 2025-01-15 at 13 39
07](https://github.com/user-attachments/assets/4e10cb5c-eb9a-47ad-9acd-0d5a46818395)|![Screenshot
2025-01-15 at 12 17
05](https://github.com/user-attachments/assets/f8052b24-18bc-49e9-8776-e6932b54a527)|


>[!IMPORTANT]
>This PR will be followed by another to properly address the error
triggered by the charts. For now, we need this one to silence the
failing Cypress tests in some CI runs and ensure that at least the
functioning charts are displayed on the screen.
2025-01-15 14:52:27 +00:00
Sandra G
06526fe928
[Obs AI Assistant] fix knowledge base installation state (#206130)
Resolves https://github.com/elastic/kibana/issues/205970

Updates logic to account for knowledge base `/setup` no longer polling
for model readiness before returning.

- Currently we only poll `/status` if user manually installs the
knowledge base. In cases where we auto installed, such as after
successfully setting up a connector, we depended on `/setup` to poll
internally. Since the latter was removed, we need to always poll
`/status`, otherwise user could potentially be in the state where
`setup` has finished (considered installed) but `status` still reports
not ready and we show the install message again (see screenshots in
https://github.com/elastic/kibana/issues/205970)
- Currently if an install is in progress and user closes the flyout, the
progress state is lost. These changes should continue to reflect the
installation progress in the UI.
- Renames variables and adds comments for easier readability
- adds unit test to component that handles the install UI state,
`WelcomeMessageKnowledgeBase`

---------

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2025-01-15 09:38:07 -05:00
Clint Andrew Hall
16f69b7b2d
Remove build hash from Storybook upload (#206687)
## Summary

After a CI run, Storybooks are built. Each commit is built and uploaded
separately, which makes sense:


https://github.com/elastic/kibana/blob/main/.buildkite/scripts/steps/storybooks/build_and_upload.ts#L24

Unfortunately, we don't have a way to consistently point to main, or to
a PR.

## PRs

Using https://github.com/elastic/kibana/pull/206540 as an example, the
Storybook is currently hosted at:


https://ci-artifacts.kibana.dev/storybooks/pr-206540/803ec26fb200e1fd23c33ead174dcc5356262cfc

This means that, if I push another commit, the URL will change... so all
of the links I've posted in Slack are now invalid. This PR changes the
URL so it will remain:

https://ci-artifacts.kibana.dev/storybooks/pr-206540

regardless of how many commits I push.

## `main`

Furthermore, being able to visit
https://ci-artifacts.kibana.dev/storybooks/main/latest/index.html to see
the most recent Storybook build is awesome. The issue is each Storybook
is hosted with that same hash:


https://ci-artifacts.kibana.dev/storybooks/main/5ad3ef7b0a76968a31b0824bd08f9132c374c841/shared_ux/index.html

So this PR alters the URL so you can consistently point to the latest
Storybook build:

https://ci-artifacts.kibana.dev/storybooks/main/shared_ux/index.html
2025-01-15 09:37:27 -05:00
Irene Blanco
9f92c8e67f
[APM] Attempt to fix Cypress flaky test in Mobile Transactions (#206639)
## Summary

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

This PR aims to fix a flaky test that waits for `aria-selected`
attribute to be `true` after click, but it resolved to `false`.

The test was written like this:

````
cy.getByTestSubj('apmAppVersionTab').click().should('have.attr', 'aria-selected', 'true');
````

After some research, I found that having it like that makes Cypress skip
waiting for any visual or state changes after the click. This can lead
to scenarios where the attribute hasn't been updated yet by the time the
expectation is evaluated.

By separating the click and the assertion, we effectively allow more
time for the state to update, and Cypress will automatically retry it
within the configured timeout.
2025-01-15 15:34:46 +01:00
Eyo O. Eyo
44b756c2f5
Account for disabledShareUrl prop for rendered sharing options (#206592)
## Summary

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

This PR adds logic to honor the `disabledShareUrl` prop. For the user
this means that in instances where the user doesn't have permissions to
create a share url, the link tab doesn't get rendered to such user.

## How to test

- Create a simple user and a custom role. Assign only Read capabilities
to Visualize Library
- Now sign up with that user, create a new lens visualization and try to
share it
- The share Link tab is not visible.

<!-- 

### 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/src/platform/packages/shared/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)
- [ ] ...


-->
2025-01-15 15:21:15 +01:00
Walter Rafelsberger
abbdd0f826
[ML] Field Stats: Use field caps option include_empty_fields=false to identify populated fields. (#205417)
## Summary

Part of #178606.

Uses `dataViews.getFieldsForIndexPattern()` instead of custom code to
identify populated fields for field stats and the data grid used in the
Data Frame Analytics wizard.

- The previous custom code supported abort signals to cancel requests as
well as runtime fields. This was not yet supported by
`getFieldsForIndexPattern/getFieldsForWildcard`, so this PR adds that
capability.
- This also tweaks the options interface for `getFieldsForIndexPattern`
so you no longer have to pass in the empty `pattern: ''`.

This GIF demonstrates cancelling the request by navigating away from the
Data Frame Analytics wizard while the page is still loading (done with
3G throttling in dev tools):

![field-caps-cancel-0001](https://github.com/user-attachments/assets/8865ef08-76f0-4c84-a459-211230b2608e)

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-15 15:16:17 +01:00
Vadim Kibana
571ee960ad
[ES|QL] JOIN command autocomplete and validation (#205762)
## Summary

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

Main goal of this PR is to introduce initial autocomplete for the `JOIN`
command:

![Kapture 2025-01-09 at 19 02
17](https://github.com/user-attachments/assets/5ecaddb7-d8c1-4768-a22d-82d2adc521ce)

In this PR:

- Adds `JOIN` command and `AS` function definition
- Adds `JOIN` command validation
- Adds `JOIN` command autocomplete
  - New command suggestion, including command type
  - Command suggestion on partial command entry
  - Suggests lookup indices
    - Fetches them from the server and caches
    - Also suggests lookup index aliases
  - Suggests `ON` keyword
  - Suggests join condition fields
  - Suggests `,` or `|` after join condition fields
- Autocomplete behaviour that could be improve in followup
- After index suggestion selection, the "ON" suggestion does not appear
automatically, user needs to enter space ` `.
- When suggesting `ON <condition>` fields, compute lookup index and
source index field intersection and show only those.
- Only `LOOKUP JOIN` is exposed. `LEFT JOIN` and `RIGTH JOIN` are
defined in code, but commented out.
- The aliasing using `AS` operator will validate, but autocomplete does
not actively suggest it to the user.

---

### Testing

To test, you can create lookup indices in dev console using the
following queries:

```
PUT /lookup_index
{
  "settings": {
    "index.mode": "lookup" 
  },
  "mappings": {
    "properties": {
        "currency": {
            "type": "keyword"
        }
    }
  }
}

PUT /lookup_index_with_alias
{
  "settings": {
    "index.mode": "lookup" 
  },
  "aliases": {
    "lookup_index2_alias1": {},
    "lookup_index2_alias2": {}
  }
}
```

Add some sample data:

```
POST /lookup_index/_doc
{
  "currency": "EUR",
  "continenet": "Europe",
  "name": "Euro"
}
POST /lookup_index/_doc
{
  "currency": "USD",
  "continenet": "North America",
  "name": "US Dollar"
}
POST /lookup_index/_doc
{
  "currency": "USD",
  "continenet": "North America",
  "name": "Canadian Dollar"
}
```

Add `kibana_sample_data_ecommerce` sample data and execute a query:

```
FROM kibana_sample_data_ecommerce | LOOKUP JOIN lookup_index ON currency 
```

---



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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-15 09:14:19 -05:00
Faisal Kanout
e7f0771be7
[OBX-UX-MGMT][ALERTING] Fix Metric and Custom Threshold rules time range extension when the rule execution fails (#202142)
## Summary
It fixes #191179 
It fixes #202493 
By adding guard rail to limit the time range to "no more than" 3 times
the execution window. As proposed
[here](https://github.com/elastic/kibana/issues/191179#issuecomment-2501435071)
While ensuring the rule will still be able to detect the missing groups.


### What has been done:
- Fix the unlimited extension of the time range when the rule fails for
both rules, the Metric and Custom Threshold
- Tests have been added to cover the guardrail 
 ### Hot to test the PR:
- Create Metric and Threshold rules that fire alerts with a groupBy
options, e.g., with `host.name`
- From the data source/generation tool, try to remove groups, and the
rule should be able to detect the missing groups.
- Try to make the rule fail e.g., a typo in the rules' executors. 
- The rule time range would be extended up to 3x during the execution
and then back to the defined time range.


### Why not ignore the `lastPeriodEnd` without using a guardrail
This feature is implemented for a reason, which is to catch the missing
groups and keep the rule on-sync as much as possible. Also, the Security
team has an appetite to introduce a similar feature.
Instead of removing it completely, we keep it with a guardrail to
protect the cluster resources. And we can go back to remove it or update
it anytime in the future.

<img width="1433" alt="Screenshot 2024-11-28 at 11 57 13"
src="https://github.com/user-attachments/assets/72a04b25-c7c6-4261-8fea-9fa9a1cce3a6">
<img width="1427" alt="Screenshot 2024-11-28 at 11 57 06"
src="https://github.com/user-attachments/assets/e0ee8605-fe27-4f23-bf42-4b6a9fe76e2b">
2025-01-15 15:12:37 +01:00
Tre
ac76690449
[SKIP ON MKI] x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts (#206735)
## Summary

see details: https://github.com/elastic/kibana/issues/206734
2025-01-15 14:00:39 +00:00
Alexey Antonov
9c6de6aabc
fix: [Security:Assets:Fleet:AgentPolicy:Edit Integration page]Modal dialog missing title from announcement (#205403)
Closes: #204920

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

## Changes made:
1. added required `a11y` attributes. See
https://eui.elastic.co/#/layout/modal#confirm-modal for more details

## Screen:

<img width="1678" alt="image"
src="https://github.com/user-attachments/assets/3e29215a-c45d-4e13-8350-94d00e1c4ff0"
/>
2025-01-15 15:35:21 +02:00
Pablo Machado
3ba3e86495
[SecuritySolution] Skip asset criticality integration test on MKI (#206745)
## Summary

The test depends on an experimental flag and it is not supported by MKI
tests.
2025-01-15 13:26:35 +00:00
Rodney Norris
e3f54e8ce8
[Search] remove entsearch product access usage (#206682) 2025-01-15 07:19:10 -06:00
Kerry Gallagher
a4c1c2066a
[Streams] Partitioning page toasts UX improvement (#206571)
## Summary

Just a UX improvement to implement this:
https://github.com/elastic/kibana/pull/206116#issuecomment-2587744663
(https://github.com/elastic/kibana/pull/206116 was merged already).
2025-01-15 13:07:26 +00:00
Luke Gmys
0c4c8aa163
[Cases][Case Observables] move route key down in the component tree (#206449)
Fixes https://github.com/elastic/kibana/issues/206275

There was an issue with Case Page header not updating correctly when
navigating directly from one case to another (through similar cases
feature).

The solution for that was to add a key to the Route component for the
case view, but it is suboptimal - all the components on that page would
end up being re-rendered.

Thats why this PR moves the key to the header itself, with the same
result effectively but without re-rendering the entire page.
2025-01-15 12:39:36 +00:00
Anton Dosov
d51e35e8ff
Make dashboard listing initial render faster (#206618)
## Summary

Follow up to https://github.com/elastic/kibana/pull/201401

I opened perf profiler in overview cluster (1000 dashboards) and noticed
a very slow function. The slowness was likely caused by two spread
operators on each iteration, but there was likely something more to it
from the engine perspective because it was very-very slow.


Before (318 ms, ~1000 dashboard)
![Screenshot 2025-01-14 at 16 49
17](https://github.com/user-attachments/assets/369bdbea-c17c-4b4c-a168-da6a9eda0f72)

After (<1ms, same data)
![Screenshot 2025-01-14 at 16 47
33](https://github.com/user-attachments/assets/4320b5c5-3da3-4f92-ad9a-eae2f35331d1)
2025-01-15 13:28:29 +01:00
Konrad Szwarc
f4651a82cd
[EDR Workflows] Workflow Insights - copy changes (#206412)
RBAC related copy changes were covered in
https://github.com/elastic/kibana/pull/205088

1. Fixes issue with AI assistant icon


![a](https://github.com/user-attachments/assets/f2328e4c-69c7-4e99-aa3f-27b7191d88dc)

![Screenshot 2025-01-13 at 11 45
18](https://github.com/user-attachments/assets/aca5a9ec-86e3-4a63-b166-fd1ffaaa02db)

2. Changes displayed copies to requested ones:

![Screenshot 2025-01-13 at 12 06
14](https://github.com/user-attachments/assets/a96a9b7e-9c77-41f6-9e1b-d8e42aeb55c9)


3. Adds Tech Preview badge

![Screenshot 2025-01-14 at 10 41
53](https://github.com/user-attachments/assets/a4fcf246-77ce-404b-87f3-9ca72877d87f)
![Screenshot 2025-01-14 at 12 44
27](https://github.com/user-attachments/assets/23745e72-31a4-43fc-85e4-8765e10fcd12)
![Screenshot 2025-01-14 at 12 44
33](https://github.com/user-attachments/assets/f4a3b0ae-4d66-4b8c-9da5-151eb74b02b5)
2025-01-15 13:02:01 +01:00
Kerry Gallagher
b18e998b5a
[Logs] Authz migration (#206576)
## Summary

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

As per [the
docs](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization#api-authorization)
this route is primarily a wrapper around Saved Objects (via spaces, SOs,
and advanced settings) so we opt out of explicit security checks.
2025-01-15 11:23:57 +00:00
Mark Hopkin
4304e21933
[Entity Analytics] Add legacy risk engine breaking change to upgrade notes (#206413)
## Summary

This deprecation was added to the 8.x branch in
https://github.com/elastic/kibana/pull/202775 but I think we also need a
record of this breaking chain on `main`

---------

Co-authored-by: natasha-moore-elastic <137783811+natasha-moore-elastic@users.noreply.github.com>
2025-01-15 10:48:15 +00:00
Dario Gieselaar
0cb6f54e9c
[Streams] Migrate to storage adapter (#206438)
Migrates the `.kibana_streams` index to be managed by the Storage Index
Adapter.

Additionally, `streams_crud` was refactored into a client that can be
used in routes (and at some point, other plugins).

Functional changes:

- The defaults for the types were removed. Setting defaults means that
we have to use `.parse()` everywhere to make sure we get the default
values. Without using parse, the current type guards make it seem like
the defaults have been added to a value.
- The storage adapter was simplified (no more enums, required or
multi-value until we need it)
- Write access is verified before deleting a stream
- We throw an error if an update from ingest -> wired or vice versa is
attempted

Notes:
- I changed `readStream` to `getStream` to avoid confusion around
`ReadStreamDefinition` and `readStream`. This was before I realized that
ReadStreamDefinition refers to the value returned from the `GET
/api/streams/{id}` endpoint. I've left this change in place for now as I
would consider `get` to be more commonly used verbiage (eg.
`esClient.get`), but happy to revert.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2025-01-15 10:40:16 +00:00
Faisal Kanout
7ba5a786f6
[Custom threshold] Removnig count aggregation filter breaks the rule creation flyout (#206652)
## Summary

it fixes #206617
2025-01-15 11:27:53 +01:00
jennypavlova
adfd7d7ed4
Dashboard tab test: attempt to fix (#206485)
Closes #203740

## Summary

After some other attempts to fix it, I saw that a different tab was
selected before the test started so I added an extra step to start from
the overview (this should make it more stable- locally it passed several
times so I guess the issue was that other test results affected the
test)
2025-01-15 10:49:38 +01:00
Julia Bardi
21493f7990
[Fleet] remove enabled feature flags (#206448)
## Summary

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

Removed feature flags enabled by default, deleted conditionals where not
needed.
2025-01-15 10:41:15 +01:00
elastic-renovate-prod[bot]
62308641bf
Update dependency @redocly/cli to ^1.27.1 (main) (#206605) 2025-01-15 09:26:17 +00:00
Artem Shelkovnikov
4462b48939
Don't run agentless connectors task on Serverless for now (#206609)
## Summary

This PR makes it so that Agentless Connectors task would not be running
on Serverless environments.

### 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/src/platform/packages/shared/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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-15 13:25:39 +04:00
Miriam
93b7c950ef
[ObsUx][Infra] Fix failing test (#206637)
Closes https://github.com/elastic/kibana/issues/192891

### Summary

The element wasn't found in the DOM because was reloaded, found the
error `StaleElementReferenceError: stale element reference: stale
element not found in the current frame`, the test has been fixed adding
a wait for the page to completely load.

Going to run flaky test runner
2025-01-15 09:03:28 +00:00
Stratoula Kalafateli
098e8cb518
[ES|QL] Sets the KQL/Lucene query on dataview to ES|QL transition (#206391)
## Summary

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

Transitions the KQL / Lucene query while transitioning from dataview to
ES|QL mode


![meow](https://github.com/user-attachments/assets/f0572699-c515-4348-8cee-35fdb6545fa4)


### Checklist
- [ ] [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
2025-01-15 10:41:11 +02:00
Georgiana-Andreea Onoleață
10cc89182f
[ResponseOps][UI] - EUI Visual Refresh integration and QA (#204352)
## Summary

Closes: https://github.com/elastic/kibana/issues/202551
Closes: https://github.com/elastic/kibana/issues/202550
Closes: https://github.com/elastic/kibana/issues/202549
Closes: https://github.com/elastic/kibana/issues/202548

Meta: https://github.com/elastic/kibana/issues/202547

Summary

- Buttons with `success` color have been updated to `primary`
- Replaced "textSuccess" to "successText"
example: Edit connector -> **Save** button
<img width="756" alt="Screenshot 2024-12-17 at 15 32 14"
src="https://github.com/user-attachments/assets/5d953c7a-6855-4718-98ab-fc89c516ff8d"
/>

- All references to renamed tokens have been updated to use the new
token name
- Replaced the color utility functions with EUI color tokens as they
will be deprecated
- All usage of color palette tokens and functions now pull from the
theme
- changed severity colors in Borealis

Amsterdam:
<img width="1931" alt="Screenshot 2024-12-18 at 11 50 51"
src="https://github.com/user-attachments/assets/401465b5-b589-47c7-82a6-8211f06c13a5"
/>

Borealis: 
<img width="1925" alt="Screenshot 2024-12-18 at 11 50 06"
src="https://github.com/user-attachments/assets/47ebcba7-70b0-4875-906a-55f509e0b5ca"
/>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-15 09:07:25 +02:00
Kibana Machine
112acc1ae8
[api-docs] 2025-01-15 Daily api_docs build (#206700)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/953
2025-01-15 07:06:15 +00:00
Ignacio Rivas
567eedbc52
[Console] Add syntax highlighting for ESQL language (#206410) 2025-01-14 17:38:38 -07:00
Tiago Costa
55e02e486a
chore(NA): update versions after v7.17.28 bump (#206648)
This PR is a simple update of our versions file after the recent bumps.
2025-01-15 00:28:08 +00:00
elastic-renovate-prod[bot]
ee6316990c
Update dependency @types/diff to v7 (main) (#206586)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@types/diff](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/diff)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/diff))
| devDependencies | major | [`^6.0.0` ->
`^7.0.0`](https://renovatebot.com/diffs/npm/@types%2fdiff/6.0.0/7.0.0) |

---

### Configuration

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

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

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

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

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkRhdGFEaXNjb3ZlcnkiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2025-01-14 18:35:03 -04:00
elastic-renovate-prod[bot]
ca33120c66
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to f2813ac (main) (#206675)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `eef54b3` ->
`f2813ac` |

---

### Configuration

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

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

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

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

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-01-14 16:18:43 -06:00
Hannah Mudge
686571547f
[Dashboard][Collapsable Panels] Swap react-grid-layout for kbn-grid-layout (#205341)
Closes https://github.com/elastic/kibana/issues/190446

## Summary

This PR swaps out `react-grid-layout` for the new internal
`kbn-grid-layout` in the Dashboard plugin. This is the first major step
in making collapsible sections possible in Dashboard.

- **`react-grid-layout` (before)**:


https://github.com/user-attachments/assets/ca6ec059-7f4a-43fb-890e-7b72b781e50b

- **`kbn-grid-layout` (after)**:


https://github.com/user-attachments/assets/3d3de1f3-1afc-4e6b-93d6-9cc31a46e2cf

### Notable Improvements

- Better handling of resizing panels near the bottom of the screen
   
  | `react-grid-layout` | `kbn-grid-layout` |
  |--------|--------|
| ![Jan-09-2025
09-59-00](https://github.com/user-attachments/assets/75854b76-3ad7-4f06-9745-b03bde15f87a)
| ![Jan-09-2025
09-26-24](https://github.com/user-attachments/assets/f0fbc0bf-9208-4866-b7eb-988c7abc3e50)
|


- Auto-scroll when dragging / resizing panels near the top and bottom of
the screen, making it much easier to move panels around by larger
distances

  | `react-grid-layout` | `kbn-grid-layout` |
  |--------|--------|
| ![Jan-09-2025
10-01-30](https://github.com/user-attachments/assets/e3457e5e-3647-4024-b6e6-c594d6d3e1d7)
| ![Jan-09-2025
09-25-35](https://github.com/user-attachments/assets/3252bdec-2bbc-4793-b089-346866d4589b)
|

- More reliable panel positioning due to the use of CSS grid rather than
absolute positioning via pixels

  | `react-grid-layout` | `kbn-grid-layout` |
  |--------|--------|
| ![Screenshot 2025-01-09 at 9 32
52 AM](https://github.com/user-attachments/assets/06bd31a4-0a9f-4561-84c3-4cd96ba297b0)
| ![Screenshot 2025-01-09 at 9 35
14 AM](https://github.com/user-attachments/assets/573dab98-3fb9-4ef6-9f37-c4cf4d03ce52)
|

- Better performance when dragging and resizing (see
https://github.com/elastic/kibana/pull/204134 for a more thorough
explanation) and a smaller bundle size than `react-grid-layout`

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

This PR contains a significant change to the Dashboard layout engine,
which means that it carries a decent amount of risk for introducing new,
uncaught bugs with dragging / resizing panels and collision resolution.
That being said, `kbn-grid-layout` has been built **iteratively** with
plenty of testing along the way to reduce this risk.

## Release note
Improves Dashboard layout engine by switching to the internally
developed `kbn-grid-layout`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
2025-01-14 14:51:14 -07:00
Patryk Kopyciński
2c9e55dc44
[Attack discovery] Add utils for testing (#182918)
## Summary

Add `load_attack_discovery_data` script that populates alerts data for
Attack discovery testing

To load Attack discovery data to the existing instance:
```
node x-pack/solutions/security/plugins/security_solution/scripts/load_attack_discovery_data.js --kibanaUrl http://127.0.0.1:5620 --elasticsearchUrl http://127.0.0.1:9220
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
2025-01-14 22:45:28 +01:00
Tiago Costa
0640f38b7a
skip flaky suite (#204152) 2025-01-14 21:34:44 +00:00
Tiago Costa
2039dab1ca
skip flaky suite (#205731) 2025-01-14 21:33:51 +00:00
Mason Herron
5803366e04
[Fleet] Show reason for agent/endpoint uninstall (#205815)
## Summary

Closes #197731 

- Using the new `audit_unenroll_reason`, added `Orphaned` and
`Uninstalled` Badges to the table UI to make those entries distinct from
the normal `offline` entries
- Added conditional rendering on the labels at the top of the table to
only show up when the matches are greater than zero
- Updated `offline` counts to be distinct from the `orphaned` and
`uninstalled` items in those labels
- Added Orphaned and Uninstalled filters to status filter dropdown

Screenshot of new: 

![image](https://github.com/user-attachments/assets/9126f50d-03e4-4a67-9a20-b5b358478054)


### 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/src/platform/packages/shared/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

n/a


## Release Note
Improves filtering & visibility of `Uninstalled` and `Orphaned` Agents
in Fleet, by differentiating them from `Offline` agents. Status filters
have been added for both `Uninstalled` and `Orphaned` agents. Agent
`status` runtime field has been updated to return accordingly when an
agent is `uninstalled` or `orphaned`. Additionally, improved UI by
hiding agent labels with `0` agent matches.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-14 20:55:12 +00:00
Rodney Norris
87d349b3eb
Search: remove appSearch & workplaceSearch doclinks (#206506)
## Summary

Removing App Search & Workplace Search doclink, which are now unused.
2025-01-14 20:51:04 +00:00
Nicolas Chaulet
9c01db9744
[Fleet] Telemetry for space awareness (#206493) 2025-01-14 14:19:00 -05:00
Kevin Delemme
9618e42548
chore(slo): update telemetry data (#206135) 2025-01-14 13:29:25 -05:00
Viduni Wickramarachchi
b8cda36aa8
[Obs AI Assistant] Ensure compatibility with the new semantic_text format (#206510)
## Summary

Elasticsearch is introducing a breaking change in `8.18` and `9.0.0` to
`semantic_text` fields.
This PR ensures compatibility with this new `semantic_text` format.

Relates to https://github.com/elastic/dev/issues/2936

### Changes made
- Remove the `inference` meta field exclusions in recalling from
semantic search connectors (the `inference` subfield won't be returned
anymore with the new `semantic_text` format)
- Set the `index.mapping.semantic_text.use_legacy_format` index setting
to false to force the new format for KB indices and evaluation framework
indices.

The following does not impact Obs AI Assistant as a part of this
breaking change:

| Breaking change | Do we use it? | Is there an impact? |
|--------|--------|--------|
| `inner_hits` is removed and `highlight is introduced | We don't use
`inner_hits` at the moment | No |
| The shape of semantic text field return type is updated to a string
(previously it was an object with a `text` property) | Even though we
query via the `semantic_text` field in KB entries, we don't use the
result of the `semantic_text` field in `_source` | No |
| pre-computed embeddings using a new `_inference_fields` metafield |
Not used | No |


### 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] 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)
2025-01-14 13:19:18 -05:00
Tiago Costa
a05869015c
skip flaky suite (#206056) 2025-01-14 18:08:19 +00:00