10 lines
313 B
Python
10 lines
313 B
Python
|
def grafana_9x(data, headers):
|
||
|
"""Pretty-print a Grafana newer than v9.x notification."""
|
||
|
text = ""
|
||
|
if "title" in data:
|
||
|
text = "#### " + data["title"] + "\n"
|
||
|
if "message" in data:
|
||
|
text = text + data["message"].replace("\n", "\n\n") + "\n\n"
|
||
|
data["body"] = text
|
||
|
return data
|