Commit graph

82543 commits

Author SHA1 Message Date
elastic-renovate-prod[bot]
8bb59ee47b
Update dependency ipaddr.js to v2.2.0 2025-01-10 15:18:32 +00:00
elastic-renovate-prod[bot]
44c2504240
Update dependency io-ts to ^2.2.22 (main) (#206174)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-10 16:04:11 +01:00
Paulina Shakirova
f6fb68ce16
Consistent help dropdown UI (#206280)
#### This is a second PR, I migrated relevant code changes here after
closing the previous one. You may read the comments history
[here](https://github.com/elastic/kibana/pull/205781).

## Summary
This PR fixes [Make Help dropdown consistent across all
environments](https://github.com/elastic/kibana/issues/199465) issue.

Since we need to make dropdown consistent also in the cloud, I will
firstly merge this PR, and then deal with the Cloud part by either
opening PR in that repo, or reach out to the responsible team showcasing
changes in Kibana and ask them to implement the changes.

This is how the dropdown is displayed currently (1st screenshot) and how
it will be looking with my changes (2nd screenshot).

After discussing the design with @ek-so and trying out different
variants, this seems to be the most suitable and universal.

The changes include refactoring usage or relevant Eui components and
removing the displaying of icons in the general menu dropdown (while
keeping this functionality of adding icons to the solutions additional
menu dropdown items).

<img width="330" alt="Screenshot 2025-01-07 at 13 07 49"
src="https://github.com/user-attachments/assets/a01a4966-dc6d-4c7c-86c2-4588960237f1"
/>


<img width="346" alt="Screenshot 2025-01-09 at 15 22 36"
src="https://github.com/user-attachments/assets/e9512a49-91b4-49fe-913b-f6bc70bfe1cc"
/>
2025-01-10 15:59:58 +01:00
Alejandro Fernández Haro
d0abdbdb7e
[ES body removal] @elastic/search-kibana (#204876) 2025-01-10 14:54:23 +00:00
Shahzad
2642aff1dd
[Synthetics] E2e tests update flakiness !! (#206257)
## Summary

E2e tests update flakiness !!
2025-01-10 15:49:57 +01:00
Kibana Machine
07ab93fc6b
Unauthorized route migration for routes owned by appex-sharedux (#198328)
### 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: Eyo Okon Eyo <eyo.eyo@elastic.co>
2025-01-10 15:45:57 +01:00
Alejandro Fernández Haro
2cd882c50d
[ES body removal] @elastic/kibana-core (#204851) 2025-01-10 14:41:19 +00:00
elastic-renovate-prod[bot]
5be981535b
Update dependency @elastic/ecs to ^8.11.5 (main) (#206159)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-01-10 14:06:12 +00:00
Paulina Shakirova
86e8a2fcee
[VisLibrary] AnnotGroup listing page papercuts (#205914)
## Summary
This PR fixes [Annotation groups Listing Page
Papercuts](https://github.com/elastic/kibana/issues/198731) and
[Dashboard Listing Page
Papercuts](https://github.com/elastic/kibana/issues/198728) issues.

1. Changed the name of the first column
2. Fixed edit icon being invisible while editing functionality is
available.
In the past the logic was different - hiding of icon was happening based
on `isEditable(item)` property, and in the [[Managed content] readonly
in library
views](https://github.com/elastic/kibana/pull/176263/files#diff-e442682471f1021a9126ddcad7e00a0d334e57ac8db512c1c3268e14ecac0074L552)
PR the logic was changed to depend on adding a key `{ edit: { enabled:
false }` if there is a need to hide the Edit button. What happened is
that the logic should be -> If you don't want to show the Edit icon, add
`{ edit: { enabled: false }`, but in the current code, although there is
no such key, the pencil stays invisible, because the
`Boolean(tableItemsRowActions[item.id]?.edit?.enabled)` resolved to
`false` when it is `undefined` (when the Edit functionality isn't
disabled.) In this PR I propose an adjustment to this line of code.
3. Changed the View Details icon.
4. Show Reload page toast when a user changes preferred
`savedObjects:perPage` in Advanced Settings.
5. Fix sorting algorithm that was sorting incorrectly if the preferred
`savedObjects:perPage` was less than 10.

<img width="237" alt="Screenshot 2025-01-09 at 13 44 39"
src="https://github.com/user-attachments/assets/77a6fd45-8845-4b06-818c-0af0dc01ede9"
/>

<img width="243" alt="Screenshot 2025-01-09 at 13 43 30"
src="https://github.com/user-attachments/assets/3d9e03da-94dd-4e31-b33a-eb81e71b69dd"
/>
2025-01-10 14:38:00 +01:00
Marco Antonio Ghiani
3d82bb58af
[Streams] Fix broken image usage (#206258)
## 📓 Summary

Fixes a missing referenced image after merging
https://github.com/elastic/kibana/pull/204793
2025-01-10 13:11:47 +00:00
Artem Shelkovnikov
f612e71452
Add new native fields for SPO connector - certificate authenticate (#205337)
## Summary

This PR reflects the changes done in
https://github.com/elastic/connectors/pull/3064: update of Sharepoint
Online native connector configurable fields.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-01-10 12:51:25 +01:00
Giorgos Bamparopoulos
a3f07db7b6
Remove log stream and settings (#204115)
Removes the code used to render the log stream and settings pages.

The following areas have been checked:
- Log stream embeddable (dashboard of the `cisco_meraki` integration)
- Log stream shared component
- Log categories
- Log anomalies


https://github.com/user-attachments/assets/2bc0763d-3def-4c4b-b50a-21c17976a596

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-10 11:51:12 +00:00
Anton Dosov
64b6a1a5e7
Sustainable Kibana Architecture: Move the rest of shared-ux modules (#205924)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

Are you trying to rebase this PR to solve merge conflicts? Please follow
the steps describe
[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).

#### 1 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/url-drilldown-plugin` |
`x-pack/platform/plugins/private/drilldowns/url_drilldown` |




#### 21 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/core-chrome-browser` | `src/core/packages/chrome/browser` |
| `@kbn/deeplinks-shared` |
`src/platform/packages/shared/deeplinks/shared` |
| `@kbn/home-sample-data-card` |
`src/platform/packages/shared/home/sample_data_card` |
| `@kbn/home-sample-data-tab` |
`src/platform/packages/shared/home/sample_data_tab` |
| `@kbn/home-sample-data-types` |
`src/platform/packages/shared/home/sample_data_types` |
| `@kbn/guided-onboarding` |
`src/platform/packages/shared/kbn-guided-onboarding` |
| `@kbn/item-buffer` | `src/platform/packages/private/kbn-item-buffer` |
| `@kbn/management-settings-section-registry` |
`src/platform/packages/shared/kbn-management/settings/section_registry`
|
| `@kbn/management-settings-ids` |
`src/platform/packages/shared/kbn-management/settings/setting_ids` |
| `@kbn/react-mute-legacy-root-warning` |
`src/platform/packages/private/kbn-react-mute-legacy-root-warning` |
| `@kbn/saved-objects-settings` |
`src/platform/packages/private/kbn-saved-objects-settings` |
| `@kbn/react-kibana-context-common` |
`src/platform/packages/shared/react/kibana_context/common` |
| `@kbn/react-kibana-context-render` |
`src/platform/packages/shared/react/kibana_context/render` |
| `@kbn/react-kibana-context-root` |
`src/platform/packages/shared/react/kibana_context/root` |
| `@kbn/react-kibana-context-styled` |
`src/platform/packages/shared/react/kibana_context/styled` |
| `@kbn/react-kibana-context-theme` |
`src/platform/packages/shared/react/kibana_context/theme` |
| `@kbn/react-kibana-mount` |
`src/platform/packages/shared/react/kibana_mount` |
| `@kbn/serverless-project-switcher` |
`src/platform/packages/private/serverless/project_switcher` |
| `@kbn/serverless-common-settings` |
`src/platform/packages/private/serverless/settings/common` |
| `@kbn/serverless-observability-settings` |
`src/platform/packages/shared/serverless/settings/observability_project`
|
| `@kbn/serverless-types` |
`src/platform/packages/private/serverless/types` |


<details >
<summary>Updated relative paths</summary>

```
src/core/packages/chrome/browser/jest.config.js:12
src/core/packages/chrome/browser/tsconfig.json:2
src/core/packages/chrome/browser/tsconfig.type_check.json:2
src/core/packages/chrome/browser/tsconfig.type_check.json:21
src/core/packages/chrome/browser/tsconfig.type_check.json:24
src/core/packages/chrome/browser/tsconfig.type_check.json:27
src/core/packages/chrome/browser/tsconfig.type_check.json:30
src/core/packages/chrome/browser/tsconfig.type_check.json:33
src/core/packages/chrome/browser/tsconfig.type_check.json:36
src/core/packages/chrome/browser/tsconfig.type_check.json:39
src/core/packages/chrome/browser/tsconfig.type_check.json:42
src/core/packages/chrome/browser/tsconfig.type_check.json:45
src/core/packages/chrome/browser/tsconfig.type_check.json:48
src/core/packages/chrome/browser/tsconfig.type_check.json:51
src/core/packages/chrome/browser/tsconfig.type_check.json:54
src/platform/packages/private/kbn-item-buffer/jest.config.js:12
src/platform/packages/private/kbn-item-buffer/tsconfig.json:2
src/platform/packages/private/kbn-react-mute-legacy-root-warning/jest.config.js:12
src/platform/packages/private/kbn-react-mute-legacy-root-warning/tsconfig.json:2
src/platform/packages/private/kbn-saved-objects-settings/jest.config.js:12
src/platform/packages/private/kbn-saved-objects-settings/tsconfig.json:2
src/platform/packages/private/kbn-saved-objects-settings/tsconfig.type_check.json:2
src/platform/packages/private/serverless/project_switcher/jest.config.js:12
src/platform/packages/private/serverless/project_switcher/tsconfig.json:2
src/platform/packages/private/serverless/project_switcher/tsconfig.type_check.json:2
src/platform/packages/private/serverless/project_switcher/tsconfig.type_check.json:23
src/platform/packages/private/serverless/settings/common/tsconfig.json:2
src/platform/packages/private/serverless/settings/common/tsconfig.type_check.json:2
src/platform/packages/private/serverless/settings/common/tsconfig.type_check.json:20
src/platform/packages/private/serverless/types/tsconfig.json:2
src/platform/packages/private/serverless/types/tsconfig.type_check.json:2
src/platform/packages/shared/deeplinks/shared/jest.config.js:12
src/platform/packages/shared/deeplinks/shared/tsconfig.json:2
src/platform/packages/shared/deeplinks/shared/tsconfig.type_check.json:2
src/platform/packages/shared/home/sample_data_card/jest.config.js:12
src/platform/packages/shared/home/sample_data_card/tsconfig.json:2
src/platform/packages/shared/home/sample_data_card/tsconfig.type_check.json:2
src/platform/packages/shared/home/sample_data_card/tsconfig.type_check.json:23
src/platform/packages/shared/home/sample_data_card/tsconfig.type_check.json:29
src/platform/packages/shared/home/sample_data_tab/jest.config.js:12
src/platform/packages/shared/home/sample_data_tab/tsconfig.json:2
src/platform/packages/shared/home/sample_data_tab/tsconfig.type_check.json:2
src/platform/packages/shared/home/sample_data_tab/tsconfig.type_check.json:23
src/platform/packages/shared/home/sample_data_types/jest.config.js:12
src/platform/packages/shared/home/sample_data_types/tsconfig.json:2
src/platform/packages/shared/home/sample_data_types/tsconfig.type_check.json:2
src/platform/packages/shared/kbn-guided-onboarding/jest.config.js:12
src/platform/packages/shared/kbn-guided-onboarding/tsconfig.json:2
src/platform/packages/shared/kbn-guided-onboarding/tsconfig.type_check.json:2
src/platform/packages/shared/kbn-management/settings/section_registry/tsconfig.json:2
src/platform/packages/shared/kbn-management/settings/section_registry/tsconfig.type_check.json:2
src/platform/packages/shared/kbn-management/settings/section_registry/tsconfig.type_check.json:22
src/platform/packages/shared/kbn-management/settings/section_registry/tsconfig.type_check.json:25
src/platform/packages/shared/kbn-management/settings/setting_ids/tsconfig.json:2
src/platform/packages/shared/kbn-management/settings/setting_ids/tsconfig.type_check.json:2
src/platform/packages/shared/react/kibana_context/common/jest.config.js:12
src/platform/packages/shared/react/kibana_context/common/tsconfig.json:2
src/platform/packages/shared/react/kibana_context/common/tsconfig.type_check.json:2
src/platform/packages/shared/react/kibana_context/render/jest.config.js:12
src/platform/packages/shared/react/kibana_context/render/tsconfig.json:2
src/platform/packages/shared/react/kibana_context/render/tsconfig.type_check.json:2
src/platform/packages/shared/react/kibana_context/render/tsconfig.type_check.json:25
src/platform/packages/shared/react/kibana_context/root/jest.config.js:12
src/platform/packages/shared/react/kibana_context/root/tsconfig.json:2
src/platform/packages/shared/react/kibana_context/root/tsconfig.type_check.json:2
src/platform/packages/shared/react/kibana_context/root/tsconfig.type_check.json:22
src/platform/packages/shared/react/kibana_context/root/tsconfig.type_check.json:28
src/platform/packages/shared/react/kibana_context/root/tsconfig.type_check.json:31
src/platform/packages/shared/react/kibana_context/root/tsconfig.type_check.json:34
src/platform/packages/shared/react/kibana_context/root/tsconfig.type_check.json:37
src/platform/packages/shared/react/kibana_context/root/tsconfig.type_check.json:40
src/platform/packages/shared/react/kibana_context/styled/jest.config.js:12
src/platform/packages/shared/react/kibana_context/styled/tsconfig.json:2
src/platform/packages/shared/react/kibana_context/styled/tsconfig.type_check.json:2
src/platform/packages/shared/react/kibana_context/styled/tsconfig.type_check.json:22
src/platform/packages/shared/react/kibana_context/theme/jest.config.js:12
src/platform/packages/shared/react/kibana_context/theme/tsconfig.json:2
src/platform/packages/shared/react/kibana_context/theme/tsconfig.type_check.json:2
src/platform/packages/shared/react/kibana_context/theme/tsconfig.type_check.json:22
src/platform/packages/shared/react/kibana_mount/jest.config.js:12
src/platform/packages/shared/react/kibana_mount/tsconfig.json:2
src/platform/packages/shared/react/kibana_mount/tsconfig.type_check.json:2
src/platform/packages/shared/react/kibana_mount/tsconfig.type_check.json:22
src/platform/packages/shared/react/kibana_mount/tsconfig.type_check.json:25
src/platform/packages/shared/react/kibana_mount/tsconfig.type_check.json:28
src/platform/packages/shared/react/kibana_mount/tsconfig.type_check.json:34
src/platform/packages/shared/serverless/settings/observability_project/tsconfig.json:2
src/platform/packages/shared/serverless/settings/observability_project/tsconfig.type_check.json:2
src/platform/packages/shared/serverless/settings/observability_project/tsconfig.type_check.json:20
x-pack/platform/plugins/private/drilldowns/url_drilldown/tsconfig.json:2
```

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-10 11:30:37 +00:00
Irene Blanco
022900809a
[APM] Fix Cypress flaky test in Custom Links (#206108)
## Summary

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

This PR aims to fix a flaky test that waits for an empty state screen,
which sometimes fails to appear.

The issue might happen because the data deletion action, which triggers
the empty state, is not completed properly. This action takes place in
the previous test and does not wait for the deletion to finish.

The proposed solution ensures that the test responsible for deleting the
data waits until the empty state appears after deletion, preventing the
next test from running too soon.

### Test locally

`````
node x-pack/solutions/observability/plugins/apm/scripts/test/e2e.js --server
node x-pack/solutions/observability/plugins/apm/scripts/test/e2e.js  --runner --open
`````

Run the
[custom_links.cy.ts](http://localhost:5620/__/#/specs/runner?file=cypress/e2e/settings/custom_links.cy.ts)
test.
2025-01-10 12:30:00 +01:00
Artem Shelkovnikov
c88d519bff
Introduce Kibana task to deploy agentless connectors for 9.0 (#203973)
## Closes https://github.com/elastic/search-team/issues/8508
## Closes https://github.com/elastic/search-team/issues/8465

## Summary

This PR adds a background task for search_connectors plugin. This task
checks connector records and agentless package policies and sees if new
connector was added/old was deleted, and then adds/deletes package
policies for these connectors.

Scenario 1: a new connector was added by a user/API call

User creates an Elastic-managed connector:


https://github.com/user-attachments/assets/38296e48-b281-4b2b-9750-ab0a47334b55

When the user is done, a package policy is created by this background
task:


https://github.com/user-attachments/assets/12dbc33f-32bf-472d-b854-64588fc1e5b1

Scenario 2: a connector was deleted by a user/API call

User deletes an Elastic-managed connector:


https://github.com/user-attachments/assets/5997897e-fb9d-4199-8045-abe163264976

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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>
Co-authored-by: Jedr Blaszyk <jedrazb@gmail.com>
2025-01-10 11:22:00 +00:00
Marco Antonio Ghiani
abf00ee777
[Streams 🌊] Stream enrichment processors management (#204793)
## 📓 Summary

Part of #https://github.com/elastic/streams-program/issues/32

This work implements a UI for basic stream enrichment, supporting grok
and dissect processor + detected fields mapping.

The main features implemented in this PR consist of:
- **Sortable processors list**
- **Add new processor - Grok, Dissect**
  - Ad-hoc forms for each processor
  - Simulated document outcome with extracted fields
  - Filter matching documents with parsed fields
  - Mapping detected fields (only available for wired streams)
- **Edit processor**
  - Change configuration only
  - Delete processor CTA

As a side quest, I added a small package for object utils as
@simianhacker suggested.
`@kbn/object-utils` exposes `calculateObjectDiff` and `flattenObject` to
detect the changed fields in a simulation.

## 🔜 Follow-up work

I'll work on minor updates on top of this MVP to make this available for
further testing from the team.
The next steps will be:
- **Tests** for features that consolidate on the functional pov.
- Better field mapping detection and UI feedback (infer the type of the
detected field, currently always unmapped)
- Add better form validation and feedback for processor configuration.

As discussed offline, state management is purely based on the built-in
react APIs + react-hook-form. It could be improved with different
approaches, including a more solid state management library to make it
easier to maintain and bulletproof to race conditions. No state syncs
with the URL currently.

## 🎥 Demo


https://github.com/user-attachments/assets/a48fade9-f5aa-4270-bb19-d91d1eed822b

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-10 12:01:55 +01:00
Bryce Buchanan
c7e4249b6b
[INFRA] Add additional perf telemetry (#205955)
## Summary
Closes https://github.com/elastic/kibana/issues/205394
This PR adds performance telemetry to metric explorer and adds time
range to existing telemetry in the host tables.
Building on #180309.

The time ranges added to the telemetry use the format "now", "now-15m"
per the examples in the [performance tutorial
docs](https://docs.elastic.dev/kibana-dev-docs/tutorial/performance/adding_custom_performance_metrics#add-time-ranges)


example of perf temeletry with the query range metadata can be seen
[here](https://telemetry-v2-staging.elastic.dev/s/apm/app/discover#/?_g=(filters:!(),query:(language:kuery,query:''),refreshInterval:(pause:!t,value:60000),time:(from:'2025-01-08T18:30:00.000Z',to:'2025-01-08T19:00:00.000Z'))&_a=(columns:!(),dataSource:(dataViewId:'0d6d7d31-1369-4a53-b36d-fbe97e4e5a0e',type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'eventName%20:%20%22kibana:plugin_render_time%22%20and%20context.pageName%20:%20%22application:metrics:%2Fexplorer%22%20'),sort:!(!(timestamp,desc))))
2025-01-10 10:50:15 +00:00
Gerard Soldevila
3b42b80bce
SKA: Relocate Script v7.1 (#206233)
## Summary

* Fix an issue with the `--list` command failing the 1st run.
* Allow passing in no filters, and relocate "incorrect" modules (aka
modules that are not in the correct folder) in that case.
2025-01-10 10:47:47 +00:00
Maryam Saeidi
82721b0c25
Remove wrong test (#206231)
## Summary

This test is not useful and has a bug, so we decided to remove it.
2025-01-10 10:39:40 +00:00
Janki Salvi
7386e26824
[ResponseOps][Cases] Make case templates GA (#205940)
## Summary

This PR makes case templates GA.

<details><summary>Case settings</summary>

<img width="1133" alt="image"
src="https://github.com/user-attachments/assets/45c5896f-88dc-4199-ab83-398d05c8746a"
/>
</details> 

<details><summary>Case create</summary>

<img width="1094" alt="image"
src="https://github.com/user-attachments/assets/05df0a4a-44e8-4bf2-ad8d-e50f5d9851ef"
/>
</details> 

<details><summary>Case action</summary>

<img width="1079" alt="image"
src="https://github.com/user-attachments/assets/b321e926-3b2d-4773-90a3-3bd0b45aac3c"
/>
</details> 

### Checklist

Check the PR satisfies following conditions. 

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

### Release Notes
Case templates are now GA

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-01-10 10:31:13 +00:00
Tomasz Ciecierski
39774bfc48
[EDR Workflows] Add Runscript openApi schema (#206044) 2025-01-10 11:26:41 +01:00
Julia Bardi
20fa1a54c1
[Fleet] fix bulk actions timing out sometimes (#205735)
## Summary

Closes https://github.com/elastic/ingest-dev/issues/4346

Update: changed the implementation to run the first attempt of bulk
action execution in the task too.

```
[2025-01-08T11:10:54.139+01:00][INFO ][plugins.fleet] Running action asynchronously, actionId: f8658178-cb1e-485d-9d2f-ad60ccc37bc9, total agents:10001
actionParams {
  kuery: '( fleet-agents.policy_id : ("d3448ae1-9e55-485e-b74c-83471cb06977")) and (status:online or (status:error or status:degraded) or (status:updating or status:unenrolling or status:enrolling) or status:offline)',
  revoke: false,
  force: undefined,
  batchSize: 10000,
  showInactive: true,
  spaceId: 'default',
  total: 10001,
  actionId: 'f8658178-cb1e-485d-9d2f-ad60ccc37bc9'
}
retryParams {
  pitId: 'gIuaBAEPLmZsZWV0LWFnZW50cy03FmRQN3pDT1gzUnFpNFkwdHJFdzJvbncAARZ5N2R5SnVSelN2bWNMang1THNfVkNRAAEAAAAAAAFpZhZiZnpybjZYSFRRNklYNlBqWHFzVU1nAAEWZFA3ekNPWDNScWk0WTB0ckV3Mm9udwAA',
  retryCount: 1
}
[2025-01-08T11:10:54.154+01:00][INFO ][plugins.fleet] Scheduling task fleet:unenroll_action:retry:f8658178-cb1e-485d-9d2f-ad60ccc37bc9
[2025-01-08T11:10:54.154+01:00][DEBUG][plugins.fleet] [Bulk Agent Unenroll API] Unenroll agents in 647ms
[2025-01-08T11:10:55.772+01:00][WARN ][http.server.Kibana] Event loop utilization for /julia/api/fleet/agents exceeded threshold of 250ms (351ms out of 633ms) and 15% (55%) 
[2025-01-08T11:10:57.235+01:00][INFO ][plugins.fleet] Running bulk action retry task
[2025-01-08T11:10:57.235+01:00][DEBUG][plugins.fleet] Running task fleet:unenroll_action:retry:f8658178-cb1e-485d-9d2f-ad60ccc37bc9
[2025-01-08T11:10:57.236+01:00][INFO ][plugins.fleet] Completed bulk action retry task
[2025-01-08T11:10:57.251+01:00][INFO ][plugins.fleet] Scheduling task fleet:unenroll_action:retry:check:f8658178-cb1e-485d-9d2f-ad60ccc37bc9
[2025-01-08T11:10:57.251+01:00][DEBUG][plugins.fleet] kuery: ( fleet-agents.policy_id : ("d3448ae1-9e55-485e-b74c-83471cb06977")) and (status:online or (status:error or status:degraded) or (status:updating or status:unenrolling or status:enrolling) or status:offline)
[2025-01-08T11:10:57.781+01:00][DEBUG][plugins.fleet] Action not found
[2025-01-08T11:10:58.891+01:00][DEBUG][plugins.fleet] Secrets storage requirements already met, turned on in settings
[2025-01-08T11:10:59.414+01:00][WARN ][http.server.Kibana] Event loop utilization for /julia/api/fleet/agent_status exceeded threshold of 250ms (294ms out of 348ms) and 15% (85%) 
[2025-01-08T11:10:59.806+01:00][WARN ][http.server.Kibana] Event loop utilization for /julia/api/fleet/agents exceeded threshold of 250ms (504ms out of 743ms) and 15% (68%) 
[2025-01-08T11:11:01.532+01:00][INFO ][plugins.fleet] Removing task fleet:unenroll_action:retry:check:f8658178-cb1e-485d-9d2f-ad60ccc37bc9
actionParams {
  kuery: '( fleet-agents.policy_id : ("d3448ae1-9e55-485e-b74c-83471cb06977")) and (status:online or (status:error or status:degraded) or (status:updating or status:unenrolling or status:enrolling) or status:offline)',
  revoke: false,
  batchSize: 10000,
  showInactive: true,
  spaceId: 'default',
  total: 10001,
  actionId: 'f8658178-cb1e-485d-9d2f-ad60ccc37bc9'
}
retryParams {
  pitId: 'gIuaBAEPLmZsZWV0LWFnZW50cy03FmRQN3pDT1gzUnFpNFkwdHJFdzJvbncAARZ5N2R5SnVSelN2bWNMang1THNfVkNRAAEAAAAAAAFpZhZiZnpybjZYSFRRNklYNlBqWHFzVU1nAAEWZFA3ekNPWDNScWk0WTB0ckV3Mm9udwAA',
  retryCount: 1,
  taskId: 'fleet:unenroll_action:retry:f8658178-cb1e-485d-9d2f-ad60ccc37bc9',
  searchAfter: [ 1736331016589, 'online-98', 119770 ]
}
[2025-01-08T11:11:01.564+01:00][INFO ][plugins.fleet] Scheduling task fleet:unenroll_action:retry:check:f8658178-cb1e-485d-9d2f-ad60ccc37bc9
[2025
```


## Old description

Bulk actions supposed to run async in a kibana task, and the API to
return quickly with an action id.
This was implemented
[here](38e74d7ee6 (diff-69fa063ab8857204486203a718ff4bd0cbf9652623279d1959316de8e83233ff))
and unintentionally broke when a tslint rule was introduced
[here](https://github.com/elastic/kibana/pull/181456/files#diff-69fa063ab8857204486203a718ff4bd0cbf9652623279d1959316de8e83233ff),
effectively letting the async code finish before the API returns. This
results in the API timing out sometimes when there are many agents.

Tested by creating 100k agent docs with the `create_agents` script and
bulk unenroll agents.

Logs before the change:
```
[2025-01-07T14:38:04.467+01:00][INFO ][plugins.fleet] Running action asynchronously, actionId: 2a57ac7a-0c1b-4a08-8709-6ccb683db995, total agents:100000
[2025-01-07T14:38:04.482+01:00][INFO ][plugins.fleet] Scheduling task fleet:unenroll_action:retry:check:2a57ac7a-0c1b-4a08-8709-6ccb683db995
[2025-01-07T14:38:04.482+01:00][DEBUG][plugins.fleet] kuery: status:* AND (fleet-agents.policy_id : ("d3448ae1-9e55-485e-b74c-83471cb06977"))
...
[2025-01-07T14:39:00.264+01:00][INFO ][plugins.fleet] Removing task fleet:unenroll_action:retry:check:2a57ac7a-0c1b-4a08-8709-6ccb683db995
[2025-01-07T14:39:00.290+01:00][INFO ][plugins.fleet] Scheduling task fleet:unenroll_action:retry:check:2a57ac7a-0c1b-4a08-8709-6ccb683db995
[2025-01-07T14:39:00.293+01:00][INFO ][plugins.fleet] processed 100000 agents, took 55811ms
[2025-01-07T14:39:00.293+01:00][INFO ][plugins.fleet] Removing task fleet:unenroll_action:retry:check:2a57ac7a-0c1b-4a08-8709-6ccb683db995
[2025-01-07T14:39:00.304+01:00][DEBUG][plugins.fleet] [Bulk Agent Unenroll API] Unenroll agents in 56027ms
```

Logs after the change:
```
[2025-01-07T14:42:10.178+01:00][INFO ][plugins.fleet] Running action asynchronously, actionId: c3e12928-bbfe-4731-bdc2-c47bcac727a7, total agents:100000
[2025-01-07T14:42:10.194+01:00][INFO ][plugins.fleet] Scheduling task fleet:unenroll_action:retry:check:c3e12928-bbfe-4731-bdc2-c47bcac727a7
[2025-01-07T14:42:10.195+01:00][DEBUG][plugins.fleet] kuery: status:* AND (fleet-agents.policy_id : ("d3448ae1-9e55-485e-b74c-83471cb06977"))
[2025-01-07T14:42:10.195+01:00][DEBUG][plugins.fleet] [Bulk Agent Unenroll API] Unenroll agents in 196ms
[2025-01-07T14:43:00.762+01:00][INFO ][plugins.fleet] processed 100000 agents, took 50567ms
[2025-01-07T14:43:00.762+01:00][INFO ][plugins.fleet] Removing task fleet:unenroll_action:retry:check:c3e12928-bbfe-4731-bdc2-c47bcac727a7
```
2025-01-10 11:24:53 +01:00
Marco Liberati
6e3c967285
[Lens][Security Solutions] Restore cypress tests (#206025)
## Summary

Fixes #198756 


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-01-10 10:52:36 +01:00
Marco Liberati
41950c22df
[Lens] Restore embeddable test coverage (#204986)
## Summary

Fixes #198754

Restore previous removed tests when performing the refactor.
The new tests take advantage of the new architecture to be more modular
and close to the logic modules.

The `data_loader` tests are not just covering the re-render logic but
also some `expression_params` logic, who in the past have proven to be
the source of some bugs: specifically the tests will check that the
params are correctly passed to the params logic and then stored
correctly in the observable.

New mocks take advantage of the plain initializers to build some of the
API, that will make it in sync with the actual implementation for future
maintenance.


### Checklist

Check the PR satisfies following conditions. 

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
2025-01-10 10:29:38 +01:00
Mykola Harmash
6ed214a69f
Migrate onboarding Cypress tests to Scout (#205482)
This change converts Cypress tests for the custom logs flow into
Playwright using [the Scout
wrapper](https://github.com/elastic/kibana/tree/main/packages/kbn-scout).

> [!NOTE]
> As Scout package is still being developed, the PR pipeline configured
to runs Playwright tests only when code in certain plugins have been
changed and not on every PR.

### How to run tests locally

Start the Scout server
```bash
node scripts/scout.js start-server --stateful
```

In a separate terminal run the tests
```bash
npx playwright test --config x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts
```

Playwright runs browsers in a headless mode by default, user `--headed`
option if needed
2025-01-10 09:44:29 +01:00
Alejandro Fernández Haro
41a42555f9
[Cloud Experiments] Flag as private (#206121) 2025-01-10 09:17:40 +01:00
Stratoula Kalafateli
feefa77668
[ES|QL] Allows the editor suggestions to be visible when inline docs flyout is open (#206064)
## Summary

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

Changes the flyout z-index in order the suggestions to be visible when
the docs are open.


![image
(75)](https://github.com/user-attachments/assets/e13595d0-e98c-4e7b-9673-a6e3d011fee7)
2025-01-10 08:21:32 +01:00
Kibana Machine
6a4f4ea346
[api-docs] 2025-01-10 Daily api_docs build (#206196)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/948
2025-01-10 07:17:40 +00:00
Davis McPhee
518e0afbde
[Discover] Format JSON messages in Observability Logs profile (#205666)
## Summary

This PR updates the Observability Logs profile to detect and auto format
JSON message values within both the Log overview doc viewer tab and the
Summary cell popover. Additionally, it enables CTRL/CMD + F find
functionality within the doc viewer JSON tab for all contexts to make it
easier for users to search the JSON output.

JSON message formatting:

![json](https://github.com/user-attachments/assets/a7c63afd-bef7-4050-b8cf-08e4f469ffa9)

JSON tab find functionality:

![find](https://github.com/user-attachments/assets/aac51e05-6126-4770-8976-0d9057bad557)

### 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)
2025-01-09 20:05:18 -04:00
Nick Partridge
d96168c64f
[User] Prevent disabled input change by password manager (#204269)
Prevents username input from being edited by password manager extensions when `disabled`
2025-01-09 16:48:03 -06:00
Alex Szabo
b3b81331b5
[ci] Work around docosaurus errors (#206097)
## Summary
This workaround removes the folder that needs to be built differently
after cloning the repos.

See: https://github.com/elastic/kibana/issues/206077
2025-01-09 16:33:30 -06:00
Bharat Pasupula
668d88e19e
[Automatic Import ] Enable inference connector for Auto Import (#206111)
## Summary

Enables new inference connector in the Automatic Import.

This PR also fixes the use of `inferenceEnabled` from
`useAssistantContext` since it is not available in AutoImport.

## To test

1. Update the value for `inferenceConnectorOn` to `true` in
`x-pack/platform/plugins/shared/stack_connectors/common/experimental_features.ts`
2. Create an inference connector using [OpenAI
creds](https://p.elstc.co/paste/36VivuC+#TnP7-Z7wBKDUg8fQ/lTycSCdwUxEEbHcyQ/Q0i3oEmO).
Configure the inference endpoint for completion and name the endpoint
`openai-completion-preconfig`
3. Now that the inference endpoint is created, add a [preconfigured
connector](https://p.elstc.co/paste/tFWF3LSA#0thBRW05e6KSSkLCDjQiH8GkECQySBiHm6zRMCUThlf)
with the same credentials.
4. Select the preconfigured selector in Automatic Import.
5. Test the Auto Import flow works.

---------

Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
2025-01-09 22:04:33 +00:00
Larry Gregory
a9f5f432ad
Dependency ownership refinements (#205937)
## Summary

This PR assigns owners for dependencies that are not yet claimed. These
assignments were a "best effort", and will likely need tweaking once
downstream teams start receiving renovate PRs.
2025-01-09 18:33:38 +00:00
Marco Vettorello
75a401ffec
[Lens] Align Lens style with Borealis (#204839)
## Summary

This PR updates the style of Lens to align it with the new Borealis
theme.
It covers the set of tasks in #203050 within the `Lens editor panels`
list.

Comments are applied in order as in the mentioned issue

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-09 19:28:37 +01:00
Jason Rhodes
d7723168a5
Adds notification settings for unsupported ftr tests (synthetics, inventory) (#206085)
## Summary

Based on [work by @v1v to notify Slack teams when there are unsupported
FTR failures](https://github.com/elastic/kibana/pull/205260), I've added
the remaining ones for synthetics and inventory tests here.
2025-01-09 13:02:16 -05:00
Ash
b25c9984bb
[SecuritySolutions][Endpoint] Microsoft defender for Endpoint response actions API (#205097)
## Summary

- Adds response actions client/APIs for isolate and release actions for
Microsoft Defender for Endpoint
- The feature is behind a feature flag
`responseActionsMSDefenderEndpointEnabled`
2025-01-09 11:59:56 -05:00
Dima Arnautov
737cf96809
[ML] Transforms: Improve messages for recovered alerts (#205721) 2025-01-09 17:53:09 +01:00
Janki Salvi
a56227bf37
[ResponseOps][Rules] Allow to set notify when and throttle at rule level (#203235)
## Summary

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

This PR allows to create and update rule with `notify_when` and
`throttle` attributes at rule level instead of `action.frequency` level.

### How to test
- create a rule via api where `notify_when` and `throttle` attributes
are at rule level
  <details><summary>Example</summary>
  Note: use your existing connector for action
  
  ```typescript
  POST kbn:/api/alerting/rule
  {
    "tags": [],
    "params": {
      "searchConfiguration": {
        "query": {
          "query": "",
          "language": "kuery"
        },
        "index": "ff959d40-b880-11e8-a6d9-e546fe2bba5f"
      },
      "timeField": "order_date",
      "searchType": "searchSource",
      "timeWindowSize": 5,
      "timeWindowUnit": "d",
      "threshold": [
        10
      ],
      "thresholdComparator": ">",
      "size": 100,
      "aggType": "count",
      "groupBy": "all",
      "termSize": 5,
      "excludeHitsFromPreviousRun": false,
      "sourceFields": []
    },
    "schedule": {
      "interval": "1m"
    },
    "consumer": "stackAlerts",
    "name": "ES query rule from devtools",
    "rule_type_id": ".es-query",
    "notify_when": "onThrottleInterval",
    "throttle": "1h",
    "actions": [
      {
        "group": "query matched",
        "id": "ad923c8a-d27d-41a9-8c71-d33d94db4abb",
        "params": {
          "documents": [
            {
              "name": "{{rule.name}}"
            }
          ]
        }
      }
    ],
    "alert_delay": {
      "active": 1
    }
  }
  ``` 
  </details> 

- open the created rule
- go to `settings` tab 
- verify that dropdowns reflect notify_when and throttle value correctly
- update the rule via UI and verify the same
- update the rule via API and verify the same

### Flaky test runner: 
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7684

### Checklist

Check the PR satisfies following conditions. 

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-01-09 16:18:28 +00:00
wajihaparvez
fea598ea13
[Docs] Add wolfi image info (#205022)
## Summary

Adds information about using Wolfi container images to the Install with
Docker page.

Closes: [#594](https://github.com/elastic/platform-docs-team/issues/594)
2025-01-09 16:10:59 +00:00
Jedr Blaszyk
542a56b482
[Search serverless / Connectors FTRs] Update test role to developer (#206067)
## Summary

`viewer` role is not sufficient to call Connector APIs with new change
https://github.com/elastic/elasticsearch/pull/119863

Update the FTR tests to use developer role for testing
2025-01-09 15:45:30 +00:00
Viduni Wickramarachchi
37d7a5efb7
[Obs AI Assistant] Unskip user instructions test (#205656) (#205897)
Closes https://github.com/elastic/kibana/issues/205656

## Summary

### Problem
There seems to be a race condition and state contamination between tests
in the KB user instructions tests.

### Solution
- Clear knowledge base and conversations after tests
- Remove title interceptor --> we don't need title interception for
these tests

### Checklist

- [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)
2025-01-09 10:01:15 -05:00
Rodney Norris
75fe22b604
[Search] Remove Enterprise Search UI Apps (#205634)
## Summary

Removing app search & workplace search kibana applications from
`enterprise_search` plugin. This will be the first of many PRs to remove
code related to the enterprise search node.

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [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>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-09 15:55:18 +01:00
Sergi Romeu
45f3241db0
[APM] Fix Deep Links Cypress Flaky Test (#206000)
## Summary

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

This PR aims to solve the flakiness of deep_links.cy test.

- Instead of doing everything under 2 tests, we run a test for each
assertion and clean everything up.
- Ensures scroll div has content to be able to scroll
- scrolls to center or bottom depending on the position
2025-01-09 13:54:11 +00:00
Georgiana-Andreea Onoleață
49690d7a11
[ResponseOps][Rules]Hide number of conditions on Rule page when Rule type do not allow multiple conditions (#204385)
Closes https://github.com/elastic/kibana/issues/194809

## Summary

The "Conditions" section on the Rule page definition list is now hidden
for the rule types that don't allow multiple conditions


https://github.com/user-attachments/assets/eed1518a-91c4-453c-8294-643f86f05e30


todo: add/change tests
2025-01-09 15:51:29 +02:00
Nick Peihl
ce072268aa
[Dashboard] Add functional test for panel listing types (#205808)
Fixes #192663

## Summary

Add functional tests that verify the number of panel types registered in
the dashboards Add panel flyout. Any changes to the number of registered
panel types will trigger a review from the
`@elastic/kibana-presentation` team.

This PR also adds an additional test for panel types registered with an
advanced license.
2025-01-09 08:37:29 -05:00
Elena Shostak
d4196cd902
Fleet Privileges Display (#204402)
## Summary

Fixed privileges display for features/subFeatures that require all
spaces.

### Before
Role privileges display for only `Default` space selected

<img width="728" alt="Screenshot 2024-12-17 at 13 32 17"
src="https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3"
/>

Privileges summary display for only `Default` space selected

<img width="471" alt="Screenshot 2024-12-17 at 13 32 50"
src="https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c"
/>

### After
Role privileges display for only `Default` space selected

<img width="739" alt="Screenshot 2024-12-17 at 13 30 00"
src="https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b"
/>

Privileges summary display for only `Default` space selected

<img width="569" alt="Screenshot 2024-12-17 at 13 30 19"
src="https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9"
/>

### How to test
With `Default` space:
1. Navigate to Creating a new Role and assign Kibana privileges.
2. Set the Spaces to `Default` Space and the privilege level to All.
3. Navigate to Management category and verify that Fleet is set to
`None`.
4. Click on "View privilege summary" and verify that Fleet is set to
`None`.

With `*All Spaces`:
1. Navigate to Creating a new Role and assign Kibana privileges.
2. Set the Spaces to `*All Spaces` and the privilege level to All.
3. Navigate to Management category and verify that Fleet is set to `All`
4. Click on "View privilege summary" and verify that Fleet is set to
`All`


### Checklist

Check the PR satisfies following conditions. 

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

__Fixes: https://github.com/elastic/kibana/issues/194686__

## Release Note
Fixed privileges display for features/subFeatures that require all
spaces.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-09 14:22:51 +01:00
jennypavlova
13582aa458
[ECO][Inventory v2] Hosts entity summary endpoint changes (#203617)
## Summary

Closes #202300

This PR changes the entity client function to v2 (`searchEntities`) in
`getLatestEntity`. After the change to use `v2.searchEntities` the
parameters are also updated to include the time range (`start` and `end`
are required)

## Testing
~- We can create some definitions manually- in the Kibana DEV tools: ~ -
Not needed after we merged the V2 PR

- In a local environment enable the entities feature flag ( it should be
a clean env as the entities should not be enabled before ):
<img width="1911" alt="image"
src="https://github.com/user-attachments/assets/75d6f77d-5039-41ca-80ca-34c3bf99844e"
/>

- Some hosts and containers are required - oblt cluster/metricbeat or
   - Create hosts using synthtrace: 
       ```
node scripts/synthtrace infra_hosts_with_apm_hosts
--scenarioOpts.numInstances=20
       ```
   - Create containers using synthtrace: 
       ```
       node scripts/synthtrace infra_docker_containers.ts
       ```

- In the UI 
- Open asset details view for hosts and containers and check the summary
endpoint response:
  ⚠️ Updated: 


![image](https://github.com/user-attachments/assets/27683b74-f0b5-43a0-9a8f-98cd2a61e68e)

- If the entities FF is disabled (default: no `logs` should be part of
the `sourceDataStreams`):


![image](https://github.com/user-attachments/assets/7b8851b4-514c-4fc7-ab84-720b2ccb16ae)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
2025-01-09 13:17:37 +00:00
elastic-renovate-prod[bot]
a54045841c
Update dependency @xyflow/react to ^12.3.6 (main) (#204459)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@xyflow/react](https://reactflow.dev)
([source](https://togithub.com/xyflow/xyflow/tree/HEAD/packages/react))
| dependencies | patch | [`^12.3.5` ->
`^12.3.6`](https://renovatebot.com/diffs/npm/@xyflow%2freact/12.3.5/12.3.6)
|

---

### Release Notes

<details>
<summary>xyflow/xyflow (@&#8203;xyflow/react)</summary>

###
[`v12.3.6`](https://togithub.com/xyflow/xyflow/blob/HEAD/packages/react/CHANGELOG.md#1236)

[Compare
Source](https://togithub.com/xyflow/xyflow/compare/@xyflow/react@12.3.5...@xyflow/react@12.3.6)

##### Patch Changes

- [#&#8203;4846](https://togithub.com/xyflow/xyflow/pull/4846)
[`75017939`](7501793900)
Thanks [@&#8203;moklick](https://togithub.com/moklick)! - Make it
possible to use expandParent with immer and other immutable helpers

- [#&#8203;4865](https://togithub.com/xyflow/xyflow/pull/4865)
[`2c4acc2b`](2c4acc2bd9)
Thanks [@&#8203;moklick](https://togithub.com/moklick)! - Add group node
to BuiltInNode type. Thanks
[@&#8203;sjdemartini](https://togithub.com/sjdemartini)!

- [#&#8203;4877](https://togithub.com/xyflow/xyflow/pull/4877)
[`9a8309da`](9a8309dab8)
Thanks [@&#8203;peterkogo](https://togithub.com/peterkogo)! - Fix
intersections for nodes with origins other than \[0,0]. Thanks
[@&#8203;gmvrpw](https://togithub.com/gmvrpw)!

- [#&#8203;4844](https://togithub.com/xyflow/xyflow/pull/4844)
[`6f11e552`](6f11e552c3)
Thanks [@&#8203;moklick](https://togithub.com/moklick)! - Allow custom
data-testid for ReactFlow component

- [#&#8203;4816](https://togithub.com/xyflow/xyflow/pull/4816)
[`43aa52a8`](43aa52a8cd)
Thanks [@&#8203;moklick](https://togithub.com/moklick)! - Type
isValidConnection prop correctly by passing EdgeType

- [#&#8203;4855](https://togithub.com/xyflow/xyflow/pull/4855)
[`106c2cf8`](106c2cf8e5)
Thanks [@&#8203;mhuggins](https://togithub.com/mhuggins)! - Support
passing `path` element attributes to `BaseEdge` component.

- [#&#8203;4862](https://togithub.com/xyflow/xyflow/pull/4862)
[`adf4fb4e`](adf4fb4e7b)
Thanks [@&#8203;bcakmakoglu](https://togithub.com/bcakmakoglu)! -
Prevent default scrolling behavior when nodes or a selection is moved
with an arrow key press.

- [#&#8203;4875](https://togithub.com/xyflow/xyflow/pull/4875)
[`41d4743a`](41d4743a69)
Thanks [@&#8203;peterkogo](https://togithub.com/peterkogo)! - Prevent
unnecessary rerenders of edges when resizing the flow.

- [#&#8203;4826](https://togithub.com/xyflow/xyflow/pull/4826)
[`5f90acda`](5f90acdab1)
Thanks [@&#8203;chrtze](https://togithub.com/chrtze)! - Forward ref of
the div inside Panel components.

- Updated dependencies
\[[`d60331e6`](d60331e6ba)]:
-
[@&#8203;xyflow/system](https://togithub.com/xyflow/system)[@&#8203;0](https://togithub.com/0).0.47

</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://togithub.com/renovatebot/renovate).

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-01-09 13:04:20 +00:00
Alberto Blázquez
1e9606de9c
Turn AssetInventory sub-plugin into a Security solution page (#205363)
## Summary

Turn AssetInventory plugin into a simple Security solution page based on
this conversation:
- https://github.com/elastic/security-team/issues/10346

Follow-up of this work, where we initially developed the Asset Inventory
bare-bones as a plugin:
- https://github.com/elastic/kibana/issues/201704

Part of this work stream though not originally planned:
- https://github.com/elastic/security-team/issues/11247?reload=1

### Motivation

Reasoning behind is enabling fast development changes without any major
refactors in other packages/components that need to be reused, which
seems impossible as of now with the current codebase.

### Checklist

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

In the future, we'll probably have to turn AssetInventory into a
sub-plugin again. Doing so doesn't bring any risk in the present, and
should only involve the re-generation of the deleted files in this PR.

---------

Co-authored-by: Paulo Henrique <paulo.henrique@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-09 13:53:31 +01:00
Angela Chuang
0c0dd631bb
[Security Solution][threat hunting explore] EUI refresh: Rename color variables (#204908)
## Summary

https://github.com/elastic/kibana/issues/202499

### Running Kibana with the Borealis theme
In order to run Kibana with Borealis, you'll need to do the following:

Set the following in kibana.dev.yml:
uiSettings.experimental.themeSwitcherEnabled: true

Run Kibana with the following environment variable set:
KBN_OPTIMIZER_THEMES="borealislight,borealisdark,v8light,v8dark" yarn
start

This will expose a toggle under Stack Management > Advanced Settings >
Theme version, which you can use to toggle between Amsterdam and
Borealis.


![Image](https://github.com/user-attachments/assets/78d64946-43fc-4400-bbb1-229d900b7f05)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-09 12:47:25 +00:00