icingaweb2-module-director/application/forms/IcingaServiceForm.php

43 lines
1.2 KiB
PHP
Raw Normal View History

<?php
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
class IcingaServiceForm extends DirectorObjectForm
{
public function setup()
{
2016-02-17 21:58:28 +01:00
$this->addObjectTypeElement();
$this->addElement('text', 'object_name', array(
'label' => $this->translate('Name'),
'required' => true,
'description' => $this->translate('Name for the Icinga object you are going to create')
));
/*
$this->addElement('text', 'groups', array(
'label' => $this->translate('Servicegroups'),
'description' => $this->translate('One or more comma separated servicegroup names')
));
*/
$this->optionalBoolean(
'use_agent',
$this->translate('Run on agent'),
$this->translate('Whether the check commmand for this service should be executed on the Icinga agent')
);
$this->addZoneElement();
$this->addImportsElement();
2016-02-17 20:10:22 +01:00
$this->addDisabledElement();
$this->addCheckCommandElements();
2015-06-26 16:20:16 +02:00
if ($this->isTemplate()) {
$this->addCheckExecutionElements();
}
$this->setButtons();
}
}