Merge branch 'feature/list-installed-modules-versions-and-state-in-the-about-page-9381' into feature/show-icinga-web-2-s-version-in-the-frontend-9247

This commit is contained in:
Alexander A. Klimov 2015-09-25 18:06:38 +02:00
commit a99430ec6d
2 changed files with 28 additions and 0 deletions

View File

@ -5,11 +5,14 @@ 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->hasPermission = $this->hasPermission('config/modules');
$this->view->version = Version::get();
$this->view->modules = Icinga::app()->getModuleManager()->getLoadedModules();
}
}

View File

@ -30,4 +30,29 @@
?></a>&emsp;<a href="https://www.facebook.com/icinga"><?=
$this->translate('Icinga on Facebook')
?></a></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><?= $hasPermission ? $this->qlink(
$name,
'config/module/',
array('name' => $name),
array('title' => sprintf($this->translate('Show the overview of the %s module'), $name))
) : $name ?></td>
<td><?= $module->getVersion() ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>