diff options
author | Andrejs Verza <andrejs.verza@zabbix.com> | 2020-09-24 14:51:42 +0300 |
---|---|---|
committer | Andrejs Verza <andrejs.verza@zabbix.com> | 2020-09-24 14:51:42 +0300 |
commit | f00a79a6a75cb905884a07bf6a94e3d5fef1565f (patch) | |
tree | 3528e5668160d8aa675fde17848690b59d80eae3 /ui/app/controllers/CControllerHost.php | |
parent | 94ef326114180c23c4b58a0ce34f5252926bc949 (diff) |
..F....... [ZBXNEXT-6001] implemented host dashboard view
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) { |