parent
02eee7a603
commit
d0f11e10f6
|
@ -26,8 +26,8 @@ class HoststatusQuery extends IdoQuery
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
protected $columnMap = array(
|
protected $columnMap = array(
|
||||||
'instances' => array(
|
'checktimeperiods' => array(
|
||||||
'instance_name' => 'i.instance_name'
|
'host_check_timeperiod' => 'ctp.alias COLLATE latin1_general_ci'
|
||||||
),
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
|
@ -158,6 +158,9 @@ class HoststatusQuery extends IdoQuery
|
||||||
'host_status_update_time' => 'hs.status_update_time',
|
'host_status_update_time' => 'hs.status_update_time',
|
||||||
'host_unhandled' => 'CASE WHEN (hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth) = 0 THEN 1 ELSE 0 END'
|
'host_unhandled' => 'CASE WHEN (hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth) = 0 THEN 1 ELSE 0 END'
|
||||||
),
|
),
|
||||||
|
'instances' => array(
|
||||||
|
'instance_name' => 'i.instance_name'
|
||||||
|
),
|
||||||
'servicegroups' => array(
|
'servicegroups' => array(
|
||||||
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
||||||
'servicegroup_name' => 'sgo.name1',
|
'servicegroup_name' => 'sgo.name1',
|
||||||
|
@ -167,9 +170,6 @@ class HoststatusQuery extends IdoQuery
|
||||||
'service' => 'so.name2 COLLATE latin1_general_ci',
|
'service' => 'so.name2 COLLATE latin1_general_ci',
|
||||||
'service_description' => 'so.name2',
|
'service_description' => 'so.name2',
|
||||||
'service_display_name' => 's.display_name COLLATE latin1_general_ci',
|
'service_display_name' => 's.display_name COLLATE latin1_general_ci',
|
||||||
),
|
|
||||||
'checktimeperiods' => array(
|
|
||||||
'host_check_timeperiod' => 'ctp.alias COLLATE latin1_general_ci'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -197,6 +197,18 @@ class HoststatusQuery extends IdoQuery
|
||||||
$this->joinedVirtualTables['hosts'] = true;
|
$this->joinedVirtualTables['hosts'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join check time periods
|
||||||
|
*/
|
||||||
|
protected function joinChecktimeperiods()
|
||||||
|
{
|
||||||
|
$this->select->joinLeft(
|
||||||
|
array('ctp' => $this->prefix . 'timeperiods'),
|
||||||
|
'ctp.timeperiod_object_id = h.check_timeperiod_object_id',
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Join host groups
|
* Join host groups
|
||||||
*/
|
*/
|
||||||
|
@ -229,6 +241,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()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Join service groups
|
* Join service groups
|
||||||
*/
|
*/
|
||||||
|
@ -267,27 +291,6 @@ class HoststatusQuery extends IdoQuery
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Join instances
|
|
||||||
*/
|
|
||||||
protected function joinInstances()
|
|
||||||
{
|
|
||||||
$this->select->join(
|
|
||||||
array('i' => $this->prefix . 'instances'),
|
|
||||||
'i.instance_id = ho.instance_id',
|
|
||||||
array()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function joinChecktimeperiods()
|
|
||||||
{
|
|
||||||
$this->select->joinLeft(
|
|
||||||
array('ctp' => $this->prefix . 'timeperiods'),
|
|
||||||
'ctp.timeperiod_object_id = h.check_timeperiod_object_id',
|
|
||||||
array()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query the service problem summary for all hosts of this query's result set
|
* Query the service problem summary for all hosts of this query's result set
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue