109 |
109 |
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
110 |
110 |
<?php include("fbegin.inc"); ?>
|
111 |
111 |
<form action="status_lb_pool.php" method="post">
|
112 |
|
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
|
|
112 |
<?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
|
113 |
113 |
<?php print_info_box_np(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));?><br />
|
114 |
114 |
<?php endif; ?>
|
115 |
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
|
115 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status load balancer pools">
|
116 |
116 |
<tr><td class="tabnavtbl">
|
117 |
117 |
<?php
|
118 |
118 |
/* active tabs */
|
... | ... | |
125 |
125 |
<tr>
|
126 |
126 |
<td>
|
127 |
127 |
<div id="mainarea">
|
128 |
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" name="sortabletable" id="sortabletable">
|
|
128 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable" id="sortabletable" summary="main area">
|
129 |
129 |
<tr>
|
130 |
130 |
<td width="10%" class="listhdrr"><?=gettext("Name");?></td>
|
131 |
131 |
<td width="10%" class="listhdrr"><?=gettext("Mode");?></td>
|
... | ... | |
153 |
153 |
?>
|
154 |
154 |
</td>
|
155 |
155 |
<td class="listr" align="center">
|
156 |
|
<table border="0" cellpadding="2" cellspacing="0">
|
|
156 |
<table border="0" cellpadding="2" cellspacing="0" summary="status">
|
157 |
157 |
<?php
|
158 |
158 |
$pool_hosts=array();
|
159 |
159 |
foreach ((array) $pool['servers'] as $server) {
|
... | ... | |
175 |
175 |
switch ($server['ip']['state']) {
|
176 |
176 |
case 'up':
|
177 |
177 |
$bgcolor = "#90EE90"; // lightgreen
|
178 |
|
$checked = "checked";
|
|
178 |
$checked = "checked=\"checked\"";
|
179 |
179 |
break;
|
180 |
180 |
case 'disabled':
|
181 |
181 |
$bgcolor = "white";
|
... | ... | |
183 |
183 |
break;
|
184 |
184 |
default:
|
185 |
185 |
$bgcolor = "#F08080"; // lightcoral
|
186 |
|
$checked = "checked";
|
|
186 |
$checked = "checked=\"checked\"";
|
187 |
187 |
}
|
188 |
188 |
echo "<tr>";
|
189 |
189 |
switch ($pool['mode']) {
|
190 |
190 |
case 'loadbalance':
|
191 |
|
echo "<td><input type='checkbox' name='{$pool['name']}|".str_replace('.', '_', $server['ip']['addr'])."' {$checked}></td>\n";
|
|
191 |
echo "<td><input type=\"checkbox\" name=\"{$pool['name']}|" . str_replace('.', '_', $server['ip']['addr']) . "\" {$checked} /></td>\n";
|
192 |
192 |
break;
|
193 |
193 |
case 'failover':
|
194 |
|
echo "<td><input type='radio' name='{$pool['name']}' value='{$server['ip']['addr']}' {$checked}></td>\n";
|
|
194 |
echo "<td><input type=\"radio\" name=\"{$pool['name']}\" value=\"{$server['ip']['addr']}\" {$checked} /></td>\n";
|
195 |
195 |
break;
|
196 |
196 |
}
|
197 |
|
echo "<td bgcolor={$bgcolor}> {$server['ip']['addr']}:{$pool['port']} </td><td bgcolor={$bgcolor}> ";
|
198 |
|
# echo "<td bgcolor={$bgcolor}> {$server['ip']['addr']}:{$pool['port']} ";
|
|
197 |
echo "<td bgcolor=\"{$bgcolor}\"> {$server['ip']['addr']}:{$pool['port']} </td><td bgcolor=\"{$bgcolor}\"> ";
|
|
198 |
# echo "<td bgcolor=\"{$bgcolor}\"> {$server['ip']['addr']}:{$pool['port']} ";
|
199 |
199 |
if($server['ip']['avail'])
|
200 |
200 |
echo " ({$server['ip']['avail']}) ";
|
201 |
201 |
echo " </td></tr>";
|
... | ... | |
214 |
214 |
<?php endforeach; ?>
|
215 |
215 |
<tr>
|
216 |
216 |
<td colspan="5">
|
217 |
|
<input name="Submit" type="submit" class="formbtn" value="<?= gettext("Save"); ?>">
|
218 |
|
<input name="Reset" type="reset" class="formbtn" value="<?= gettext("Reset"); ?>">
|
|
217 |
<input name="Submit" type="submit" class="formbtn" value="<?= gettext("Save"); ?>" />
|
|
218 |
<input name="Reset" type="reset" class="formbtn" value="<?= gettext("Reset"); ?>" />
|
219 |
219 |
</td>
|
220 |
220 |
</tr>
|
221 |
221 |
</table>
|
Tidy up "status_lb" XHTML
Add SUMMARY to TABLES
Update HTML Boolean operators
Close INPUT tags