diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:25:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:25:24 +0000 |
commit | d76d47b12fdcc9e127d023661e806cf2ca8e7715 (patch) | |
tree | 52c73718c9e2b6e4aa3f997791786aa2ee6ebcc9 /configuration.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-nagvis-d76d47b12fdcc9e127d023661e806cf2ca8e7715.tar.xz icingaweb2-module-nagvis-d76d47b12fdcc9e127d023661e806cf2ca8e7715.zip |
Adding upstream version 1.1.1.upstream/1.1.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'configuration.php')
-rw-r--r-- | configuration.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/configuration.php b/configuration.php new file mode 100644 index 0000000..f6dcf64 --- /dev/null +++ b/configuration.php @@ -0,0 +1,41 @@ +<?php + +use Icinga\Application\Config; +use Icinga\Module\Nagvis\RestrictionHelper; + +$section = $this->menuSection(N_('Maps')) + ->setUrl('nagvis/show/map') + ->setIcon('globe'); + +$prio = 0; +$restriction = RestrictionHelper::getRegex(); +foreach (Config::module('nagvis')->getSection('menu') as $name => $caption) { + if ($restriction !== null && ! preg_match($restriction, $name)) { + continue; + } + $section->add($caption, array( + 'url' => 'nagvis/show/map', + 'urlParameters' => array('map' => $name), + 'priority' => ++$prio + )); +} + +$this->providePermission( + 'nagvis/edit', + $this->translate('Modify NagVis maps') +); + +$this->providePermission( + 'nagvis/admin', + $this->translate('Nagvis administration') +); + +$this->providePermission( + 'nagvis/overview', + $this->translate('NagVis general overview') +); + +$this->provideRestriction( + 'nagvis/map/filter', + $this->translate('Filter NagVis maps') +); |