piler/webui/view/theme/default/templates/health/worker.tpl

170 lines
7.4 KiB
Smarty
Raw Normal View History

2013-04-05 10:16:33 +02:00
<div class="container">
<div class="alert alert-info"><strong><?php print $text_refresh_period; ?>:</strong> <?php print HEALTH_REFRESH; ?> sec</div>
<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>&nbsp;<?php print $cpuinfo; ?>% <?php print $cpuload; ?></div></td>
</tr>
<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>&nbsp;<?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>&nbsp;<?php print $swapinfo; ?>% / <?php print $totalswap; ?> MB</div></td>
</tr>
2013-07-24 22:14:05 +02:00
<?php if(ENABLE_SAAS == 1) { ?>
<tr>
<th class="span4"><?php print $text_online_users; ?>:</th>
<td class="span8"><a href="index.php?route=stat/online"><?php print $num_of_online_users; ?></a></td>
</tr>
<?php } ?>
2013-04-05 10:16:33 +02:00
</table>
<h2><i class="icon-hdd icon-2x pull-left"></i>&nbsp;Storage</h2>
<table class="table table-striped">
<tr>
<th><?php print $text_archive_size; ?>:</th>
<td><?php print $archive_size; ?>B</td>
</tr>
<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']; ?> =&gt; <?php print nice_size(1000*$partition['used']); ?> / <?php print nice_size(1000*$partition['total']); ?> (<?php print $partition['utilization']; ?>%)</span><br /> <?php } ?></td>
2013-04-05 10:16:33 +02:00
</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>
<tr>
<th><?php print $text_periodic_purge; ?></th>
2013-08-11 11:44:49 +02:00
<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 if($purge_stat[0]) { print $text_last; ?>: <?php print $purge_stat[0]; ?>, <?php print $text_next; ?>: <?php print $purge_stat[1]; } ?>
<?php } else { print $text_disabled; ?>. <a href="<?php print HEALTH_URL; ?>&toggle_enable_purge"><?php print $text_enable; ?></a><?php } ?>
</span>
</td>
2013-04-05 10:16:33 +02:00
</tr>
2013-08-09 10:13:54 +02:00
<?php if($indexer_stat[0]) { ?>
<tr>
<th><?php print $text_indexer_job; ?></th>
<td><?php print $text_last; ?>: <?php print $indexer_stat[0]; ?>, <?php print $text_next; ?>: <?php print $indexer_stat[1]; ?></td>
</tr>
<?php } ?>
2013-04-05 10:16:33 +02:00
</table>
</div>
<div class="span4">
<table class="table table-striped">
<tr>
<th colspan="2">Cumulative Counts</th>
</tr>
2013-04-22 23:03:40 +02:00
<tr>
<td><?php print $text_oldest_record; ?></td>
2013-08-28 09:56:37 +02:00
<td><?php print date(DATE_TEMPLATE, $oldestmessagets); ?></td>
2013-04-22 23:03:40 +02:00
</tr>
2013-04-05 10:16:33 +02:00
<tr>
<td><?php print $text_processed_emails; ?></td>
2013-08-22 11:24:54 +02:00
<td><?php print $processed_emails[0]; ?> (<?php print $text_60_minutes; ?>)<br /><?php print $processed_emails[1]; ?> (<?php print $text_24_hours; ?>)<br /><?php print $processed_emails[2]; ?> (<?php print $text_1_week; ?>)<br /><?php print $processed_emails[3]; ?> (<?php print $text_30_days; ?>)</td>
2013-04-05 10:16:33 +02:00
</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 } } ?>
</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 id="health2">
2012-02-08 23:14:28 +01:00
<?php if(isset($queues)) { ?>
2013-04-05 10:16:33 +02:00
<tr>
<th><?php print $text_queue_status; ?></div>
2012-02-08 23:14:28 +01:00
</div>
<?php foreach ($queues as $queue) {
if(isset($queue['desc'])) { ?>
2013-04-05 10:16:33 +02:00
<tr>
<th><?php print $queue['desc']; ?></div>
2012-02-08 23:14:28 +01:00
</div>
2013-04-05 10:16:33 +02:00
<tr>
<td><pre><?php print $queue['lines']; ?></pre></div>
2012-02-08 23:14:28 +01:00
</div>
<?php }
} ?>
<?php } ?>
2013-04-05 10:16:33 +02:00
</div>
2012-02-08 23:14:28 +01:00
2013-04-05 10:16:33 +02:00
</div>
2012-02-08 23:14:28 +01:00