You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

53 lines
1.6 KiB

{% load hc_extras humanize %}
{
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"themeColor": "{% if check.status == "up" %}5cb85c{% endif %}{% if check.status == "down" %}d9534f{% endif %}",
"sections": [
{
"facts": [
{% if check.tags_list %}
{
"name": "Tags:",
"value": "{% for tag in check.tags_list %}`{{ tag|escapejs }}` {% endfor %}"
},
{% endif %}
{% if check.kind == "simple" %}
{
"name": "Period:",
"value": "{{ check.timeout|hc_duration }}"
},
{% elif check.kind == "cron" %}
{
"name": "Schedule:",
"value": "{{ check.schedule|escapejs }}"
},
{% endif %}
{
"name": "Last Ping:",
{% if check.last_ping %}
"value": "{{ check.last_ping|naturaltime }}"
{% else %}
"value": "Never"
{% endif %}
},
{
"name": "Total Pings:",
"value": "{{ check.n_pings }}"
}
]
}
],
"potentialAction": [
{
"@type": "OpenUri",
"name": "View in {% site_name %}",
"targets": [
{
"os": "default",
"uri": "{{ check.cloaked_url }}"
}
]
}
]
}