1
0

Added output of Mail markup schema for GMail and Inbox.

This commit is contained in:
Markus Birth 2017-02-15 16:11:59 +01:00
parent c80a2417c8
commit f35fdeeea2
3 changed files with 44 additions and 2 deletions

View File

@ -216,11 +216,14 @@ def main():
base_url = context['PARAMETER_2'].rstrip('/')
host_url = base_url + context['HOSTURL']
context['BASE_URL'] = context['PARAMETER_2']
context['HOST_URL'] = host_url
context['LINKEDHOSTNAME'] = '<a href="%s">%s</a>' % (host_url, context['HOSTNAME'])
context['HOSTLINK'] = '\nLink: %s' % host_url
if context['WHAT'] == 'SERVICE':
service_url = base_url + context['SERVICEURL']
context['SERVICE_URL'] = service_url
context['LINKEDSERVICEDESC'] = '<a href="%s">%s</a>' % (service_url, context['SERVICEDESC'])
context['SERVICELINK'] = '\nLink: %s' % service_url
else:

View File

@ -54,4 +54,24 @@
</tr>
{{/HOSTCUSTOMNOTES}}
{{{GRAPH_CODE}}}
</table>{{> foot_html}}
</table>
{{#HOST_URL}}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"description": "Host {{HOSTNAME}} is {{HOSTSTATE}}",
"potentialAction": {
"@type": "ViewAction",
"target": "{{HOST_URL}}",
"name": "Show host"
},
"publisher": {
"@type": "Organization",
"name": "Check_MK",
"url": "{{BASE_URL}}"
}
}
</script>
{{/HOST_URL}}
{{> foot_html}}

View File

@ -69,4 +69,23 @@
</tr>
{{/SERVICECUSTOMNOTES}}
{{{GRAPH_CODE}}}
{{> foot_html}}
{{#SERVICE_URL}}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"description": "Service {{HOSTNAME}}/{{SERVICEDESC}} is {{SERVICESTATE}}",
"potentialAction": {
"@type": "ViewAction",
"target": "{{SERVICE_URL}}",
"name": "Show service"
},
"publisher": {
"@type": "Organization",
"name": "Check_MK",
"url": "{{BASE_URL}}"
}
}
</script>
{{/SERVICE_URL}}
{{> foot_html}}