function nagios_menu in Nagios Monitoring 7
Same name and namespace in other branches
- 5 nagios.module \nagios_menu()
- 6 nagios.module \nagios_menu()
Implements hook_menu().
File
- ./
nagios.module, line 48
Code
function nagios_menu() {
$items = [];
$items['admin/config/system/nagios'] = [
'type' => MENU_NORMAL_ITEM,
'title' => 'Nagios Monitoring',
'description' => 'Settings for Nagios Monitoring',
'page callback' => 'drupal_get_form',
'page arguments' => [
'nagios_settings',
],
'access arguments' => [
'administer site configuration',
],
];
$path = variable_get('nagios_page_path', 'nagios-status');
$callback = variable_get('nagios_page_callback', 'nagios_status_page');
$items[$path] = [
'type' => MENU_SUGGESTED_ITEM,
'title' => 'Nagios status page',
'page callback' => $callback,
'access callback' => 'variable_get',
'access arguments' => [
'nagios_enable_status_page',
FALSE,
],
];
return $items;
}