diff options
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/status_gateways.php | 6 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/gateways.widget.php | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index eca1eec..8ca69f6 100755 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -75,17 +75,17 @@ include("head.inc"); <td width="30%" class="listhdrr">Status</td> <td width="30%" class="listhdr">Description</td> </tr> - <?php foreach ($gateways_status as $gateway) { + <?php foreach ($gateways_status as $target => $gateway) { ?> <tr> <td class="listlr"> <?=strtoupper($gateway['name']);?> </td> <td class="listr" align="center" > - <?=$gateway['gateway'];?> + <?=$a_gateways[$gateway['name']['gateway'];?> </td> <td class="listr" align="center" > - <?=$gateway['monitor'];?> + <?=$target;?> </td> <td class="listr" > <table border="0" cellpadding="0" cellspacing="2"> diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index a9ba45f..c2f5645 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -30,6 +30,7 @@ require_once("guiconfig.inc"); require_once("pfsense-utils.inc"); require_once("functions.inc"); +$a_gateways = return_gateways_array(); $gateways_status = array(); $gateways_status = return_gateways_status(); @@ -44,9 +45,9 @@ $counter = 1; <td width="10%" class="listhdrr">Loss</td> <td width="30%" class="listhdrr">Status</td> </tr> - <?php foreach ($gateways_status as $gateway) { ?> + <?php foreach ($gateways_status as $target => $gateway) { ?> <?php - $monitor = $gateway['monitor']; + $monitor = $target; if(empty($monitor)) { $monitor = $gateway['gateway']; } @@ -57,15 +58,15 @@ $counter = 1; <?php $counter++; ?> </td> <td class="listr" align="center" id="gateway<?= $counter; ?>"> - <?=$gateway['gateway'];?> + <?=$a_gateways[$gateway['name']]['gateway'];?> <?php $counter++; ?> </td> <td class="listr" align="center" id="gateway<?= $counter; ?>"> - <?=$gateways_status[$monitor]['delay'];?> + <?=$gateway['delay'];?> <?php $counter++; ?> </td> <td class="listr" align="center" id="gateway<?= $counter; ?>"> - <?=$gateways_status[$monitor]['loss'];?> + <?=$gateway['loss'];?> <?php $counter++; ?> </td> <td class="listr" id=\"gateway<?=$counter?>\" > |