2015-02-02 16:34:29 +01:00
|
|
|
<div class="controls">
|
2015-02-17 16:19:03 +01:00
|
|
|
<?= $this->tabs ?>
|
2014-05-26 16:38:03 +02:00
|
|
|
</div>
|
|
|
|
<div class="content">
|
2015-02-17 16:19:03 +01:00
|
|
|
<?php if (! $module): ?>
|
|
|
|
<?= $this->translate('There is no such module installed.') ?>
|
|
|
|
<?php return; endif ?>
|
|
|
|
<?php
|
2020-11-13 11:49:53 +01:00
|
|
|
$requiredMods = $module->getRequiredModules();
|
|
|
|
$requiredLibs = $module->getRequiredLibraries();
|
2015-02-17 16:19:03 +01:00
|
|
|
$restrictions = $module->getProvidedRestrictions();
|
|
|
|
$permissions = $module->getProvidedPermissions();
|
2020-11-13 11:49:53 +01:00
|
|
|
$unmetDependencies = $moduleManager->hasUnmetDependencies($module->getName());
|
2021-11-03 12:41:57 +01:00
|
|
|
$isIcingadbSupported = isset($requiredMods['icingadb']);
|
|
|
|
$state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : 'disabled';
|
2015-02-17 16:19:03 +01:00
|
|
|
?>
|
2015-09-29 18:04:15 +02:00
|
|
|
<table class="name-value-table">
|
2015-02-17 16:19:03 +01:00
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($this->translate('Name')) ?></th>
|
|
|
|
<td><?= $this->escape($module->getName()) ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->translate('State') ?></th>
|
2018-10-08 15:50:02 +02:00
|
|
|
<td>
|
|
|
|
<?= $state ?>
|
2020-11-13 11:49:53 +01:00
|
|
|
<?php if (isset($this->toggleForm)): ?>
|
|
|
|
<?php if ($moduleData->enabled || ! $unmetDependencies): ?>
|
2018-10-08 15:50:02 +02:00
|
|
|
<?= $this->toggleForm ?>
|
2020-11-13 11:49:53 +01:00
|
|
|
<?php else: ?>
|
|
|
|
<?= $this->icon('attention-alt', $this->translate('Module can\'t be enabled due to unmet dependencies')) ?>
|
2018-10-08 15:50:02 +02:00
|
|
|
<?php endif ?>
|
2020-11-13 11:49:53 +01:00
|
|
|
<?php endif ?>
|
2015-02-17 16:19:03 +01:00
|
|
|
</td>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($this->translate('Version')) ?></th>
|
2016-09-01 10:26:55 +02:00
|
|
|
<td><?= $this->escape($module->getVersion()) ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php if (isset($moduleGitCommitId) && $moduleGitCommitId !== false): ?>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($this->translate('Git commit')) ?></th>
|
|
|
|
<td><?= $this->escape($moduleGitCommitId) ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
2015-02-17 16:19:03 +01:00
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($this->translate('Description')) ?></th>
|
2016-08-30 09:08:24 +02:00
|
|
|
<td>
|
|
|
|
<strong><?= $this->escape($module->getTitle()) ?></strong><br>
|
|
|
|
<?= nl2br($this->escape($module->getDescription())) ?>
|
|
|
|
</td>
|
2015-02-17 16:19:03 +01:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($this->translate('Dependencies')) ?></th>
|
2020-11-13 11:49:53 +01:00
|
|
|
<td class="module-dependencies">
|
|
|
|
<?php if (empty($requiredLibs) && empty($requiredMods)): ?>
|
|
|
|
<?= $this->translate('This module has no dependencies') ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php if ($unmetDependencies): ?>
|
|
|
|
<strong class="unmet-dependencies">
|
|
|
|
<?= $this->translate('Unmet dependencies found! Module can\'t be enabled unless all dependencies are met.') ?>
|
|
|
|
</strong>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php if (! empty($requiredLibs)): ?>
|
|
|
|
<table class="name-value-table">
|
|
|
|
<caption><?= $this->translate('Libraries') ?></caption>
|
|
|
|
<?php foreach ($requiredLibs as $libraryName => $versionString): ?>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($libraryName) ?></th>
|
|
|
|
<td>
|
|
|
|
<?php if ($libraries->has($libraryName, $versionString === true ? null : $versionString)): ?>
|
|
|
|
<?= $versionString === true ? '*' : $this->escape($versionString) ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<span class="missing"><?= $versionString === true ? '*' : $this->escape($versionString) ?></span>
|
|
|
|
<?php if (($library = $libraries->get($libraryName)) !== null): ?>
|
|
|
|
(<?= $library->getVersion() ?>)
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endif ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</table>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php if (! empty($requiredMods)): ?>
|
|
|
|
<table class="name-value-table">
|
|
|
|
<caption><?= $this->translate('Modules') ?></caption>
|
|
|
|
<?php foreach ($requiredMods as $moduleName => $versionString): ?>
|
2021-11-03 12:41:57 +01:00
|
|
|
<?php if ($moduleName === 'monitoring' && $isIcingadbSupported && $moduleManager->has('icingadb', $requiredMods['icingadb'])) : ?>
|
|
|
|
<?php continue; ?>
|
|
|
|
<?php endif ?>
|
2020-11-13 11:49:53 +01:00
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($moduleName) ?></th>
|
|
|
|
<td>
|
|
|
|
<?php if ($moduleManager->has($moduleName, $versionString === true ? null : $versionString)): ?>
|
|
|
|
<?= $versionString === true ? '*' : $this->escape($versionString) ?>
|
|
|
|
<?php else: ?>
|
2021-11-03 12:41:57 +01:00
|
|
|
<span <?= ($moduleName === 'icingadb' && isset($requiredMods['monitoring']) && $moduleManager->has('monitoring', $requiredMods['monitoring'])) ? 'class="optional"' : 'class="missing"' ?>>
|
|
|
|
<?= $versionString === true ? '*' : $this->escape($versionString) ?>
|
|
|
|
</span>
|
2020-11-13 11:49:53 +01:00
|
|
|
<?php if (! $moduleManager->hasInstalled($moduleName)): ?>
|
|
|
|
(<?= $this->translate('not installed') ?>)
|
|
|
|
<?php else: ?>
|
|
|
|
(<?= $moduleManager->getModule($moduleName, false)->getVersion() ?><?= $moduleManager->hasEnabled($moduleName) ? '' : ', ' . $this->translate('disabled') ?>)
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endif ?>
|
|
|
|
</td>
|
2021-11-03 12:41:57 +01:00
|
|
|
<?php if ($moduleName === 'monitoring' && $isIcingadbSupported) : ?>
|
|
|
|
<td class="or-separator"><?= $this->translate('or') ?></td>
|
|
|
|
<?php endif ?>
|
2020-11-13 11:49:53 +01:00
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</table>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endif ?>
|
2015-02-17 16:19:03 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php if (! empty($permissions)): ?>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($this->translate('Permissions')) ?></th>
|
|
|
|
<td>
|
|
|
|
<?php foreach ($permissions as $permission): ?>
|
|
|
|
<strong><?= $this->escape($permission->name) ?></strong>: <?= $this->escape($permission->description) ?><br />
|
|
|
|
<?php endforeach ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php if (! empty($restrictions)): ?>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->escape($this->translate('Restrictions')) ?></th>
|
|
|
|
<td>
|
|
|
|
<?php foreach ($restrictions as $restriction): ?>
|
|
|
|
<strong><?= $this->escape($restriction->name) ?></strong>: <?= $this->escape($restriction->description) ?><br />
|
|
|
|
<?php endforeach ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
|
|
|
</table>
|
2014-05-26 16:38:03 +02:00
|
|
|
</div>
|