CustomvarQuery: Add query column `instance_name'

refs #9943
This commit is contained in:
Johannes Meyer 2015-08-25 16:33:41 +02:00
parent 7916c149b9
commit edb83c8b41
1 changed files with 15 additions and 0 deletions

View File

@ -6,6 +6,9 @@ namespace Icinga\Module\Monitoring\Backend\Ido\Query;
class CustomvarQuery extends IdoQuery
{
protected $columnMap = array(
'instances' => array(
'instance_name' => 'i.instance_name'
),
'customvariablestatus' => array(
'varname' => 'cvs.varname',
'varvalue' => 'cvs.varvalue',
@ -55,6 +58,18 @@ class CustomvarQuery extends IdoQuery
);
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = cvs.instance_id',
array()
);
}
/**
* {@inheritdoc}
*/