mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
parent
b74e264f01
commit
7f4e1936f7
@ -89,21 +89,25 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
|
|||||||
$cfg = $this->getConfiguration();
|
$cfg = $this->getConfiguration();
|
||||||
$preferences = $this->getUserPreferences();
|
$preferences = $this->getUserPreferences();
|
||||||
$downtimes = Backend::getInstance($this->getRequest()->getParam('backend'))->select()
|
$downtimes = Backend::getInstance($this->getRequest()->getParam('backend'))->select()
|
||||||
->from('downtime', array(
|
->from(
|
||||||
'host_name',
|
'downtime',
|
||||||
'service_description',
|
array(
|
||||||
'downtime_scheduled_start_time',
|
'host_name',
|
||||||
'downtime_internal_downtime_id',
|
'service_description',
|
||||||
))->fetchAll();
|
'downtime_scheduled_start_time',
|
||||||
|
'downtime_internal_downtime_id'
|
||||||
|
)
|
||||||
|
)->fetchAll();
|
||||||
|
|
||||||
$options = array();
|
$options = array(
|
||||||
foreach ($downtimes as $downtime)
|
'0' => 'No Triggered Downtime '
|
||||||
{
|
);
|
||||||
|
foreach ($downtimes as $downtime) {
|
||||||
$dt = DateTimeFactory::create($downtime->downtime_scheduled_start_time);
|
$dt = DateTimeFactory::create($downtime->downtime_scheduled_start_time);
|
||||||
$date_format = $preferences->get('app.dateFormat', $cfg->get('app.dateFormat', 'd/m/Y'));
|
$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'));
|
$time_format = $preferences->get('app.timeFormat', $cfg->get('app.timeFormat', 'g:i A'));
|
||||||
$label = sprintf(
|
$label = sprintf(
|
||||||
'ID %s: %s%s starting @ %s',
|
'ID %s: %s%s Starting @ %s',
|
||||||
$downtime->downtime_internal_downtime_id,
|
$downtime->downtime_internal_downtime_id,
|
||||||
$downtime->host_name,
|
$downtime->host_name,
|
||||||
!empty($downtime->service_description) ? ' (' . $downtime->service_description . ')' : '',
|
!empty($downtime->service_description) ? ' (' . $downtime->service_description . ')' : '',
|
||||||
@ -327,7 +331,7 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
|
|||||||
/**
|
/**
|
||||||
* Create Downtime from request Data
|
* Create Downtime from request Data
|
||||||
*
|
*
|
||||||
* @return \Icinga\Protocol\Commandpipe\Downtime
|
* @return Downtime
|
||||||
*/
|
*/
|
||||||
public function getDowntime()
|
public function getDowntime()
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,9 @@ namespace Icinga\Module\Monitoring\Command;
|
|||||||
|
|
||||||
use Icinga\Protocol\Commandpipe\Comment;
|
use Icinga\Protocol\Commandpipe\Comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Command for acknowledging an object
|
||||||
|
*/
|
||||||
class AcknowledgeCommand extends BaseCommand
|
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()
|
* @see BaseCommand::getHostCommand()
|
||||||
*/
|
*/
|
||||||
public function getHostCommand($hostname)
|
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()
|
* @see BaseCommand::getServiceCommand()
|
||||||
*/
|
*/
|
||||||
public function getServiceCommand($hostname, $servicename)
|
public function getServiceCommand($hostname, $servicename)
|
||||||
|
@ -30,6 +30,11 @@ namespace Icinga\Module\Monitoring\Command;
|
|||||||
|
|
||||||
use Icinga\Protocol\Commandpipe\Comment;
|
use Icinga\Protocol\Commandpipe\Comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Icinga Command for adding comments
|
||||||
|
*
|
||||||
|
* @see BaseCommand
|
||||||
|
*/
|
||||||
class AddCommentCommand extends 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()
|
* @see BaseCommand::getHostCommand()
|
||||||
*/
|
*/
|
||||||
public function getHostCommand($hostname)
|
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()
|
* @see BaseCommand::getServiceCommand()
|
||||||
*/
|
*/
|
||||||
public function getServiceCommand($hostname, $servicename)
|
public function getServiceCommand($hostname, $servicename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user