parent
9b5c1f06d0
commit
33e0fbb7d9
|
@ -27,7 +27,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
|
|||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->setAttrib('class', 'inline');
|
||||
$this->setAttrib('class', 'inline instance-features');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,19 +60,19 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
|
|||
public function createElements(array $formData = array())
|
||||
{
|
||||
if ((bool) $this->status->notifications_enabled) {
|
||||
$description = sprintf(
|
||||
$notificationDescription = sprintf(
|
||||
'<a title="%s" href="%s" data-base-target="_next">%s</a>',
|
||||
mt('monitoring', 'Disable notifications for a specific time on a program-wide basis'),
|
||||
$this->getView()->href('monitoring/process/disable-notifications'),
|
||||
mt('monitoring', 'Disable temporarily')
|
||||
);
|
||||
} elseif ($this->status->disable_notif_expire_time) {
|
||||
$description = sprintf(
|
||||
$notificationDescription = sprintf(
|
||||
mt('monitoring', 'Notifications will be re-enabled in <strong>%s</strong>'),
|
||||
$this->getView()->timeUntil($this->status->disable_notif_expire_time)
|
||||
);
|
||||
} else {
|
||||
$description = '';
|
||||
$notificationDescription = null;
|
||||
}
|
||||
$this->addElements(array(
|
||||
array(
|
||||
|
@ -113,17 +113,17 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
|
|||
array(
|
||||
'label' => mt('monitoring', 'Notifications Enabled'),
|
||||
'autosubmit' => true,
|
||||
'description' => $description,
|
||||
'description' => $notificationDescription,
|
||||
'decorators' => array(
|
||||
'ViewHelper',
|
||||
'Errors',
|
||||
array(
|
||||
'Description',
|
||||
array('tag' => 'span', 'class' => 'feature-instance-notifications', 'escape' => false)
|
||||
array('tag' => 'span', 'class' => 'description', 'escape' => false)
|
||||
),
|
||||
'Label',
|
||||
array('HtmlTag', array('tag' => 'div'))
|
||||
),
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
|
|
|
@ -7,4 +7,6 @@ namespace Icinga\Module\Monitoring\Command\Transport;
|
|||
/**
|
||||
* Interface for Icinga command transports
|
||||
*/
|
||||
interface CommandTransportInterface {}
|
||||
interface CommandTransportInterface
|
||||
{
|
||||
}
|
||||
|
|
|
@ -183,13 +183,13 @@ class RemoteCommandFile implements CommandTransportInterface
|
|||
$this->path
|
||||
)
|
||||
);
|
||||
$ssh = sprintf('ssh -o BatchMode=yes -p %u', $this->port); // -o BatchMode=yes for disabling interactive
|
||||
// authentication methods
|
||||
$ssh = sprintf('ssh -o BatchMode=yes -p %u', $this->port);
|
||||
// -o BatchMode=yes for disabling interactive authentication methods
|
||||
if (isset($this->user)) {
|
||||
$ssh .= sprintf(' -l %s', escapeshellarg($this->user));
|
||||
}
|
||||
$ssh .= sprintf(
|
||||
' %s "echo %s > %s" 2>&1', // Redirect stderr to stdout
|
||||
' %s "echo %s > %s" 2>&1', // Redirect stderr to stdout
|
||||
escapeshellarg($this->host),
|
||||
escapeshellarg($commandString),
|
||||
escapeshellarg($this->path)
|
||||
|
|
Loading…
Reference in New Issue