diff options
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/status_openvpn.php | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/src/usr/local/www/status_openvpn.php b/src/usr/local/www/status_openvpn.php index 1722db6..3139a73 100644 --- a/src/usr/local/www/status_openvpn.php +++ b/src/usr/local/www/status_openvpn.php @@ -102,11 +102,9 @@ include("head.inc"); ?> <tr> <th><?=gettext("Common Name")?></th> <th><?=gettext("Real Address")?></th> - <th><?=gettext("Virtual IPv4 Address"); ?></th> - <th><?=gettext("Virtual IPv6 Address"); ?></th> + <th><?=gettext("Virtual Address"); ?></th> <th><?=gettext("Connected Since"); ?></th> - <th><?=gettext("Bytes Sent")?></th> - <th><?=gettext("Bytes Received")?></th> + <th><?=gettext("Bytes Sent/Received")?></th> <th><!-- Icons --></th> </tr> </thead> @@ -116,13 +114,25 @@ include("head.inc"); ?> foreach ($server['conns'] as $conn): ?> <tr id="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>"> - <td><?=$conn['common_name'];?></td> + <td> + <?=$conn['common_name'];?> + <?php if (!empty($conn['common_name']) && !empty($conn['user_name']) && ($conn['user_name'] != "UNDEF")): ?> + <br /> + <?php endif; ?> + <?php if (!empty($conn['user_name']) && ($conn['user_name'] != "UNDEF")): ?> + <?=$conn['user_name'];?> + <?php endif; ?> + </td> <td><?=$conn['remote_host'];?></td> - <td><?=$conn['virtual_addr'];?></td> - <td><?=$conn['virtual_addr6'];?></td> + <td> + <?=$conn['virtual_addr'];?> + <?php if (!empty($conn['virtual_addr']) && !empty($conn['virtual_addr6'])): ?> + <br /> + <?php endif; ?> + <?=$conn['virtual_addr6'];?> + </td> <td><?=$conn['connect_time'];?></td> - <td><?=format_bytes($conn['bytes_sent']);?></td> - <td><?=format_bytes($conn['bytes_recv']);?></td> + <td><?=format_bytes($conn['bytes_sent']);?> / <?=format_bytes($conn['bytes_recv']);?></td> <td> <a onclick="killClient('<?=$server['mgmt'];?>', '<?=$conn['remote_host'];?>');" style="cursor:pointer;" @@ -228,8 +238,7 @@ include("head.inc"); ?> <th><?=gettext("Connected Since"); ?></th> <th><?=gettext("Virtual Address"); ?></th> <th><?=gettext("Remote Host"); ?></th> - <th><?=gettext("Bytes Sent"); ?></th> - <th><?=gettext("Bytes Received"); ?></th> + <th><?=gettext("Bytes Sent / Received"); ?></th> <th><?=gettext("Service"); ?></th> </tr> </thead> @@ -244,8 +253,7 @@ include("head.inc"); ?> <td><?=$sk_server['connect_time'];?></td> <td><?=$sk_server['virtual_addr'];?></td> <td><?=$sk_server['remote_host'];?></td> - <td><?=format_bytes($sk_server['bytes_sent']);?></td> - <td><?=format_bytes($sk_server['bytes_recv']);?></td> + <td><?=format_bytes($sk_server['bytes_sent']);?> / <?=format_bytes($sk_server['bytes_recv']);?></td> <td> <table> <tr> @@ -282,10 +290,10 @@ include("head.inc"); ?> <th><?=gettext("Name"); ?></th> <th><?=gettext("Status"); ?></th> <th><?=gettext("Connected Since"); ?></th> + <th><?=gettext("Local Address"); ?></th> <th><?=gettext("Virtual Address"); ?></th> <th><?=gettext("Remote Host"); ?></th> - <th><?=gettext("Bytes Sent"); ?></th> - <th><?=gettext("Bytes Received"); ?></th> + <th><?=gettext("Bytes Sent/Received"); ?></th> <th><?=gettext("Service"); ?></th> </tr> </thead> @@ -298,10 +306,16 @@ include("head.inc"); ?> <td><?=htmlspecialchars($client['name']);?></td> <td><?=$client['status'];?></td> <td><?=$client['connect_time'];?></td> - <td><?=$client['virtual_addr'];?></td> - <td><?=$client['remote_host'];?></td> - <td><?=format_bytes($client['bytes_sent']);?></td> - <td><?=format_bytes($client['bytes_recv']);?></td> + <td><?=$client['local_host'];?>:<?=$client['local_port'];?></td> + <td> + <?=$client['virtual_addr'];?> + <?php if (!empty($client['virtual_addr']) && !empty($client['virtual_addr6'])): ?> + <br /> + <?php endif; ?> + <?=$client['virtual_addr6'];?> + </td> + <td><?=$client['remote_host'];?>:<?=$client['remote_port'];?></td> + <td><?=format_bytes($client['bytes_sent']);?> / <?=format_bytes($client['bytes_recv']);?></td> <td> <table> <tr> |