Add monitor IP to API results. (#7646)

Co-authored-by: Herman Bonnes <herman@sentillia.com>
This commit is contained in:
b0nes 2024-07-25 13:22:09 +02:00 committed by GitHub
parent 95812e2786
commit ba49c8b65f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,6 +43,7 @@ foreach ((new \OPNsense\Routing\Gateways())->gatewaysIndexedByName() as $gname =
$gatewayItem['loss'] = $gateways_status[$gname]['loss'];
$gatewayItem['delay'] = $gateways_status[$gname]['delay'];
$gatewayItem['stddev'] = $gateways_status[$gname]['stddev'];
$gatewayItem['monitor'] = $gateways_status[$gname]['monitor'];
switch ($gatewayItem['status']) {
case 'none':
$gatewayItem['status_translated'] = gettext('Online');
@ -72,6 +73,7 @@ foreach ((new \OPNsense\Routing\Gateways())->gatewaysIndexedByName() as $gname =
$gatewayItem['loss'] = '~';
$gatewayItem['stddev'] = '~';
$gatewayItem['delay'] = '~';
$gatewayItem['monitor'] = '~';
}
$result[] = $gatewayItem;