Skip to content
Snippets Groups Projects
Commit 2f37c1b4 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'imporove-logging' into 'main'

Imporove logging

See merge request !44
parents 0db82ea5 43353d7d
No related branches found
No related tags found
1 merge request!44Imporove logging
Pipeline #5318 passed
......@@ -4,7 +4,7 @@ $sTplPage = file_get_contents('config/page_tpl.html');
$aReplacements = [
'{{TITLE}}' => 'MFA Server',
'{{VERSION}}' => 'v0.19',
'{{VERSION}}' => 'v0.20',
'{{APP}}' => '',
'{{NAV}}' => '',
'{{LANG}}' => '',
......
......@@ -53,8 +53,10 @@ function showLog($aFilter=[]) {
if(!$sLine){
continue;
}
$sTable.="<tr>";
foreach(explode("\t", $sLine) as $sCol){
$aCols=explode("\t", $sLine);
$sTrClass='class="'.$aCols[2].'"';
$sTable.="<tr $sTrClass>";
foreach($aCols as $sCol){
$sTable.="<td>".htmlentities($sCol)."</td>";
}
$sTable.="</tr>\n";
......
......@@ -73,8 +73,10 @@ foreach($oMfasessions->search([
: ''
;
*/
$sTrClass='class="'.($bActive ? "active" : "inactive").'"';
$sTable.="
<tr>
<tr $sTrClass>
<td title=\"$sTimes\">".( $sLifetime). "</td>
<td title=\"$sTimes\">".date("Y-m-d H:i:s", $aSession['timemfa']). "</td>
<td><a href=\"#\" onclick=\"filter(this); return false;\">$aSession[username]</a></td>
......
......@@ -9,3 +9,16 @@
}
span.appid{color: #478;}
span.secret{color: #c66;}
th{background: #d0e0e8;;}
tr.debug{background: #ddd;}
tr.error{background: #f8f0f0; color: #a33;}
tr.info{background: #f8f0e0;}
tr.ok{background: #f0f8f0;}
tr.active{background: #f0f8f0;}
tr.inactive{opacity: 0.5;}
......@@ -286,10 +286,6 @@ div.msg.success{
color: #080;
}
span.appid{color: #478;}
span.secret{color: #c66;}
/* ----------------------------------------------------------------------
FORMS
---------------------------------------------------------------------- */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment