mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
parent
11c9cde557
commit
7c8ff44fd1
@ -70,6 +70,15 @@ class Monitoring_CommentController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receive DeleteCommentCommandForm post from other controller
|
||||||
|
*/
|
||||||
|
public function removeAction()
|
||||||
|
{
|
||||||
|
$this->assertHttpMethod('POST');
|
||||||
|
$this->createDelCommentForm();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a command form to delete a single comment
|
* Create a command form to delete a single comment
|
||||||
*
|
*
|
||||||
|
@ -105,6 +105,15 @@ class Monitoring_DowntimeController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receive DeleteDowntimeCommandForm post from other controller
|
||||||
|
*/
|
||||||
|
public function removeAction()
|
||||||
|
{
|
||||||
|
$this->assertHttpMethod('POST');
|
||||||
|
$this->createDelDowntimeForm();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a command form to delete a single comment
|
* Create a command form to delete a single comment
|
||||||
*
|
*
|
||||||
|
@ -7,7 +7,6 @@ use Icinga\Module\Monitoring\Object\Service;
|
|||||||
use Icinga\Module\Monitoring\Object\Host;
|
use Icinga\Module\Monitoring\Object\Host;
|
||||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimesCommandForm;
|
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimesCommandForm;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display detailed information about a downtime
|
* Display detailed information about a downtime
|
||||||
|
@ -84,16 +84,7 @@ if (count($comments) === 0) {
|
|||||||
<?php
|
<?php
|
||||||
$delCommentForm = clone $delCommentForm;
|
$delCommentForm = clone $delCommentForm;
|
||||||
$delCommentForm->populate(array('comment_id' => $comment->id, 'redirect' => $this->url));
|
$delCommentForm->populate(array('comment_id' => $comment->id, 'redirect' => $this->url));
|
||||||
if ($comment->objecttype === 'host') {
|
$delCommentForm->setAction($this->url('monitoring/comment/remove', array('comment_id' => $comment->id)));
|
||||||
$delCommentForm->setAction(
|
|
||||||
$this->url('monitoring/host/delete-comment', array('host' => $comment->host_name))
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$delCommentForm->setAction($this->url('monitoring/service/delete-comment', array(
|
|
||||||
'host' => $comment->host_name,
|
|
||||||
'service' => $comment->service_description
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
echo $delCommentForm;
|
echo $delCommentForm;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -129,14 +129,7 @@ if (count($downtimes) === 0) {
|
|||||||
<?php
|
<?php
|
||||||
$delDowntimeForm = clone $delDowntimeForm;
|
$delDowntimeForm = clone $delDowntimeForm;
|
||||||
$delDowntimeForm->populate(array('downtime_id' => $downtime->id, 'redirect' => $this->url));
|
$delDowntimeForm->populate(array('downtime_id' => $downtime->id, 'redirect' => $this->url));
|
||||||
if (! $isService) {
|
$delDowntimeForm->setAction($this->url('monitoring/downtime/remove', array('downtime_id' => $downtime->id)));
|
||||||
$delDowntimeForm->setAction($this->url('monitoring/host/delete-downtime', array('host' => $downtime->host_name)));
|
|
||||||
} else {
|
|
||||||
$delDowntimeForm->setAction($this->url('monitoring/service/delete-downtime', array(
|
|
||||||
'host' => $downtime->host_name,
|
|
||||||
'service' => $downtime->service_description
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
echo $delDowntimeForm;
|
echo $delDowntimeForm;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -303,6 +303,10 @@
|
|||||||
var data = self.icinga.ui.getSelectionKeys($table);
|
var data = self.icinga.ui.getSelectionKeys($table);
|
||||||
var url = $table.data('icinga-multiselect-url');
|
var url = $table.data('icinga-multiselect-url');
|
||||||
|
|
||||||
|
if ($(event.target).closest('form').length) {
|
||||||
|
// allow form actions in table rows to pass through
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user