summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_openvpn.php
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2014-05-16 23:16:14 +0100
committerColin Fleming <cj_fleming@sky.com>2014-05-16 23:16:14 +0100
commit4d33138f093d72fb7cb16677982e755db320082a (patch)
tree9f54b40f846a22b35a924c7c77ece7e34cb2f8c7 /usr/local/www/status_openvpn.php
parent024068017f98572f6bd41b7ba542fc36fccee39a (diff)
downloadpfsense-4d33138f093d72fb7cb16677982e755db320082a.zip
pfsense-4d33138f093d72fb7cb16677982e755db320082a.tar.gz
Tidy up "status_openvpn.php" XHTML
Add CDATA sections to SCRIPTS Add SUMMARY to TABLES Change NAME to ID in TR tags Closing IMG tags and add ALT to IMG Add missing closing FORM, closing BODY and closing HTML
Diffstat (limited to 'usr/local/www/status_openvpn.php')
-rw-r--r--usr/local/www/status_openvpn.php55
1 files changed, 31 insertions, 24 deletions
diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php
index 8746254..4d1f46f 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","");
@@ -138,11 +139,12 @@ include("head.inc"); ?>
function(index,row) { jQuery(row).fadeOut(1000); }
);
}
+//]]>
</script>
<?php $i = 0; ?>
<?php foreach ($servers as $server): ?>
-<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
+<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" summary="status openvpn">
<tr>
<td colspan="6" class="listtopic">
<?=$server['name'];?> <?=gettext("Client connections"); ?>
@@ -150,7 +152,7 @@ include("head.inc"); ?>
</tr>
<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">
+ <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" summary="connections">
<tr>
<td class="listhdrr"><?=gettext("Common Name"); ?></td>
<td class="listhdrr"><?=gettext("Real Address"); ?></td>
@@ -161,7 +163,7 @@ include("head.inc"); ?>
</tr>
<?php foreach ($server['conns'] as $conn): ?>
- <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'>
+ <tr id="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>">
<td class="listlr">
<?=$conn['common_name'];?>
</td>
@@ -180,11 +182,11 @@ include("head.inc"); ?>
<td class="listr">
<?=$conn['bytes_recv'];?>
</td>
- <td class='list'>
- <img src='/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif' height='17' width='17' border='0'
- onclick="killClient('<?php echo $server['mgmt']; ?>', '<?php echo $conn['remote_host']; ?>');" style='cursor:pointer;'
- name='<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>'
- title='<?php echo gettext("Kill client connection from") . ' ' . $conn['remote_host']; ?>' alt='' />
+ <td class="list">
+ <img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" height="17" width="17" border="0"
+ onclick="killClient('<?php echo $server['mgmt']; ?>', '<?php echo $conn['remote_host']; ?>');" style="cursor:pointer;"
+ id="<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>"
+ title="<?php echo gettext("Kill client connection from") . " " . $conn['remote_host']; ?>" alt="delete" />
</td>
</tr>
@@ -194,9 +196,9 @@ include("head.inc"); ?>
<td colspan="2" class="list" height="12">
<table>
<tr>
- <?php $ssvc = find_service_by_openvpn_vpnid($server['vpnid']); ?>
+ <td><?php $ssvc = find_service_by_openvpn_vpnid($server['vpnid']); ?>
<?= get_service_status_icon($ssvc, true, true); ?>
- <td><?= get_service_control_links($ssvc, true); ?></td>
+ <?= get_service_control_links($ssvc, true); ?></td>
</tr>
</table>
</td>
@@ -209,10 +211,10 @@ include("head.inc"); ?>
</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"); ?>" /> - <?= 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"); ?>" /> - <?= 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 ?>">
+<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 ?>" summary="routing table">
<tr>
<td colspan="6" class="listtopic">
<?=$server['name'];?> <?=gettext("Routing Table"); ?>
@@ -220,7 +222,7 @@ include("head.inc"); ?>
</tr>
<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">
+ <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" summary="results">
<tr>
<td class="listhdrr"><?=gettext("Common Name"); ?></td>
<td class="listhdrr"><?=gettext("Real Address"); ?></td>
@@ -229,7 +231,7 @@ include("head.inc"); ?>
</tr>
<?php foreach ($server['routes'] as $conn): ?>
- <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'>
+ <tr id="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>">
<td class="listlr">
<?=$conn['common_name'];?>
</td>
@@ -261,7 +263,7 @@ include("head.inc"); ?>
<br />
<?php if (!empty($sk_servers)) { ?>
-<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
+<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" summary="peer to peer stats">
<tr>
<td colspan="6" class="listtopic">
<?=gettext("Peer to Peer Server Instance Statistics"); ?>
@@ -269,7 +271,7 @@ include("head.inc"); ?>
</tr>
<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">
+ <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" summary="results">
<tr>
<td class="listhdrr"><?=gettext("Name"); ?></td>
<td class="listhdrr"><?=gettext("Status"); ?></td>
@@ -282,7 +284,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 "r:{$sk_server['port']}:{$sk_server['vpnid']}"; ?>">
<td class="listlr">
<?=$sk_server['name'];?>
</td>
@@ -307,9 +309,9 @@ include("head.inc"); ?>
<td class="listr">
<table>
<tr>
- <?php $ssvc = find_service_by_openvpn_vpnid($sk_server['vpnid']); ?>
+ <td><?php $ssvc = find_service_by_openvpn_vpnid($sk_server['vpnid']); ?>
<?= get_service_status_icon($ssvc, false, true); ?>
- <td><?= get_service_control_links($ssvc, true); ?></td>
+ <?= get_service_control_links($ssvc, true); ?></td>
</tr>
</table>
</td>
@@ -324,7 +326,7 @@ include("head.inc"); ?>
} ?>
<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">
+<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" summary="client stats">
<tr>
<td colspan="6" class="listtopic">
<?=gettext("Client Instance Statistics"); ?>
@@ -332,7 +334,7 @@ include("head.inc"); ?>
</tr>
<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">
+ <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" summary="results">
<tr>
<td class="listhdrr"><?=gettext("Name"); ?></td>
<td class="listhdrr"><?=gettext("Status"); ?></td>
@@ -345,7 +347,7 @@ include("head.inc"); ?>
</tr>
<?php foreach ($clients as $client): ?>
- <tr name='<?php echo "r:{$client['port']}:{$client['vpnid']}"; ?>'>
+ <tr id="<?php echo "r:{$client['port']}:{$client['vpnid']}"; ?>">
<td class="listlr">
<?=$client['name'];?>
</td>
@@ -370,9 +372,9 @@ include("head.inc"); ?>
<td class="listr" height="12">
<table>
<tr>
- <?php $ssvc = find_service_by_openvpn_vpnid($client['vpnid']); ?>
+ <td><?php $ssvc = find_service_by_openvpn_vpnid($client['vpnid']); ?>
<?= get_service_status_icon($ssvc, false, true); ?>
- <td><?= get_service_control_links($ssvc, true); ?></td>
+ <?= get_service_control_links($ssvc, true); ?></td>
</tr>
</table>
</td>
@@ -382,6 +384,7 @@ include("head.inc"); ?>
</td>
</tr>
</table>
+</form>
<?php
}
@@ -398,9 +401,13 @@ if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) {
<?php include("fend.inc"); ?>
<script type="text/javascript">
+//<![CDATA[
function show_routes(id, buttonid) {
document.getElementById(buttonid).innerHTML='';
aodiv = document.getElementById(id);
aodiv.style.display = "block";
}
+//]]>
</script>
+</body>
+</html>
OpenPOWER on IntegriCloud