Support sending messages when a rule no longer matches and fix dual-use notification sender

This commit is contained in:
2023-01-16 00:10:41 +00:00
parent 75603570ff
commit a2207bbcf4
6 changed files with 173 additions and 63 deletions

View File

@@ -108,6 +108,7 @@ class NotificationRuleForm(RestrictedFormMixin, ModelForm):
"topic",
"url",
"service",
"send_empty",
"enabled",
)
help_texts = {
@@ -121,6 +122,7 @@ class NotificationRuleForm(RestrictedFormMixin, ModelForm):
"interval": "How often to run the search. On demand evaluates messages as they are received, without running a scheduled search. The remaining options schedule a search of the database with the window below.",
"window": "Time window to search: 1d, 1h, 1m, 1s, etc.",
"amount": "Amount of matches to be returned for scheduled queries. Cannot be used with on-demand queries.",
"send_empty": "Send a notification if no matches are found.",
}
def clean(self):