Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Verza <andrejs.verza@zabbix.com>2020-09-24 14:51:42 +0300
committerAndrejs Verza <andrejs.verza@zabbix.com>2020-09-24 14:51:42 +0300
commitf00a79a6a75cb905884a07bf6a94e3d5fef1565f (patch)
tree3528e5668160d8aa675fde17848690b59d80eae3 /ui/app/controllers/CControllerHost.php
parent94ef326114180c23c4b58a0ce34f5252926bc949 (diff)
..F....... [ZBXNEXT-6001] implemented host dashboard view
Diffstat (limited to 'ui/app/controllers/CControllerHost.php')
-rw-r--r--ui/app/controllers/CControllerHost.php5
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) {