diff options
Diffstat (limited to 'ui/app/controllers/CControllerHost.php')
-rw-r--r-- | ui/app/controllers/CControllerHost.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php index 1d0ce50282c..2d997030e8b 100644 --- a/ui/app/controllers/CControllerHost.php +++ b/ui/app/controllers/CControllerHost.php @@ -51,6 +51,7 @@ abstract class CControllerHost extends CController { // Multiselect host groups. $multiselect_hostgroup_data = []; + if ($filter['groupids']) { $groups = API::HostGroup()->get([ 'output' => ['groupid', 'name'], @@ -129,7 +130,6 @@ abstract class CControllerHost extends CController { ], 'selectInterfaces' => ['ip', 'dns', 'port', 'main', 'type', 'useip'], 'selectGraphs' => API_OUTPUT_COUNT, - 'selectScreens' => API_OUTPUT_COUNT, 'selectHttpTests' => API_OUTPUT_COUNT, 'selectTags' => ['tag', 'value'], 'selectInheritedTags' => ['tag', 'value'], @@ -168,6 +168,9 @@ abstract class CControllerHost extends CController { } foreach ($hosts as &$host) { + // Count number of dashboards for each host. + $host['dashboards'] = count(getHostDashboards($host['hostid'])); + CArrayHelper::sort($host['interfaces'], [['field' => 'main', 'order' => ZBX_SORT_DOWN]]); if ($host['status'] == HOST_STATUS_MONITORED && $host['maintenance_status'] == HOST_MAINTENANCE_STATUS_ON) { |