Commit graph

84965 commits

Author SHA1 Message Date
Kevin Qualters
7f435b046d
[Security Solution] Cleanup alerts table rendering and reference issues (#213649)
## Summary

This pr fixes some odd issues with getBulkActions, which is really a
hook in disguise, as well as an issue with the useGetMutedAlertsQuery
hook, which was/is fetching data much more often than it should, exactly
why that is I'm not sure, perhaps something to do with how timeline
blocks focus to the underlying DOM when it's open, and this causes the
default to true refetchOnWindowFocus prop of useQuery to re-run the
query, or if there's an error with the queryKey.

Below are 2 GIFs comparing react performance profiles of simply opening
and then closing the timeline while on the alerts page with 50 alerts in
the table.

Before fix:

![pre_fixes_profiler](https://github.com/user-attachments/assets/548d1ea8-6bde-460f-90da-0cead5ea76e1)

12 renders for a total of 950 ms, a large portion of which is coming
from the alert table cells.

After fix:


![with_fixes_profiler](https://github.com/user-attachments/assets/7119725a-fe3a-4e66-a181-4dd7b24204f0)

8 renders for a total of 380 ms, almost none of it coming from the alert
table.

Each of the alerts table and timeline/discover drive some of the more
stateful and complex workflows in kibana on their own, and on top of
that one is rendering within a flyout on top of the other, listening to
the same url changes/tens of context provider wrappers changing above
them in the tree/kibana services, etc, & so proper memoization is a
pre-requisite for a good ux.

### 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-03-19 12:07:54 -04:00
Kibana Machine
f7d01667ee
Unauthorized route migration for routes owned by obs-ai-assistant,security-solution (#198338)
### Authz API migration for unauthorized routes

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

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

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

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

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

Co-authored-by: Ashokaditya <ashokaditya@elastic.co>
Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
2025-03-19 12:04:24 -04:00
Tre
22587ea045
[SKIP ON MKI] index mgmt test (#215178)
## Summary

see details: https://github.com/elastic/kibana/issues/200878
2025-03-19 17:56:40 +02:00
Gerard Soldevila
cbb5e612a1
Update upgrade_assistant archive to 8.19.0 (#215176)
## Summary

Addresses https://github.com/elastic/kibana/issues/209048

1. Started ES with
```
yarn es snapshot --version 8.19.0 --data-archive=../kibana/x-pack/test/upgrade_assistant_integration/fixtures/data_archives/upgrade_assistant.zip
```

2. Then created updated archive
```
zip -r ../../../kibana/x-pack/test/upgrade_assistant_integration/fixtures/data_archives/upgrade_assistant.zip data  -x "*/\.*"
```
2025-03-19 17:52:59 +02:00
Maria Iriarte
ecd3521acd
[Graph/SCSS] Refactor styles to use Emotion (#212916)
## Summary

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

Replaces scss to css-in-js.

> [!NOTE]
> The rest of the `.scss` will be migrated in different pull requests

<!--

- [ ] `x-pack/platform/plugins/private/graph/`public/_mixins.scss

- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_app.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_graph.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_inspect.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_search_bar.scss

- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_search_bar.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/field_manager/_field_picker.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/field_manager/_index.scss

-->

### Checklist

- [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-03-19 16:14:01 +01:00
Paul Tavares
e11c3ecea5
[Security Solution][Endpoint] Adjust Artifacts policy assignment component in support of spaces (#214487)
## Summary


### Fleet

- Exposed API route for bulk get package policies via the routes service
- Created and exposed type `BulkGetPackagePoliciesRequestBody`

<br/>


### Security Solution

The following changes were made to Endpoint Artifacts in support of
spaces:

> [!NOTE]
> Space awareness is currently behind feature flag:
`endpointManagementSpaceAwarenessEnabled`


- The policy assignment component, which is displayed on artifact's
Create and Update forms, now:
- Displays the count of policies (if any) that are associated with the
artifact, but not currently accessible in the active space (screen
capture 1️⃣ )
- When a user does NOT have the Global Artifact privilege, the `Global`
toggle selection will be disabled and a tooltip is displayed. This
change also applies to the create form where the default selection will
be per-policy and the global button will be disabled. (screen capture
2️⃣ )
- Artifact policy assignments that are not accessible in active space
are preserved when submitting an update to the artifact
- The component was also refactored a bit to simplify its list of props
- Artifact card policy assignment menu was adjusted to show any policy
that is not accessible to the user as "disabled" along with a tooltip
(screen capture 3️⃣ )
- The update artifact API was changed (via server-side extension point)
to not error when validating policies that are not accessible in active
space if they were already associated with the item being updated.
- Fixes a bug in the Find artifacts API (impact only when spaces was
enabled) where an invalid filter was created when there was no policies
currently shared with active space.
2025-03-19 11:12:59 -04:00
Gerard Soldevila
443af08131
Fix failing migrations actions.test.ts (#215161)
## Summary

Addresses https://github.com/elastic/kibana/issues/167273

* Breaks down the `beforeAll` logic in 3 different hooks (allowing for
bigger margin for each).
* Updates the logic that fills the `existing_index_with_100k_docs`
index, using `refresh: 'wait_for'` only in the last iteration.
* Fixes a source of flakiness: a search request that was returning
results in random order.

The most recent failure was:
<img width="1140" alt="image"
src="https://github.com/user-attachments/assets/fef18850-ab06-43b0-afd9-671604a5f84a"
/>
2025-03-19 16:09:58 +01:00
Riccardo Magliocchetti
ea73a1aa1c
[ObsUX] [APM] [OTel] Reduce python runtime metrics dashboard to otel_native (#215005)
## Summary

Since the GA supported path is the native OTel one, start simple with
just that one.
This also renames the dashboard to match the dashboard triplet.

This is a follow up from #213599

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

This reduce risks since it reduces the surface of changes from #213599
2025-03-19 16:58:38 +02:00
Philippe Oberti
97f3594c3a
[Security Solution] Fix issue with alert grouping re-render (#215086)
## Summary

While doing a POC trying to implement the grouping component with the
UnifiedDataTable, I discovered a rendering issue that caused some sort
of infinite loop rerendering after selecting a group.

This PR fixes that issue but making sure we do not have a new instance
of an empty array every time the component is rendered.
2025-03-19 09:57:55 -05:00
Gonçalo Rica Pais da Silva
54d9cf45cb
[Discover][APM] Refactor APM sources for better trace enablement (#212634)
## Summary

This PR reworks how APM handles getting its sources data, elevating the
necessary code to a private shared plugin so that Discover for Traces
can access the data and handle user provided configuration. It also
removes the need for Discover for Traces to rely on the APM static data
view, so the Trace data source and document profile will work on any
compatible/configured index, even in ESQL mode.

Closes #211414

<img alt="ESQL Discover Traces Screenshot 2025-03-04 173032"
src="https://github.com/user-attachments/assets/f5bbb736-8b8b-45dc-ac23-4bf7083aa47e"
/>

## How to test

Test with olbt-cli instance for now, will post for doing with synthtrace
data. Ensure the following is added to your kibana.dev.yml:

```yaml
discover.experimental.enabledProfiles:
  - observability-traces-data-source-profile
```

- Make sure your space has the Observability solution view configured
- Go to Discover page
- Select Data Views mode if required and create a view with a `traces`
specific index. Or use the APM static data view.
- The default columns on the page should show the summary column with
four of the following badges: `service.name`, `event.outcome`,
`transaction.name`, `transaction.duration.us`, `span.name`,
`span.duration.us`
- Go to ESQL mode with the query targetting a `traces` index
- The default columns should show the same as in Data View mode

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Irene Blanco <irene.blanco@elastic.co>
2025-03-19 15:52:30 +01:00
Carlos Crespo
2f453ac2b7
[Synthtrace] Synthtrace to generate unique ids (#214637)
closes [214636](https://github.com/elastic/kibana/issues/214636)

## Summary

This PR updates the id generation logic in Synthtrace to ensure the
uniqueness of generated ids. The change addresses the issue of ID
collisions when Synthtrace is executed on multiple pods in parallel, as
observed in the edge clusters.

This change will affect APM traces, but the idea could be extended to
other scenarios requiring unique/random ids in the test environments.


### Performance

| Length | Sequential id generator | Random id generator |
| --| -----------------------| ----------------------|
| 16 chars | ~0.005ms | ~ 0.007ms |
| 32 chars | ~0.005ms | ~ 0.007ms |

### How to test

Execute this query after running synthtrace.

```bash
curl -X GET "http://elastic:changeme@localhost:9200/apm*,traces-apm*/_search" -H "Content-Type: application/json" -d '{
  "size": 1,
  "query": {
    "bool": {
      "filter": [
        {
          "terms": {
            "processor.event": [
              "transaction",
              "span"
            ]
          }
        }
      ]
    }
  },
  "_source": [
    "span.id",
    "transaction.id",
    "trace.id",
    "error.id"
  ]
}' | jq '.hits.hits[]._source'
```


**Historical data**


*Sequential ids*

```bash
node scripts/synthtrace service_map_oom.ts --from=now-5m to=now --clean --workers=1
```

```json
{
  "trace": {
    "id": "56956000000000000000000000281715"
  },
  "transaction": {
    "id": "5695600000281714"
  }
}
```

*Random ids*

```bash
node scripts/synthtrace service_map_oom.ts --from=now-5m to=now --clean --workers=1 --uniqueIds
```

```json
{
  "trace": {
    "id": "9dd787e4c55948000000000000081916"
  },
  "transaction": {
    "id": "9dd709a2f7979800"
  }
}
```


**Live data**

*Sequential ids*

```bash
node scripts/synthtrace service_map_oom.ts --live --clean
```

```json
{
  "trace": {
    "id": "58384000000000000000000000001995"
  },
  "transaction": {
    "id": "5838400000001994"
  }
}

```
*Random ids*

```bash
node scripts/synthtrace service_map_oom.ts --live --clean --uniqueIds
```

```json
{
  "trace": {
    "id": "3d8b3401711004000000000000001996"
  },
  "transaction": {
    "id": "3d834f49b9bb0c00"
  }
}
```
2025-03-19 15:44:01 +01:00
Devin W. Hurley
cd491c34e7
[Security Solution] [Detections] Use preview route for testing EQL shard failure (#214284)
fixes flakey test https://github.com/elastic/kibana/issues/209024
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-03-19 09:12:38 -04:00
Maria Iriarte
347e384b91
[Lens/SCSS] Delete and migrate annotations.scss file (#209074)
## Summary

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

Replaces scss to css-in-js.


### Checklist

- [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: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-19 14:04:02 +01:00
Jatin Kathuria
89a56ec73c
[Security Solution] Fix - Extra timeline space because of Borealis changes (#215124)
## Summary

This very small PR fixes an extra space below querybar in timeline. This
was issue because of what `euiThemeVars` v/s`euiTheme` returns as a size
i.e. `8` v/s `8px`

### Before

![image](https://github.com/user-attachments/assets/ee767778-741b-4430-aac2-543a08b50822)


### After

![image](https://github.com/user-attachments/assets/cf9eca1c-8c99-43ef-96f4-914e68fcc233)



### 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-03-19 14:45:21 +02:00
Maria Iriarte
1dbaf0e22b
[Graph/SCSS] Migrate _guidance_panel.scss file to Emotion (#214929)
## Summary

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

Replaces scss `_guidance_panel.scss` file to css-in-js .

### Checklist

- [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-03-19 14:40:16 +02:00
Sergi Romeu
0ee664a555
[APM] Prevent getChildrenGroupedByParentId to include the parent in the children list (#214957)
## Summary

Closes #213074

This PR prevents `getChildrenGroupedByParentId` to include the parent
item in the children list, as this was causing some duplication.

| Before | After |

|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
<img width="1433" alt="image"
src="https://github.com/user-attachments/assets/788684a8-21d7-48a6-820c-07b1fb3d0045"
/>|<img width="858" alt="image"
src="https://github.com/user-attachments/assets/b68129e1-137d-42fe-a7ce-70373447ece9"
/>|
|<img width="1372" alt="image"
src="https://github.com/user-attachments/assets/ff6a5ac8-b46a-4eea-9c4c-638f4b479dc8"
/>|<img width="844" alt="image"
src="https://github.com/user-attachments/assets/31ef881c-a6d0-41ea-80d4-aebd587e76cd"
/>|
2025-03-19 13:28:20 +01:00
Stratoula Kalafateli
4a8915e98e
[ES|QL] Update grammars (manually) (#215091)
## Summary

Update the antlr to get the latest changes, especially the double
parameter one which is blocking the work for variables
2025-03-19 12:55:46 +01:00
Marco Liberati
cc52db1474
[Lens][Embeddable] fix can edit check (#213887)
## Summary

This PR fixes a regression introduced for user messages.
The `viewMode` check moved from observable to its raw value but still
performing the observable check.

The fix is to check both the panel `viewMode` AND as fallback the
embeddable hierarchy viewMode until the `edit` mode is met.

---------

Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
2025-03-19 12:50:04 +01:00
Abhishek Bhatia
90dd368e71
[Security Solution][Entity Analytics][Bug][Risk Score]Changes to replace 30m to 30d for Risk score lookback period (#215093)
## Summary

The PR updates the code to extend the lookback period for Risk scoring
calculations from `now-30m` to `now-30d`.

This change impacts:  
- Risk score UI (date picker)
- The preview API  
- The enable API (for Risk Score Saved Object configuration)


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

Screenshots : 

## UI and Preview API payload


![image](https://github.com/user-attachments/assets/9a074dc4-328f-405b-8ffe-5ce8a7def3d6)

## Risk Engine configuration SO


![image](https://github.com/user-attachments/assets/bfd4f6f8-3f1c-4f83-8247-66b9e93a71c2)


## Testing Steps:

1. Navigate to the Entity Analytics management page (Entity Risk Score
webpage).
2. Ensure the default text in the date picker displays **"Last 30
days"**.
3. Open the **Network** tab in Developer Tools and verify that the
**"preview"** API request reflects a 30-day difference between the
`from` and `to` values.
4. If the **Risk Engine** is enabled, disable it and open a window
displaying Kibana logs.
5. Re-enable the **Risk Engine** and check the logs for the
configuration message: **"Risk engine running with configuration"**. The
expected range should be:
   ```json
   "range": {
     "start": "now/M",
     "end": "now"
   }
   ```


## Advanced Testing Steps  

1. The date picker should default to **"Last 30 days"**. If you change
it to **"Yesterday"** without clicking **Save changes**, the **Preview
API** should reflect "Yesterday," but the **Saved Object (SO)** should
**not** update its range.
2. Upon refreshing the page without saving the changes, the date picker
should reset to its default value, **"Last 30 days"**.
2025-03-19 17:16:24 +05:30
Julia Rechkunova
328ce08494
[Discover Tabs] Visually connect the active tab with the top nav (#214440)
- Closes https://github.com/elastic/kibana/issues/210864

## Summary

This PR changes tabs styles and visually connects the selected tab with
the Kibana header.

Classic view:

<img width="1439" alt="Screenshot 2025-03-17 at 13 26 16"
src="https://github.com/user-attachments/assets/31dc0311-7bc1-4bc8-9b83-48f40227705f"
/>
<img width="1435" alt="Screenshot 2025-03-17 at 13 26 52"
src="https://github.com/user-attachments/assets/301963fb-3207-49ae-ab70-177834f3a73f"
/>


Project view:

<img width="1438" alt="Screenshot 2025-03-17 at 13 25 34"
src="https://github.com/user-attachments/assets/df1d1bff-82f8-4eed-9cf3-b3e557f5658c"
/>
<img width="1437" alt="Screenshot 2025-03-17 at 13 24 58"
src="https://github.com/user-attachments/assets/dfe27fc7-1cfe-4695-b1fd-2e306adc8787"
/>

### Testing

Two options are possible:

1. start Storybook with `yarn storybook unified_tabs` and navigate to
`http://localhost:9001`.
2. start Kibana with `yarn start --run-examples`. Then navigate to the
Unified Tabs example plugin
`http://localhost:5601/app/unifiedTabsExamples`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-19 13:33:51 +02:00
Jesus Wahrman
e14369edab
Add strip unkowns to nested objects in maps, arrays and records (#214978)
## Summary

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

Added strip unkowns to nested objects in map, array and record. Added a
lot of test cases to cover things like objects inside maps, objects
inside records, objects inside maps inside records, ...

One thing to note is that we can't apply `stripUnkowns` to
`schema.oneOf` since it's using `joi.alternatives` and you can't use it
there.


### 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)
2025-03-19 11:38:31 +01:00
Robert Stelmach
b913373b7c
Change url path to start with monitor creation flow (#214604)
Change url path to start with monitor creation flow
Before: 


https://github.com/user-attachments/assets/dcf75a38-9cde-4999-b382-1211f436ad64

After: 


https://github.com/user-attachments/assets/51859c92-fceb-47fb-8be2-33789c48b303
2025-03-19 11:01:26 +01:00
Mykola Harmash
81f6f2897f
[Onboarding][OTel K8s] Use MOTel managed service on Serverless (#213261)
Closes https://github.com/elastic/kibana/issues/208037

This change switches OTel K8S quickstart flow on Serverless to the
managed OTel collector as the ingest endpoint.

* Adds shared `useOtelIngestEndpointUrl` hook to be later re-used in
OTel Host flow as well
* Adds the logic to use APM API key on serverless to access the managed
service endpoint
* Modifies the code snipped with the new variables

## How to test

* Use the Serverless instance deployed from this PR, make sure OTel K8S
flow code snippet uses the managed service endpoint, ingest logs from
your computer (you can use [reference-stack
cluster](https://github.com/elastic/oblt-reference-stack) with minikube)
* Run the classic Kibana locally, and make sure the OTel K8S flow uses
the usual code snippet with ES ingest endpoint, ingest logs from your
computer

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-19 10:58:40 +01:00
Dzmitry Lemechko
ef32357d80
[scout] support login with a custom role (#213798)
## Summary

Adding custom roles support in Scout UI tests

Example:

```
    test.beforeEach(async ({ browserAuth, pageObjects }) => {
      await browserAuth.loginWithCustomRole({
        elasticsearch: {
          cluster: ['manage'],
          indices: [
            {
              names: ['.siem-signals*', '.lists-*', '.items-*'],
              privileges: ['read', 'view_index_metadata'],
              allow_restricted_indices: false,
            },
            {
              names: ['.alerts*', '.preview.alerts*'],
              privileges: ['read', 'view_index_metadata'],
              allow_restricted_indices: false,
            },
          ],
        },
        kibana: [
          {
            base: [],
            feature: {
              siemV2: ['read', 'read_alerts'],
            },
            spaces: ['*'],
          },
        ],
      });
      await pageObjects.dashboard.goto();
```

In `kbn/scout-security` to login as `platform_engineer` we will need to
override browser auth fixture with smth like:

```ts
const resourcePath = path.resolve(SERVERLESS_ROLES_ROOT_PATH, 'security', 'roles.yml');
const svlRoleDescriptors = new Map<string, any>(
    Object.entries(readRolesDescriptorsFromResource(resourcePath) as Record<string, unknown>)
);

const loginAsPlatformEngineer = async () => {
  const roleName = 'platform_engineer';
  if (!serverless) {
      const roleDesciptor = svlRoleDescriptors?.get(roleName) as ElasticsearchRoleDescriptor;
      if (!roleDesciptor) {
        throw new Error(`No role descriptors found for ${roleName}`);
      }
      await samlAuth.setCustomRole(roleDesciptor);
      return loginAs(samlAuth.customRoleName);
  } else {
    await loginAs(roleName);
  }
}
```

This way we gonna use custom role to replicate serverless default roles
in Stateful run (and support deployment agnostic approach)

---------

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
2025-03-19 10:50:32 +01:00
Gloria Hornero
c6b594cfee
[Security Solution] Enable Cypress Tests for AI4DSOC effort (#214776)
## Summary  
This PR establishes the baseline to execute Cypress tests in the new
`search_ai_lake` tier.

## Changes Introduced  
- All tests under
`x-pack/test/security_solution_cypress/cypress/e2e/ai4dsoc` will be
executed using the new tier by default.
- These tests will run as part of the PR process within the `Serverless
AI4DSOC - Security Solution Cypress Tests` execution.

## Adding a New Test  
To add a new test, follow these guidelines:  

- Read the
[README](x-pack/test/security_solution_cypress/cypress/e2e/ai4dsoc/README.md).
- Inside the `AI4DSOC` folder, we should have different subfolders
representing the various AI4DSOC functionalities.
- Each subfolder should have ownership by either an area team or the
developers actively working on it.
- Make sure that any functionality you want to be tested in the new tier
is added inside the `AI4DSOC` folder; otherwise, that functionality will
be tested using the complete tier.

## Running Tests Locally  
Run the tests with the following Yarn scripts from
`x-pack/test/security_solution_cypress`:

```sh
yarn cypress:open:ai4dsoc:serverless
```

Opens the Cypress UI with all tests in the `e2e/ai4dsoc` directory. This
also runs a mocked serverless environment using the `ai_soc` product
line and `search_ai_lake` tier by default.

```sh
yarn cypress:run:ai4dsoc:serverless
```

Runs all tests tagged as @serverless in the e2e/ai4dsoc directory in
headless mode using the ai_soc product line and search_ai_lake tier by
default.

## Key Considerations  
- All tests must have the `@serverless` tag to be executed as part of
the PR process.
- MKI is not yet supported for test execution.  
- The AI4DSOC Cypress tests will be executed each time there is a change
in one of its
[dependencies](https://github.com/elastic/kibana/blob/main/.buildkite/scripts/pipelines/pull_request/pipeline.ts).
- All tests are executed by default using the `platform_engineer` role.
- Temporary Ownership: The Security Engineering Productivity team will
own the entire AI4DSOC testing folder initially to ensure structure and
best practices. Once all teams understand the workflow, this ownership
will be removed.
- Execution Time: If test execution in a PR takes more than 45 minutes,
parallelism should be increased in the new
`.buildkite/pipelines/pull_request/security_solution/ai4dsoc.yml` file.

## Security Engineering Productivity Codeownership Responsibilities  
The Security Engineering Productivity team should ensure:  

- Best practices are followed.  
- All tests are placed inside a functionality subfolder.  
- Each functionality subfolder has designated code owners.  
- Tests include the `@serverless` label.  
- The execution of AI4DSOC tests does not exceed 45 minutes.    

## Follow-Up Tasks 
- Remove the dummy test (@tomsonpl feel free to delete it when you need
to add new tests to the navigation).
- Integrate tests into the periodic pipeline.  
- Add tests to the Kibana QA quality gate.  
- Update the README with MKI instructions once tests are added to the
periodic pipeline and Kibana QA quality gate.
- Clarify which roles will be used for the AI4DSOC effort and update the
tests accordingly.
2025-03-19 10:50:07 +01:00
Stratoula Kalafateli
66b00f3583
[ES|QL] Highlights the code examples in our inline docs (#214915)
## Summary

Adds ES|QL highlight in our inline docs


![image
(87)](https://github.com/user-attachments/assets/a08c21b4-f11b-4366-aaa1-8505e973d201)
2025-03-19 10:46:30 +01:00
Julia Rechkunova
d764bd91f5
[Discover Tabs] Don't allow to duplicate a tab when tabs limit is reached (#214772)
## Summary

This PR is a follow up for https://github.com/elastic/kibana/pull/213106
to hide Duplicate menu item when the max tabs limit is already reached.

## Testing

Two options are possible:

1. start Storybook with `yarn storybook unified_tabs` and navigate to
`http://localhost:9001`.
2. start Kibana with `yarn start --run-examples`. Then navigate to the
Unified Tabs example plugin
`http://localhost:5601/app/unifiedTabsExamples`.


### 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-03-19 10:25:58 +01:00
Maria Iriarte
4f9c54f91b
[Graph/SCSS] Migrate _venn_diagram.scss file to Emotion (#214962)
## Summary

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

Replaces `_venn_diagram.scss` file to css-in-js .

## Screenshots

<img width="1593" alt="Screenshot 2025-03-18 at 12 50 55"
src="https://github.com/user-attachments/assets/f6685a78-15ce-4019-992a-9388efb79fab"
/>

<img width="1586" alt="Screenshot 2025-03-18 at 12 50 36"
src="https://github.com/user-attachments/assets/b1f57d53-509d-43c3-9a96-99ebacba35a1"
/>


### 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)
2025-03-19 10:14:00 +01:00
Joe Reuter
856b222142
🌊 Streams: Link to streams in Discover (#214052)
Adding a link to the stream into the overview tab of the discover
document flyout:

<img width="228" alt="Screenshot 2025-03-12 at 08 57 48"
src="https://github.com/user-attachments/assets/dfd396e7-b0dc-4cca-a09c-637357cc88f9"
/>

Some reviewer notes:
* This is using the same strategy as the observability AI assistant via
the discover_shared registry - streams is not an observability-only
plugin, but for now we want to treat it like this. If we move closer to
this becoming a main feature, we can probably have discover depend on
streams directly
* For now, it's only showing the entry in the flyout if streams is
enabled so it's easy to test but doesn't show up accidentally. Before
the initial release, we can change this condition to always show for
observability spaces
* Resolving an index name to a data stream needs an Elasticsearch call
to get the index meta data. I created a new internal route for that. It
means that there is a loading state in theory, but in practice it should
resolve really quickly because it only hits the cluster state, not the
actual data.
* Even if no stream can be resolved it still shows the entry in the
flyout with a `-`. This is because it avoids shifting layout and it
doesn't seem to hurt if it's there.
* As I need to link to streams, I started introducing a locator - I'm
sure it will be needed more soon. I didn't add all the possible routes
yet, we can expand it as needed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-19 10:56:07 +02:00
Marco Liberati
3c3038b855
[Lens] Hide fix action when in embeddable (#213414)
## Summary

Related to #177932
Inline editing introduced a blurred boundary for the editing experience
in Lens, while the full editor relies on a Redux state manager to
dispatch state changes the inline editor has an hybrid approach.
Specifically the `fixAction` feature in the user messages system needs
access to the redux store which is not available within the embeddable
environment as for now.
So with this PR I've currently limited the scope provided for those
message with a `fixAction` and won't render the button any more.

For instance while investigating #177932 I've noticed that now the
embeddable doesn't crash any more, but rather shows the error message
with the `fixAction` button:

<img width="1496" alt="Screenshot 2025-03-06 at 16 07 35"
src="https://github.com/user-attachments/assets/1b2a5d73-56d9-4010-8a6f-82528efcb2ce"
/>

Note that clicking on the `Use filters` nothing will happen as
d2412a5f98/x-pack/platform/plugins/shared/lens/public/react_embeddable/user_messages/api.ts (L195)
is a mock. A simple `updateAttributes` call here won't suffice as it
requires the logic behind `updateDatasourceState` slice to harmonize the
datasource changes with the visualisation counter part.
With this PR the message will hide the button and render as follow:

<img width="1498" alt="Screenshot 2025-03-06 at 16 18 55"
src="https://github.com/user-attachments/assets/01d55f6c-7563-4e07-a18e-35d1062a8d79"
/>

It is a temporary fix but at least it won't feel broken.

### 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-03-19 09:55:34 +01:00
Kibana Machine
b731d759e8
[ES|QL] Update function metadata (#215087)
This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.
2025-03-19 10:50:05 +02:00
Kibana Machine
9ff3d6fd9b
[api-docs] 2025-03-19 Daily api_docs build (#215083)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1016
2025-03-19 08:18:29 +02:00
Kerry Gallagher
f9783504bb
[Streams] [Dedicated Grok UI] Package / highlight matched parts / suggestions (#213278)
## Summary

Closes https://github.com/elastic/streams-program/issues/170 and
https://github.com/elastic/streams-program/issues/171

## Reviewer notes

It's worth reading the research in
https://github.com/elastic/streams-program/issues/168 to understand why
certain decisions were made. Some of the resolving code is inspired by
`grok-js`, unfortunately this wasn't something we could use directly.

The design / UX is **not** final. This is just a functional version. The
editor is currently on the streams > enrichment page so it can be played
with, this will **not** be merged.

There is pattern support for our ECS patterns, I have not added the
legacy ones.

There will almost certainly be some edge cases that don't work, every
repo for a Grok tool I looked at had their own 😅 I've tried to test this
with lots of varied examples though.

I'd recommend unticking "No extension" from the file filter to remove
the pattern files.

<img width="323" alt="Screenshot 2025-03-06 at 22 40 19"
src="https://github.com/user-attachments/assets/5b594f5f-0b0f-4ed0-ae10-2412fcf9e31a"
/>

## Possible improvements / followups

- We could in the future expand the UI to toggle on and off certain
pattern collections.

- Ability to add custom patterns (like in our Grok debugger). This can
still be achieved with `(?<queue_id>[0-9A-F]{10,11})` syntax.

- Point out when regex is invalid (right now it's silent).

- I've copied over the patterns from the ES repo for now, with a light
script to generate an object from them. There's a CLI skeleton in place
if we feel we want to actually pull these from the ES repo directly.
These patterns don't change often, and aren't heavy size wise.

- Debouncing etc for processing, but I'd like to see how the final UX
ends up.

## Media

Screenshot

![Screenshot 2025-03-06 at 11 58
56](https://github.com/user-attachments/assets/158b2a6f-df26-490e-b9f8-63ae69625607)

Simple example


![simple_example](https://github.com/user-attachments/assets/36f36505-eb0b-45d6-bd24-1dbef769658d)

Complex example


![complex_example](https://github.com/user-attachments/assets/968cc935-d208-4ef0-a64d-452995dccd5e)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-18 22:56:58 +00:00
Jon
ca04dbafd2
[package testing] Skip FTR (#215070)
The functional test run during package testing is currently erroring
post folder migration, but after fixing the path it's still not going to
match on any tests.

This temporarily disables the step while alternatives are considered.

Related to https://github.com/elastic/kibana/pull/214730 and
https://github.com/elastic/kibana/pull/210956
2025-03-18 16:33:50 -05:00
Hannah Mudge
edd9bf6896
[kbn-grid-layout] Fix bug when bulk moving panels to an empty row (#215024)
## Summary

We were not accounting for moving panels to an **empty** row in the
logic for `movePanelsToRow` - this resulted in a `maxRow` of `Infinity`,
which then caused the `grid-row-start` of all the panels to be
`Infinity`. This caused the following bug, because CSS grid does not
know how to handle `Infinity`:



https://github.com/user-attachments/assets/671112b9-ab96-4a1d-8589-e79bebd25292



By setting `maxRow` to zero when there are no panels in the destination
row, we now get the expected behaviour:




https://github.com/user-attachments/assets/7d4032e3-2699-47b0-847c-77af8f5f03ee



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

The row feature has not been released to customers, so risk is very low.
2025-03-18 14:25:23 -06:00
Dzmitry Lemechko
05447fe978
[scout] extend config-discovery with CI validator (#214403)
## Summary

More teams are adding Scout tests in their plugins, often as a PoC and
not stable yet for continuous execution.
We don't want to block it, but need a way to manage the scope of Scout
pipeline and be able to disable it quickly to unblock the Scout
development.

Since Scout is in active development and we need it to be simple and
quick as possible (we can iterate and improve later), we agreed with
Robert to disable tests by plugin:

```
ui_tests:
  enabled:
    - apm
    - discover_enhanced
    - maps
    - observability_onboarding
  disabled:
    - *skipped_plugin*
```

When scout configuration is added to the new plugin, it will require to
update `.buildkite/scout_ci_config.yml` that is owned by `appex-qa`
team. If there is no intention to run Scout tests on CI, plugin name
should be added under `disabled` section.

**How to test locally:**

- Scout tests were added in `observability_onboarding` plugin, pipeline
will throw error

modify locally `.buildkite/scout_ci_config.yml`
```
ui_tests:
  enabled:
    - apm
    - discover_enhanced
    - maps
  disabled:
```

run `node scripts/scout discover-playwright-configs --validate --save`

```
ERROR The following plugins are not registered in Scout CI config '.buildkite/scout_ci_config.yml'
      - observability_onboarding
```

~~On CI annotation will be added to clarify the failure:~~

we decided to move validation to "Quick Checks", no need to annotate.

<img width="1583" alt="image"
src="https://github.com/user-attachments/assets/ed6b5778-74cb-4473-8218-b96239aab067"
/>


- `observability_onboarding` plugin is disabled, pipeline won't include
it (excluded in `scout_playwright_configs.json`)

modify locally `.buildkite/scout_ci_config.yml`
```
ui_tests:
  enabled:
    - apm
    - discover_enhanced
    - maps
  disabled:
   - observability_onboarding
```

run `node scripts/scout discover-playwright-configs --validate --save`

```
 warn The following plugins are disabled in '.buildkite/scout_ci_config.yml' and will be excluded from CI run
      - observability_onboarding
 info Found Playwright config files in '4' plugins.
      Saved '3' plugins to '/Users/dmle/github/kibana/.scout/test_configs/scout_playwright_configs.json'
```
2025-03-18 21:24:54 +01:00
elastic-renovate-prod[bot]
ee906e67e2
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 5ba5def (main) (#214937)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `66d427a` ->
`5ba5def` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJiYWNrcG9ydDpza2lwIiwicmVsZWFzZV9ub3RlOnNraXAiXX0=-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-03-18 14:28:42 -05:00
Kibana Machine
681295ff9e
[ES|QL] Update grammars (#213006)
This PR updates the ES|QL grammars (lexer and parser) to match the
latest version in Elasticsearch.

---------

Co-authored-by: drewdaemon <drew.tate@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-03-18 21:25:57 +02:00
Dominique Clarke
dfb16cbe46
[Chore] [Synthetics] Unskip previously flaky test (#214276)
## Summary

Fixes https://github.com/elastic/kibana/issues/196257
Fixes https://github.com/elastic/kibana/issues/202337

Unskip flaky test

Adjusted some assertions for more reliability. 

The final flaky test runner passed for 200 iterations.
2025-03-18 15:24:40 -04:00
Bailey Cash
0a10127efc
[SLO] add ability to select all services for apm slos (#214653)
## Summary

Resolves #212981

![Screenshot 2025-03-14 at 4 32
57 PM](https://github.com/user-attachments/assets/37ce3d96-1337-4106-91de-6de0f3057fee)

## Release Notes

Adds the ability to create an APM availability or latency SLO for all
services

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kevin Delemme <kdelemme@gmail.com>
2025-03-18 21:23:19 +02:00
Tiago Costa
1f3cbf1105
fix(NA): retrieve_elastic_doc tests helpers import (#215051)
This PR fixes https://github.com/elastic/kibana/pull/214880 as it
included a non existent import
2025-03-18 19:20:40 +00:00
Tiago Costa
003ff6514b
fix(NA): retrieve_elastic_doc tests helpers import 2025-03-18 19:15:27 +00:00
Lisa Cawley
3b2df8935b
[DOCS] Consolidate and clean up Kibana settings (part 1) (#214934) 2025-03-18 11:37:40 -07:00
Viduni Wickramarachchi
70e3a6096e
[Obs AI Assistant] Fix contextual insights scoring (#214259)
Closes https://github.com/elastic/kibana/issues/209572

### Summary

Scoring in contextual insights is broken because the
`get_contextual_insight_instructions` tool call is not followed by the
tool response. This happens because we replace the last user message (in
this case tool response) with the user message related to scoring.

### Solution

We should include the tool call name when replacing this message, so
that it gets converted to inference messages correctly here:

07012811b2/x-pack/platform/plugins/shared/observability_ai_assistant/common/convert_messages_for_inference.ts (L60-L81)


### Checklist

- [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-03-18 14:37:21 -04:00
Tiago Costa
ca1f38a693
skip flaky suite (#194701) 2025-03-18 17:59:08 +00:00
Patryk Kopyciński
be777cf44f
[Security Assistant] Fix inference rollover (#214718)
## Summary
Fixes https://github.com/elastic/kibana/issues/214709#event-16799922233

The issue was caused by the rollover of the Knowledge Base Data stream
to use default inference endpoint.
During the rollover it first got to this branch
https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/elastic_assistant/server/ai_assistant_service/index.ts#L347-L369
where it went through all the steps and continued, but it didn't
override `this.knowledgeBaseStream`, so the next time someone hit API it
was going through this path calling `getInitializedResources` to make
sure all data streams were configured properly, but because we didn't
update `this.knowledgeBaseStream` it was failing, because the original
configuration that was created in service constructor was not called,
that's why it was returning an error
2025-03-18 19:47:45 +02:00
Elena Shostak
a3dd168cb1
Unauthorized route migration for routes owned by search-kibana (#214786)
### Authz API migration for unauthorized routes

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

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

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-18 18:29:08 +01:00
Lukas Olson
2de4b331d3
Fix sort for rollup data views (#214656)
## Summary

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

Since https://github.com/elastic/kibana/pull/163784 we have included a
`format` parameter in the `sort` that we send to Elasticsearch. This
worked for everything except rollup data views, which break when the
`format` parameter is provided.

This restores the behavior prior to that PR (we still send the `sort`
but don't include the `format` parameter). Ideally we would probably not
send the timestamp field at all for rollup data views since we treat
them as if they are non-time-based, but this would require a bit of a
refactor, and rollups are deprecated anyway.

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

### Release notes

Fixes opening a rollup data view in Discover.

Co-authored-by: Matthew Kime <matt@mattki.me>
2025-03-18 10:17:53 -07:00
Elena Shostak
a7cc00c4fe
Unauthorized route migration for routes owned by appex-sharedux (#214779)
### Authz API migration for unauthorized routes

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

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

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-18 18:00:53 +01:00
Joe Reuter
df55627b2d
Fix special click behavior in new side nav (#214650)
Not sure whether we have an issue for is, but a problem I constantly run
into is that cmd+click to open in new tab doesn't work with the new side
nav. You need to do right click + open in new tab which is taking at
least 3 times as long.

This is a problem because it's not the expected behavior - the entries
in the nav are regular links and they should behave like that (the old
nav didn't have this problem).

This PR fixes the issue to not call `e.preventDefault()` in case it's a
"special click" and only triggers the in-page navigation in cases where
the user does a normal left click.

Co-authored-by: Bhavya RM <bhavya@elastic.co>
2025-03-18 17:06:58 +01:00