summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN0YB <Al_Stu@Frontier.com>2014-02-17 23:45:01 -0800
committerN0YB <Al_Stu@Frontier.com>2014-02-17 23:45:01 -0800
commit1370befae444d9da0843728a9f69cc8f12eda74a (patch)
treebcde23d68a2a93d5e1b0f35d8a2202200e6ee3e3
parentcb061c7f117c957af5bab32a76a0022ba36c165a (diff)
downloadpfsense-1370befae444d9da0843728a9f69cc8f12eda74a.zip
pfsense-1370befae444d9da0843728a9f69cc8f12eda74a.tar.gz
XHTML Compliance
Open VPN Status
-rw-r--r--usr/local/www/status_openvpn.php104
1 files changed, 70 insertions, 34 deletions
diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php
index e5ac31b..796ab18 100644
--- a/usr/local/www/status_openvpn.php
+++ b/usr/local/www/status_openvpn.php
@@ -111,6 +111,7 @@ include("head.inc"); ?>
<?php include("fbegin.inc"); ?>
<form action="status_openvpn.php" method="get" name="iform">
<script type="text/javascript">
+//<![CDATA[
function killClient(mport, remipp) {
var busy = function(index,icon) {
jQuery(icon).bind("onclick","");
@@ -134,10 +135,15 @@ include("head.inc"); ?>
return;
}
- jQuery('tr[name="r:' + values[1] + ":" + values[2] + '"]').each(
+ jQuery('tr[id="Client_Connections_r:' + values[1] + ":" + values[2] + '"]').each(
+ function(index,row) { jQuery(row).fadeOut(1000); }
+ );
+
+ jQuery('tr[id="Routing_Table_r:' + values[1] + ":" + values[2] + '"]').each(
function(index,row) { jQuery(row).fadeOut(1000); }
);
}
+//]]>
</script>
<?php $i = 0; ?>
<?php foreach ($servers as $server): ?>
@@ -151,6 +157,7 @@ include("head.inc"); ?>
<tr>
<td>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
<tr>
<td class="listhdrr"><?=gettext("Common Name"); ?></td>
<td class="listhdrr"><?=gettext("Real Address"); ?></td>
@@ -159,9 +166,28 @@ include("head.inc"); ?>
<td class="listhdrr"><?=gettext("Bytes Sent"); ?></td>
<td class="listhdrr"><?=gettext("Bytes Received"); ?></td>
</tr>
-
- <?php foreach ($server['conns'] as $conn): ?>
- <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'>
+ </thead>
+ <tfoot>
+ <tr>
+ <td colspan="2" class="list" height="12">
+ <table>
+ <tr>
+ <?php $ssvc = find_service_by_openvpn_vpnid($server['vpnid']); ?>
+ <td><?= get_service_status_icon($ssvc, true, true); ?></td>
+ <td><?= get_service_control_links($ssvc, true); ?></td>
+ </tr>
+ </table>
+ </td>
+ <td colspan="4" class="list" height="12">&nbsp;</td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <?php
+ $rowIndex = 0;
+ foreach ($server['conns'] as $conn):
+ $rowIndex++;
+ ?>
+ <tr id='<?php echo "Client_Connections_r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'>
<td class="listlr">
<?=$conn['common_name'];?>
</td>
@@ -188,30 +214,22 @@ include("head.inc"); ?>
</td>
</tr>
- <?php endforeach; ?>
- <tfoot>
- <tr>
- <td colspan="2" class="list" height="12">
- <table>
- <tr>
- <?php $ssvc = find_service_by_openvpn_vpnid($server['vpnid']); ?>
- <td class="listr" align="center">
- <?= get_service_status_icon($ssvc, true, true); ?>
- </td>
- <td><?= get_service_control_links($ssvc, true); ?></td>
- </tr>
- </table>
- </td>
- <td colspan="4" class="list" height="12">&nbsp;</td>
- </tr>
- </tfoot>
+ <?php
+ endforeach;
+ if($rowIndex == 0) {
+ ?>
+ <tr><td></td></tr>
+ <?php
+ }
+ ?>
+ </tbody>
</table>
</td>
</tr>
</table>
<?php if (is_array($server['routes']) && count($server['routes'])): ?>
<div id="shroutebut-<?= $i ?>">
-<input type="button" onClick="show_routes('tabroute-<?= $i ?>','shroutebut-<?= $i ?>')" value="<?php echo gettext("Show Routing Table"); ?>"></input> - <?= gettext("Display OpenVPN's internal routing table for this server.") ?></a>
+<input type="button" onclick="show_routes('tabroute-<?= $i ?>','shroutebut-<?= $i ?>')" value="<?php echo gettext("Show Routing Table"); ?>"></input> - <?= gettext("Display OpenVPN's internal routing table for this server.") ?>
<br/><br/>
</div>
<table style="display: none; padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" id="tabroute-<?= $i ?>">
@@ -223,15 +241,26 @@ include("head.inc"); ?>
<tr>
<td>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
<tr>
<td class="listhdrr"><?=gettext("Common Name"); ?></td>
<td class="listhdrr"><?=gettext("Real Address"); ?></td>
<td class="listhdrr"><?=gettext("Target Network"); ?></td>
<td class="listhdrr"><?=gettext("Last Used"); ?></td>
</tr>
-
- <?php foreach ($server['routes'] as $conn): ?>
- <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'>
+ </thead>
+ <tfoot>
+ <tr>
+ <td colspan="6" class="list" height="12"><?= gettext("An IP address followed by C indicates a host currently connected through the VPN.") ?></td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <?php
+ $rowIndex = 0;
+ foreach ($server['routes'] as $conn):
+ $rowIndex++;
+ ?>
+ <tr id='<?php echo "Routing_Table_r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'>
<td class="listlr">
<?=$conn['common_name'];?>
</td>
@@ -246,12 +275,15 @@ include("head.inc"); ?>
</td>
</tr>
- <?php endforeach; ?>
- <tfoot>
- <tr>
- <td colspan="6" class="list" height="12"><?= gettext("An IP address followed by C indicates a host currently connected through the VPN.") ?></td>
- </tr>
- </tfoot>
+ <?php
+ endforeach;
+ if($rowIndex == 0) {
+ ?>
+ <tr><td></td></tr>
+ <?php
+ }
+ ?>
+ </tbody>
</table>
</td>
</tr>
@@ -284,7 +316,7 @@ include("head.inc"); ?>
</tr>
<?php foreach ($sk_servers as $sk_server): ?>
- <tr name='<?php echo "r:{$sk_server['port']}:{$sk_server['vpnid']}"; ?>'>
+ <tr id='<?php echo "Servers_r:{$sk_server['port']}:{$sk_server['vpnid']}"; ?>'>
<td class="listlr">
<?=$sk_server['name'];?>
</td>
@@ -326,7 +358,7 @@ include("head.inc"); ?>
<?php
} ?>
-<br>
+<br/>
<?php if (!empty($clients)) { ?>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -349,7 +381,7 @@ include("head.inc"); ?>
</tr>
<?php foreach ($clients as $client): ?>
- <tr name='<?php echo "r:{$client['port']}:{$client['vpnid']}"; ?>'>
+ <tr id='<?php echo "Clients_r:{$client['port']}:{$client['vpnid']}"; ?>'>
<td class="listlr">
<?=$client['name'];?>
</td>
@@ -401,6 +433,7 @@ if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) {
}
?>
+</form>
<?php include("fend.inc"); ?>
<script type="text/javascript">
@@ -410,3 +443,6 @@ function show_routes(id, buttonid) {
aodiv.style.display = "block";
}
</script>
+
+</body>
+</html>
OpenPOWER on IntegriCloud