mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[RAM] [Flapping] Add Flapping Rules Settings (#147774)
## Summary Resolves: https://github.com/elastic/kibana/issues/143529 This PR adds a new saved object `rules-settings` with the schema: ``` properties: { flapping: { properties: { enabled: { type: 'boolean', }, lookBackWindow: { type: 'long', }, statusChangeThreshold: { type: 'long', }, createdBy: { type: 'keyword', }, updatedBy: { type: 'keyword', }, createdAt: { type: 'date', }, updatedAt: { type: 'date', }, }, }, }, ``` It also adds 2 new endpoints: `GET /rules/settings/_flapping` `POST /rules/settings/_flapping` The new rules settings saved object is instantiated per space, using a predetermined ID to enable OCC. This new saved object allows the user to control rules flapping settings for a given space. Access control to the new saved object is done through the kibana features API. A new `RulesSettingsClient` was created and can be used to interact with the settings saved object. This saved object is instantiated lazily. When the code calls `rulesSettingsClient.flapping().get` or `rulesSettingsClient.flapping().update`, we will lazily create a new saved object if one does not exist for the current space. (I have explored bootstrapping this saved object elsewhere but I think this is the easiest solution, I am open to change on this). We have set up the rules settings to support future rule settings sections by making the settings client and permissions modular. Since permission control can be easily extended by using sub features. This PR doesn't contain integration for the `task_runner` to use the flapping settings, but I can do that in this PR if needed. ### Rules settings feature and sub feature (under management)  ### Rules settings settings button  ### Rules settings modal  ### Disabled  ### Rules settings settings button with insufficient permissions  ### Rules settings modal with insufficient write subfeature permissions  ### Rules settings modal with insufficient read subfeature permissions  Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
a0ac890f23
commit
dc28138d00
44 changed files with 2944 additions and 4 deletions
|
@ -47,6 +47,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
actions: ['all', 'read', 'minimal_all', 'minimal_read'],
|
||||
filesManagement: ['all', 'read', 'minimal_all', 'minimal_read'],
|
||||
filesSharedImage: ['all', 'read', 'minimal_all', 'minimal_read'],
|
||||
rulesSettings: ['all', 'read', 'minimal_all', 'minimal_read'],
|
||||
},
|
||||
global: ['all', 'read'],
|
||||
space: ['all', 'read'],
|
||||
|
@ -161,6 +162,14 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
'packs_all',
|
||||
'packs_read',
|
||||
],
|
||||
rulesSettings: [
|
||||
'all',
|
||||
'read',
|
||||
'minimal_all',
|
||||
'minimal_read',
|
||||
'allFlappingSettings',
|
||||
'readFlappingSettings',
|
||||
],
|
||||
},
|
||||
reserved: ['fleet-setup', 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring'],
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue