|
7 | 7 | use DateTime; |
8 | 8 | use DateTimeZone; |
9 | 9 | use Icinga\Date\DateFormatter; |
| 10 | +use Icinga\File\Ini\Dom\Comment; |
10 | 11 | use Icinga\Module\Icingadb\Common\Auth; |
11 | 12 | use Icinga\Module\Icingadb\Common\Database; |
12 | 13 | use Icinga\Module\Icingadb\Common\HostLink; |
13 | 14 | use Icinga\Module\Icingadb\Common\HostStates; |
14 | 15 | use Icinga\Module\Icingadb\Common\Links; |
| 16 | +use Icinga\Module\Icingadb\Hook\CommentOutputHook; |
15 | 17 | use Icinga\Module\Icingadb\Hook\ExtensionHook\ObjectDetailExtensionHook; |
16 | 18 | use Icinga\Module\Icingadb\Widget\MarkdownText; |
17 | 19 | use Icinga\Module\Icingadb\Common\ServiceLink; |
@@ -253,7 +255,7 @@ protected function assembleDowntimeEvent(DowntimeHistory $downtime) |
253 | 255 | { |
254 | 256 | $commentInfo = [ |
255 | 257 | new HtmlElement('h2', null, Text::create(t('Comment'))), |
256 | | - new MarkdownText($downtime->comment) |
| 258 | + new MarkdownText(CommentOutputHook::processComment($downtime->comment)) |
257 | 259 | ]; |
258 | 260 |
|
259 | 261 | $eventInfo = [new HtmlElement('h2', null, Text::create(t('Event Info')))]; |
@@ -352,7 +354,7 @@ protected function assembleCommentEvent(CommentHistory $comment) |
352 | 354 | { |
353 | 355 | $commentInfo = [ |
354 | 356 | new HtmlElement('h2', null, Text::create(t('Comment'))), |
355 | | - new MarkdownText($comment->comment) |
| 357 | + new MarkdownText(CommentOutputHook::processComment($comment->comment)) |
356 | 358 | ]; |
357 | 359 |
|
358 | 360 | $eventInfo = [new HtmlElement('h2', null, Text::create(t('Event Info')))]; |
@@ -464,7 +466,7 @@ protected function assembleAcknowledgeEvent(AcknowledgementHistory $acknowledgem |
464 | 466 | if ($acknowledgement->comment) { |
465 | 467 | $commentInfo = [ |
466 | 468 | new HtmlElement('h2', null, Text::create(t('Comment'))), |
467 | | - new MarkdownText($acknowledgement->comment) |
| 469 | + new MarkdownText(CommentOutputHook::processComment($acknowledgement->comment)) |
468 | 470 | ]; |
469 | 471 | } elseif (! isset($acknowledgement->author)) { |
470 | 472 | $commentInfo[] = new EmptyState(t('This acknowledgement was set before Icinga DB history recording')); |
|
0 commit comments