Commit b78b8e5d authored by Ad Schellevis's avatar Ad Schellevis

(legacy) add number of active mobile users in ipsec.widget.php

parent c3135f5f
......@@ -114,7 +114,20 @@ if (isset($config['ipsec']['phase2'])) {
<tr>
<td><?= $activetunnels; ?></td>
<td><?= (count($ipsec_tunnels) - $activetunnels); ?></td>
<td>0 <!-- todo: add count mobile leases --></td>
<td>
<?php
// count active mobile users
$mobile_users = 0;
foreach ($ipsec_leases as $pool => $pool_details) {
foreach ($pool_details['items'] as $lease) {
if ($lease['status'] == 'online') {
++$mobile_users;
}
}
}
?>
<?=$mobile_users;?>
</td>
</tr>
</tbody>
</table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment