Commit graph

8 commits

Author SHA1 Message Date
Jiawei Wu
e4805fc9e0
[RAM][Maintenance Window] Maintenance window scoped query frontend changes (#171949)
## Summary
Partially resolves: https://github.com/elastic/kibana/issues/164255,
this is 2/3 of the scoped query changes.

Maintenance window scoped query frontend changes. Adds the ability to
add and edit scoped query for maintenance windows. Due to limitations
with the alerts search bar and each solution fetches AAD fields, we only
allow users to associate scoped query with 1 category (manangement,
o11y, or security solution). The intended usage in this case is for the
user to create multiple maintenance windows if they wish to apply scoped
queries to multiple solutions.

### To test:
go to
`x-pack/plugins/alerting/public/pages/maintenance_windows/constants.ts`
and set `IS_SCOPED_QUERY_ENABLED` to `true`

### Scoped query off, multiple category allowed:

![image](dbf03e8e-f9bd-449c-8d23-0b474fe5a9c4)

### Scoped query on, multiple category disallowed:

![image](368f954a-7671-410b-839b-77f0420f26fa)

### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-12-04 15:18:33 -08:00
Zacqary Adam Xeper
444e080fe1
[RAM][Maintenance Window] Add categories to banner title (#169704)
## Summary

Fixes #169591

Adds category names to the Maintenance Window banner title. This will
make it clearer why the banner is showing up, and which rules it
affects.

The banner will still **always** appear in Stack Management if there's
an active maintenance window, because Stack Management displays all
rules.

<img width="818" alt="Screenshot 2023-10-24 at 1 13 05 PM"
src="e5ad6486-4afd-42fa-b507-63de9374710b">
<img width="993" alt="Screenshot 2023-10-24 at 1 12 51 PM"
src="10b8cc13-618d-4ff2-9100-c007ebc637c7">
<img width="922" alt="Screenshot 2023-10-24 at 1 33 23 PM"
src="12502962-2c13-4094-96dd-54e03e5d5d8d">
<img width="949" alt="Screenshot 2023-10-24 at 1 00 31 PM"
src="9d2853e9-7481-40e8-9ece-d17849d33e75">


### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-25 16:34:31 -07:00
Jiawei Wu
092cc0d098
[RAM][Maintenance Window] Add maintenance window solution selection. (#166781)
## Summary
Resolves: https://github.com/elastic/kibana/issues/166301

Adds support for solution/category filtering to maintenance windows by
adding a new property: `category_ids`. Selecting one or more solutions
when creating/updating a maintenance window will cause the maintenance
window to only suppress rule types belonging to said solutions. In order
to achieve filtering by solution/category, we are adding a new field to
the rule types schema called `category`. This field should map to the
feature category that the rule type belongs to (`observability`,
`securitySolution` or `management`).

Our initial plan was to use feature IDs or rule type IDs to accomplish
this filtering, we decided against using rule type IDs because if a new
rule type gets added, we need to change the API to support this new rule
type. We decided against feature IDs because it's a very anti-serverless
way of accomplishing this feature, as we don't want to expose feature
IDs to APIs. We decided on app categories because it works well with
serverless and should be much easier to maintain if new rule types are
added in the future.

This means the `rule_types` API has to be changed to include this new
field, although it shouldn't be a breaking change since we're just
adding a new field. No migrations are needed since rule types are in
memory and maintenance windows are backwards compatible.


![image](d07b05cd-ade8-46a4-a4c0-ab623c31c11b)

### Error state:

![image](b61984b4-c1e1-4e9b-98b4-97a681e977a8)

### Checklist

Delete any items that are not applicable to this PR.

- [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/packages/kbn-i18n/README.md)
- [x]
[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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2023-10-02 09:20:53 +01:00
Zacqary Adam Xeper
107239c333
[RAM] Mark disabled alerts as Untracked in both Stack and o11y (#164788)
## Summary
Part of #164059 

Implements the `Untracked` lifecycle status, and applies it to alerts
when their corresponding rule is disabled.

<img width="1034" alt="Screenshot 2023-08-24 at 4 24 45 PM"
src="4d31545d-9fc0-4eb3-9972-72685107184d">
<img width="904" alt="Screenshot 2023-08-24 at 4 56 32 PM"
src="3d7cfa19-5aca-4148-a9bc-d0d0c949d84b">
<img width="820" alt="Screenshot 2023-08-24 at 4 56 17 PM"
src="e59870c8-4140-4588-893a-f3f54170f78a">


### Checklist

- [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/packages/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
2023-09-27 15:28:03 -07:00
Julia
0af40a3066
[RAM] Autocomplete (#158454)
## Summary

Solves this issue: https://github.com/elastic/kibana/issues/161763

This PR introduces autocomplete for mustache variables for email
connector(next PR will add it to all connectors) under the feature flag.

We decided keep old solution with button with all searchable options as
well.

How to test:
Create an email connector in kibana.yml:

xpack.actions.preconfigured:
  maildev:
    name: 'email: maildev'
    actionTypeId: '.email'
    config:
      from: 'guskova@example.com'
      host: 'localhost'
      port: '1025'

How it should work:
You start writing in Message window {{ and mustache variable name. And
you should see autocomplete popup with all possible options to choose.
When you click somewhere else, popup should disappeared.


061016a6-b8ca-497b-9bed-b8b012d31a95

e options to choose. When you click somewhere else, popup should
disappeared.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2023-08-30 19:04:14 -07:00
Julia
b3122cb656
[RAM] add maintenance window banner (#163516)
## Summary

Solves: https://github.com/elastic/kibana/issues/163465

Add maintenance window banner to Rules list and Alerts list in O11y and
Management.

<img width="1334" alt="Screenshot 2023-08-09 at 13 03 50"
src="de0708b1-db2a-4517-91aa-a3d6b3e62b44">

<img width="1350" alt="Screenshot 2023-08-09 at 13 05 10"
src="9f7c488d-e992-4807-a60e-3c077b623b4e">

---------

Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-17 04:04:56 -07:00
Zacqary Adam Xeper
0dc73122a5
[RAM] Move maintenance window callout to @kbn/alerts-ui-shared package (#160678)
## Summary

Moves the Security Solution's `MaintenanceWindowCallout` into a shared
KBN package to make it more accessible by other plugins.

### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-06 12:34:55 -07:00
Xavier Mouligneau
01f07bccf1
[RAM] Bring flapping status and settings in o11y (#150483)
## Summary

Bring shareable components to set the flapping configuration on rule
management in o11y and update the status alert around flapping.

<img width="1697" alt="image"
src="https://user-images.githubusercontent.com/189600/217358288-57eb93ef-94e2-4576-9e99-baee8c2ef2b2.png">

<img width="1696" alt="Screenshot 2023-02-07 at 3 15 01 PM"
src="https://user-images.githubusercontent.com/189600/217356846-441eaf51-f6c9-4afd-9f6b-9c8f5a3531bd.png">


### 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>
2023-02-07 20:52:26 -07:00