Change the order of fields in slack notifications: start with description, project name and tags. Follow with period, last ping, total pings.

This commit is contained in:
Pēteris Caune 2020-03-23 12:23:25 +02:00
parent 1baa8ad46d
commit 119965b432
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
2 changed files with 16 additions and 12 deletions

View File

@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
- OpsGenie integration returns more detailed error messages
- Telegram integration returns more detailed error messages
- Added the "Get a single check" API call (#337)
- Display project name in Slack notifications (#342)
### Bug Fixes
- The "render_docs" command checks if markdown and pygments is installed (#329)

View File

@ -13,17 +13,26 @@
"mrkdwn_in": ["fields"],
"text": "“{{ check.name_then_code|escapejs }}” is {{ check.status|upper }}.",
"fields": [
{% if check.project.name %}
{"title": "Project",
"value": "{{ check.project.name|escapejs }}"
},
{% endif %}
{% if check.desc %}
{"title": "Description",
"value": "{{ check.desc|escapejs }}"
},
{% endif %}
{% if check.project.name %}
{"title": "Project",
"value": "{{ check.project.name|escapejs }}",
"short": true
},
{% endif %}
{% if check.tags_list %}
{"title": "Tags",
"value": "{% for tag in check.tags_list %}`{{ tag|escapejs }}` {% endfor %}",
"short": true
},
{% endif %}
{% if check.kind == "simple" %}
{"title": "Period",
"value": "{{ check.timeout|hc_duration }}",
@ -45,12 +54,6 @@
"short": true
},
{% if check.tags_list %}
{"title": "Tags",
"value": "{% for tag in check.tags_list %}`{{ tag|escapejs }}` {% endfor %}",
"short": true
},
{% endif %}
{"title": "Total Pings",
"value": "{{ check.n_pings }}",