2015-04-24 14:26:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Forms;
|
|
|
|
|
|
|
|
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
|
|
|
|
|
|
|
|
class IcingaCommandForm extends DirectorObjectForm
|
|
|
|
{
|
|
|
|
public function setup()
|
|
|
|
{
|
|
|
|
$this->addElement('select', 'methods_execute', array(
|
|
|
|
'label' => $this->translate('Command type'),
|
|
|
|
'description' => $this->translate('Whether this should be a template'),
|
|
|
|
'multiOptions' => array(
|
|
|
|
null => '- please choose -',
|
|
|
|
'PluginCheck' => 'Plugin Check Command',
|
|
|
|
'PluginNotification' => 'Notification Plugin Command',
|
2015-06-11 22:01:51 +02:00
|
|
|
'PluginEvent' => 'Event Plugin Command',
|
2015-04-24 14:26:44 +02:00
|
|
|
'IcingaCheck' => 'Icinga Check Command',
|
|
|
|
'ClusterCheck' => 'Icinga Cluster Command',
|
2015-06-11 22:01:51 +02:00
|
|
|
'RandomCheck' => 'Random Check Command',
|
2015-04-24 14:26:44 +02:00
|
|
|
'ClusterZoneCheck' => 'Icinga Cluster Zone Check Command',
|
|
|
|
'CrlCheck' => 'Crl Check Command',
|
|
|
|
),
|
|
|
|
'class' => 'autosubmit'
|
|
|
|
));
|
|
|
|
|
|
|
|
$this->addElement('text', 'object_name', array(
|
|
|
|
'label' => $this->translate('Command name'),
|
|
|
|
'required' => true,
|
|
|
|
'description' => $this->translate('Identifier for the Icinga command you are going to create')
|
|
|
|
));
|
|
|
|
|
|
|
|
$this->addElement('text', 'timeout', array(
|
|
|
|
'label' => $this->translate('Timeout'),
|
|
|
|
'description' => $this->translate('Optional command timeout')
|
|
|
|
));
|
|
|
|
|
2015-08-02 13:27:35 +02:00
|
|
|
$this->addImportsElement();
|
2015-04-24 14:26:44 +02:00
|
|
|
}
|
|
|
|
}
|