WIP massive services

This commit is contained in:
fbsanchez 2020-07-06 19:35:31 +02:00
parent 534aa8c7c5
commit cf26293a33
2 changed files with 19 additions and 0 deletions

View File

@ -92,6 +92,12 @@ if ($satellite_options != ENTERPRISE_NOT_HOOK) {
$options_satellite = array_merge($options_satellite, $satellite_options);
}
$options_services = enterprise_hook('massive_services_options');
if ($options_services === ENTERPRISE_NOT_HOOK) {
$options_services = [];
}
if (in_array($option, array_keys($options_alerts))) {
$tab = 'massive_alerts';
} else if (in_array($option, array_keys($options_agents))) {
@ -108,6 +114,8 @@ if (in_array($option, array_keys($options_alerts))) {
$tab = 'massive_satellite';
} else if (in_array($option, array_keys($options_plugins))) {
$tab = 'massive_plugins';
} else if (in_array($option, array_keys($options_services))) {
$tab = 'massive_services';
}
if ($tab == 'massive_agents' && $option == '') {
@ -173,6 +181,10 @@ switch ($tab) {
$options = $options_plugins;
break;
case 'massive_services':
$options = $options_services;
break;
default:
// Default.
break;
@ -241,6 +253,11 @@ if ($satellitetab == ENTERPRISE_NOT_HOOK) {
$satellitetab = '';
}
$servicestab = enterprise_hook('massive_services_tab');
if ($servicestab == ENTERPRISE_NOT_HOOK) {
$servicestab = '';
}
$onheader = [];
$onheader['massive_agents'] = $agentstab;
@ -254,6 +271,7 @@ $onheader['massive_alerts'] = $alertstab;
$onheader['policies'] = $policiestab;
$onheader['snmp'] = $snmptab;
$onheader['satellite'] = $satellitetab;
$onheader['services'] = $servicestab;
/*
Hello there! :)

View File

@ -189,6 +189,7 @@ if (check_acl($config['id_user'], 0, 'AW')) {
enterprise_hook('massivepolicies_submenu');
enterprise_hook('massivesnmp_submenu');
enterprise_hook('massivesatellite_submenu');
enterprise_hook('massiveservices_submenu');
$sub['gmassive']['sub2'] = $sub2;
}