From: Marcin Haba Date: Fri, 8 Dec 2023 13:57:21 +0000 (+0100) Subject: baculum: List only reachable/unreachable clients in clients endpoint X-Git-Tag: Beta-15.0.1~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be8d9c1f578264f649c493355541707d31a8446b;p=thirdparty%2Fbacula.git baculum: List only reachable/unreachable clients in clients endpoint --- diff --git a/gui/baculum/protected/API/Pages/API/Clients.php b/gui/baculum/protected/API/Pages/API/Clients.php index 829ff0863..556cd3599 100644 --- a/gui/baculum/protected/API/Pages/API/Clients.php +++ b/gui/baculum/protected/API/Pages/API/Clients.php @@ -167,6 +167,13 @@ class Clients extends BaculumAPIServer { $jobs, $mode ); + + if ($type === ClientManager::CLIENT_TYPE_REACHABLE) { + $clients_unreached['clients'] = []; + } elseif ($type === ClientManager::CLIENT_TYPE_UNREACHABLE) { + $clients_reached['clients'] = []; + } + $clients = [ 'reachable' => $clients_reached, 'unreachable' => $clients_unreached