Update functions.php

This commit is contained in:
Andrew Bauer 2020-07-29 15:26:07 -05:00 committed by GitHub
parent 695da2221f
commit 1119923c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -379,11 +379,11 @@ function getDbConHTML() {
$connections = dbFetchOne('SHOW status WHERE variable_name=\'threads_connected\'', 'Value');
$max_connections = dbFetchOne('SHOW variables WHERE variable_name=\'max_connections\'', 'Value');
$percent_used = $max_connections ? 100 * $connections / $max_connections : 100;
$class = $percent_used > 90 ? 'text-warning' : '';
$class = ( $percent_used > 90 ) ? 'text-warning' : '';
echo '<li class="'. $class .' nav-item mx-2">'.PHP_EOL;
echo '<li class="nav-item mx-2 ' .$class. '">'.PHP_EOL;
echo '<i class="material-icons md-18 mr-1">storage</i>'.PHP_EOL;
echo translate('DB').': '.$connections.'/'.$max_connections.PHP_EOL;
echo translate('DB'). ': ' .$connections. '/' .$max_connections.PHP_EOL;
echo '</li>'.PHP_EOL;
}