Skip to content

[9.1] [SecuritySolution] [Bug] Fix Manage data sources page index import (#226099)#226921

Merged
machadoum merged 1 commit intoelastic:9.1from
machadoum:backport/9.1/pr-226099
Jul 8, 2025
Merged

[9.1] [SecuritySolution] [Bug] Fix Manage data sources page index import (#226099)#226921
machadoum merged 1 commit intoelastic:9.1from
machadoum:backport/9.1/pr-226099

Conversation

@machadoum
Copy link
Member

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

…lastic#226099)

Fix the Manage Data Sources page index import by implementing the
creation, updating, deletion, and retrieval of entity source
configurations. It includes updates to the TypeScript definitions, API
schema, and client-side API methods to support these operations.

After this change, the user will be able to create only one data source
using the UI.

### API and types changes
* Added new types (`CreateMonitoringEntitySource`,
`UpdatedMonitoringEntitySource`, `MonitoringEntitySource`) with expanded
fields for entity source configurations, such as `indexPattern`,
`enabled`, `error`, and `matchers`.
[[1]](diffhunk://#diff-b8c44f34825a1f7fa2c3f70fdda00f38b07e19ef8600e1a2e937660346d95c72R18-R21)
[[2]](diffhunk://#diff-b8c44f34825a1f7fa2c3f70fdda00f38b07e19ef8600e1a2e937660346d95c72L39-R64)
[[3]](diffhunk://#diff-b8c44f34825a1f7fa2c3f70fdda00f38b07e19ef8600e1a2e937660346d95c72R76-R122)

* Updated the API schema (`monitoring_entity_source.schema.yaml`) to
reflect new entity source operations, including `CreateEntitySource`,
`UpdateEntitySource`, `DeleteEntitySource`, `GetEntitySource`, and
`ListEntitySources`. Added support for query parameters and refined
response schema definitions.
[[1]](diffhunk://#diff-e7f2de573ae15c6a3c3781b2a97b9875299c0674f81dd673d2bf9b3a6cf397f1L10-R30)
[[2]](diffhunk://#diff-e7f2de573ae15c6a3c3781b2a97b9875299c0674f81dd673d2bf9b3a6cf397f1L42-R48)
[[3]](diffhunk://#diff-e7f2de573ae15c6a3c3781b2a97b9875299c0674f81dd673d2bf9b3a6cf397f1L58-R72)
[[4]](diffhunk://#diff-e7f2de573ae15c6a3c3781b2a97b9875299c0674f81dd673d2bf9b3a6cf397f1L78-R102)
[[5]](diffhunk://#diff-e7f2de573ae15c6a3c3781b2a97b9875299c0674f81dd673d2bf9b3a6cf397f1L88-R114)
[[6]](diffhunk://#diff-e7f2de573ae15c6a3c3781b2a97b9875299c0674f81dd673d2bf9b3a6cf397f1L128-R189)
[[7]](diffhunk://#diff-e7f2de573ae15c6a3c3781b2a97b9875299c0674f81dd673d2bf9b3a6cf397f1R219-R220)

* Add a uniqueness assertion for the data source name.

* Create the data source 'PUT' API that allows updates

* Force the `managed` to be consistently defined by default

* Update list data sources API to support filter params

### UI changes
* Extract `IndexImportManageDataSource` component to its file.
* Stop calling the `init` API on updates
* Implement the edit mode instead of creating a new data source on every
save
  * Load the already added indices when editing
* Fix the displayed added indices message to show the right value

### Video

https://github.com/user-attachments/assets/9d1c1ad1-09b9-49f0-8cea-1b640a26e954

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [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)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 8453edc)
@machadoum machadoum requested a review from kibanamachine as a code owner July 8, 2025 07:10
@machadoum machadoum added the backport This PR is a backport of another PR label Jul 8, 2025
@machadoum machadoum enabled auto-merge (squash) July 8, 2025 07:10
@machadoum machadoum self-assigned this Jul 8, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7818 7820 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.8MB 9.8MB +1.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 94.2KB 94.2KB +1.0B

cc @machadoum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants