1
0
mirror of https://gitlab.com/JKANetwork/CheckServer.git synced 2026-02-20 12:11:34 +01:00

Fix for new tests at index

This commit is contained in:
2018-01-09 23:34:50 +01:00
parent 5e33adbbaf
commit 0aeaada922
2 changed files with 24 additions and 23 deletions

View File

@@ -31,11 +31,12 @@
{# "Switch" type #}
{% if check.ID_TC == 1 or check.ID_TC == 2 or check.ID_TC == 4 %} {# Ping, HttpCode, SQL DB #}
{% if check.uptime != -1 %}{#Only if records exists#}
<td>
<span class='{{check.statusColor}}' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{check.statusText}}</span>
({{ check.uptime}}%)
</td>
{% if check.uptime != -1 %}{#Only if records exists#}
<td>
{{check.dateLastChk}} -
{% if check.failedLastChk == 0 %}
@@ -44,8 +45,8 @@
<span style="color:red">{{T_.failed}}</span>
{% endif %}
</td>
{%else%}
<td>Dame tiempo para recopilar estadísticas</td>
{%else%} {#If not records yet#}
<td colspan="2">Dame tiempo para recopilar estadísticas</td>
{%endif%}
<td>
{%if check.dateLastErr is not null%}
@@ -54,7 +55,6 @@
{{T_.no_errs}}
{%endif%}
</td>
{% endif %}
{% if check.ID_TC == 3 %}
<td colspan="3">

View File

@@ -14,8 +14,9 @@ while ($onechk = dbw_fetch_array($db_conn,$results)){
$idchk = $onechk['ID_C'];
$chks[$idchk] = $onechk; //First array data
$chks[$idchk]['nameGroup'] = $groups[$onechk['ID_G']]; //Know group of this check
$ID_TC = $chks[$idchk]['ID_TC']; //Type of Check
switch ($chks[$idchk]['ID_TC']){
switch ($ID_TC){
// Case 1 and 2 are normal status, case 3 (Visits) is numeric, not status
case 1: //Ping
case 2: //HttpCode
@@ -34,7 +35,6 @@ while ($onechk = dbw_fetch_array($db_conn,$results)){
$chks[$idchk]['dateLastErr'] = date('d/m H:i',$lastErr);
}
$ID_TC = $chks[$idchk]['ID_TC'];
$chks[$idchk]['nameCheck'] = textTypeChk($ID_TC);
if ($onechk['manStatus'] != ''){
@@ -43,7 +43,8 @@ while ($onechk = dbw_fetch_array($db_conn,$results)){
$chks[$idchk]['uptime'] = getUptime($idchk);
}
list($chks[$idchk]['statusText'],$chks[$idchk]['statusColor']) = getStatus($idchk);
}else{
$chks[$idchk]['uptime'] = -1; //Anything collected yet
}
break;