[icinga-checkins] icinga.org: icingaweb2-module-nagvis/master: menu: respect config file order

git at icinga.org git at icinga.org
Fri Dec 2 12:13:06 CET 2016


Module: icingaweb2-module-nagvis
Branch: master
Commit: e9ade7ee2d2356d507df3ac71140308732dd8a40
URL:    https://git.icinga.org/?p=icingaweb2-module-nagvis.git;a=commit;h=e9ade7ee2d2356d507df3ac71140308732dd8a40

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Dec  2 10:28:12 2016 +0000

menu: respect config file order

---

 configuration.php |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configuration.php b/configuration.php
index c27761a..efe4e87 100644
--- a/configuration.php
+++ b/configuration.php
@@ -6,10 +6,12 @@ $section = $this->menuSection(N_('Maps'))
     ->setUrl('nagvis/show/map')
     ->setIcon('globe');
 
+$prio = 0;
 foreach (Config::module('nagvis')->getSection('menu') as $name => $caption) {
     $section->add($caption, array(
         'url'           => 'nagvis/show/map',
-        'urlParameters' => array('map' => $name)
+        'urlParameters' => array('map' => $name),
+        'priority'      => ++$prio
     ));
 }
 



More information about the icinga-checkins mailing list