{% include 'header.twig' %}
{{T_.statdif1}}
{% for check in checks %}
{% if check.ID_G != beforegroup %}
{{T_.name}}
{{T_.status_uptime}}
{{T_.last_check}}
{{T_.last_err}}
{% endif %}
{% set beforegroup = check.ID_G %}
{{check.nameGroup}}
{% endfor %}
{{check.name}}
{# "Switch" type #}
{% if check.ID_TC == 1 or check.ID_TC == 2 or check.ID_TC == 4 %} {# Ping, HttpCode, SQL DB #}
{#IF/SWITCH uptime to text#}
{%if check.uptime <= 100 and check.uptime > 90 %}
{{T_.status_right}}
{%elseif check.uptime <= 95 and check.uptime > 60 %}
{{T_.status_lproblems}}
{%elseif check.uptime <= 60 and check.uptime > 15 %}
{{T_.status_problems}}
{%elseif check.uptime <= 15 and check.uptime >= 0 %}
{{T_.status_outofserv}}
{%elseif check.uptime == 255 %}
{{T_.status_maintenance}}
{%else%}
{{T_.status_empty}}
{%endif%}
{#END IF/SWITCH#}
({{ check.uptime}}%)
{% if check.uptime != -1 %}{#Only if records exists#}
{{check.dateLastChk}} -
{% if check.failedLastChk == 0 %}
{{T_.status_right}}
{% else %}
{{T_.failed}}
{% endif %}
{%else%}
Dame tiempo para recopilar estadísticas
{%endif%}
{%if check.dateLastErr is not null%}
{{check.dateLastErr}}
{%else%}
{{T_.no_errs}}
{%endif%}
{% endif %}
{% if check.ID_TC == 3 %}
{% endif %}
{# Fin Switch #}