mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaHost: use inherited fields support
This commit is contained in:
parent
a61ab0f890
commit
3b7cf5a4d4
@ -43,6 +43,8 @@ class IcingaHost extends IcingaObject
|
|||||||
|
|
||||||
protected $supportsImports = true;
|
protected $supportsImports = true;
|
||||||
|
|
||||||
|
protected $supportsFields = true;
|
||||||
|
|
||||||
protected function renderCheck_command_id()
|
protected function renderCheck_command_id()
|
||||||
{
|
{
|
||||||
return $this->renderCommandProperty($this->check_command_id);
|
return $this->renderCommandProperty($this->check_command_id);
|
||||||
@ -82,22 +84,4 @@ class IcingaHost extends IcingaObject
|
|||||||
{
|
{
|
||||||
return $this->renderBooleanProperty('volatile');
|
return $this->renderBooleanProperty('volatile');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFields(DirectorObjectForm $form)
|
|
||||||
{
|
|
||||||
$db = $this->getDb();
|
|
||||||
|
|
||||||
$query = $db->select()
|
|
||||||
->from(
|
|
||||||
array('df' => 'director_datafield')
|
|
||||||
)
|
|
||||||
->join(
|
|
||||||
array('hf' => 'icinga_host_field'),
|
|
||||||
'df.id = hf.datafield_id'
|
|
||||||
)
|
|
||||||
->where('hf.host_id = ?', (int) $this->id)
|
|
||||||
->order('df.caption ASC');
|
|
||||||
|
|
||||||
return $db->fetchAll($query);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user