Db: Add enumHostTemplates and enumServiceTemplates
This commit is contained in:
parent
2a4a8d2fdc
commit
e89a568fc3
|
@ -234,6 +234,15 @@ class Db extends DbConnection
|
||||||
return $this->db()->fetchPairs($select);
|
return $this->db()->fetchPairs($select);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function enumHostTemplates()
|
||||||
|
{
|
||||||
|
$select = $this->db()->select()->from('icinga_host', array(
|
||||||
|
'id',
|
||||||
|
'object_name',
|
||||||
|
))->where('object_type = ?', 'template')->order('object_name ASC');
|
||||||
|
return $this->db()->fetchPairs($select);
|
||||||
|
}
|
||||||
|
|
||||||
public function enumSyncRule()
|
public function enumSyncRule()
|
||||||
{
|
{
|
||||||
$select = $this->db()->select()->from('sync_rule', array(
|
$select = $this->db()->select()->from('sync_rule', array(
|
||||||
|
@ -262,6 +271,15 @@ class Db extends DbConnection
|
||||||
return $this->db()->fetchPairs($select);
|
return $this->db()->fetchPairs($select);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function enumServiceTemplates()
|
||||||
|
{
|
||||||
|
$select = $this->db()->select()->from('icinga_service', array(
|
||||||
|
'id',
|
||||||
|
'object_name',
|
||||||
|
))->where('object_type = ?', 'template')->order('object_name ASC');
|
||||||
|
return $this->db()->fetchPairs($select);
|
||||||
|
}
|
||||||
|
|
||||||
public function enumServicegroups()
|
public function enumServicegroups()
|
||||||
{
|
{
|
||||||
$select = $this->db()->select()->from('icinga_servicegroup', array(
|
$select = $this->db()->select()->from('icinga_servicegroup', array(
|
||||||
|
@ -298,6 +316,16 @@ class Db extends DbConnection
|
||||||
return $this->db()->fetchPairs($select);
|
return $this->db()->fetchPairs($select);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function enumDatafields()
|
||||||
|
{
|
||||||
|
$select = $this->db()->select()->from('director_datafield', array(
|
||||||
|
'id',
|
||||||
|
'varname',
|
||||||
|
'caption',
|
||||||
|
))->order('varname ASC');
|
||||||
|
return $this->db()->fetchPairs($select);
|
||||||
|
}
|
||||||
|
|
||||||
public function enumUsergroups()
|
public function enumUsergroups()
|
||||||
{
|
{
|
||||||
$select = $this->db()->select()->from('icinga_usergroup', array(
|
$select = $this->db()->select()->from('icinga_usergroup', array(
|
||||||
|
|
Loading…
Reference in New Issue