Argus icon indicating copy to clipboard operation
Argus copied to clipboard

Send around FilterBlobSerializer more freely instead of things that depend on it

Open hmpf opened this issue 1 year ago • 3 comments

This issue is solely about things that just needs a swappable FilterBlobSerializer.

Copying from #855:

  • FilterSerializer dynamically loads FilterBlobSerializer from the plugin
  • validate_jsonfilter reads FilterBlobSerializer from the plugin and uses its is_valid() method. I think we can also inline most of validate_jsonfilter into fallback_filter_check

For Providing OpenAPI integration for FilterBlobSerializer, I have currently set up a drf_spectacular.extensions.OpenApiSerializerExtension which works well enough

hmpf avatar Aug 20 '24 09:08 hmpf

event_fits() is needed for sending notifications. The current consensus seems to be that event-type filters should not be set from the incident list filter interface but from the notification profile instead (I disagree). Changing event_fits() is out of scope for this issue.

hmpf avatar Aug 20 '24 09:08 hmpf

Todo: Update validate_jsonfilter, FilterSerializer

hmpf avatar Aug 20 '24 09:08 hmpf

I do not agree to inlining validate_jsonfilter, it is useful from CLI/when debugging.

hmpf avatar Aug 20 '24 09:08 hmpf