Revision 6c07db48
Added by Phil Davis about 10 years ago
usr/local/www/status_lb_pool.php | ||
---|---|---|
56 | 56 |
$now = time(); |
57 | 57 |
$year = date("Y"); |
58 | 58 |
|
59 |
$pgtitle = array(gettext("Status"),gettext("Load Balancer"),gettext("Pool"));
|
|
59 |
$pgtitle = array(gettext("Status"), gettext("Load Balancer"), gettext("Pool"));
|
|
60 | 60 |
$shortcut_section = "relayd"; |
61 | 61 |
include("head.inc"); |
62 | 62 |
|
... | ... | |
154 | 154 |
<td class="listr" align="center"> |
155 | 155 |
<table border="0" cellpadding="2" cellspacing="0" summary="status"> |
156 | 156 |
<?php |
157 |
$pool_hosts=array();
|
|
157 |
$pool_hosts = array();
|
|
158 | 158 |
foreach ((array) $pool['servers'] as $server) { |
159 |
$svr['ip']['addr']=$server;
|
|
160 |
$svr['ip']['state']=$relay_hosts[$pool['name'].":".$pool['port']][$server]['state'];
|
|
161 |
$svr['ip']['avail']=$relay_hosts[$pool['name'].":".$pool['port']][$server]['avail'];
|
|
159 |
$svr['ip']['addr'] = $server;
|
|
160 |
$svr['ip']['state'] = $relay_hosts[$pool['name'] . ":" . $pool['port']][$server]['state'];
|
|
161 |
$svr['ip']['avail'] = $relay_hosts[$pool['name'] . ":" . $pool['port']][$server]['avail'];
|
|
162 | 162 |
$pool_hosts[]=$svr; |
163 | 163 |
} |
164 | 164 |
foreach ((array) $pool['serversdisabled'] as $server) { |
165 |
$svr['ip']['addr']="$server";
|
|
166 |
$svr['ip']['state']='disabled';
|
|
167 |
$svr['ip']['avail']='disabled';
|
|
165 |
$svr['ip']['addr'] = "$server";
|
|
166 |
$svr['ip']['state'] = 'disabled';
|
|
167 |
$svr['ip']['avail'] = 'disabled';
|
|
168 | 168 |
$pool_hosts[]=$svr; |
169 | 169 |
} |
170 | 170 |
asort($pool_hosts); |
171 | 171 |
|
172 | 172 |
foreach ((array) $pool_hosts as $server) { |
173 |
if ($server['ip']['addr']!="") {
|
|
173 |
if ($server['ip']['addr'] != "") {
|
|
174 | 174 |
switch ($server['ip']['state']) { |
175 | 175 |
case 'up': |
176 | 176 |
$bgcolor = "#90EE90"; // lightgreen |
Also available in: Unified diff
Code spacing
and other random stuff I noticed.
I think this finishes messing with code style. The codebase should match
the developer style guide closely enough that 99.9% of changes will not
feel the need to also massage the formatting.