Show loaded modules in the about page

refs #9381
This commit is contained in:
Alexander A. Klimov 2015-09-24 19:23:49 +02:00
parent b69311165c
commit f64db890d2
2 changed files with 27 additions and 0 deletions

View File

@ -5,11 +5,13 @@ namespace Icinga\Controllers;
use Icinga\Application\Version;
use Icinga\Web\Controller\ActionController;
use Icinga\Application\Icinga;
class AboutController extends ActionController
{
public function indexAction()
{
$this->view->version = Version::get();
$this->view->modules = Icinga::app()->getModuleManager()->getLoadedModules();
}
}

View File

@ -22,4 +22,29 @@
: '<p>' . nl2br(implode("\n", $versionInfo), false)
) . '</p>';
?>
<h1><?= $this->translate('Loaded modules') ?></h1>
<table class="action alternating" data-base-target="_next">
<thead>
<tr>
<th><?= $this->translate('Name') ?></th>
<th><?= $this->translate('Version') ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($modules as $module) {
$name = $module->getName();
?>
<tr>
<td><?= $this->qlink(
$name,
'config/module/',
array('name' => $name),
array('title' => sprintf($this->translate('Show the overview of the %s module'), $name))
) ?></td>
<td><?= $module->getVersion() ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>