1
0
mirror of https://gitlab.com/JKANetwork/CheckServer.git synced 2026-02-19 03:31:34 +01:00

Optimize index and fix delete older checks from hist

This commit is contained in:
2017-12-16 20:17:00 +01:00
parent 1be1751a3d
commit a44f87cea4
24 changed files with 262 additions and 158 deletions

View File

@@ -32,16 +32,16 @@
{# "Switch" type #}
{% if check.ID_TC == 1 or check.ID_TC == 2 or check.ID_TC == 4 %} {# Ping, HttpCode, SQL DB #}
<td>
{#IF/SWITCH status text#}
{%if check.status == 0%}
{#IF/SWITCH uptime to text#}
{%if check.uptime <= 100 and check.uptime > 90 %}
<span class='green' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{T_.status_right}}</span>
{%elseif check.status == 1%}
{%elseif check.uptime <= 95 and check.uptime > 60 %}
<span class='blue' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{T_.status_lproblems}}</span>
{%elseif check.status == 2%}
{%elseif check.uptime <= 60 and check.uptime > 15 %}
<span class='orange' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{T_.status_problems}}</span>
{%elseif check.status == 3%}
{%elseif check.uptime <= 15 and check.uptime >= 0 %}
<span class='red' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{T_.status_outofserv}}</span>
{%elseif check.status == 4%}
{%elseif check.uptime == 255 %}
<span class='blue' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{T_.status_maintenance}}</span>
{%else%}
<span class='grey' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{T_.status_empty}}</span>
@@ -49,7 +49,7 @@
{#END IF/SWITCH#}
({{ check.uptime}}%)
</td>
{% if check.status is defined %}{#Only if records exists#}
{% if check.uptime != -1 %}{#Only if records exists#}
<td>
{{check.dateLastChk}} -
{% if check.failedLastChk == 0 %}