add db connections to the header
This commit is contained in:
parent
151126e70c
commit
9482114f95
|
@ -263,6 +263,12 @@ if ( canView( 'Stream' ) && $cycleCount > 1 ) {
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li><?php echo translate('Load') ?>: <?php echo getLoad() ?></li>
|
<li><?php echo translate('Load') ?>: <?php echo getLoad() ?></li>
|
||||||
|
<?php
|
||||||
|
$connections = dbFetchOne( "SHOW status WHERE variable_name='threads_connected'", 'Value' );
|
||||||
|
$max_connections = dbFetchOne( "SHOW variables WHERE variable_name='max_connections'", 'Value' );
|
||||||
|
$percent_used = 100 * $connections / $max_connections;
|
||||||
|
echo '<li'. ( $percent_used > 90 ? ' class="warning"' : '' ).'>'.translate('DB').':'.$connections.'/'.$max_connections.'</li>';
|
||||||
|
?>
|
||||||
<li><?php echo translate('Storage') ?>:
|
<li><?php echo translate('Storage') ?>:
|
||||||
<?php
|
<?php
|
||||||
$storage_areas = Storage::find_all();
|
$storage_areas = Storage::find_all();
|
||||||
|
|
Loading…
Reference in New Issue