###########################################################
#
# to adjust the menu configuration, copy this file to
# "menu_local.conf" and change it to your needs
# See https://thruk.org/documentation/menu.html for details.
#
###########################################################

use utf8;

add_section('name' => 'General', icon => 'uil-estate');
  add_link('name' => 'Home', 'href' => '/thruk/cgi-bin/main.cgi');
  add_link('name' => 'Documentation', 'href' => $c->config->{'documentation_link'} eq "/thruk/docs/index.html" ? "/thruk/docs/index.html" : "/thruk/#".Thruk::Utils::Filter::escape_html($c->config->{'documentation_link'})) if($c->config->{'documentation_link'});


add_section('name' => 'Current Status', icon => 'uil-desktop');
  add_link('name' => 'Tactical Overview',     'href' => '/thruk/cgi-bin/tac.cgi');
  add_link('name' => 'Hosts',                 'href' => '/thruk/cgi-bin/status.cgi?style=hostdetail');
  add_link('name' => 'Services',              'href' => '/thruk/cgi-bin/status.cgi?style=detail');
  add_link('name' => 'Host Groups',           'href' => '/thruk/cgi-bin/status.cgi?style=hostoverview');
    add_sub_link('name' => 'Summary',         'href' => '/thruk/cgi-bin/status.cgi?style=hostsummary');
    add_sub_sub_link('name' => 'Grid',        'href' => '/thruk/cgi-bin/status.cgi?style=hostgrid');
  add_link('name' => 'Service Groups',        'href' => '/thruk/cgi-bin/status.cgi?style=serviceoverview');
    add_sub_link('name' => 'Summary',         'href' => '/thruk/cgi-bin/status.cgi?style=servicesummary');
    add_sub_sub_link('name' => 'Grid',        'href' => '/thruk/cgi-bin/status.cgi?style=servicegrid');
  add_link('name' => 'Business View',         'href' => '/thruk/cgi-bin/businessview.cgi') if $c->stash->{'enable_shinken_features'};
  add_link('name' => 'Problems',              'href' => $c->stash->{'all_problems_link'});
    add_sub_link('name' => 'Services',        'href' => '/thruk/cgi-bin/status.cgi?host=all&servicestatustypes=28');
      add_sub_sub_link('name' => 'Unhandled Services', 'href' => '/thruk/cgi-bin/status.cgi?host=all&type=detail&hostprops=10&hoststatustypes=3&serviceprops=10&servicestatustypes=28');
    add_sub_link('name' => 'Hosts',           'href' => '/thruk/cgi-bin/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12');
      add_sub_sub_link('name' => 'Unhandled Hosts', 'href' => '/thruk/cgi-bin/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12&hostprops=10');
    add_sub_link('name' => 'Network Outages', 'href' => '/thruk/cgi-bin/outages.cgi');
    add_sub_link('name' => 'Root Problems',   'href' => '/thruk/cgi-bin/outagespbimp.cgi') if $c->stash->{'enable_shinken_features'};

  add_search('name' => '');


add_section('name' => 'Reports', icon => 'uil-book-alt');
  add_link('name' => 'Event Log',         'href' => '/thruk/cgi-bin/showlog.cgi');
  add_link('name' => 'Notifications',     'href' => '/thruk/cgi-bin/notifications.cgi');
  add_link('name' => 'Availability',      'href' => '/thruk/cgi-bin/avail.cgi');
  add_link('name' => 'Trends',            'href' => '/thruk/cgi-bin/trends.cgi') if $c->stash->{'use_feature_trends'};
  add_link('name' => 'Alert Summary',     'href' => '/thruk/cgi-bin/summary.cgi');


add_section('name' => 'System', icon => 'uil-tachometer-fast-alt');
  add_link('name' => 'Comments',          'href' => '/thruk/cgi-bin/extinfo.cgi?type=3');
  add_link('name' => 'Downtimes',         'href' => '/thruk/cgi-bin/extinfo.cgi?type=6');
    add_sub_link('name' => 'Recurring Downtimes', 'href' => '/thruk/cgi-bin/extinfo.cgi?type=6&recurring') if $c->stash->{'use_feature_recurring_downtime'};
  add_link('name' => 'Process Info',      'href' => '/thruk/cgi-bin/extinfo.cgi?type=0') if has_role('authorized_for_system_information');
  add_link('name' => 'Performance Info',  'href' => '/thruk/cgi-bin/extinfo.cgi?type=4');
  add_link('name' => 'Scheduling Queue',  'href' => '/thruk/cgi-bin/extinfo.cgi?type=7');
  add_link('name' => 'Configuration',     'href' => '/thruk/cgi-bin/config.cgi') if has_role('authorized_for_system_information', 'authorized_for_configuration_information');
  add_link('name' => 'Broadcasts',        'href' => '/thruk/cgi-bin/broadcast.cgi') if has_role('authorized_for_broadcasts');
