mirror of
https://gitlab.com/JKANetwork/CheckServer.git
synced 2026-02-16 18:21:35 +01:00
Fixes
This commit is contained in:
@@ -47,6 +47,8 @@ a backup of your sqlite.db3 database before updating or data may lost.
|
|||||||
|
|
||||||
-TODO: Fix JSON GET/POST Check (Only add part works)
|
-TODO: Fix JSON GET/POST Check (Only add part works)
|
||||||
|
|
||||||
|
-Code fixes
|
||||||
|
|
||||||
### Version 0.9.3 (Beta)
|
### Version 0.9.3 (Beta)
|
||||||
|
|
||||||
-New JSON GET/POST Check
|
-New JSON GET/POST Check
|
||||||
|
|||||||
@@ -34,8 +34,9 @@
|
|||||||
|
|
||||||
{% if check.uptime != -1 %}{#Only if records exists#}
|
{% if check.uptime != -1 %}{#Only if records exists#}
|
||||||
<td>
|
<td>
|
||||||
<span class='{{check.statusColor}}' data-tooltip='Type of check: {{check.nameCheck}}' data-tooltip-position='top'>{{check.statusText}}</span>
|
<span class='{{check.statusColor}}' data-tooltip='Type of check: {{T_[check.nameCheck]}}' data-tooltip-position='top'>{{check.statusText}}</span> {# Use T_[Var] to merge var to array #}
|
||||||
({{ check.uptime}}%)
|
({{ check.uptime}}%)
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{check.dateLastChk}} -
|
{{check.dateLastChk}} -
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
//English (Use as a reference) - Maybe grammar can be fixed
|
//English (Use as a reference) - Maybe grammar can be fixed
|
||||||
|
if (!defined('T_ENGVERSION')){
|
||||||
define('T_ENGVERSION',1);
|
define('T_ENGVERSION',1);
|
||||||
|
}
|
||||||
|
|
||||||
//(indexpage.twig) In index, title
|
//(indexpage.twig) In index, title
|
||||||
$T_['statdif1'] = 'Status of different checks';
|
$T_['statdif1'] = 'Status of different checks';
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
//Español (Oficial)
|
//Español (Oficial)
|
||||||
|
if (!defined('T_VERSION')){
|
||||||
define('T_VERSION',1);
|
define('T_VERSION',1);
|
||||||
|
}
|
||||||
|
|
||||||
//(indexpage.twig) In index, title
|
//(indexpage.twig) In index, title
|
||||||
$T_['statdif1'] = 'Estado de los diferentes servicios';
|
$T_['statdif1'] = 'Estado de los diferentes servicios';
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ function ping($host,$port = '80') {
|
|||||||
|
|
||||||
/** Returns web root (ie. http://jkanetwork.com) */
|
/** Returns web root (ie. http://jkanetwork.com) */
|
||||||
function webRoot(){
|
function webRoot(){
|
||||||
$root = $_SERVER['HTTPS'] ? "https://" : "http://"; //Variable = condicion ? Verdadero : Falso
|
$root = isset($_SERVER['HTTPS']) ? "https://" : "http://"; //Variable = condicion ? Verdadero : Falso
|
||||||
return $root . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
|
return $root . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ while ($onechk = dbw_fetch_array($db_conn,$results)){
|
|||||||
$chks[$idchk]['dateLastErr'] = date('d/m H:i',$lastErr);
|
$chks[$idchk]['dateLastErr'] = date('d/m H:i',$lastErr);
|
||||||
}
|
}
|
||||||
|
|
||||||
$chks[$idchk]['nameCheck'] = textTypeChk($ID_TC);
|
$chks[$idchk]['nameCheck'] = arrayTypeChk()[$ID_TC]; //To send array name and not the word
|
||||||
|
|
||||||
if ($onechk['manStatus'] != ''){
|
if ($onechk['manStatus'] != ''){
|
||||||
$chks[$idchk]['uptime'] = 255;//255 = Maintenance I suppose, not implemented
|
$chks[$idchk]['uptime'] = 255;//255 = Maintenance I suppose, not implemented
|
||||||
@@ -84,5 +84,5 @@ while ($incident = dbw_fetch_array($db_conn,$incidents)){
|
|||||||
->text($incident['text']);
|
->text($incident['text']);
|
||||||
$incs[$ID_N]['ID_N'] = $incident['ID_N'];
|
$incs[$ID_N]['ID_N'] = $incident['ID_N'];
|
||||||
}
|
}
|
||||||
renderPage('indexpage.twig',array('you' => $you,'checks' => $chks, 'news' => $incs)); //Render
|
renderPage('indexpage.twig',array('checks' => $chks, 'news' => $incs)); //Render
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('VERSION','0.9.3');
|
define('VERSION','0.9.4');
|
||||||
//define('INSTALLER_MODE','1');
|
//define('INSTALLER_MODE','1');
|
||||||
require_once 'lib/loadTwig.php';
|
require_once 'lib/loadTwig.php';
|
||||||
|
|
||||||
|
|||||||
2
load.php
2
load.php
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'functions.php'; //Preloads functions
|
require_once 'functions.php'; //Preloads functions
|
||||||
require_once 'lib/dbwrapper.php';
|
require_once 'lib/dbwrapper.php';
|
||||||
define('VERSION','0.9.3');
|
define('VERSION','0.9.4');
|
||||||
session_start(); //Session in all page
|
session_start(); //Session in all page
|
||||||
//Preload file
|
//Preload file
|
||||||
//This function loads all things needed, with optional db things if needed
|
//This function loads all things needed, with optional db things if needed
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ switch($page){
|
|||||||
'ID_C' => $fail['ID_C'],
|
'ID_C' => $fail['ID_C'],
|
||||||
'name' => nameFromIDC($fail['ID_C']),
|
'name' => nameFromIDC($fail['ID_C']),
|
||||||
'groupName' => nameGroupFromIDG(IDGFromIDC($fail['ID_C'])),
|
'groupName' => nameGroupFromIDG(IDGFromIDC($fail['ID_C'])),
|
||||||
'typeCheck' => textTypeChk($T_,$fail['ID_TC']),
|
/* 'typeCheck' => textTypeChk($fail['ID_TC']), Doesnt work yet */
|
||||||
'errorText' => $fail['errorText'],
|
'errorText' => $fail['errorText'],
|
||||||
'date' => date('j/n/Y',$fail['timestamp']),
|
'date' => date('j/n/Y',$fail['timestamp']),
|
||||||
'hour' => date('H:i',$fail['timestamp'])
|
'hour' => date('H:i',$fail['timestamp'])
|
||||||
|
|||||||
Reference in New Issue
Block a user