diff --git a/hc/api/transports.py b/hc/api/transports.py index 9748586e..9b10583f 100644 --- a/hc/api/transports.py +++ b/hc/api/transports.py @@ -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 } diff --git a/templates/integrations/trello_desc.html b/templates/integrations/trello_desc.html new file mode 100644 index 00000000..90f943b0 --- /dev/null +++ b/templates/integrations/trello_desc.html @@ -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 }}) \ No newline at end of file diff --git a/templates/integrations/trello_name.html b/templates/integrations/trello_name.html new file mode 100644 index 00000000..85583ab2 --- /dev/null +++ b/templates/integrations/trello_name.html @@ -0,0 +1,5 @@ +{% if check.status == "down" %} + Down: {{ check.name_then_code }} +{% else %} + Up: {{ check.name_then_code }} +{% endif %} diff --git a/templates/integrations/trello_title.html b/templates/integrations/trello_title.html deleted file mode 100644 index 3fcdc774..00000000 --- a/templates/integrations/trello_title.html +++ /dev/null @@ -1,5 +0,0 @@ -{% if check.status == "down" %} - {{ check.name_then_code }} is DOWN -{% else %} - {{ check.name_then_code }} is now UP -{% endif %}