mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
21f0b4c925
commit
f47bc46654
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
||||||
|
|
||||||
|
use Icinga\Logger\Logger;
|
||||||
use Zend_Db_Select;
|
use Zend_Db_Select;
|
||||||
|
|
||||||
class GroupSummaryQuery extends IdoQuery
|
class GroupSummaryQuery extends IdoQuery
|
||||||
@ -69,8 +70,15 @@ class GroupSummaryQuery extends IdoQuery
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$groupColumn = 'hostgroup';
|
||||||
|
|
||||||
|
if (in_array('servicegroup', $this->desiredColumns)) {
|
||||||
|
$groupColumn = 'servicegroup';
|
||||||
|
}
|
||||||
|
|
||||||
$union = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL);
|
$union = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL);
|
||||||
$this->select->from(array('statussummary' => $union), '*')->group($columns[0]);
|
$this->select->from(array('statussummary' => $union), array($groupColumn))->group(array($groupColumn));
|
||||||
|
|
||||||
$this->joinedVirtualTables = array(
|
$this->joinedVirtualTables = array(
|
||||||
'servicestatussummary' => true,
|
'servicestatussummary' => true,
|
||||||
'hoststatussummary' => true
|
'hoststatussummary' => true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user