]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: List only reachable/unreachable clients in clients endpoint
authorMarcin Haba <marcin.haba@bacula.pl>
Fri, 8 Dec 2023 13:57:21 +0000 (14:57 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 18 Jan 2024 09:22:37 +0000 (10:22 +0100)
gui/baculum/protected/API/Pages/API/Clients.php

index 829ff0863a55b54b4e90d15ca7d0a100b12f5e5e..556cd3599fc9275c8211facb7dfad038fec9da0b 100644 (file)
@@ -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