parent
d0fe1be7f7
commit
6f51f40fc0
|
@ -88,7 +88,7 @@ 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::createBackend($this->getRequest()->getParam('backend'))->select()
|
||||||
->from(
|
->from(
|
||||||
'downtime',
|
'downtime',
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -72,7 +72,6 @@ class Zend_View_Helper_CommandForm extends Zend_View_Helper_Abstract
|
||||||
public function labelSubmitForm($submitLabel, $submitTitle, $cls, $commandName, array $arguments = array())
|
public function labelSubmitForm($submitLabel, $submitTitle, $cls, $commandName, array $arguments = array())
|
||||||
{
|
{
|
||||||
$form = $this->simpleForm($commandName, $arguments);
|
$form = $this->simpleForm($commandName, $arguments);
|
||||||
|
|
||||||
$button = new Zend_Form_Element_Button(
|
$button = new Zend_Form_Element_Button(
|
||||||
array(
|
array(
|
||||||
'name' => 'btn_submit',
|
'name' => 'btn_submit',
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
<?php
|
||||||
|
/** @var Zend_View_Helper_CommandForm $cf */
|
||||||
|
$cf = $this->getHelper('CommandForm');
|
||||||
|
?>
|
||||||
<div>
|
<div>
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="panel-hostname">
|
<div class="panel-hostname">
|
||||||
|
@ -41,11 +45,18 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<form>
|
<?php
|
||||||
<button type="submit" value="1" class="button btn-small btn-common" title="Remove comment">
|
$deleteData = $data;
|
||||||
<i class="icinga-icon-remove"></i>
|
$deleteData['commentid'] = $comment->comment_internal_id;
|
||||||
</button>
|
|
||||||
</form>
|
echo $cf->iconSubmitForm(
|
||||||
|
'icinga-icon-remove',
|
||||||
|
'Remove comment',
|
||||||
|
'btn-small',
|
||||||
|
'removecomment',
|
||||||
|
$deleteData
|
||||||
|
);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?= $this->escape($comment->comment_author); ?>, <?= $comment->comment_type; ?>
|
<?= $this->escape($comment->comment_author); ?>, <?= $comment->comment_type; ?>
|
||||||
(<?= $this->format()->timeSince($comment->comment_timestamp); ?>)
|
(<?= $this->format()->timeSince($comment->comment_timestamp); ?>)
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
$object = $this->object;
|
$object = $this->object;
|
||||||
$type = (isset($object->service_description) === true) ? 'service' : 'host';
|
$type = (isset($object->service_description) === true) ? 'service' : 'host';
|
||||||
|
|
||||||
|
/** @var Zend_View_Helper_CommandForm $cf */
|
||||||
|
$cf = $this->getHelper('CommandForm');
|
||||||
|
|
||||||
if ($type === 'host') {
|
if ($type === 'host') {
|
||||||
$objectStateName = strtolower($this->util()->getHostStateName($this->object->host_state));
|
$objectStateName = strtolower($this->util()->getHostStateName($this->object->host_state));
|
||||||
$objectState = (int) $object->host_state;
|
$objectState = (int) $object->host_state;
|
||||||
|
@ -72,14 +75,44 @@
|
||||||
<div class="panel-row">
|
<div class="panel-row">
|
||||||
<p><?= $this->pluginOutput($object->output); ?></p>
|
<p><?= $this->pluginOutput($object->output); ?></p>
|
||||||
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<?php if ($objectState > 0): ?>
|
<?php if ($objectState > 0): ?>
|
||||||
<button type="submit" class="button btn-cta btn-half-left">Acknowledge</button>
|
<?php if ($this->object->host_acknowledged || $this->object->service_acknowledged): ?>
|
||||||
|
<?= $cf->labelSubmitForm(
|
||||||
|
'Remove Ack',
|
||||||
|
'Remove problem acknowledgement',
|
||||||
|
'btn-cta btn-half-left',
|
||||||
|
'removeacknowledgement',
|
||||||
|
array(
|
||||||
|
'host' => $this->object->host_name,
|
||||||
|
'service' => $this->object->service_description
|
||||||
|
)
|
||||||
|
) ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<a href="<?=
|
||||||
|
$this->href(
|
||||||
|
'monitoring/command/acknowledgeproblem',
|
||||||
|
array(
|
||||||
|
'host' => $this->object->host_name,
|
||||||
|
'service' => $this->object->service_description
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>" class="button btn-cta btn-half-left">
|
||||||
|
Acknowledge
|
||||||
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php endif; ?>
|
||||||
<button type="submit" class="button btn-cta <?= ($objectState > 0) ? 'btn-half-right' : 'btn-wide'; ?>">Recheck</button>
|
<?= $cf->labelSubmitForm(
|
||||||
</form>
|
'Recheck',
|
||||||
|
'Reschedule next check immediately',
|
||||||
|
'btn-cta ' . (($objectState > 0) ? 'btn-half-right' : 'btn-wide'),
|
||||||
|
'reschedulenextcheck',
|
||||||
|
array(
|
||||||
|
'host' => $this->object->host_name,
|
||||||
|
'service' => $this->object->service_description,
|
||||||
|
'checktime' => time(),
|
||||||
|
'forcecheck' => '1'
|
||||||
|
)
|
||||||
|
) ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-row">
|
<div class="panel-row">
|
||||||
|
@ -123,11 +156,17 @@
|
||||||
<?= $this->dateFormat()->formatDateTime($object->next_check); ?>
|
<?= $this->dateFormat()->formatDateTime($object->next_check); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-button">
|
<div class="panel-button">
|
||||||
<form>
|
<a href="<?=
|
||||||
<button class="button btn-common btn-small">
|
$this->href(
|
||||||
<i class="icinga-icon-reschedule"></i>
|
'monitoring/command/reschedulenextcheck',
|
||||||
</button>
|
array(
|
||||||
</form>
|
'host' => $this->object->host_name,
|
||||||
|
'service' => $this->object->serivce_description
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>" class="button btn-common btn-small">
|
||||||
|
<i class="icinga-icon-reschedule"></i>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -169,6 +169,7 @@ abstract class AbstractObject
|
||||||
'comment_author',
|
'comment_author',
|
||||||
'comment_data',
|
'comment_data',
|
||||||
'comment_type',
|
'comment_type',
|
||||||
|
'comment_internal_id'
|
||||||
)
|
)
|
||||||
)->where('comment_objecttype_id', $this->type)
|
)->where('comment_objecttype_id', $this->type)
|
||||||
)->fetchAll();
|
)->fetchAll();
|
||||||
|
|
Loading…
Reference in New Issue