diff options
Diffstat (limited to 'ui/app/controllers/CControllerHost.php')
-rw-r--r-- | ui/app/controllers/CControllerHost.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php index f2e6fbc645b..f7ed03b47da 100644 --- a/ui/app/controllers/CControllerHost.php +++ b/ui/app/controllers/CControllerHost.php @@ -65,12 +65,14 @@ abstract class CControllerHost extends CController { * @return int */ protected function getCount(array $filter): int { + $groupids = $filter['groupids'] ? getSubGroups($filter['groupids']) : null; + return (int) API::Host()->get([ 'countOutput' => true, 'evaltype' => $filter['evaltype'], 'tags' => $filter['tags'], 'inheritedTags' => true, - 'groupids' => $filter['groupids'] ? getSubGroups($filter['groupids']) : null, + 'groupids' => $groupids, 'severities' => $filter['severities'] ? $filter['severities'] : null, 'withProblemsSuppressed' => $filter['severities'] ? (($filter['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE) ? null : false) @@ -114,12 +116,13 @@ abstract class CControllerHost extends CController { */ protected function getData(array $filter): array { $limit = CSettingsHelper::get(CSettingsHelper::SEARCH_LIMIT) + 1; + $groupids = $filter['groupids'] ? getSubGroups($filter['groupids']) : null; $hosts = API::Host()->get([ 'output' => ['hostid', 'name', 'status'], 'evaltype' => $filter['evaltype'], 'tags' => $filter['tags'], 'inheritedTags' => true, - 'groupids' => $filter['groupids'] ? getSubGroups($filter['groupids']) : null, + 'groupids' => $groupids, 'severities' => $filter['severities'] ? $filter['severities'] : null, 'withProblemsSuppressed' => $filter['severities'] ? (($filter['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE) ? null : false) |