diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
index e1f5ab63f..9e070a6da 100644
--- a/application/controllers/ConfigController.php
+++ b/application/controllers/ConfigController.php
@@ -138,6 +138,8 @@ class ConfigController extends Controller
}
$this->view->module = $module;
+ $this->view->libraries = $app->getLibraries();
+ $this->view->moduleManager = $manager;
$this->view->toggleForm = $toggleForm;
$this->view->title = $module->getName();
$this->view->tabs = $module->getConfigTabs()->activate('info');
diff --git a/application/views/scripts/config/module.phtml b/application/views/scripts/config/module.phtml
index 684c62f6d..6cadd8a90 100644
--- a/application/views/scripts/config/module.phtml
+++ b/application/views/scripts/config/module.phtml
@@ -6,9 +6,11 @@
= $this->translate('There is no such module installed.') ?>
getDependencies();
+ $requiredMods = $module->getRequiredModules();
+ $requiredLibs = $module->getRequiredLibraries();
$restrictions = $module->getProvidedRestrictions();
$permissions = $module->getProvidedPermissions();
+ $unmetDependencies = $moduleManager->hasUnmetDependencies($module->getName());
$state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : 'disabled'
?>
@@ -20,9 +22,13 @@
= $this->translate('State') ?> |
= $state ?>
- toggleForm)): ?>
+ toggleForm)): ?>
+ enabled || ! $unmetDependencies): ?>
= $this->toggleForm ?>
+
+ = $this->icon('attention-alt', $this->translate('Module can\'t be enabled due to unmet dependencies')) ?>
+
|
= $this->escape($this->translate('Version')) ?> |
@@ -43,13 +49,58 @@
= $this->escape($this->translate('Dependencies')) ?> |
-
- translate('This module has no dependencies');
- else: foreach ($dependencies as $name => $versionString): ?>
- = $this->escape($name) ?>: = $this->escape($versionString) ?>
-
+ |
+
+ = $this->translate('This module has no dependencies') ?>
+
+
+
+ = $this->translate('Unmet dependencies found! Module can\'t be enabled unless all dependencies are met.') ?>
+
+
+
+
+ = $this->translate('Libraries') ?>
+ $versionString): ?>
+
+ = $this->escape($libraryName) ?> |
+
+ has($libraryName, $versionString === true ? null : $versionString)): ?>
+ = $versionString === true ? '*' : $this->escape($versionString) ?>
+
+ = $versionString === true ? '*' : $this->escape($versionString) ?>
+ get($libraryName)) !== null): ?>
+ (= $library->getVersion() ?>)
+
+
+ |
+
+
+
+
+
+
+ = $this->translate('Modules') ?>
+ $versionString): ?>
+
+ = $this->escape($moduleName) ?> |
+
+ has($moduleName, $versionString === true ? null : $versionString)): ?>
+ = $versionString === true ? '*' : $this->escape($versionString) ?>
+
+ = $versionString === true ? '*' : $this->escape($versionString) ?>
+ hasInstalled($moduleName)): ?>
+ (= $this->translate('not installed') ?>)
+
+ (= $moduleManager->getModule($moduleName, false)->getVersion() ?>= $moduleManager->hasEnabled($moduleName) ? '' : ', ' . $this->translate('disabled') ?>)
+
+
+ |
+
+
+
+
+
|
diff --git a/public/css/icinga/main.less b/public/css/icinga/main.less
index 4588750c3..9276a170b 100644
--- a/public/css/icinga/main.less
+++ b/public/css/icinga/main.less
@@ -178,6 +178,12 @@ a:hover > .icon-cancel {
width: 100%;
}
+.name-value-table > caption {
+ margin-top: .5em;
+ text-align: left;
+ font-weight: bold;
+}
+
.name-value-table > tbody > tr > th {
color: @text-color-light;
// Reset default font-weight
@@ -350,4 +356,30 @@ a:hover > .icon-cancel {
padding-right: 0;
}
}
+}
+
+.module-dependencies {
+ .unmet-dependencies {
+ background-color: @color-warning;
+ color: @text-color-on-icinga-blue;
+ padding: .25em .5em;
+ margin-left: -.5em;
+ }
+
+ .name-value-table {
+ > caption {
+ font-weight: normal;
+ color: @text-color-light;
+ }
+
+ > tbody > tr > th {
+ font-weight: bold;
+ color: @text-color;
+ }
+
+ .missing {
+ color: @color-critical;
+ font-weight: bold;
+ }
+ }
}
\ No newline at end of file