Merge pull request #4237 from Icinga/fix/generictts-hook-not-executed-everywhere
Use TicketHook where missing
This commit is contained in:
commit
1f77414a93
|
@ -3,6 +3,7 @@
|
|||
|
||||
namespace Icinga\Module\Monitoring\Controllers;
|
||||
|
||||
use Icinga\Application\Hook;
|
||||
use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||
use Icinga\Web\Url;
|
||||
|
@ -58,6 +59,10 @@ class CommentController extends Controller
|
|||
'url' =>'monitoring/comments/show'
|
||||
)
|
||||
)->activate('comment')->extend(new DashboardAction())->extend(new MenuAction());
|
||||
|
||||
if (Hook::has('ticket')) {
|
||||
$this->view->tickets = Hook::first('ticket');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
namespace Icinga\Module\Monitoring\Controllers;
|
||||
|
||||
use Icinga\Application\Hook;
|
||||
use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimeCommandForm;
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
|
@ -68,6 +69,10 @@ class DowntimeController extends Controller
|
|||
'url' =>'monitoring/downtimes/show'
|
||||
)
|
||||
)->activate('downtime')->extend(new DashboardAction())->extend(new MenuAction());
|
||||
|
||||
if (Hook::has('ticket')) {
|
||||
$this->view->tickets = Hook::first('ticket');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,6 +40,13 @@ class EventController extends Controller
|
|||
'dt_end' => 'downtimeevent'
|
||||
);
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Hook::has('ticket')) {
|
||||
$this->view->tickets = Hook::first('ticket');
|
||||
}
|
||||
}
|
||||
|
||||
public function showAction()
|
||||
{
|
||||
$type = $this->params->shiftRequired('type');
|
||||
|
|
|
@ -65,6 +65,11 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= $this->translate('Comment') ?></th>
|
||||
<td><?= $this->nl2br($this->createTicketLinks($this->markdown($comment->comment))) ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if (isset($delCommentForm)): // Form is unset if the current user lacks the respective permission ?>
|
||||
<tr class="newsection">
|
||||
<th><?= $this->translate('Commands') ?></th>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</tr>
|
||||
<tr title="<?= $this->translate('A comment, as entered by the author, associated with the scheduled downtime'); ?>">
|
||||
<th><?= $this->translate('Comment') ?></th>
|
||||
<td><?= $this->nl2br($this->markdown($this->downtime->comment)) ?></td>
|
||||
<td><?= $this->nl2br($this->createTicketLinks($this->markdown($downtime->comment))) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue