diff --git a/library/Icinga/Protocol/Commandpipe/CommandType.php b/library/Icinga/Protocol/Commandpipe/CommandType.php index 5608b3a66..e10a54d64 100644 --- a/library/Icinga/Protocol/Commandpipe/CommandType.php +++ b/library/Icinga/Protocol/Commandpipe/CommandType.php @@ -33,4 +33,4 @@ namespace Icinga\Protocol\Commandpipe; */ interface CommandType { -} \ No newline at end of file +} diff --git a/modules/monitoring/application/forms/Command/ScheduleDowntimeForm.php b/modules/monitoring/application/forms/Command/ScheduleDowntimeForm.php index 55075b4ed..3c3a94c67 100644 --- a/modules/monitoring/application/forms/Command/ScheduleDowntimeForm.php +++ b/modules/monitoring/application/forms/Command/ScheduleDowntimeForm.php @@ -89,21 +89,25 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm $cfg = $this->getConfiguration(); $preferences = $this->getUserPreferences(); $downtimes = Backend::getInstance($this->getRequest()->getParam('backend'))->select() - ->from('downtime', array( - 'host_name', - 'service_description', - 'downtime_scheduled_start_time', - 'downtime_internal_downtime_id', - ))->fetchAll(); + ->from( + 'downtime', + array( + 'host_name', + 'service_description', + 'downtime_scheduled_start_time', + 'downtime_internal_downtime_id' + ) + )->fetchAll(); - $options = array(); - foreach ($downtimes as $downtime) - { + $options = array( + '0' => 'No Triggered Downtime ' + ); + foreach ($downtimes as $downtime) { $dt = DateTimeFactory::create($downtime->downtime_scheduled_start_time); $date_format = $preferences->get('app.dateFormat', $cfg->get('app.dateFormat', 'd/m/Y')); $time_format = $preferences->get('app.timeFormat', $cfg->get('app.timeFormat', 'g:i A')); $label = sprintf( - 'ID %s: %s%s starting @ %s', + 'ID %s: %s%s Starting @ %s', $downtime->downtime_internal_downtime_id, $downtime->host_name, !empty($downtime->service_description) ? ' (' . $downtime->service_description . ')' : '', @@ -327,7 +331,7 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm /** * Create Downtime from request Data * - * @return \Icinga\Protocol\Commandpipe\Downtime + * @return Downtime */ public function getDowntime() { diff --git a/modules/monitoring/library/Monitoring/Command/AcknowledgeCommand.php b/modules/monitoring/library/Monitoring/Command/AcknowledgeCommand.php index 2bff674d1..7003e6ec6 100644 --- a/modules/monitoring/library/Monitoring/Command/AcknowledgeCommand.php +++ b/modules/monitoring/library/Monitoring/Command/AcknowledgeCommand.php @@ -30,6 +30,9 @@ namespace Icinga\Module\Monitoring\Command; use Icinga\Protocol\Commandpipe\Comment; +/** + * Command for acknowledging an object + */ class AcknowledgeCommand extends BaseCommand { /** @@ -147,6 +150,9 @@ class AcknowledgeCommand extends BaseCommand } /** + * @param String $hostname The name of the host to create the command for for + * + * @return String The command string to return for the host * @see BaseCommand::getHostCommand() */ public function getHostCommand($hostname) @@ -157,6 +163,10 @@ class AcknowledgeCommand extends BaseCommand } /** + * @param String $hostname The name of the host to create the command for + * @param String $servicename The name of the service to create the command for + * + * @return String The command string to return for the service * @see BaseCommand::getServiceCommand() */ public function getServiceCommand($hostname, $servicename) @@ -165,4 +175,4 @@ class AcknowledgeCommand extends BaseCommand return sprintf('ACKNOWLEDGE_SVC_PROBLEM%s;', $this->expireTime > -1 ? '_EXPIRE' : '') . implode(';', array_merge(array($hostname, $servicename), $parameters)); } -} \ No newline at end of file +} diff --git a/modules/monitoring/library/Monitoring/Command/AddCommentCommand.php b/modules/monitoring/library/Monitoring/Command/AddCommentCommand.php index 2c546e85e..f9194a234 100644 --- a/modules/monitoring/library/Monitoring/Command/AddCommentCommand.php +++ b/modules/monitoring/library/Monitoring/Command/AddCommentCommand.php @@ -30,6 +30,11 @@ namespace Icinga\Module\Monitoring\Command; use Icinga\Protocol\Commandpipe\Comment; +/** + * Icinga Command for adding comments + * + * @see BaseCommand + */ class AddCommentCommand extends BaseCommand { /** @@ -62,6 +67,9 @@ class AddCommentCommand extends BaseCommand } /** + * @param String $hostname The name of the host to create the command for for + * + * @return String The command string to return for the host * @see BaseCommand::getHostCommand() */ public function getHostCommand($hostname) @@ -70,6 +78,10 @@ class AddCommentCommand extends BaseCommand } /** + * @param String $hostname The name of the host to create the command for + * @param String $servicename The name of the service to create the command for + * + * @return String The command string to return for the service * @see BaseCommand::getServiceCommand() */ public function getServiceCommand($hostname, $servicename) diff --git a/modules/monitoring/library/Monitoring/Command/BaseCommand.php b/modules/monitoring/library/Monitoring/Command/BaseCommand.php index 770c9878a..6682fc66d 100644 --- a/modules/monitoring/library/Monitoring/Command/BaseCommand.php +++ b/modules/monitoring/library/Monitoring/Command/BaseCommand.php @@ -93,4 +93,4 @@ class BaseCommand implements CommandType { throw new NotImplementedError(); } -} \ No newline at end of file +}