| | 4 | ref from [https://www.thruk.org/documentation/menu.html here] |
| | 5 | |
| | 6 | Create menu_local.conf under /etc/thruk/ |
| | 7 | {{{ |
| | 8 | #!sh |
| | 9 | OMD[demo@a36aee5c525e]:~/etc/thruk$ pwd |
| | 10 | /omd/sites/demo/etc/thruk |
| | 11 | OMD[demo@a36aee5c525e]:~/etc/thruk$ cat menu_local.conf |
| | 12 | do '/usr/share/thruk/menu.conf'; |
| | 13 | |
| | 14 | remove_item('Reports'); |
| | 15 | remove_item('General', 'Panorama View'); |
| | 16 | remove_item('System', 'Configuration'); |
| | 17 | |
| | 18 | add_section('name' => 'General'); |
| | 19 | add_link('name' => 'Home', 'href' => '/thruk/main.html'); |
| | 20 | add_link('name' => 'Logout', 'href' => $c->config->{'logout_link'}, 'target' => "_parent") if($c->stash->{'cookie_auth'}); |
| | 21 | |
| | 22 | add_section('name' => 'Current Status'); |
| | 23 | add_link('name' => 'Hosts', 'href' => '/thruk/cgi-bin/status.cgi?hostgroup=all&style=hostdetail'); |
| | 24 | add_link('name' => 'Services', 'href' => '/thruk/cgi-bin/status.cgi?host=all'); |
| | 25 | add_search('name' => 'Quick Search:'); |
| | 26 | |
| | 27 | add_section('name' => 'Logs'); |
| | 28 | add_link('name' => 'Event Log', 'href' => '/thruk/cgi-bin/showlog.cgi'); |
| | 29 | add_link('name' => "Test submenu", 'href' => 'https://171.100.112.174:5688/demo/test3.html'); |
| | 30 | |
| | 31 | add_section('name' => 'System'); |
| | 32 | add_link('name' => 'Configuration', 'href' => '/thruk/cgi-bin/config.cgi') if has_role('authorized_for_system_information', 'authorized_for_configuration_information'); |
| | 33 | |
| | 34 | #insert_item('NewItem', { 'href' => '/thruk/frame.html/http://172.17.0.2', 'name' => 'Company' }, 'target' => '_parent'); |
| | 35 | |
| | 36 | OMD[demo@a36aee5c525e]:~/etc/thruk$ |
| | 37 | }}} |