mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 13:37:02 +02:00
merging new gui part #1
This commit is contained in:
@ -98,7 +98,7 @@
|
||||
<?php print $averagemessagesize; ?> + <?php print $averagesqlsize; ?> + <?php print $averagesphinxsize; ?> (<?php print $text_average_message_size; ?>)<br/>
|
||||
<?php print $averagesizeday; ?> (<?php print $text_average_size_day; ?>)<br/>
|
||||
<?php print $daysleftatcurrentrate[0]; ?> years, <?php print $daysleftatcurrentrate[1]; ?> months, <?php print $daysleftatcurrentrate[2]; ?> days ("<?php print DATA_PARTITION; ?>" <?php print $text_partition_full; ?>)<br/>
|
||||
<?php if ( $usagetrend > 0 ) { print $text_usage_increasing; } elseif( $usagetrend < 0 ) { print $text_usage_decreasing; } else { print $text_usage_neutral; } ?> (<?php print $text_usage_trend; ?>)<br/>
|
||||
<?php if ( $usagetrend > 0 ) { print $text_usage_increasing; } elseif( $usagetrend < 0 ) { print $text_useage_decreasing; } else { print $text_usage_neutral; } ?> (<?php print $text_usage_trend; ?>)<br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1 +1 @@
|
||||
<span id="A1"><?php print $text_loading; ?> . . .</span>
|
||||
<span id="A1"><div id="spinner" class="alert alert-info lead"><i class="icon-spinner icon-spin icon-2x pull-left"></i><?php print $text_loading; ?></div></span>
|
||||
|
@ -1,145 +1,154 @@
|
||||
<div id="search">
|
||||
<div class="container">
|
||||
<div class="alert alert-info"><strong><?php print $text_refresh_period; ?>:</strong> <?php print HEALTH_REFRESH; ?> sec</div>
|
||||
|
||||
<div id="health1">
|
||||
<div class="row">
|
||||
|
||||
<div class="span8">
|
||||
<h2><i class="icon-dashboard icon-2x pull-left"></i><?php print $sysinfo[0]; ?> <small">Status</small></h2>
|
||||
<h3><strong>Up For:</strong> <?php print $uptime; ?></h3>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th class="span4"><?php print $text_server_operating_system; ?>:</th>
|
||||
<td class="span8"> <?php print $sysinfo[1]; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?php print $text_cpu_usage; ?>:</th>
|
||||
<td><div class="progress <?php if($cpuinfo < HEALTH_RATIO) { ?>progress-success<?php } else { ?>progress-danger<?php } ?>"><div class="bar" style="width: <?php print $cpuinfo; ?>%"></div> <?php print $cpuinfo; ?>% <?php print $cpuload; ?></div></td>
|
||||
</tr>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_refresh_period; ?>:</div>
|
||||
<div class="cellhealthright"><?php print HEALTH_REFRESH; ?> sec</div>
|
||||
</div>
|
||||
<tr>
|
||||
<th><?php print $text_memory_usage; ?>:</th>
|
||||
<td><div class="progress <?php if($meminfo < HEALTH_RATIO) { ?>progress-success<?php } else { ?>progress-danger<?php } ?>"><div class="bar" style="width: <?php print $meminfo; ?>%"></div> <?php print $meminfo; ?>% / <?php print $totalmem; ?> MB</div></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?php print $text_swap_usage; ?>:</th>
|
||||
<td><div class="progress <?php if($swapinfo < HEALTH_RATIO) { ?>progress-success<?php } else { ?>progress-danger<?php } ?>"><div class="bar" style="width: <?php print $swapinfo; ?>%"></div> <?php print $swapinfo; ?>% / <?php print $totalswap; ?> MB</div></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<h2><i class="icon-hdd icon-2x pull-left"></i> Storage</h2>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th><?php print $text_archive_size; ?>:</th>
|
||||
<td><?php print $archive_size; ?>B</td>
|
||||
</tr>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_server_name; ?>:</div>
|
||||
<div class="cellhealthright"><?php print $sysinfo[0]; ?></div>
|
||||
</div>
|
||||
<tr>
|
||||
<th><?php print $text_disk_usage; ?></th>
|
||||
<td><?php foreach($shortdiskinfo as $partition) { ?><span class="<?php if($partition['utilization'] < HEALTH_RATIO) { ?>text-success<?php } else { ?>text-error<?php } ?>"><?php print $partition['partition']; ?> <?php print $partition['utilization']; ?>%</span> <?php } ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?php print $text_smtp_status; ?>:</th>
|
||||
<td>
|
||||
<?php foreach($health as $h) {
|
||||
if(preg_match("/^220/", $h[1])) {
|
||||
$status = 'OK'; $class = 'text-success';
|
||||
} else {
|
||||
$status = 'ERROR'; $class = 'text-error';
|
||||
}
|
||||
?>
|
||||
<div class="<?php print $class; ?>"><span onmouseover="Tip('<?php print preg_replace("/\'/", "\'", $h[1]); ?>, <?php print $h[2]; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><?php print $h[3]; ?>: <?php print $status; ?></span></div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_server_operating_system; ?>:</div>
|
||||
<div class="cellhealthright"><?php print $sysinfo[1]; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_uptime; ?>:</div>
|
||||
<div class="cellhealthright"><?php print $uptime; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_archive_size; ?>:</div>
|
||||
<div class="cellhealthright"><?php print $archive_size; ?>B</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_smtp_status; ?>:</div>
|
||||
<div class="cellhealthright">
|
||||
<?php foreach($health as $h) {
|
||||
if(preg_match("/^220/", $h[1])) {
|
||||
$status = 'OK'; $class = 'text-success';
|
||||
} else {
|
||||
$status = 'ERROR'; $class = 'text-error';
|
||||
}
|
||||
?>
|
||||
<div class="bold <?php print $class; ?>"><span><?php print $h[3]; ?>: <?php print $status; ?></span></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<th><?php print $text_periodic_purge; ?></th>
|
||||
<td><span class="<?php if($options['enable_purge'] == 1) { ?>ok<?php } else { ?>error<?php } ?>"><?php if($options['enable_purge'] == 1) { print $text_enabled; ?>. <a href="<?php print HEALTH_URL; ?>&toggle_enable_purge"><?php print $text_disable; ?></a><?php } else { print $text_disabled; ?>. <a href="<?php print HEALTH_URL; ?>&toggle_enable_purge"><?php print $text_enable; ?></a><?php } ?> </span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="span4">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th colspan="2">Cumulative Counts</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php print $text_processed_emails; ?></td>
|
||||
<td><?php print $processed_emails[0]; ?> (<?php print $text_24_hours; ?>)<br /><?php print $processed_emails[1]; ?> (<?php print $text_1_week; ?>)<br /><?php print $processed_emails[2]; ?> (<?php print $text_30_days; ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">Message Disposition</th>
|
||||
</tr>
|
||||
<?php while(list($k, $v) = each($counters)) {
|
||||
if(!is_numeric($k)) { ?>
|
||||
<tr>
|
||||
<td><?php $a = preg_replace("/^_piler\:/", "", $k); if(isset($$a)) { print $$a; } else { print $k; } ?></td>
|
||||
<td><?php print $v; ?></td>
|
||||
</tr>
|
||||
<?php } } ?>
|
||||
<?php if(Registry::get('admin_user') == 1) { ?>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form action="index.php?route=health/worker" method="post">
|
||||
<input type="hidden" name="resetcounters" value="1" />
|
||||
<input type="submit" name="submit" class="btn" value="<?php print $text_reset_counters; ?>" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<h4><?php print $text_space_projection; ?></h4>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td><?php print $text_average_messages_day; ?></td>
|
||||
<td><?php print $averagemessages; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php print $text_average_message_size; ?></td>
|
||||
<td><?php print $averagemessagesize; ?> + <?php print $averagesqlsize; ?> + <?php print $averagesphinxsize; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php print $text_average_size_day; ?></td>
|
||||
<td><?php print $averagesizeday; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"<?php print DATA_PARTITION; ?>" <?php print $text_partition_full; ?></td>
|
||||
<td><?php print $daysleftatcurrentrate[0]; ?> years, <?php print $daysleftatcurrentrate[1]; ?> months, <?php print $daysleftatcurrentrate[2]; ?> days</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php print $text_usage_trend; ?></td>
|
||||
<td><?php if ( $usagetrend > 0 ) { print $text_usage_increasing; } elseif( $usagetrend < 0 ) { print $text_usage_decreasing; } else { print $text_usage_neutral; } ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_processed_emails; ?>:</div>
|
||||
<div class="cellhealthright"><?php print $processed_emails[0]; ?> (<?php print $text_24_hours; ?>)<br /><?php print $processed_emails[1]; ?> (<?php print $text_1_week; ?>)<br /><?php print $processed_emails[2]; ?> (<?php print $text_30_days; ?>)</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_cpu_usage; ?>:</div>
|
||||
<div class="cellhealthright"><span class="bold <?php if($cpuinfo < HEALTH_RATIO) { ?>text-success<?php } else { ?>text-error<?php } ?>"><?php print $cpuinfo; ?>% <?php print $cpuload; ?></span></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_memory_usage; ?>:</div>
|
||||
<div class="cellhealthright"><span class="bold <?php if($meminfo < HEALTH_RATIO) { ?>text-success<?php } else { ?>text-error<?php } ?>"><?php print $meminfo; ?>% / <?php print $totalmem; ?> MB</span></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_swap_usage; ?></div>
|
||||
<div class="cellhealthright"><span class="bold <?php if($swapinfo < HEALTH_RATIO) { ?>text-success<?php } else { ?>text-error<?php } ?>"><?php print $swapinfo; ?>% / <?php print $totalswap; ?> MB</span></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_disk_usage; ?></div>
|
||||
<div class="cellhealthright"><?php foreach($shortdiskinfo as $partition) { ?><span class="bold <?php if($partition['utilization'] < HEALTH_RATIO) { ?>text-success<?php } else { ?>text-error<?php } ?>"><?php print $partition['partition']; ?> <?php print $partition['utilization']; ?>%</span> <?php } ?></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_periodic_purge; ?></div>
|
||||
<div class="cellhealthright"><span class="bold <?php if($options['enable_purge'] == 1) { ?>text-success<?php } else { ?>text-error<?php } ?>"><?php if($options['enable_purge'] == 1) { print $text_enabled; ?>. <a href="<?php print HEALTH_URL; ?>&toggle_enable_purge"><?php print $text_disable; ?></a><?php } else { print $text_disabled; ?>. <a href="<?php print HEALTH_URL; ?>&toggle_enable_purge"><?php print $text_enable; ?></a><?php } ?> </span></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_counters; ?></div>
|
||||
<div class="cellhealthright">
|
||||
<?php while(list($k, $v) = each($counters)) {
|
||||
if(!is_numeric($k)) { ?>
|
||||
<div class="row">
|
||||
<div class="cellhealthright"><?php $a = preg_replace("/^_piler\:/", "", $k); if(isset($$a)) { print $$a; } else { print $k; } ?></div>
|
||||
<div class="cellhealthright"><?php print $v; ?></div>
|
||||
</div>
|
||||
<?php } } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_space_projection; ?></div>
|
||||
<div class="cellhealthright">
|
||||
<div class="row">
|
||||
<div class="cellhealthright"><?php print $text_average_messages_day; ?></div>
|
||||
<div class="cellhealthright"><?php print $averagemessages; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cellhealthright"><?php print $text_average_message_size; ?></div>
|
||||
<div class="cellhealthright"><?php print $averagemessagesize; ?> + <?php print $averagesqlsize; ?> + <?php print $averagesphinxsize; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cellhealthright"><?php print $text_average_size_day; ?></div>
|
||||
<div class="cellhealthright"><?php print $averagesizeday; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cellhealthright">"<?php print DATA_PARTITION; ?>" <?php print $text_partition_full; ?></div>
|
||||
<div class="cellhealthright"><?php print $daysleftatcurrentrate[0]; ?> <?php print $text_years; ?>, <?php print $daysleftatcurrentrate[1]; ?> <?php print $text_months; ?>, <?php print $daysleftatcurrentrate[2]; ?> <?php print $text_days2; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cellhealthright"><?php print $text_usage_trend; ?></div>
|
||||
<div class="cellhealthright"><?php if ( $usagetrend > 0 ) { print $text_usage_increasing; } elseif( $usagetrend < 0 ) { print $text_usage_decreasing; } else { print $text_usage_neutral; } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="health2">
|
||||
<div id="health2">
|
||||
<?php if(isset($queues)) { ?>
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_queue_status; ?></div>
|
||||
<tr>
|
||||
<th><?php print $text_queue_status; ?></div>
|
||||
</div>
|
||||
|
||||
<?php foreach ($queues as $queue) {
|
||||
|
||||
if(isset($queue['desc'])) { ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $queue['desc']; ?></div>
|
||||
<tr>
|
||||
<th><?php print $queue['desc']; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthright"><pre><?php print $queue['lines']; ?></pre></div>
|
||||
<tr>
|
||||
<td><pre><?php print $queue['lines']; ?></pre></div>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user