forked from GithubBackups/healthchecks
Better name & description for Trello cards.
This commit is contained in:
parent
362a43dae7
commit
288a57a4b1
@ -435,7 +435,8 @@ class Trello(HttpTransport):
|
|||||||
def notify(self, check):
|
def notify(self, check):
|
||||||
params = {
|
params = {
|
||||||
"idList": self.channel.trello_list_id,
|
"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,
|
"key": settings.TRELLO_APP_KEY,
|
||||||
"token": self.channel.trello_token
|
"token": self.channel.trello_token
|
||||||
}
|
}
|
||||||
|
14
templates/integrations/trello_desc.html
Normal file
14
templates/integrations/trello_desc.html
Normal 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 }})
|
5
templates/integrations/trello_name.html
Normal file
5
templates/integrations/trello_name.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{% if check.status == "down" %}
|
||||||
|
Down: {{ check.name_then_code }}
|
||||||
|
{% else %}
|
||||||
|
Up: {{ check.name_then_code }}
|
||||||
|
{% endif %}
|
@ -1,5 +0,0 @@
|
|||||||
{% if check.status == "down" %}
|
|
||||||
{{ check.name_then_code }} is DOWN
|
|
||||||
{% else %}
|
|
||||||
{{ check.name_then_code }} is now UP
|
|
||||||
{% endif %}
|
|
Loading…
x
Reference in New Issue
Block a user