Better name & description for Trello cards.

This commit is contained in:
Pēteris Caune 2018-10-20 19:09:40 +03:00
parent 362a43dae7
commit 288a57a4b1
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
4 changed files with 21 additions and 6 deletions

View File

@ -435,7 +435,8 @@ class Trello(HttpTransport):
def notify(self, check):
params = {
"idList": self.channel.trello_list_id,
"name": tmpl("trello_title.html", check=check),
"name": tmpl("trello_name.html", check=check),
"desc": tmpl("trello_desc.html", check=check),
"key": settings.TRELLO_APP_KEY,
"token": self.channel.trello_token
}

View File

@ -0,0 +1,14 @@
{% load hc_extras humanize %}
{{ check.desc|safe }}
{% if check.kind == "simple" %}
**Period:** {{ check.timeout|hc_duration }}
{% endif %}
{% if check.kind == "cron" %}
**Schedule:** {{ check.schedule|escapejs }}
{% endif %}
**Last Ping:** {{ check.last_ping|naturaltime }}
[Full Details @ {% site_name %}]({{ check.details_url }})

View File

@ -0,0 +1,5 @@
{% if check.status == "down" %}
Down: {{ check.name_then_code }}
{% else %}
Up: {{ check.name_then_code }}
{% endif %}

View File

@ -1,5 +0,0 @@
{% if check.status == "down" %}
{{ check.name_then_code }} is DOWN
{% else %}
{{ check.name_then_code }} is now UP
{% endif %}