mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
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->addTitleTab('hostgroups', $this->translate('Host Groups'), $this->translate('List host groups'));
|
||||||
$this->setAutorefreshInterval(12);
|
$this->setAutorefreshInterval(12);
|
||||||
$query = $this->backend->select()->from('groupsummary', array(
|
$query = $this->backend->select()->from('groupsummary', array(
|
||||||
'hostgroup',
|
'hostgroup_name',
|
||||||
'hostgroup_alias',
|
'hostgroup_alias',
|
||||||
'hosts_up',
|
'hosts_up',
|
||||||
'hosts_unreachable_handled',
|
'hosts_unreachable_handled',
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($hostgroups as $h): ?>
|
<?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): ?>
|
<?php if ($h->services_critical_last_state_change_unhandled): ?>
|
||||||
<td class="state change critical unhandled">
|
<td class="state change critical unhandled">
|
||||||
<strong><?= $this->translate('CRITICAL'); ?></strong>
|
<strong><?= $this->translate('CRITICAL'); ?></strong>
|
||||||
@ -82,7 +82,7 @@
|
|||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$h->hostgroup_alias,
|
$h->hostgroup_alias,
|
||||||
'monitoring/list/hosts',
|
'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))
|
array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $h->hostgroup_alias))
|
||||||
); ?>
|
); ?>
|
||||||
</td>
|
</td>
|
||||||
@ -90,7 +90,7 @@
|
|||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$h->services_total,
|
$h->services_total,
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('hostgroup_name' => $h->hostgroup),
|
array('hostgroup_name' => $h->hostgroup_name),
|
||||||
array('title' => sprintf(
|
array('title' => sprintf(
|
||||||
$this->translate('List all services of all hosts in host group "%s"'),
|
$this->translate('List all services of all hosts in host group "%s"'),
|
||||||
$h->hostgroup_alias
|
$h->hostgroup_alias
|
||||||
@ -105,7 +105,7 @@
|
|||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array(
|
array(
|
||||||
'service_state' => 0,
|
'service_state' => 0,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -132,7 +132,7 @@
|
|||||||
'service_acknowledged' => 0,
|
'service_acknowledged' => 0,
|
||||||
'service_in_downtime' => 0,
|
'service_in_downtime' => 0,
|
||||||
'host_problem' => 0,
|
'host_problem' => 0,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -156,7 +156,7 @@
|
|||||||
array(
|
array(
|
||||||
'service_state' => 2,
|
'service_state' => 2,
|
||||||
'service_handled' => 1,
|
'service_handled' => 1,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -186,7 +186,7 @@
|
|||||||
'service_acknowledged' => 0,
|
'service_acknowledged' => 0,
|
||||||
'service_in_downtime' => 0,
|
'service_in_downtime' => 0,
|
||||||
'host_problem' => 0,
|
'host_problem' => 0,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -210,7 +210,7 @@
|
|||||||
array(
|
array(
|
||||||
'service_state' => 3,
|
'service_state' => 3,
|
||||||
'service_handled' => 1,
|
'service_handled' => 1,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -240,7 +240,7 @@
|
|||||||
'service_acknowledged' => 0,
|
'service_acknowledged' => 0,
|
||||||
'service_in_downtime' => 0,
|
'service_in_downtime' => 0,
|
||||||
'host_problem' => 0,
|
'host_problem' => 0,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -264,7 +264,7 @@
|
|||||||
array(
|
array(
|
||||||
'service_state' => 1,
|
'service_state' => 1,
|
||||||
'service_handled' => 1,
|
'service_handled' => 1,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -291,7 +291,7 @@
|
|||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array(
|
array(
|
||||||
'service_state' => 99,
|
'service_state' => 99,
|
||||||
'hostgroup_name' => $h->hostgroup,
|
'hostgroup_name' => $h->hostgroup_name,
|
||||||
'sort' => 'service_severity'
|
'sort' => 'service_severity'
|
||||||
),
|
),
|
||||||
array(
|
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_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_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)',
|
'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'
|
'hostgroup_alias' => 'hostgroup_alias'
|
||||||
),
|
),
|
||||||
'servicestatussummary' => array(
|
'servicestatussummary' => array(
|
||||||
@ -61,9 +61,9 @@ class GroupSummaryQuery extends IdoQuery
|
|||||||
$columns[] = 'servicegroup_alias';
|
$columns[] = 'servicegroup_alias';
|
||||||
$groupColumns = array('servicegroup', 'servicegroup_alias');
|
$groupColumns = array('servicegroup', 'servicegroup_alias');
|
||||||
} else {
|
} else {
|
||||||
$columns[] = 'hostgroup';
|
$columns[] = 'hostgroup_name';
|
||||||
$columns[] = 'hostgroup_alias';
|
$columns[] = 'hostgroup_alias';
|
||||||
$groupColumns = array('hostgroup', 'hostgroup_alias');
|
$groupColumns = array('hostgroup_name', 'hostgroup_alias');
|
||||||
}
|
}
|
||||||
$hosts = $this->createSubQuery(
|
$hosts = $this->createSubQuery(
|
||||||
'Hoststatus',
|
'Hoststatus',
|
||||||
|
@ -83,7 +83,7 @@ class HoststatusQuery extends IdoQuery
|
|||||||
END'
|
END'
|
||||||
),
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup_name' => 'hgo.name1',
|
||||||
'hostgroup_alias' => 'hg.alias'
|
'hostgroup_alias' => 'hg.alias'
|
||||||
),
|
),
|
||||||
'servicegroups' => array(
|
'servicegroups' => array(
|
||||||
|
@ -15,7 +15,7 @@ class Groupsummary extends DataView
|
|||||||
return array(
|
return array(
|
||||||
'servicegroup',
|
'servicegroup',
|
||||||
'servicegroup_alias',
|
'servicegroup_alias',
|
||||||
'hostgroup',
|
'hostgroup_name',
|
||||||
'hostgroup_alias',
|
'hostgroup_alias',
|
||||||
'hosts_up',
|
'hosts_up',
|
||||||
'hosts_unreachable',
|
'hosts_unreachable',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user