DetailviewExtension: Make sure data-icinga-module is set on container

To allow the eventhandler in JS to load and initialize the
corresponding module.
This commit is contained in:
Markus Frosch 2018-01-23 17:25:26 +01:00
parent b3e0b5d587
commit ecbfafd25a
1 changed files with 2 additions and 1 deletions

View File

@ -92,8 +92,9 @@ abstract class MonitoredObjectController extends Controller
$html = $this->view->escape($e->getMessage());
}
$module = $this->view->escape($hook->getModule()->getName());
$this->view->extensionsHtml[] =
'<div class="icinga-module module-' . $this->view->escape($hook->getModule()->getName()) . '">'
'<div class="icinga-module module-' . $module . '" data-icinga-module="' . $module . '">'
. $html
. '</div>';
}