mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Merge branch 'feature/offer-instance-name-as-query-column-9943'
resolves #9943
This commit is contained in:
commit
bce7bc1277
@ -25,7 +25,8 @@ class CommentQuery extends IdoQuery
|
|||||||
'comment_is_persistent' => 'c.comment_is_persistent',
|
'comment_is_persistent' => 'c.comment_is_persistent',
|
||||||
'comment_timestamp' => 'c.comment_timestamp',
|
'comment_timestamp' => 'c.comment_timestamp',
|
||||||
'comment_type' => 'c.comment_type',
|
'comment_type' => 'c.comment_type',
|
||||||
'object_type' => 'c.object_type'
|
'object_type' => 'c.object_type',
|
||||||
|
'instance_name' => 'c.instance_name'
|
||||||
),
|
),
|
||||||
'hosts' => array(
|
'hosts' => array(
|
||||||
'host_display_name' => 'c.host_display_name',
|
'host_display_name' => 'c.host_display_name',
|
||||||
|
@ -17,6 +17,9 @@ class ContactQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'contacts' => array(
|
'contacts' => array(
|
||||||
'contact_id' => 'c.contact_id',
|
'contact_id' => 'c.contact_id',
|
||||||
'contact' => 'co.name1 COLLATE latin1_general_ci',
|
'contact' => 'co.name1 COLLATE latin1_general_ci',
|
||||||
@ -183,6 +186,18 @@ class ContactQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = c.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class ContactgroupQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'contactgroups' => array(
|
'contactgroups' => array(
|
||||||
'contactgroup' => 'cgo.name1 COLLATE latin1_general_ci',
|
'contactgroup' => 'cgo.name1 COLLATE latin1_general_ci',
|
||||||
'contactgroup_name' => 'cgo.name1',
|
'contactgroup_name' => 'cgo.name1',
|
||||||
@ -187,6 +190,18 @@ class ContactgroupQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = cg.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -6,6 +6,9 @@ namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
|||||||
class CustomvarQuery extends IdoQuery
|
class CustomvarQuery extends IdoQuery
|
||||||
{
|
{
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'customvariablestatus' => array(
|
'customvariablestatus' => array(
|
||||||
'varname' => 'cvs.varname',
|
'varname' => 'cvs.varname',
|
||||||
'varvalue' => 'cvs.varvalue',
|
'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}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,8 @@ class DowntimeQuery extends IdoQuery
|
|||||||
'downtime_scheduled_end' => 'd.downtime_scheduled_end',
|
'downtime_scheduled_end' => 'd.downtime_scheduled_end',
|
||||||
'downtime_scheduled_start' => 'd.downtime_scheduled_start',
|
'downtime_scheduled_start' => 'd.downtime_scheduled_start',
|
||||||
'downtime_start' => 'd.downtime_start',
|
'downtime_start' => 'd.downtime_start',
|
||||||
'object_type' => 'd.object_type'
|
'object_type' => 'd.object_type',
|
||||||
|
'instance_name' => 'd.instance_name'
|
||||||
),
|
),
|
||||||
'hosts' => array(
|
'hosts' => array(
|
||||||
'host_display_name' => 'd.host_display_name',
|
'host_display_name' => 'd.host_display_name',
|
||||||
|
@ -17,6 +17,9 @@ class HostcommentQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'comments' => array(
|
'comments' => array(
|
||||||
'comment_author' => 'c.author_name COLLATE latin1_general_ci',
|
'comment_author' => 'c.author_name COLLATE latin1_general_ci',
|
||||||
'comment_author_name' => 'c.author_name',
|
'comment_author_name' => 'c.author_name',
|
||||||
@ -151,6 +154,18 @@ class HostcommentQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = c.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class HostcommenthistoryQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'commenthistory' => array(
|
'commenthistory' => array(
|
||||||
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'ho.name1',
|
'host_name' => 'ho.name1',
|
||||||
@ -149,6 +152,18 @@ class HostcommenthistoryQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = hch.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class HostdowntimeQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'downtimes' => array(
|
'downtimes' => array(
|
||||||
'downtime_author' => 'sd.author_name COLLATE latin1_general_ci',
|
'downtime_author' => 'sd.author_name COLLATE latin1_general_ci',
|
||||||
'downtime_author_name' => 'sd.author_name',
|
'downtime_author_name' => 'sd.author_name',
|
||||||
@ -157,6 +160,18 @@ class HostdowntimeQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = sd.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'downtimehistory' => array(
|
'downtimehistory' => array(
|
||||||
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'ho.name1',
|
'host_name' => 'ho.name1',
|
||||||
@ -158,6 +161,18 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = hdh.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class HostgroupQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
||||||
@ -126,6 +129,18 @@ class HostgroupQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = hg.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class HostnotificationQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'notifications' => array(
|
'notifications' => array(
|
||||||
'notification_output' => 'hn.output',
|
'notification_output' => 'hn.output',
|
||||||
'notification_start_time' => 'UNIX_TIMESTAMP(hn.start_time)',
|
'notification_start_time' => 'UNIX_TIMESTAMP(hn.start_time)',
|
||||||
@ -224,6 +227,18 @@ class HostnotificationQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = hn.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -21,6 +21,9 @@ class HostserviceproblemsummaryQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'services' => array(
|
'services' => array(
|
||||||
'host_name' => 'so.name1',
|
'host_name' => 'so.name1',
|
||||||
'service_description' => 'so.name2'
|
'service_description' => 'so.name2'
|
||||||
@ -76,6 +79,18 @@ class HostserviceproblemsummaryQuery extends IdoQuery
|
|||||||
$this->joinedVirtualTables['services'] = true;
|
$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
|
* Join host groups
|
||||||
*/
|
*/
|
||||||
|
@ -27,6 +27,9 @@ class HoststatehistoryQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'statehistory' => array(
|
'statehistory' => array(
|
||||||
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
'host' => 'ho.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'ho.name1',
|
'host_name' => 'ho.name1',
|
||||||
@ -165,6 +168,18 @@ class HoststatehistoryQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = hh.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -16,6 +16,9 @@ class HoststatusQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
||||||
@ -237,6 +240,18 @@ class HoststatusQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = ho.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -26,7 +26,8 @@ class NotificationQuery extends IdoQuery
|
|||||||
'acknowledgement_entry_time' => 'n.acknowledgement_entry_time',
|
'acknowledgement_entry_time' => 'n.acknowledgement_entry_time',
|
||||||
'acknowledgement_author_name' => 'n.acknowledgement_author_name',
|
'acknowledgement_author_name' => 'n.acknowledgement_author_name',
|
||||||
'acknowledgement_comment_data' => 'n.acknowledgement_comment_data',
|
'acknowledgement_comment_data' => 'n.acknowledgement_comment_data',
|
||||||
'object_type' => 'n.object_type'
|
'object_type' => 'n.object_type',
|
||||||
|
'instance_name' => 'n.instance_name'
|
||||||
),
|
),
|
||||||
'history' => array(
|
'history' => array(
|
||||||
'type' => 'n.type',
|
'type' => 'n.type',
|
||||||
|
@ -17,6 +17,9 @@ class ServicecommentQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'comments' => array(
|
'comments' => array(
|
||||||
'comment_author' => 'c.author_name COLLATE latin1_general_ci',
|
'comment_author' => 'c.author_name COLLATE latin1_general_ci',
|
||||||
'comment_author_name' => 'c.author_name',
|
'comment_author_name' => 'c.author_name',
|
||||||
@ -165,6 +168,18 @@ class ServicecommentQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = c.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class ServicecommenthistoryQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'commenthistory' => array(
|
'commenthistory' => array(
|
||||||
'host' => 'so.name1 COLLATE latin1_general_ci',
|
'host' => 'so.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'so.name1',
|
'host_name' => 'so.name1',
|
||||||
@ -147,6 +150,18 @@ class ServicecommenthistoryQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = sch.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class ServicedowntimeQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'downtimes' => array(
|
'downtimes' => array(
|
||||||
'downtime_author' => 'sd.author_name COLLATE latin1_general_ci',
|
'downtime_author' => 'sd.author_name COLLATE latin1_general_ci',
|
||||||
'downtime_author_name' => 'sd.author_name',
|
'downtime_author_name' => 'sd.author_name',
|
||||||
@ -171,6 +174,18 @@ class ServicedowntimeQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = sd.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'downtimehistory' => array(
|
'downtimehistory' => array(
|
||||||
'host' => 'so.name1 COLLATE latin1_general_ci',
|
'host' => 'so.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'so.name1',
|
'host_name' => 'so.name1',
|
||||||
@ -156,6 +159,18 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = sdh.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -14,6 +14,9 @@ class ServicegroupQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
||||||
@ -118,6 +121,18 @@ class ServicegroupQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = sg.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,9 @@ class ServicenotificationQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'notifications' => array(
|
'notifications' => array(
|
||||||
'notification_output' => 'sn.output',
|
'notification_output' => 'sn.output',
|
||||||
'notification_start_time' => 'UNIX_TIMESTAMP(sn.start_time)',
|
'notification_start_time' => 'UNIX_TIMESTAMP(sn.start_time)',
|
||||||
@ -222,6 +225,18 @@ class ServicenotificationQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = sn.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -27,6 +27,9 @@ class ServicestatehistoryQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'statehistory' => array(
|
'statehistory' => array(
|
||||||
'host' => 'so.name1 COLLATE latin1_general_ci',
|
'host' => 'so.name1 COLLATE latin1_general_ci',
|
||||||
'host_name' => 'so.name1',
|
'host_name' => 'so.name1',
|
||||||
@ -163,6 +166,18 @@ class ServicestatehistoryQuery extends IdoQuery
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join instances
|
||||||
|
*/
|
||||||
|
protected function joinInstances()
|
||||||
|
{
|
||||||
|
$this->select->join(
|
||||||
|
array('i' => $this->prefix . 'instances'),
|
||||||
|
'i.instance_id = sh.instance_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -19,6 +19,9 @@ class ServicestatusQuery extends IdoQuery
|
|||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
||||||
@ -280,6 +283,18 @@ class ServicestatusQuery extends IdoQuery
|
|||||||
$this->joinedVirtualTables['services'] = true;
|
$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
|
* Join host groups
|
||||||
*/
|
*/
|
||||||
|
@ -62,6 +62,7 @@ class Controller extends IcingaWebController
|
|||||||
{
|
{
|
||||||
$restrictions = Filter::matchAny();
|
$restrictions = Filter::matchAny();
|
||||||
$restrictions->setAllowedFilterColumns(array(
|
$restrictions->setAllowedFilterColumns(array(
|
||||||
|
'instance_name',
|
||||||
'host_name',
|
'host_name',
|
||||||
'hostgroup_name',
|
'hostgroup_name',
|
||||||
'service_description',
|
'service_description',
|
||||||
@ -85,6 +86,7 @@ class Controller extends IcingaWebController
|
|||||||
$restriction,
|
$restriction,
|
||||||
$filter,
|
$filter,
|
||||||
implode(', ', array(
|
implode(', ', array(
|
||||||
|
'instance_name',
|
||||||
'host_name',
|
'host_name',
|
||||||
'hostgroup_name',
|
'hostgroup_name',
|
||||||
'service_description',
|
'service_description',
|
||||||
|
@ -14,6 +14,7 @@ class Comment extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'comment_author_name',
|
'comment_author_name',
|
||||||
'comment_data',
|
'comment_data',
|
||||||
'comment_expiration',
|
'comment_expiration',
|
||||||
|
@ -11,6 +11,7 @@ class Contact extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'contact_object_id',
|
'contact_object_id',
|
||||||
'contact_id',
|
'contact_id',
|
||||||
'contact_name',
|
'contact_name',
|
||||||
|
@ -11,6 +11,7 @@ class Contactgroup extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'contactgroup_name',
|
'contactgroup_name',
|
||||||
'contactgroup_alias',
|
'contactgroup_alias',
|
||||||
'contact_object_id',
|
'contact_object_id',
|
||||||
|
@ -14,6 +14,7 @@ class Downtime extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'downtime_author_name',
|
'downtime_author_name',
|
||||||
'downtime_comment',
|
'downtime_comment',
|
||||||
'downtime_duration',
|
'downtime_duration',
|
||||||
|
@ -50,6 +50,7 @@ class Eventgrid extends DataView
|
|||||||
public function getStaticFilterColumns()
|
public function getStaticFilterColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'host', 'host_alias',
|
'host', 'host_alias',
|
||||||
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
||||||
'service', 'service_host_name',
|
'service', 'service_host_name',
|
||||||
|
@ -11,6 +11,7 @@ class EventHistory extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'cnt_notification',
|
'cnt_notification',
|
||||||
'cnt_hard_state',
|
'cnt_hard_state',
|
||||||
'cnt_soft_state',
|
'cnt_soft_state',
|
||||||
|
@ -14,6 +14,7 @@ class Hostgroup extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'hostgroup_alias',
|
'hostgroup_alias',
|
||||||
'hostgroup_name'
|
'hostgroup_name'
|
||||||
);
|
);
|
||||||
|
@ -47,6 +47,7 @@ class Hostgroupsummary extends DataView
|
|||||||
public function getStaticFilterColumns()
|
public function getStaticFilterColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'hosts_severity',
|
'hosts_severity',
|
||||||
'host', 'host_alias', 'host_display_name', 'host_name',
|
'host', 'host_alias', 'host_display_name', 'host_name',
|
||||||
'hostgroup',
|
'hostgroup',
|
||||||
|
@ -11,6 +11,7 @@ class HostStatus extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'host_name',
|
'host_name',
|
||||||
'host_display_name',
|
'host_display_name',
|
||||||
'host_alias',
|
'host_alias',
|
||||||
|
@ -30,6 +30,7 @@ class Hoststatussummary extends DataView
|
|||||||
public function getStaticFilterColumns()
|
public function getStaticFilterColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'host', 'host_alias', 'host_display_name', 'host_name',
|
'host', 'host_alias', 'host_display_name', 'host_name',
|
||||||
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
||||||
'service', 'service_description', 'service_display_name',
|
'service', 'service_description', 'service_display_name',
|
||||||
|
@ -11,6 +11,7 @@ class Notification extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'notification_state',
|
'notification_state',
|
||||||
'notification_start_time',
|
'notification_start_time',
|
||||||
'notification_contact_name',
|
'notification_contact_name',
|
||||||
|
@ -11,6 +11,7 @@ class Servicegroup extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'servicegroup_alias',
|
'servicegroup_alias',
|
||||||
'servicegroup_name'
|
'servicegroup_name'
|
||||||
);
|
);
|
||||||
|
@ -42,6 +42,7 @@ class Servicegroupsummary extends DataView
|
|||||||
public function getStaticFilterColumns()
|
public function getStaticFilterColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'services_severity',
|
'services_severity',
|
||||||
'host', 'host_alias', 'host_display_name', 'host_name',
|
'host', 'host_alias', 'host_display_name', 'host_name',
|
||||||
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
||||||
|
@ -11,6 +11,7 @@ class ServiceStatus extends DataView
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'host_name',
|
'host_name',
|
||||||
'host_display_name',
|
'host_display_name',
|
||||||
'host_state',
|
'host_state',
|
||||||
|
@ -35,6 +35,7 @@ class Servicestatussummary extends DataView
|
|||||||
public function getStaticFilterColumns()
|
public function getStaticFilterColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'host', 'host_alias', 'host_display_name', 'host_name',
|
'host', 'host_alias', 'host_display_name', 'host_name',
|
||||||
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
||||||
'service', 'service_description', 'service_display_name',
|
'service', 'service_description', 'service_display_name',
|
||||||
|
@ -101,6 +101,7 @@ class StatusSummary extends DataView
|
|||||||
public function getStaticFilterColumns()
|
public function getStaticFilterColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'instance_name',
|
||||||
'host', 'host_alias', 'host_display_name', 'host_name',
|
'host', 'host_alias', 'host_display_name', 'host_name',
|
||||||
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
||||||
'service', 'service_description', 'service_display_name',
|
'service', 'service_description', 'service_display_name',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user