mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
## Summary Resolves: https://github.com/elastic/kibana/issues/131682 Taking inspiration from this PR: https://github.com/elastic/kibana/pull/148382 This PR changes the rules client aggregation method to accept arbitrary aggregations. This allows the users of the method to better customize the response when calling rules client aggregate. We have added validation to the aggregate method to prevent aggregations on certain rule fields. ```ts const ALLOW_FIELDS = [ 'alert.attributes.executionStatus.status', 'alert.attributes.lastRun.outcome', 'alert.attributes.muteAll', 'alert.attributes.tags', 'alert.attributes.snoozeSchedule', 'alert.attributes.snoozeSchedule.duration', 'alert.attributes.alertTypeId', 'alert.attributes.enabled', 'alert.attributes.params.*', ]; const ALLOW_AGG_TYPES = ['terms', 'composite', 'nested', 'filter']; ``` This PR also adds a new endpoint `rules/_tags` to allow for pagination of rule tags. This new endpoint takes advantage of the arbitrary aggregation of the new aggregate method. I tested the security solution rules page to ensure tags are still loading as expected. ### 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 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co> |
||
---|---|---|
.. | ||
src | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.md | ||
tsconfig.json |
@kbn/core-saved-objects-api-server-internal
This package contains the internal implementation of core's server-side savedObjects client and repository.