Hostgroups: Use query column `hostgroup_name' instead of `hostgroup'
refs #8613
This commit is contained in:
parent
e7c1e552a5
commit
c59d5ac7d5
|
@ -559,7 +559,7 @@ class Monitoring_ListController extends Controller
|
|||
$this->addTitleTab('hostgroups', $this->translate('Host Groups'), $this->translate('List host groups'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'hostgroup',
|
||||
'hostgroup_name',
|
||||
'hostgroup_alias',
|
||||
'hosts_up',
|
||||
'hosts_unreachable_handled',
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($hostgroups as $h): ?>
|
||||
<tr href="<?= $this->href('monitoring/list/hosts', array('hostgroup_name' => $h->hostgroup)) ?>">
|
||||
<tr href="<?= $this->href('monitoring/list/hosts', array('hostgroup_name' => $h->hostgroup_name)) ?>">
|
||||
<?php if ($h->services_critical_last_state_change_unhandled): ?>
|
||||
<td class="state change critical unhandled">
|
||||
<strong><?= $this->translate('CRITICAL'); ?></strong>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<?= $this->qlink(
|
||||
$h->hostgroup_alias,
|
||||
'monitoring/list/hosts',
|
||||
array('hostgroup_name' => $h->hostgroup),
|
||||
array('hostgroup_name' => $h->hostgroup_name),
|
||||
array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $h->hostgroup_alias))
|
||||
); ?>
|
||||
</td>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<?= $this->qlink(
|
||||
$h->services_total,
|
||||
'monitoring/list/services',
|
||||
array('hostgroup_name' => $h->hostgroup),
|
||||
array('hostgroup_name' => $h->hostgroup_name),
|
||||
array('title' => sprintf(
|
||||
$this->translate('List all services of all hosts in host group "%s"'),
|
||||
$h->hostgroup_alias
|
||||
|
@ -105,7 +105,7 @@
|
|||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 0,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
@ -132,7 +132,7 @@
|
|||
'service_acknowledged' => 0,
|
||||
'service_in_downtime' => 0,
|
||||
'host_problem' => 0,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
@ -156,7 +156,7 @@
|
|||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 1,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
@ -186,7 +186,7 @@
|
|||
'service_acknowledged' => 0,
|
||||
'service_in_downtime' => 0,
|
||||
'host_problem' => 0,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
@ -210,7 +210,7 @@
|
|||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 1,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
@ -240,7 +240,7 @@
|
|||
'service_acknowledged' => 0,
|
||||
'service_in_downtime' => 0,
|
||||
'host_problem' => 0,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
@ -264,7 +264,7 @@
|
|||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
@ -291,7 +291,7 @@
|
|||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 99,
|
||||
'hostgroup_name' => $h->hostgroup,
|
||||
'hostgroup_name' => $h->hostgroup_name,
|
||||
'sort' => 'service_severity'
|
||||
),
|
||||
array(
|
||||
|
|
|
@ -19,7 +19,7 @@ class GroupSummaryQuery extends IdoQuery
|
|||
'hosts_down_handled' => 'SUM(CASE WHEN object_type = \'host\' AND state = 1 AND acknowledged + in_downtime != 0 THEN 1 ELSE 0 END)',
|
||||
'hosts_down_unhandled' => 'SUM(CASE WHEN object_type = \'host\' AND state = 1 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
|
||||
'hosts_pending' => 'SUM(CASE WHEN object_type = \'host\' AND state = 99 THEN 1 ELSE 0 END)',
|
||||
'hostgroup' => 'hostgroup',
|
||||
'hostgroup_name' => 'hostgroup_name',
|
||||
'hostgroup_alias' => 'hostgroup_alias'
|
||||
),
|
||||
'servicestatussummary' => array(
|
||||
|
@ -61,9 +61,9 @@ class GroupSummaryQuery extends IdoQuery
|
|||
$columns[] = 'servicegroup_alias';
|
||||
$groupColumns = array('servicegroup', 'servicegroup_alias');
|
||||
} else {
|
||||
$columns[] = 'hostgroup';
|
||||
$columns[] = 'hostgroup_name';
|
||||
$columns[] = 'hostgroup_alias';
|
||||
$groupColumns = array('hostgroup', 'hostgroup_alias');
|
||||
$groupColumns = array('hostgroup_name', 'hostgroup_alias');
|
||||
}
|
||||
$hosts = $this->createSubQuery(
|
||||
'Hoststatus',
|
||||
|
|
|
@ -83,7 +83,7 @@ class HoststatusQuery extends IdoQuery
|
|||
END'
|
||||
),
|
||||
'hostgroups' => array(
|
||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||
'hostgroup_name' => 'hgo.name1',
|
||||
'hostgroup_alias' => 'hg.alias'
|
||||
),
|
||||
'servicegroups' => array(
|
||||
|
|
|
@ -15,7 +15,7 @@ class Groupsummary extends DataView
|
|||
return array(
|
||||
'servicegroup',
|
||||
'servicegroup_alias',
|
||||
'hostgroup',
|
||||
'hostgroup_name',
|
||||
'hostgroup_alias',
|
||||
'hosts_up',
|
||||
'hosts_unreachable',
|
||||
|
|
Loading…
Reference in New Issue