Better english (#1959)
Not sure if this breaks anything. it probably breaks backwards compat. Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
This commit is contained in:
parent
eee5065e74
commit
44b105343a
9 changed files with 11 additions and 11 deletions
|
|
@ -527,9 +527,9 @@ def test_channel_filter_convert_from_regex_to_jinja2(
|
|||
make_channel_filter(alert_receive_channel, is_default=True)
|
||||
|
||||
# r"..." used to keep this string as raw string
|
||||
regex_filtering_term = r"\".*\": \"This alert was sent by user for the demonstration purposes\""
|
||||
final_filtering_term = r'{{ payload | json_dumps | regex_search("\".*\": \"This alert was sent by user for the demonstration purposes\"") }}'
|
||||
payload = {"description": "This alert was sent by user for the demonstration purposes"}
|
||||
regex_filtering_term = r"\".*\": \"This alert was sent by user for demonstration purposes\""
|
||||
final_filtering_term = r'{{ payload | json_dumps | regex_search("\".*\": \"This alert was sent by user for demonstration purposes\"") }}'
|
||||
payload = {"description": "This alert was sent by user for demonstration purposes"}
|
||||
|
||||
regex_channel_filter = make_channel_filter(
|
||||
alert_receive_channel,
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ example_payload = {
|
|||
"labels": {"alertname": "TestAlert", "region": "eu-1", "severity": "critical"},
|
||||
"annotations": {
|
||||
"message": "This is test alert",
|
||||
"description": "This alert was sent by user for the demonstration purposes",
|
||||
"description": "This alert was sent by user for demonstration purposes",
|
||||
"runbook_url": "https://grafana.com/",
|
||||
},
|
||||
"startsAt": "2018-12-25T15:47:47.377363608Z",
|
||||
|
|
|
|||
|
|
@ -57,4 +57,4 @@ resolve_condition = """\
|
|||
|
||||
acknowledge_condition = None
|
||||
|
||||
example_payload = {"message": "This alert was sent by user for the demonstration purposes"}
|
||||
example_payload = {"message": "This alert was sent by user for demonstration purposes"}
|
||||
|
|
|
|||
|
|
@ -52,5 +52,5 @@ example_payload = {
|
|||
"image_url": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Grumpy_Cat_by_Gage_Skidmore.jpg",
|
||||
"state": "alerting",
|
||||
"link_to_upstream_details": "https://en.wikipedia.org/wiki/Downtime",
|
||||
"message": "This alert was sent by user for the demonstration purposes\nSmth happened. Oh no!",
|
||||
"message": "This alert was sent by user for demonstration purposes\nSmth happened. Oh no!",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ example_payload = {
|
|||
"alertname": "TestAlert",
|
||||
"region": "eu-1",
|
||||
},
|
||||
"annotations": {"description": "This alert was sent by user for the demonstration purposes"},
|
||||
"annotations": {"description": "This alert was sent by user for demonstration purposes"},
|
||||
"startsAt": "2018-12-25T15:47:47.377363608Z",
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"generatorURL": "",
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ example_payload = {
|
|||
"alertname": "TestAlert",
|
||||
"region": "eu-1",
|
||||
},
|
||||
"annotations": {"description": "This alert was sent by user for the demonstration purposes"},
|
||||
"annotations": {"description": "This alert was sent by user for demonstration purposes"},
|
||||
"startsAt": "2018-12-25T15:47:47.377363608Z",
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"generatorURL": "",
|
||||
|
|
|
|||
|
|
@ -54,6 +54,6 @@ acknowledge_condition = None
|
|||
|
||||
example_payload = {
|
||||
"id": "TestAlert",
|
||||
"message": "This alert was sent by user for the demonstration purposes",
|
||||
"message": "This alert was sent by user for demonstration purposes",
|
||||
"data": "{foo: bar}",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,4 +57,4 @@ resolve_condition = """\
|
|||
{%- endif %}"""
|
||||
acknowledge_condition = None
|
||||
|
||||
example_payload = {"message": "This alert was sent by user for the demonstration purposes"}
|
||||
example_payload = {"message": "This alert was sent by user for demonstration purposes"}
|
||||
|
|
|
|||
|
|
@ -54,5 +54,5 @@ example_payload = {
|
|||
"image_url": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Grumpy_Cat_by_Gage_Skidmore.jpg",
|
||||
"state": "alerting",
|
||||
"link_to_upstream_details": "https://en.wikipedia.org/wiki/Downtime",
|
||||
"message": "This alert was sent by user for the demonstration purposes\nSmth happened. Oh no!",
|
||||
"message": "This alert was sent by user for demonstration purposes\nSmth happened. Oh no!",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue