summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_lb_vs.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-15 11:40:50 +0545
committerPhil Davis <phil.davis@inf.org>2015-05-15 11:40:50 +0545
commit42b0c92129b93ca6d182f4904ec92708c9a8c750 (patch)
tree7d396b83ba7920878bb6e8f42ae5907e9518c003 /usr/local/www/status_lb_vs.php
parentc8f1c7bd70cd156f23a59400e5c738ef8bf5281b (diff)
downloadpfsense-42b0c92129b93ca6d182f4904ec92708c9a8c750.zip
pfsense-42b0c92129b93ca6d182f4904ec92708c9a8c750.tar.gz
Code style WWW Status
Diffstat (limited to 'usr/local/www/status_lb_vs.php')
-rw-r--r--usr/local/www/status_lb_vs.php158
1 files changed, 85 insertions, 73 deletions
diff --git a/usr/local/www/status_lb_vs.php b/usr/local/www/status_lb_vs.php
index 62ae530..07c1736 100644
--- a/usr/local/www/status_lb_vs.php
+++ b/usr/local/www/status_lb_vs.php
@@ -61,84 +61,96 @@ include("head.inc");
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status load balancer virtual servers">
- <tr><td class="tabnavtbl">
- <?php
- /* active tabs */
- $tab_array = array();
- $tab_array[] = array(gettext("Pools"), false, "status_lb_pool.php");
- $tab_array[] = array(gettext("Virtual Servers"), true, "status_lb_vs.php");
- display_top_tabs($tab_array);
- ?>
- </td></tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
- <tr>
- <td width="10%" class="listhdrr"><?=gettext("Name"); ?></td>
- <td width="20%" class="listhdrr"><?=gettext("Address"); ?></td>
- <td width="10%" class="listhdrr"><?=gettext("Servers"); ?></td>
- <td width="25%" class="listhdrr"><?=gettext("Status"); ?></td>
- <td width="25%" class="listhdr"><?=gettext("Description"); ?></td>
+ <tr><td class="tabnavtbl">
+ <?php
+ /* active tabs */
+ $tab_array = array();
+ $tab_array[] = array(gettext("Pools"), false, "status_lb_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), true, "status_lb_vs.php");
+ display_top_tabs($tab_array);
+ ?>
+ </td></tr>
+ <tr>
+ <td>
+ <div id="mainarea">
+ <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
+ <tr>
+ <td width="10%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Address"); ?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Servers"); ?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Status"); ?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description"); ?></td>
</tr>
- <?php $i = 0; foreach ($a_vs as $vsent): ?>
- <tr>
- <td class="listlr">
- <?=$vsent['name'];?>
- </td>
- <td class="listr" align="center" >
- <?=$vsent['ipaddr']." : ".$vsent['port'];?>
- <br />
- </td>
- <td class="listr" align="center" >
- <table border="0" cellpadding="0" cellspacing="2" summary="servers">
- <?php
- foreach ($a_pool as $vipent) {
- if ($vipent['name'] == $vsent['poolname']) {
- foreach ((array) $vipent['servers'] as $server) {
- print "<tr><td> {$server} </td></tr>";
- }
+<?php
+ $i = 0;
+ foreach ($a_vs as $vsent):
+?>
+ <tr>
+ <td class="listlr">
+ <?=$vsent['name'];?>
+ </td>
+ <td class="listr" align="center" >
+ <?=$vsent['ipaddr']." : ".$vsent['port'];?>
+ <br />
+ </td>
+ <td class="listr" align="center" >
+ <table border="0" cellpadding="0" cellspacing="2" summary="servers">
+<?php
+ foreach ($a_pool as $vipent) {
+ if ($vipent['name'] == $vsent['poolname']) {
+ foreach ((array) $vipent['servers'] as $server) {
+ print "<tr><td> {$server} </td></tr>";
}
}
+ }
?>
- </table>
- </td>
- <?php
- switch (trim($rdr_a[$vsent['name']]['status'])) {
- case 'active':
- $bgcolor = "#90EE90"; // lightgreen
- $rdr_a[$vsent['name']]['status'] = "Active";
- break;
- case 'down':
- $bgcolor = "#F08080"; // lightcoral
- $rdr_a[$vsent['name']]['status'] = "Down";
- break;
- default:
- $bgcolor = "#D3D3D3"; // lightgray
- $rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?';
- }
- ?>
- <td class="listr nowrap">
- <table border="0" cellpadding="3" cellspacing="2" summary="status">
- <tr><td bgcolor="<?=$bgcolor?>"><?=$rdr_a[$vsent['name']]['status']?> </td></tr>
- </table>
- <?php
- if (!empty($rdr_a[$vsent['name']]['total']))
- echo "Total Sessions: {$rdr_a[$vsent['name']]['total']}\n";
- if (!empty($rdr_a[$vsent['name']]['last']))
- echo "<br />Last: {$rdr_a[$vsent['name']]['last']}\n";
- if (!empty($rdr_a[$vsent['name']]['average']))
- echo "<br />Average: {$rdr_a[$vsent['name']]['average']}\n";
- ?>
- </td>
- <td class="listbg" >
+ </table>
+ </td>
+<?php
+ switch (trim($rdr_a[$vsent['name']]['status'])) {
+ case 'active':
+ $bgcolor = "#90EE90"; // lightgreen
+ $rdr_a[$vsent['name']]['status'] = "Active";
+ break;
+ case 'down':
+ $bgcolor = "#F08080"; // lightcoral
+ $rdr_a[$vsent['name']]['status'] = "Down";
+ break;
+ default:
+ $bgcolor = "#D3D3D3"; // lightgray
+ $rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?';
+ }
+?>
+ <td class="listr nowrap">
+ <table border="0" cellpadding="3" cellspacing="2" summary="status">
+ <tr>
+ <td bgcolor="<?=$bgcolor?>"><?=$rdr_a[$vsent['name']]['status']?> </td>
+ </tr>
+ </table>
+<?php
+ if (!empty($rdr_a[$vsent['name']]['total'])) {
+ echo "Total Sessions: {$rdr_a[$vsent['name']]['total']}\n";
+ }
+ if (!empty($rdr_a[$vsent['name']]['last'])) {
+ echo "<br />Last: {$rdr_a[$vsent['name']]['last']}\n";
+ }
+ if (!empty($rdr_a[$vsent['name']]['average'])) {
+ echo "<br />Average: {$rdr_a[$vsent['name']]['average']}\n";
+ }
+?>
+ </td>
+ <td class="listbg" >
<?=$vsent['descr'];?>
- </td>
- </tr>
- <?php $i++; endforeach; ?>
- </table>
- </div>
-</td></tr>
+ </td>
+ </tr>
+<?php
+ $i++;
+ endforeach;
+?>
+ </table>
+ </div>
+ </td>
+ </tr>
</table>
<?php include("fend.inc"); ?>
OpenPOWER on IntegriCloud