Hostservice...Query: Add query column `instance_name'

refs #9943
This commit is contained in:
Johannes Meyer 2015-08-25 16:38:54 +02:00
parent 94693fe3e7
commit 819d20f17a
1 changed files with 15 additions and 0 deletions

View File

@ -21,6 +21,9 @@ class HostserviceproblemsummaryQuery extends IdoQuery
* {@inheritdoc}
*/
protected $columnMap = array(
'instances' => array(
'instance_name' => 'i.instance_name'
),
'services' => array(
'host_name' => 'so.name1',
'service_description' => 'so.name2'
@ -76,6 +79,18 @@ class HostserviceproblemsummaryQuery extends IdoQuery
$this->joinedVirtualTables['services'] = true;
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = so.instance_id',
array()
);
}
/**
* Join host groups
*/