From 366d3fe5cf9a4f6869051c5a15327d1c835a3070 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 12 Dec 2016 08:11:41 -0800 Subject: [PATCH] Styling fixes. Debug timer totals fix. --- e107_handlers/db_debug_class.php | 27 +++++++++++++++++++++++---- e107_plugins/log/stats.php | 11 ++++++++--- e107_themes/bootstrap3/style.css | 2 +- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index dd0f1bd8b..002b6642f 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -412,11 +412,30 @@ class e107_db_debug { $aSum['%Time']=$totTime ? number_format(100.0 * ($aSum['Time'] / $totTime), 0) : 0; $aSum['%DB Time']=$db_time ? number_format(100.0 * ($aSum['DB Time'] / $db_time), 0) : 0; $aSum['%DB Count']=($sql->db_QueryCount()) ? number_format(100.0 * ($aSum['DB Count'] / ($sql->db_QueryCount())), 0) : 0; - $aSum['Time']=number_format($aSum['Time']*1000.0, 1); + $aSum['Time']=number_format($aSum['Time'] * 1000.0, 1); $aSum['DB Time']=number_format($aSum['DB Time']*1000.0, 1); - $text .= "".implode(" ", $aSum)."  \n"; - $text .= "\n
\n"; + + $text .= " +   + Total + ".$aSum['%Time']." + ".$aSum['%DB Time']." + ".$aSum['%DB Count']." + ".$aSum['Time']." + ".$aSum['DB Time']." + ".$aSum['DB Count']." + ".$tMarker['Memory']." + ".$tMarker['OB Lev']." + + + "; + + + // $text .= "".implode(" ", $aSum)."  \n"; + + $text .= "\n
\n"; + // // Stats by Table @@ -461,7 +480,7 @@ class e107_db_debug { $aSum['%DB Time']=$db_time ? number_format(100.0 * ($aSum['DB Time'] / $db_time), 0) : 0; $aSum['%DB Count']=($sql->db_QueryCount()) ? number_format(100.0 * ($aSum['DB Count'] / ($sql->db_QueryCount())), 0) : 0; $aSum['DB Time']=number_format($aSum['DB Time']*1000.0, 1); - $text .= "".implode(" ", array_values($aSum))." \n"; + $text .= "".implode(" ", array_values($aSum))." \n"; $text .= "\n
\n"; return $text; diff --git a/e107_plugins/log/stats.php b/e107_plugins/log/stats.php index b9069a0c3..c46fea0a3 100644 --- a/e107_plugins/log/stats.php +++ b/e107_plugins/log/stats.php @@ -816,12 +816,16 @@ class siteStats $url = str_replace($this->plugFolder,'',$url); + + if($truncate) { - return e107::getParser()->text_truncate($url,50); + $result = e107::getParser()->text_truncate($url,50); + + return $result; } - return $url; + return trim($url); } @@ -842,6 +846,7 @@ class siteStats $totalArray = array(); $totalv = 0; $totalu = 0; + $total = 0; foreach ($this -> fileInfo as $k => $v) { $found = (strpos($k,'error/') === 0); @@ -871,7 +876,7 @@ class siteStats if($info['ttl']) { $percentage = round(($info['ttl']/$totalv) * 100, 2); - $text .= "\n ".$this->getLabel($key)." + $text .= "\n ".$this->getLabel($key)." \n".$this -> bar($percentage, $info['ttl']." [".$info['unq']."]")."\n".$percentage."%\n\n"; } } diff --git a/e107_themes/bootstrap3/style.css b/e107_themes/bootstrap3/style.css index f41b35ae9..1ab931824 100644 --- a/e107_themes/bootstrap3/style.css +++ b/e107_themes/bootstrap3/style.css @@ -143,7 +143,7 @@ table label.checkbox { #sidebar .panel-body ul.list-unstyled { padding-left:0} -li.dropdown-avatar > a.dropdown-toggle { padding:0; padding-top:9px; padding-bottom:10px} +li.dropdown-avatar > a.dropdown-toggle { padding:9px 15px 10px 0; }