IcingaEndpointForm: allow to choose API users
This commit is contained in:
parent
08c3614620
commit
0da806cbf7
|
@ -49,6 +49,11 @@ class IcingaEndpointForm extends DirectorObjectForm
|
|||
'description' => $this->translate('The log duration time.')
|
||||
));
|
||||
|
||||
$this->addElement('select', 'apiuser_id', array(
|
||||
'label' => $this->translate('API user'),
|
||||
'multiOptions' => $this->optionalEnum($this->db->enumApiUsers())
|
||||
));
|
||||
|
||||
$this->addZoneElement()
|
||||
->addImportsElement();
|
||||
|
||||
|
|
|
@ -390,6 +390,11 @@ class Db extends DbConnection
|
|||
return $this->enumIcingaObjects('usergroup');
|
||||
}
|
||||
|
||||
public function enumApiUsers()
|
||||
{
|
||||
return $this->enumIcingaObjects('apiuser');
|
||||
}
|
||||
|
||||
public function enumSyncRule()
|
||||
{
|
||||
return $this->enum('sync_rule', array('id', 'rule_name'));
|
||||
|
|
Loading…
Reference in New Issue