[Automatic Migrations] Get Dashboards Endpoint#234016
Conversation
3aff0a8 to
c04c32f
Compare
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
💚 Build Succeeded
Metrics [docs]Saved Objects .kibana field count
|
...tions/security/plugins/security_solution/server/lib/siem_migrations/common/api/util/audit.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull Request Overview
This PR implements a GET /internal/siem_migrations/dashboards/{migration_id}/dashboards endpoint that adds the capability to list, search, filter, sort and paginate dashboards in SIEM dashboard migrations. The implementation follows a similar pattern to existing rule migration functionality.
Key changes include:
- Added comprehensive dashboard filtering and sorting capabilities
- Implemented API endpoint with extensive test coverage
- Refactored common sorting logic to be shared between rules and dashboards
- Enhanced type definitions and API schema for dashboard querying
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
mocks.ts |
Removed unused imports and statsOverrideCallbackFactory function |
index.ts |
Added export for common utilities |
es_queries_dashboards.ts |
Added function to index test dashboard migration data |
dashboards.ts |
Added getDashboards method to test utility |
dashboard_mocks.ts |
Added mock data structures and helper functions for testing |
common.ts |
Created common utilities file with moved statsOverrideCallbackFactory |
dashboard_migrations/index.ts |
Added test file registration for new GET endpoint |
dashboards/get.ts |
Comprehensive test suite for the new GET dashboards endpoint |
security_solution_api.gen.ts |
Generated API client code for new endpoint |
rules/data/sort.ts |
Refactored to use common sorting utilities and improved type safety |
rule_migrations_data_rules_client.ts |
Updated to use refactored common types |
rules/api/rules/get.ts |
Updated audit logging method name |
dashboards/data/sort.ts |
New sorting implementation for dashboard migrations |
dashboards/data/dsl_queries.ts |
New filtering queries for dashboard migrations |
dashboard_migrations_data_dashboards_client.ts |
Enhanced client with filtering and sorting logic |
dashboards/api/index.ts |
Registered new GET endpoint route |
dashboards/api/dashboards/get.ts |
Main API endpoint implementation |
dashboards/api/dashboards/create.ts |
Removed debug logging |
| Common data types and schema files | Enhanced type definitions and API schema |
...tes/siem_migrations/rules/trial_license_complete_tier/dashboard_migrations/dashboards/get.ts
Outdated
Show resolved
Hide resolved
...on/server/lib/siem_migrations/dashboards/data/dashboard_migrations_data_dashboards_client.ts
Show resolved
Hide resolved
.../solutions/security/plugins/security_solution/server/lib/siem_migrations/common/data/sort.ts
Show resolved
Hide resolved
…on/test_suites/siem_migrations/rules/trial_license_complete_tier/dashboard_migrations/dashboards/get.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
## Summary Resolves - elastic/security-team#13835 - elastic/security-team#13803 Adds `GET /internal/dashboards/{migration_id}/dashboards` endpoint which add capability to `list`, `search` and order dashboards.
## Summary Resolves - elastic/security-team#13835 - elastic/security-team#13803 Adds `GET /internal/dashboards/{migration_id}/dashboards` endpoint which add capability to `list`, `search` and order dashboards.
## Summary Resolves - elastic/security-team#13835 - elastic/security-team#13803 Adds `GET /internal/dashboards/{migration_id}/dashboards` endpoint which add capability to `list`, `search` and order dashboards.
Summary
Resolves
Adds
GET /internal/dashboards/{migration_id}/dashboardsendpoint which add capability tolist,searchand order dashboards.