Commit a478f8a5 authored by Kevin Puertas Ruiz's avatar Kevin Puertas Ruiz

Fixes

parent 97ac06b2
......@@ -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)
-Code fixes
### Version 0.9.3 (Beta)
-New JSON GET/POST Check
......
......@@ -34,8 +34,9 @@
{% 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>
<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}}%)
}
</td>
<td>
{{check.dateLastChk}} -
......
<?php
//English (Use as a reference) - Maybe grammar can be fixed
define('T_ENGVERSION',1);
if (!defined('T_ENGVERSION')){
define('T_ENGVERSION',1);
}
//(indexpage.twig) In index, title
$T_['statdif1'] = 'Status of different checks';
......
<?php
//Español (Oficial)
define('T_VERSION',1);
if (!defined('T_VERSION')){
define('T_VERSION',1);
}
//(indexpage.twig) In index, title
$T_['statdif1'] = 'Estado de los diferentes servicios';
......
......@@ -65,7 +65,7 @@ function ping($host,$port = '80') {
/** Returns web root (ie. http://jkanetwork.com) */
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']);
}
......
......@@ -36,7 +36,7 @@ while ($onechk = dbw_fetch_array($db_conn,$results)){
$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'] != ''){
$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']);
$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
?>
<?php
define('VERSION','0.9.3');
define('VERSION','0.9.4');
//define('INSTALLER_MODE','1');
require_once 'lib/loadTwig.php';
......
<?php
require_once 'functions.php'; //Preloads functions
require_once 'lib/dbwrapper.php';
define('VERSION','0.9.3');
define('VERSION','0.9.4');
session_start(); //Session in all page
//Preload file
//This function loads all things needed, with optional db things if needed
......
......@@ -320,7 +320,7 @@ switch($page){
'ID_C' => $fail['ID_C'],
'name' => nameFromIDC($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'],
'date' => date('j/n/Y',$fail['timestamp']),
'hour' => date('H:i',$fail['timestamp'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment