diff --git a/apps/controllers/AdminController.php b/apps/controllers/AdminController.php index 8bdef2e..850842e 100644 --- a/apps/controllers/AdminController.php +++ b/apps/controllers/AdminController.php @@ -116,10 +116,6 @@ private function infoRedis() private function infoMysql() { $res = app()->pdo->createCommand('SHOW GLOBAL STATUS')->queryAll(); - $res = array_map(function ($s) { - $s['Variable_name'] = str_replace('_', ' ', $s['Variable_name']); - return $s; - }, $res); $serverStatus = array_column($res, 'Value', 'Variable_name'); $startAt = app()->pdo->createCommand('SELECT UNIX_TIMESTAMP() - :uptime')->bindParams([ 'uptime' => $serverStatus['Uptime'] @@ -127,7 +123,7 @@ private function infoMysql() $queryStats = []; $tmp_array = $serverStatus; foreach ($tmp_array AS $name => $value) { - if (substr($name, 0, 4) == 'Com ') { + if (substr($name, 0, 4) == 'Com_') { $queryStats[substr($name, 4)] = $value; unset($serverStatus[$name]); } diff --git a/apps/views/admin/mysql_status.html.twig b/apps/views/admin/mysql_status.html.twig index a2c2256..92e6ba2 100644 --- a/apps/views/admin/mysql_status.html.twig +++ b/apps/views/admin/mysql_status.html.twig @@ -26,18 +26,18 @@