U 优化钉钉告警恢复通知字体颜色

pull/154/head
vapao 2020-07-16 10:56:24 +08:00
parent 9c7d1fafe7
commit 6005d291b6
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ def notify_by_dd(event, obj):
if users:
texts = [
'## %s ## ' % ('监控告警通知' if event == '1' else '告警恢复通知'),
f'**告警名称:** <font color="#{"f90202" if event == "1" else "8ece60"}">{obj.name}</font> ',
f'**告警名称:** <font color="#{"f90202" if event == "1" else "008000"}">{obj.name}</font> ',
f'**告警时间:** {human_datetime()} ',
f'**告警描述:** {obj.out} ',
]