Commit graph

85777 commits

Author SHA1 Message Date
Ievgen Sorokopud
437065d9c8
[Attack Discovery][Scheduling] Decouple AD generation logic from the postAttackDiscoveryRoute (#12036) (#216274)
## Summary

These changes decouple the core attack discovery generation
functionality from the `POST
/internal/elastic_assistant/attack_discovery` route.

This will allow us to use this functionality within the upcoming attack
discovery schedule execution handler ([internal
link](https://github.com/elastic/security-team/issues/12004)).

There are no changes in the business logic of the attack discovery
generation process and everything should continue working as before.
2025-04-01 13:00:41 +02:00
Joe Reuter
cc15d3ed65
🌊 Streams: Restore orphaned streams functionality (#215517)
There were a couple places where our UI and API would break on orphaned
streams (classic data streams that exist in the streams API but the
underlying data stream got deleted by the user). As discussed in
https://github.com/elastic/streams-program/discussions/212 , we should
handle this case gracefully. This PR makes sure that the UI doesn't fail
anywhere

##
`x-pack/platform/packages/shared/kbn-streams-schema/src/models/ingest/lifecycle/index.ts`

An unwired ingest stream effective lifecycle can also be an error if the
data stream doesn't exist. This was part of the typescript type, but not
the schema, so using our generated typeguards would fail.

## `x-pack/platform/plugins/shared/streams/server/lib/streams/client.ts`

`client.ensureStream` would not actually do what it claimed - it would
not throw if the stream didn't exist at all. Adjusted the logic so it
does.

##
`x-pack/platform/plugins/shared/streams/server/routes/internal/streams/crud/route.ts`

_details endpoint would throw if the data stream doesn't exist, but it
can just do the search and report a doc count of 0

## All the other changes

This is more of a tangent, but I noticed that on switching to the
management tab it would reload the stream definition because it was a
different route, so the component holding the `useStreamsAppFetch` would
remount.

I fixed this by making the detail route a parent and the individual tabs
children. It's a little awkward because the management tab is the only
one having subtabs. I moved the handling of this into the
`StreamDetailViewContent` component because it wouldn't play well with
our typing of routes otherwise, but the behavior is the same as before,
with the difference that the stream definition is not reloaded if not
necessary.

Also added some api-level tests to make sure it stays that way.
2025-04-01 11:33:36 +01:00
Alberto Blázquez
931d2d652e
Prevent layout shifts caused by AssetInventory-specific components (#216001)
## Summary

This will reduce the current "jumpy" experience improving the perceived
quality while also boosting performance.

Part of the solution for:
- https://github.com/elastic/security-team/issues/12209

Depends on:

- https://github.com/elastic/kibana/pull/215963
- https://github.com/elastic/kibana/pull/212955
- https://github.com/elastic/kibana/pull/215733

### Motivation

The consequence of layout shifts is browsers need to perform a new
rendering cycle, affecting performance negatively:

- **Layout**. This means they need to calculate again the exact position
and size of every visible element, an expensive operation also known as
"reflow".
- **Paint**. Once the layout is ready, browsers need to fill those
pixels with colors, borders, text, shadow, etc...
- **Composite** (Layering and rendering). Finally, browsers put
everything together in different layers and render them on screen.

### Screenshots Before

<details><summary>TBD</summary>

</details>

### Screenshots After

<details><summary>TBD</summary>

</details>

### 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/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)
- [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.
- [ ] [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

No risk since feature is not publicly available yet.
2025-04-01 12:27:02 +02:00
jennypavlova
a987209d3f
[APM][OTel] Add url.full fallback (#215397)
## Summary

This PR fixes the missing URL in the transaction summary 

## Testing [_UPDATED_]
- [SOLVED  ⬇️ ] ~~This is tricky to test ( I am trying to create a
serverless instance from this PR and it should make it easier)~~
- Testing on serverless (the env linked in the PR) 
   - EDOT service (I run locally in Docker and connect to the env):  
<img width="1904" alt="image"
src="https://github.com/user-attachments/assets/c3a7ab56-5b8f-42a5-8033-55ccbb915b40"
/>

  - Other generated service (from the env):

![image](https://github.com/user-attachments/assets/e76f2901-050a-4ee3-b536-a057d45454e2)
   
- In the meantime 
   - using synthtrace: Case to run/expectation
- `node scripts/synthtrace otel_edot_simple_trace.ts` / The trace
summary should be visible
      

![image](https://github.com/user-attachments/assets/b9ad8a8b-f89a-449c-a053-a5628c2fa620)

- `node scripts/synthtrace simple_trace.ts` / The trace summary should
still be visible (using `url.full` in this case)
      

![image](https://github.com/user-attachments/assets/93ffac41-9f79-4d09-ab69-ae5c8e782750)
2025-04-01 11:50:28 +02:00
Joe Reuter
c5e0b05454
🌊 Streams: Selectors for derived samples (#213638)
Simplified massively from first state and just plugging in reselect in
places where that's suitable (here to calculate the currently relevant
sample documents).

Also does a drive-by layout fix.

~Introduces a new xstate helper for derived data.~

~In most cases, the actor and state machine model of xstate is great,
but for derived data using pure functions, the semantics of the
`useMemo` hook with defined dependencies is often easier to understand
and eliminates the risk of forgetting to update the derived data
correctly in some cases.~

~It's about using the right tool for the right job - you don't need to
choose between the dependency list of useMemo and the actor model of
xstate, you can use what fits the case, without compromising
performance.~

~This is the API:~
```ts
const myActorContext = withMemoizedSelectors(
  createActorContext(myMachine),
  {
    derivedView: createSelector(
      [
        (ctx: MyContextType) => {
          return ctx.dependency1;
        },
        (ctx: MyContextType) =>
          ctx.dependency2,
      ],
      (dependency1, dependency2) => {
        return // expensive calculation only running when necessary
      }
    ),
  },
  (context) => (context.subMachine ? [context.subMachine] : []) // optional subscribe to changes of submachines as well
);


// in react use useMemoizedSelector hook
// this will cause the component to rerender if the selector is returning a new value
myActorContext.useMemoizedSelector('derivedView')
```

~This is using reselect to declare the dependencies similar to a react
useMemo hook - the actual selector will only run if the dependencies
change, leading to similar semantics as useMemo, with the additional
benefit that if the value is used in multiple places, it's still just
calculated once. The component calling `withMemoizedSelectors` only
re-renders if the value returned by the selector changes. The selector
itself only re-runs if one of the declared dependencies changes.~

~Everything is type-safe by capturing the types of the reselect selector
object via inferred type param and using it in the `useMemoizedSelector`
type.~
2025-04-01 10:47:31 +01:00
Sergi Romeu
8fc00a088f
[APM][OTel] Fix spanlink invalid filter (#215322)
## Summary

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

This PR adds an optional check for `span.id` (this value is always
populated) when redirecting to an error within a span link.
2025-04-01 11:43:19 +02:00
Marco Vettorello
f8b3e93573
Upgrade @elastic/charts to 69.2.1 (#216430)
## Summary

This PR updates `@elastic/charts` library to 69.2.1, that reverse the
wrongly merged multi-time axis breaking change and keeps only the new
feature added to Metric about exposing the fontsize and the color
styling


[v69.2.0](https://redirect.github.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6920-2025-03-26)
[Compare
Source](https://redirect.github.com/elastic/elastic-charts/compare/v69.1.1...v69.2.0)

Features
metric: Expose both font size and color stylings on the extra prop
([#​2627](https://redirect.github.com/elastic/elastic-charts/issues/2627))
([2d21118](2d21118995))
2025-04-01 11:31:12 +02:00
Marta Bondyra
f5b185a28f
[kbn-grid-layout][dashboard] Basic keyboard interaction (#208286)
## Summary
Adds keyboard navigation for drag-and-drop interactions
Fixes https://github.com/elastic/kibana/issues/211925
Fixes https://github.com/elastic/kibana/issues/190448

### Supported features 
1. Resize panels


https://github.com/user-attachments/assets/ba7add16-a0c6-4f15-9f3b-0f8ef7caf8ac

2. Drag panels within the same section (dragging between sections is
pending)


https://github.com/user-attachments/assets/a1fd80af-63ca-4fa2-bded-3db9968a8366

3. Move rows up/down


https://github.com/user-attachments/assets/8d7e8d7d-b1bf-4abe-9cc2-28eeea9b43f8

### Interaction Flow

1. Start interaction with `Space` or `Enter`
2. Move using arrow keys
3. Finish by confirming (`Enter`/`Space`) or canceling (`Escape`)
(blurring also confirms the changes)

### Scrolling Behavior:
* Default browser scrolling is disabled in interaction mode to avoid
unexpected behavior and edge cases that would overcomplicate this simple
implementation.
* Scrolling occurs when the user reaches the edge of the screen while
resizing or dragging, allowing them to continue the interaction
smoothly.
* When the operation is confirmed, we also scroll to the element to make
sure it's in view.

### Missing (planned for another PR):
* A11y announcements 
* Dragging between sections
* This feature is not well unit-tested, but it's very difficult to do it
without mocking the crucial pieces of functionality. I'd vote to leave
it for now and add a few functional tests once we decide a strategy for
it, since drag and drop interactions are anyway quite difficult to
unit-test reliably anyway.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 11:29:02 +02:00
Sergi Romeu
8767adc622
[A11y][APM] Add aria-label to technical preview badge (#216483)
## Summary

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

This PR adds the `aria-label` prop so screen readers work with this
tooltip text.

![image](https://github.com/user-attachments/assets/8c3d345d-68be-42cb-ab6f-addafd0d7683)
2025-04-01 11:08:27 +02:00
Sergi Romeu
54ce010161
[A11y][APM] Add aria-label to fold traces button (#216485)
## Summary

Fixes #212228

This PR adds `aria-label` to the fold/unfold traces button.


![image](https://github.com/user-attachments/assets/7c14d3d1-c246-4b85-a80c-4fb51dd1f305)
2025-04-01 11:06:55 +02:00
Luke Gmys
65bb560539
[Security Solution] Rename use_data_view to use_data_view_spec (#216461)
## Summary

Just naming things, the goal is to highlight the fact the hook returns
the spec and not the DataView instance.
No testing is required as the change does not alter the logic.
2025-04-01 09:40:25 +01:00
Julia Bardi
69a7108313
[Fleet] enable flaky test (#216460)
## Summary

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


### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-04-01 10:29:23 +02:00
Alex Prozorov
1b9bf801e4
[Cloud Security] handle grouping in multi value fields (#215913)
## Summary

Purpose of this PR is to handle grouping of multi-value fields which are
introduced by Qualys VDMR integrations.
This PR adds the capability to flatten grouping results of the following
fields - vulnerability.id, package.name, package.version and
package.fixed_version, which are all ECS fields.

It continues the changes of this
[PR](https://github.com/elastic/kibana/pull/213039).

### Checklist

**The following topics will be merged as part of another PR**
### Vulnerabilities data grid and Flyout
- [x] grouping by CVE should be handled properly in the UI.
- [x] multi value fields are flattened - each value is counted as
separate group key.
- [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)


### Screenshots

Grouping before fix by multiple values

![image](https://github.com/user-attachments/assets/21756172-819c-4836-ba3a-79ae9ed6cbad)

Flatten by each value

![image](https://github.com/user-attachments/assets/d329d3f7-b499-4abb-8e40-6c8580be9202)
2025-04-01 11:26:46 +03:00
Vitalii Dmyterko
b3d750bc49
[Security Solution][Detection Engine] adds spaces telemetry for detection rules (#215393)
## Summary

 - addresses https://github.com/elastic/security-team/issues/12000
 - adds telemetry for rules in spaces: 
   - number of spaces, detection rules added
   - number of rules in each space

---------

Co-authored-by: Dan Dillinger <ddillinger@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 09:07:08 +01:00
Julian Gernun
2881895b45
[Response Ops][Rules] Settings as Flyout instead of Modal (#216162)
## Summary

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

<img width="597" alt="Screenshot 2025-03-28 at 12 28 08"
src="https://github.com/user-attachments/assets/6f4b5cb0-0778-4771-851a-a0a2d295f6b1"
/>

## Release note:
Moves rule settings to a flyout instead of a modal
2025-04-01 09:59:25 +02:00
Kibana Machine
74376338e4
[api-docs] 2025-04-01 Daily api_docs build (#216575)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1029
2025-04-01 07:19:14 +01:00
Tiago Costa
b87374e466
skip flaky suite (#192459) 2025-04-01 04:43:46 +01:00
Catherine Liu
96598fc019
[Controls] Fix control styles and invalid selection icon for Borealis (#213851)
## Summary

Closes https://github.com/elastic/kibana/issues/210614.
Closes https://github.com/elastic/kibana/issues/210615.
Closes https://github.com/elastic/kibana/issues/210616.

This is a follow up to the Borealis updates to fix controls
colors/styles. This also fixes the text color of the range slider number
inputs to match the invalid state.

#### Light mode
![Screenshot 2025-03-10 at 5 54
28 PM](https://github.com/user-attachments/assets/1f3cfe7c-0a0f-4fed-9486-3aaee1b33fb1)

#### Dark mode
![Screenshot 2025-03-10 at 5 33
48 PM](https://github.com/user-attachments/assets/dda36740-93fd-4adc-bffe-c12aa4be3b4c)

#### Options List control with selection that results in no data

![Screenshot 2025-03-10 at 5 49
05 PM](https://github.com/user-attachments/assets/b8b6310b-c600-4703-af28-ee60d16339e0)

#### Range Slider control with valid selection that results in no data
![Screenshot 2025-03-10 at 5 49
01 PM](https://github.com/user-attachments/assets/afbf971b-95df-414f-8b99-2e3e0822fc73)

#### Range Slider control with invalid selection
![Screenshot 2025-03-10 at 5 48
48 PM](https://github.com/user-attachments/assets/dae00db3-8c94-47e5-a706-b43fa9e0787e)




### 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-04-01 01:04:43 +01:00
Saikat Sarkar
7627c79065
[Playground] Remove Tech Preview badge from Playground (#216530)
## Summary
This PR removes the Tech Preview badge from the Playground

**Before**
![Screenshot 2025-03-31 at 11 52
00 AM](https://github.com/user-attachments/assets/29a68467-5d57-4cf1-a933-b49924de94fd)

**After**
![Screenshot 2025-03-31 at 11 52
26 AM](https://github.com/user-attachments/assets/8423d307-8b0f-4f74-bf9b-06752002af91)



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

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-03-31 16:38:48 -06:00
elastic-renovate-prod[bot]
5b3db2b69b
Update dependency @types/diff to ^7.0.2 (main) (#216427)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@types/diff](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/diff)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/diff))
| devDependencies | patch | [`^7.0.1` ->
`^7.0.2`](https://renovatebot.com/diffs/npm/@types%2fdiff/7.0.1/7.0.2) |

---

### 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://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkRhdGFEaXNjb3ZlcnkiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-03-31 19:16:59 -03:00
elastic-renovate-prod[bot]
1846807c25
Update dependency lru-cache to ^11.1.0 (main) (#216517)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [lru-cache](https://redirect.github.com/isaacs/node-lru-cache) |
dependencies | minor | [`^11.0.2` ->
`^11.1.0`](https://renovatebot.com/diffs/npm/lru-cache/11.0.2/11.1.0) |

---

### Release Notes

<details>
<summary>isaacs/node-lru-cache (lru-cache)</summary>

###
[`v11.1.0`](https://redirect.github.com/isaacs/node-lru-cache/compare/v11.0.2...v11.1.0)

[Compare
Source](https://redirect.github.com/isaacs/node-lru-cache/compare/v11.0.2...v11.1.0)

</details>

---

### Configuration

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

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

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

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

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-03-31 22:58:09 +01:00
Rodney Norris
6b511b31e6
[Search][Playground] Query Mode Fixes (#216510)
## Summary

- Better handle null/undefined values query utility functions
- Fix scroll for larger query output editor
2025-03-31 16:55:45 -05:00
Jean-Louis Leysens
606472a756
[Saved objects] Update forward compatibility schema to only return known values w/o converting them (#216081) 2025-03-31 23:54:21 +02:00
Marta Bondyra
dc1d36b50b
[Markdown] migrate scss to emotion (#216351)
## Summary

Part of https://github.com/elastic/kibana/issues/207852
Migrates markdown to emotion.
2025-03-31 22:35:13 +02:00
Marta Bondyra
b2c8762dce
[Dashboard] do not change the geometry of hover actions on drag (#216412)
## Summary

While working on [PR
#208286](https://github.com/elastic/kibana/pull/208286), I found a small
but noticeable bug: When using keyboard navigation with compacted hover
actions, the element shifts slightly left when moving up/down.


https://github.com/user-attachments/assets/71e44671-c98a-4e09-a0a0-1c79efeefa25

####  Cause:
* `sensorOffsets` are calculated before activation, when the panel has a
1px border.
* Activating the element increases the border to 2px, throwing off the
position calculation.

#### Why we cannot use outline (that is used for panels to avoid
shifting the layout):

For panels, this problem is avoided by using outline, but here we can't
because `outline` applies uniformly to all sides.
Here, we need to avoid displaying a bottom border.

#### Before fix
(Notice how hover actions get slightly wider)


https://github.com/user-attachments/assets/a6b8dd02-4be2-4425-bf28-2af6dde3b023


https://github.com/user-attachments/assets/03c5aa71-cd3c-4181-bb4c-05a2003775f5

After Fix:
The dimensions of the whole active panel and actions are stable:


https://github.com/user-attachments/assets/d7ba766e-2567-4c3e-a2d6-9c95de2e2f9a


https://github.com/user-attachments/assets/220ee96f-29b8-4f68-bd9c-1d2ee15b9e5d

I know this makes the implementation slightly more complex, but I
couldn't find a simpler solution that covers all cases (dotted line
forces us to us `outline` or `border` for panel, but no bottom border
forces us to use `border` (which causes this problem) or `box-shadow`)
2025-03-31 22:34:41 +02:00
Michel Losier
bbaa054148
Format last activity value in fleet agent details view as datetime (#215531)
## Summary

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

In the Fleet agent details view the last activity row shows the relative
time since the last report from an agent. This value is not as useful if
a user needs to debug why an agent is no longer reporting. Additionally,
the text content in the integration inputs are not selectable and
copyable.

* Changes the agent details last activity value to show the formatted
datetime. 
* The text for integration inputs in agent details is now selectable and
copyable.
2025-03-31 21:25:17 +01:00
Drew Tate
4970bb95cc
[ES|QL] Hide "not" operators from suggestions menu (#216355)
## Summary

in https://github.com/elastic/kibana/pull/205565 we accidentally removed
the behavior where we don't show `NOT LIKE` and `NOT RLIKE` in the
suggestions list. We want to show these eventually but right now, it's
broken behavior:



https://github.com/user-attachments/assets/0a7f860d-3a12-49cf-94b3-668848cff6ae

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-31 13:25:08 -06:00
Lola
35b7a4aa12
[Cloud Security] fix the alert severity order (#215813)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Alert status Order was showing Low to High rather the showing the
highest status of severity to the lowest severity.
This PR removes the reverse and shows severity from Critical to Low. I
applied ranking order for critical to low to address the sort order

<img width="664" alt="image"
src="https://github.com/user-attachments/assets/2e0f4974-ea08-4bc4-ae1c-53b0c0f53561"
/>
<img width="408" alt="image"
src="https://github.com/user-attachments/assets/77db4442-53eb-44b5-a2d1-8dbbf1858dff"
/>

<img width="628" alt="image"
src="https://github.com/user-attachments/assets/947e8cc2-989b-4b9c-bffe-97ab2e15309d"
/>
2025-03-31 20:18:03 +01:00
Davis McPhee
bf7de0e6b9
[Discover] Support state updates across tabs (#215620)
## Summary

This PR adjusts the approach introduced in #214861 to ensure state
updates work consistently across tabs, even after switching tabs during
async operations. The `currentTabId` prop has been removed from the
central state since it can't be relied on in actions, and instead tab
IDs are injected using a `CurrentTabProvider`. This allows selectors to
work the same as they did before, and tab specific actions have been
updated to use a standard `TabAction` interface that accepts a tab ID
and prevents leaking state changes.

This approach is safer but adds some complexity, so for actions
dispatched from React components, a `useCurrentTabAction` hook has been
added to handle injecting the current tab ID. We also still need to
access tab state within `DiscoverStateContainer` for now, so two utility
methods (`injectCurrentTab` and `getCurrentTab`) have been added to make
this easier. Since `DiscoverStateContainer` is scoped to a single tab,
this should be safe, and ideally temporary until we get rid of it
completely.

Resolves #215398.

### 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/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
- [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
- [ ] 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
- [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 15:41:59 -03:00
Jacek Kolezynski
63575a8320
[Security Solution] Improve documentation for version and revision fields (#216074)
**Resolves: https://github.com/elastic/security-docs/issues/3545**

## Summary

I am fixing documentation for the version and revision fields.
I used this page as the base documentation:
https://docs.elastic.dev/security-solution/dev-docs/detections/rule-versions

The changes:
- by marking the RuleVersion as read-only I am making sure we are
properly documenting that this field is not to be used in the request.
It is only returned in the response.
- by introducing RuleRevision type and marking it as read-only, I am
doing the same for this field, saying that this field is not supposed to
be used in the request.
- I am not changing any code in the app, as the ticket says we shouldn't
do any breaking changes and the update of the version should not cause
400 error. Basically current behavior is kept: users can still update
the version to whatever value they want, including going backwards, and
the changes to revision field is completely ignored.
- I am adding a condensed description of these fields.

I wanted to introduce an internal link between these two fields, but I
couldn't make it work in Bump.sh (even though this should work, normal
Markdown links) so I abandoned this idea.

You can also use this [link](https://bump.sh/jkelas2/doc/kibana_wip2)
where I deployed the generated bundled doc.

Screenshots:

<img width="664" alt="image"
src="https://github.com/user-attachments/assets/34d82eb2-f7f0-4369-ad8e-2fd3c1f35447"
/>

<img width="660" alt="image"
src="https://github.com/user-attachments/assets/dc7772af-0185-4850-816e-60be003775d6"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 20:06:13 +02:00
Nathan Reese
f408a513dd
[embeddable] fix race condition in useBatchedPublishingSubjects (#216399)
Closes https://github.com/elastic/kibana/issues/214176 and
https://github.com/elastic/kibana/issues/214853

[upgrade from chrome 134 to 135 in functional test
runner](https://github.com/elastic/kibana/issues/213919) revealed a race
condition in `useBatchedPublishingSubjects` where batched observables
could emit new values before `useEffect` sets up the subscription. This
PR resolves this issue by setting up subscription in useRef, which has
no timing delays.

In chrome 134, `useBatchedPublishingSubjects` `useEffect` gets called
(setting up subscription) before lens embeddable emits any changes to
batched observables.
<img width="300" alt="chrome134"
src="https://github.com/user-attachments/assets/b0356f74-e0c7-4d93-a23a-ace519194d5d"
/>

In chrome 135, `useBatchedPublishingSubjects` `useEffect` gets called
after lens embeddable emits changes to batched observables. This causes
the lens embeddable to not render since the `LensEmbeddableComponent`
has a stale value for `expressionParams`.
<img width="300" alt="chrome135"
src="https://github.com/user-attachments/assets/320bfb7e-8b3f-4b48-a138-1c47c5ff9961"
/>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 11:21:56 -06:00
Marta Bondyra
bee34d5d41
[Legacy controls] scss to emotion migration (#216400)
## Summary

Part of https://github.com/elastic/kibana/issues/207852
2025-03-31 18:55:21 +02:00
Alberto Blázquez
3ee795780d
Implement "Group by" feature in Asset Inventory page (#212955)
## Summary

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

Depends on:

- https://github.com/elastic/kibana/pull/213212
- https://github.com/elastic/kibana/pull/215963
- https://github.com/elastic/kibana/pull/216354

Add a "Group by" menu dropdown on the right side of the data grid to
render rows grouped recursively with a maximum of 3 group levels i.e.
entities grouped by type (1), category (2), risk(3). It supports
grouping by custom fields as in Findings.

Pagination state of each recursive group is kept locally, while the
top-level group's pagination is kept in the URL query-string. This is to
preserve consistency with the data-table's pagination state which is
also kept in the URL.

### Component hierarchy

<img width="1389" alt="Screenshot 2025-03-28 at 16 00 31"
src="https://github.com/user-attachments/assets/d4c30849-5d76-4589-867f-718847e11e8b"
/>

### Screenshots

<details><summary>TBD Menu Dropdown</summary>
</details> 

<details><summary>Group by none</summary>
<img width="1374" alt="Screenshot 2025-03-26 at 17 00 58"
src="https://github.com/user-attachments/assets/5b319f7b-d63a-4bce-bf24-15549cda254d"
/>
</details>

<details><summary>TBD Group by entity type</summary>
</details>

<details><summary>TBD Group by source</summary>
</details>

<details><summary>TBD Group by entity type, then source</summary>
</details>

<details><summary>TBD Group by source, then entity type</summary>
</details>

<details><summary>TBD Group by cloud account</summary>
</details>

<details><summary>Group by custom field (entity.id)</summary>
<img width="1348" alt="Screenshot 2025-03-26 at 17 02 45"
src="https://github.com/user-attachments/assets/46dc1f25-2bd4-4571-888d-5becf011b7c6"
/>
</details>

> [!IMPORTANT]
> We can't group by asset criticality at the moment because the field is
not present in the current dataset.

<details><summary>TBD Group by asset criticality</summary>
</details>

### Definition of done

- [x] Add a toggle to switch between **DataGrid** and **Group by View**
visualizations.
- [x] Implement the **Group by View** using the `@kbn/grouping` package
for consistency and reusability.
- [x] Provide a dropdown menu to select grouping fields, including:
(updated as per [this
epic](https://github.com/elastic/security-team/issues/10344))
- ~~**Asset type (asset.type)**~~ -> **Asset criticality
(asset.criticality)**
- ~~**Asset category (asset.category)**~~ -> **Entity type
(entity.category)**
- ~~**Risk (host.risk.calculated_level)**~~ -> **Cloud account
(cloud.account.id)**
  - ~~**Criticality (asset.criticality)**~~ -> **Source (entity.type)**
- **Custom field**: Allow users to input/select a custom field for
grouping.
- [x] Display the following information for each group row:
  - The grouped term value.
  - The count of assets in that group.
- A button to expand the group and view the assets in a filtered
**DataGrid**.
- [x] Ensure group expansion dynamically displays assets in a DataGrid
filtered by the selected grouping field.
- [x] **Pagination**: Display 10 groups per page by default, with
pagination controls to navigate between pages.
- [x] **Rows per page dropdown**: Allow users to adjust the number of
groups displayed per page (options: 10, 25, 50, 100).

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

### Risks

No risk since code is still hidden behind the *Enable Asset Inventory*
advanced setting and the beta *Cloud Asset* integration must be
installed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 17:25:36 +01:00
Sergi Romeu
a23c6d0662
[A11y][APM] Change tpm abbreviation to trace per minute for screen-readers (#216282)
## Summary

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

This PR uses the `EuiScreenReaderOnly` component to spell out trace per
minute instead of its abbreviation for screen readers

---------

Co-authored-by: jennypavlova <jennypavlova94@gmail.com>
2025-03-31 16:36:26 +01:00
Vitalii Dmyterko
f199b4ceff
[Security Solution][Detection Engine] adds missing ES|QL/New terms rule status telemetry (#214974)
## Summary

- partly addresses https://github.com/elastic/security-team/issues/12000
- adds missing ES|QL rule status telemetry
- adds missing New terms rule status telemetry

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 16:18:02 +01:00
Nicolas Chaulet
d11c1e28ac
[Fleet] Support bulk uninstall action in new installed integrations UI (#216226) 2025-03-31 11:17:09 -04:00
Saikat Sarkar
0f4ce97f0e
[Onboarding] Redirect viewers to the discover page as the landing page (#216357)
## Summary
This PR updates the landing page for viewers, directing them to the
**discover** page instead of the **Index Management** page, as they do
not have permission to create or modify indices.


https://github.com/user-attachments/assets/e6fa0808-a54e-43b5-b825-278edd766271




### 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
- [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
- [ ] 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-03-31 16:16:21 +01:00
Jared Burgett
2b85484c1e
Enabling Security's Entity store on Serverless (#216064)
Removes the "disabled" flag for Security's Entity Store feature from the
Security Solution's serverless configuration (i.e., effectively enabling
the feature in Serverless).

This feature has already been tested in ECH.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 10:09:45 -05:00
Julia Bardi
7adc1821d8
[Fleet] skip output validation when create/update package policy (#216438)
## Summary

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

Skip output validation on bump agent policy, it's unnecessary after the
package policy create/update logic already does the validation with the
correct integration output.

To verify:
- Create an agent policy with a remote ES output as data output
- Add fleet server integration - expect error as the default remote ES
output can't be used with fleet server
- Change integration output to the ES output - expect creation
successful
- Edit fleet server integration (keep ES output) - expect update
successful

<img width="1685" alt="image"
src="https://github.com/user-attachments/assets/42a0365c-1f00-42b6-b685-7797e9c916de"
/>
<img width="1714" alt="image"
src="https://github.com/user-attachments/assets/af22cea1-d8b3-4d44-a24d-78dff49eeaaa"
/>
<img width="1699" alt="image"
src="https://github.com/user-attachments/assets/aafc7e5c-b9e6-47b8-9001-16e08cf06205"
/>
<img width="1704" alt="image"
src="https://github.com/user-attachments/assets/e6e7ef47-918a-423f-a54c-11836362d495"
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/128ef119-2178-4971-9e0f-bb773c2f774a"
/>
<img width="1707" alt="image"
src="https://github.com/user-attachments/assets/cd49716d-aa38-42ff-9329-3d97f08f9e7e"
/>


### 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-03-31 16:07:23 +01:00
seanrathier
e86127ab49
[Cloud Security] Hide agentless traffic filtering callout in Serverless (#216239) 2025-03-31 11:04:28 -04:00
Elena Stoeva
b1b8b190bd
[Advanced Settings] Move security settings validation config (#216440)
## Summary

In https://github.com/elastic/kibana/pull/170234, we added validation on
the security solution settings in serverless that is enabled through the
`xpack.securitySolution.enableUiSettingsValidations` config setting. In
this PR, we move this setting to `config/serverless.security.yml` so
that it follows the sustainable architecture principles.
2025-03-31 15:59:07 +01:00
Arturo Lidueña
3c9593b1a6
[obs AI Assistant] fix title_conversation failing test (#216112)
Closes #215952

[obs AI Assistant] fix title_conversation failing test
2025-03-31 15:56:32 +01:00
Nick Peihl
c4f7c649b1
[Dashboard] Inject / extract tag references (#214788)
Fixes #210619

## Summary

Provides a tags array on the request and response bodies of dashboards.

This allows consumers of the Dashboards HTTP API and internal RPC API to
add an array of tag names to the attributes in the body of create and
update endpoints. The dashboard server will be responsible for
converting the tag names into references in the saved object.

If, during creation or update, a tag name does not have a matching tag
saved object, a new tag saved object will be created. If the user lacks
permissions to manage tags, then an error will be logged in the server
and the tag will not be added to the dashboard.

The server also injects the tag references as an array of tag names in
the attributes of the response body of get and search endpoints of the
HTTP and RPC APIs.

For backwards compatibility in create and update endpoints, tags can
alternatively be specified in the `references` array in the options
instead of (or in addition to) the `attributes.tags` in the request
body. Similarly, for backwards compatibility, tag references are
returned in the `references` of the response body of get and search
endpoints.

Client-side tag handling is out of scope for this PR. Dashboards listing
page and dashboard settings continue to use the tag references and do
not use the `tags` attribute in the response.

For example:

Here's how we currently create a dashboard with tag references.
```
## Creating a dashboard with tag references
POST kbn:/api/dashboards/dashboard
{
  "attributes": {
    "title": "my tagged dashboard"
  },
  "references": [
    {
      "type": "tag",
      "id": "37aab5de-a34d-47cb-9aa5-9375d5db595f",
      "name": "tag-ref-37aab5de-a34d-47cb-9aa5-9375d5db595f"
    },
    {
      "type": "tag",
      "id": "5ed29bba-c14d-4302-9a8c-9602e40dbc2a",
      "name": "tag-ref-5ed29bba-c14d-4302-9a8c-9602e40dbc2a"
    },
    {
      "type": "tag",
      "id": "fc7890e8-c00f-44a1-88a2-250e4d27e61d",
      "name": "tag-ref-fc7890e8-c00f-44a1-88a2-250e4d27e61d"
    }
  ]
}
```

With this PR, creating a dashboard with tags is much simpler.

```
## Creating a dashboard with tag names
POST kbn:/api/dashboards/dashboard
{
  "attributes": {
    "title": "my tagged dashboard",
    "tags": [
      "boo",
      "foo",
      "bingo",
      "bongo"
    ]
  }
}

```

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

- [ ] If there are more than one tag saved objects with the same name,
only one of the tag references will be added to the saved object when
creating a dashboard. Creating tags with duplicate names are not
permitted via the UI. But there is no such restrictions when creating
tags from imported saved objects. Having multiple tags with the same
name is an edge case that Kibana guards against with reasonable
restrictions, so I think we should not be too concerned about it.
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 15:52:24 +01:00
Mario Rodriguez Molins
8728a23282
Fix unenroll inactive agent tasks if first set of agents returned is equal to UNENROLLMENT_BATCH_SIZE (#216283)
## Summary

Fix the unenrollment inactive agent task to be able to unenroll some
agents when the number of agents returned by the first
`getAgentsByKuery` trigger is equal to the limit of
`UNENROLLMENT_BATCH_SIZE`.


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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-31 15:55:14 +02:00
Ania Kowalska
f270bd5956
Discover tabs bar menu (#216075)
## Summary

Closes #216070 

This PR implements `TabsBarMenu` feature. After clicking on three dots
icon on the right side of menu bar we should see a popup with 2 lists:
- Opened tabs
- Recently closed

Those should be rendered separately and have a separate overflow scroll.
`Recently closed` can be constrained to a chosen constant in a followup
PR, when we have real data.

Clicking on a single element behaves differently in opened tabs and
recently closed.

**Opened tabs**: 
- it should indicate which tab is currently visible (with a checkmark)
- clicking on a single element should navigate to clicked tab
(implemented  )

**Recently closed**:
- it shouldn't have an indicator
- clicking on a single element should restore a tab (TO BE DONE in a
separated PR)

<img width="298" alt="Screenshot 2025-03-26 at 16 45 26"
src="https://github.com/user-attachments/assets/40f8250f-237c-405d-b31c-8ddfe5ca05c5"
/>

### 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/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
- [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
- [ ] 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-03-31 15:28:59 +02:00
Vitalii Dmyterko
3247960336
[Security Solution][Detection Engine] fixes preview logged requests (#215177)
## Summary

During upgrade of ES client in
https://github.com/elastic/kibana/pull/208776, preview logged requests
started to show `index` property in request body.
This PR fixes issue
2025-03-31 14:24:49 +01:00
jennypavlova
cd8f18eed8
[APM][OTel] Service inventory icons should be visible if the agentName is returned (#216220)
Closes #214562 

## Summary

This PR fixes the issue with the service icons overridden by the merge
of the service stats

## Testing
As this is a bit tricky to test - it needs a bit of refreshing /
changing the time range, etc. to reproduce
The way to verify the fix is to check the service overview - every
service that has an icon there should have an icon in the service
inventory:


https://github.com/user-attachments/assets/e401554b-6a39-440b-a52b-a126e42eacd5
2025-03-31 14:07:17 +01:00
Jedr Blaszyk
6adc005809
[Serverless/Connector] Fix bug with index name generation logic (#216293)
## Summary

Improve index name generation logic. Allow any ingex name. Use
combination of lodash kebabCase + some custom checks to safely map this
into valid ES index name.

Added unit tests

### 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/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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)
- [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)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-31 15:06:10 +02:00
Maria Iriarte
c7218a3fdb
[Graph] Remove transparentize color function (#216072)
## Summary

Removes `Graph` usage of color functions in favor of color tokens as
requested in
https://github.com/elastic/kibana/issues/199715#custom-colors.

The
[guidelines](https://docs.google.com/document/d/1IAKbasq1nDfqd2IU3KdP8cwD3uCCAwkIekKRq7zgyWg/edit?tab=t.0#heading=h.5rebxirnvgy5)
recommend using opaque colors when possible.

## Screenshots

### Before

<img width="1726" alt="Screenshot 2025-03-26 at 12 12 00"
src="https://github.com/user-attachments/assets/ff9dc939-eb84-486c-b52e-9b5760e6d9a3"
/>

### After

<img width="649" alt="Screenshot 2025-03-27 at 10 51 27"
src="https://github.com/user-attachments/assets/5471db37-95f4-43e8-b3f8-82652dde8b7f"
/>

<!--

> [!NOTE]
> The border looks wider because as it is opaque.

-->


### Checklist

- [ ] 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>
Co-authored-by: Nick Partridge <nicholas.partridge@elastic.co>
2025-03-31 14:26:10 +02:00
Luke Gmys
9679f29415
[Security Solution][Sourcerer] Replace Sourcerer with Discover Data View Picker (#210585)
# Unified Data View Picker: Phase 1 Implementation
Part of https://github.com/elastic/security-team/issues/11959

## What This PR Does
This PR represents the first step in our transition from the current
Sourcerer component to the new unified Data View Picker. Specifically,
this implementation:
- Creates a new Data View Picker component
- Implements feature flag protection for all changes
- Handles asynchronous effects through Redux listener middleware
- Establishes a new Redux store architecture to support ad hoc data
views infrastructure
- Utilizes ad hoc data views to handle legacy patterns from series 7
(replacing the previous upgrade data view flow)

See the readme for more info: 
```x-pack/solutions/security/plugins/security_solution/public/data_view_manager/readme.md```

## What This PR Does NOT Cover
- Does not affect screens other than Timelines
- Does not modify the existing Sourcerer component in any way
- Does not fully support all URL/local storage patterns

## Implementation Notes
We've made several accommodations to support both Sourcerer and the new Data View Picker simultaneously during this transition period, including:
- Some interfaces might look odd, especially the hooks that return the data view or patterns - this is intentional to support existing use cases
- There are feature flag-based conditional statements throughout the code that will be removed once the transition is complete

## Testing Instructions
1. Add the following feature flag to your configuration:
   ```
   xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']
   ```
2. Navigate to the Timelines interface
3. Test interactions with the new Data View Picker

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-31 14:12:57 +02:00