alerta / alerta-webui

Alerta Web UI 7.0
https://try.alerta.io
Apache License 2.0
112 stars 56 forks source link

Add support for generic plugable "filters" #511

Open sixcare opened 2 years ago

sixcare commented 2 years ago

With the generic plugable "filters" on it's way in https://github.com/alerta/alerta/pull/1660 I would like to add support for it in the webui

The way I'd like to implement it is a filterable list. Where the list is filtered based on type and/or attributes. Something like this, but with some sort of filtering either on the table headers or above the table: image

I'd also like the list to support filtering by GET requests. So that the list can be shared

I've also considered to add a menu item for each unique filter type that exists. But I think that it would be wiser to keep the menu clean. Maybe it could be hidden behind a collapsible menu item.

sixcare commented 2 years ago

For this to work Alerta Filters need to support querying the same way Alerts does: https://github.com/alerta/alerta/blob/master/alerta/database/backends/mongodb/utils.py#L142

I've got it working for Mongodb. I'll push once done for postgress too.