diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c5518121d1..1ee3f9f9fc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.1dev-160826 +Version: 6.1dev-160829 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 7616bf397a..2df19bf604 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="6.1dev-160826" +pandora_version="6.1dev-160829" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 414fb7a9ed..0eb79afcfe 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '6.1dev'; -use constant AGENT_BUILD => '160826'; +use constant AGENT_BUILD => '160829'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 78a520b34e..8965b9300c 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.1dev -%define release 160826 +%define release 160829 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index af803b270a..befd71a82b 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 6.1dev -%define release 160826 +%define release 160829 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index fb632b044a..088cf89dcb 100644 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="6.1dev" -PI_BUILD="160826" +PI_BUILD="160829" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index df7b894fb8..41833467e2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{160826} +{160829} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f878c77e2c..078a53099e 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("6.1dev(Build 160826)") +#define PANDORA_VERSION ("6.1dev(Build 160829)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b316aacab1..8816f9333e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(6.1dev(Build 160826))" + VALUE "ProductVersion", "(6.1dev(Build 160829))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 099e713ce0..25fa7e0893 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.1dev-160826 +Version: 6.1dev-160829 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 5b7eaa5371..4971089eab 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="6.1dev-160826" +pandora_version="6.1dev-160829" package_pear=0 package_pandora=1 diff --git a/pandora_console/extensions/db_status.php b/pandora_console/extensions/db_status.php index bda57705ae..c623f612e9 100755 --- a/pandora_console/extensions/db_status.php +++ b/pandora_console/extensions/db_status.php @@ -44,7 +44,7 @@ function extension_db_status() { "images/extensions.png", false, "", true, ""); - if (! check_acl ($config['id_user'], 0, "PM")) { + if (! check_acl ($config['id_user'], 0, "DM")) { db_pandora_audit("ACL Violation", "Trying to access db status"); require ("general/noaccess.php"); @@ -362,5 +362,5 @@ function extension_db_status_execute_sql_file($url, $connection) { } extensions_add_godmode_function('extension_db_status'); -extensions_add_godmode_menu_option(__('DB Status'), 'PM', 'gextensions', null, "v1r1", 'gdbman'); +extensions_add_godmode_menu_option(__('DB Status'), 'DM', 'gextensions', null, "v1r1", 'gdbman'); ?> \ No newline at end of file diff --git a/pandora_console/extensions/extension_uploader.php b/pandora_console/extensions/extension_uploader.php index 1a64ebb05d..e359d16855 100644 --- a/pandora_console/extensions/extension_uploader.php +++ b/pandora_console/extensions/extension_uploader.php @@ -87,6 +87,6 @@ function extension_uploader_extensions() { echo ""; } -extensions_add_godmode_menu_option(__('Extension uploader'), 'AM', null, null, "v1r1"); +extensions_add_godmode_menu_option(__('Extension uploader'), 'PM', null, null, "v1r1"); extensions_add_godmode_function('extension_uploader_extensions'); ?> diff --git a/pandora_console/extensions/users_connected.php b/pandora_console/extensions/users_connected.php index 116df50ed6..02a4fecf15 100644 --- a/pandora_console/extensions/users_connected.php +++ b/pandora_console/extensions/users_connected.php @@ -120,12 +120,7 @@ function users_extension_main_god ($god = true) { } } extensions_add_godmode_menu_option (__('Users connected'), 'UM','gusuarios',"users/icon.png", "v1r1"); - -if (isset($config["id_user"])) { - if (check_acl ($config["id_user"], 0, "UM")) { - extensions_add_operation_menu_option(__('Users connected'), 'workspace',"users/icon.png", "v1r1"); - } -} +extensions_add_operation_menu_option(__('Users connected'), 'workspace',"users/icon.png", "v1r1", '', "UM"); extensions_add_godmode_function('users_extension_main_god'); extensions_add_main_function('users_extension_main'); diff --git a/pandora_console/godmode/db/db_refine.php b/pandora_console/godmode/db/db_refine.php index 35b8b08e60..c2ddba0bab 100644 --- a/pandora_console/godmode/db/db_refine.php +++ b/pandora_console/godmode/db/db_refine.php @@ -83,7 +83,7 @@ echo '
'; echo ''.__('Source agent').'

'; $agent_selected = get_parameter_post ("origen", 0); -$agents = agents_get_group_agents (array_keys (users_get_groups ($config["id_user"], "AW"))); +$agents = agents_get_group_agents (array_keys (users_get_groups ($config["id_user"], "DM"))); html_print_select ($agents, "origen", $agent_selected, 'javascript:this.form.update_agent.click();', __('No agent selected'), '0', false, false, false, '', false, 'max-width:300px !important;'); diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 130c26c1d9..c30fd358a5 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -88,11 +88,6 @@ if (check_acl ($config['id_user'], 0, "UM")) { $menu_godmode["gusuarios"]["sub"] = $sub; } - -$menu_godmode["gmodules"]["text"] = __('Configuration'); -$menu_godmode["gmodules"]["sec2"] = "godmode/modules/manage_network_templates"; -$menu_godmode["gmodules"]["id"] = "god-configuration"; - $sub = array (); if (check_acl ($config['id_user'], 0, "PM")) { $sub["godmode/modules/manage_network_components"]["text"] = __('Network components'); @@ -126,7 +121,12 @@ if (check_acl ($config['id_user'], 0, "AW")) { $sub["gmassive"]["sub2"] = $sub2; } -$menu_godmode["gmodules"]["sub"] = $sub; +if (!empty($sub)) { + $menu_godmode["gmodules"]["text"] = __('Configuration'); + $menu_godmode["gmodules"]["sec2"] = "godmode/modules/manage_network_templates"; + $menu_godmode["gmodules"]["id"] = "god-configuration"; + $menu_godmode["gmodules"]["sub"] = $sub; +} if (check_acl ($config['id_user'], 0, "LM") || check_acl ($config['id_user'], 0, "AD")) { $menu_godmode["galertas"]["text"] = __('Alerts'); @@ -275,27 +275,33 @@ if (check_acl ($config['id_user'], 0, "PM")) { $menu_godmode["gsetup"]["sub"] = $sub; } -if (check_acl ($config['id_user'], 0, "PM")) { +if (check_acl ($config['id_user'], 0, "PM") || check_acl ($config['id_user'], 0, "DM")) { $menu_godmode["gextensions"]["text"] = __('Admin tools'); $menu_godmode["gextensions"]["sec2"] = "godmode/extensions"; $menu_godmode["gextensions"]["id"] = "god-extensions"; $sub = array (); - // Audit //meter en extensiones - $sub["godmode/admin_access_logs"]["text"] = __('System audit log'); - $sub["godmode/admin_access_logs"]["id"] = 'System audit log'; - $sub["godmode/setup/links"]["text"] = __('Links'); - $sub["godmode/setup/links"]["id"] = 'Links'; - - - $sub["godmode/extensions"]["sub2"] = $sub2; + if (check_acl ($config['id_user'], 0, "PM")) { + // Audit //meter en extensiones + $sub["godmode/admin_access_logs"]["text"] = __('System audit log'); + $sub["godmode/admin_access_logs"]["id"] = 'System audit log'; + $sub["godmode/setup/links"]["text"] = __('Links'); + $sub["godmode/setup/links"]["id"] = 'Links'; + $sub["extras/pandora_diag"]["text"] = __('Diagnostic info'); + $sub["extras/pandora_diag"]["id"] = 'Diagnostic info'; + $sub["godmode/setup/news"]["text"] = __('Site news'); + $sub["godmode/setup/news"]["id"] = 'Site news'; + $sub["godmode/setup/file_manager"]["text"] = __('File manager'); + $sub["godmode/setup/file_manager"]["id"] = 'File manager'; + } if (check_acl ($config['id_user'], 0, "DM")) { $sub["gdbman"]["text"] = __('DB maintenance'); $sub["gdbman"]["id"] = 'DB maintenance'; $sub["gdbman"]["type"] = "direct"; $sub["gdbman"]["subtype"] = "nolink"; + $sub2 = array (); $sub2["godmode/db/db_info"]["text"] = __('DB information'); $sub2["godmode/db/db_purge"]["text"] = __('Database purge'); @@ -305,103 +311,88 @@ if (check_acl ($config['id_user'], 0, "PM")) { $sub["gdbman"]["sub2"] = $sub2; } - $sub["extras/pandora_diag"]["text"] = __('Diagnostic info'); - $sub["extras/pandora_diag"]["id"] = 'Diagnostic info'; - - $sub["godmode/setup/news"]["text"] = __('Site news'); - $sub["godmode/setup/news"]["id"] = 'Site news'; - - $sub["godmode/setup/file_manager"]["text"] = __('File manager'); - $sub["godmode/setup/file_manager"]["id"] = 'File manager'; - - $sub["godmode/setup/snmp_wizard"]["text"] = __('SNMP Wizard'); - $sub["godmode/setup/snmp_wizard"]["id"] = 'SNMP Wizard'; $menu_godmode["gextensions"]["sub"] = $sub; } - -if (check_acl ($config['id_user'], 0, "PM")) { - if (is_array ($config['extensions'])) { +if (is_array ($config['extensions'])) { + + $sub = array (); + $sub2 = array (); + + foreach ($config['extensions'] as $extension) { + //If no godmode_menu is a operation extension + if ($extension['godmode_menu'] == '') { + continue; + } - $sub = array (); - $sub["godmode/extensions"]["text"] = __('Extension manager'); - $sub["godmode/extensions"]["id"] = 'Extension manager'; + $extmenu = $extension['godmode_menu']; + if ($extmenu["name"] == 'DB interface' && !check_acl ($config['id_user'], 0, "DM")) { + continue; + } - $sub2 = array (); + //Check the ACL for this user + if (! check_acl ($config['id_user'], 0, $extmenu['acl'])) { + continue; + } - foreach ($config['extensions'] as $extension) { - //If no godmode_menu is a operation extension - if ($extension['godmode_menu'] == '') { - continue; - } - - $extmenu = $extension['godmode_menu']; - - if ($extmenu["name"] == 'DB interface' && !check_acl ($config['id_user'], 0, "DM")) { - continue; - } - - //Check the ACL for this user - if (! check_acl ($config['id_user'], 0, $extmenu['acl'])) { - continue; - } - - //Check if was displayed inside other menu - if ($extension['godmode_menu']["fatherId"] == '') { - $sub2[$extmenu["sec2"]]["text"] = __($extmenu["name"]); - $sub2[$extmenu["sec2"]]["id"] = $extmenu["name"]; - $sub2[$extmenu["sec2"]]["refr"] = 0; - } - else { - if (array_key_exists('fatherId',$extmenu)) { - if (strlen($extmenu['fatherId']) > 0) { - if (array_key_exists('subfatherId',$extmenu)) { - if (strlen($extmenu['subfatherId']) > 0) { - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["text"] = __($extmenu['name']); - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["id"] = $extmenu['name']; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["refr"] = 0; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["icon"] = $extmenu['icon']; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["sec"] = 'extensions'; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["extension"] = true; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["enterprise"] = $extension['enterprise']; - $menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true; - } - else { - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']); - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["id"] = $extmenu['name']; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 0; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon']; - if ($extmenu["name"] == 'Cron jobs') - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'extensions'; - else - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions'; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["enterprise"] = $extension['enterprise']; - $menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true; - } + //Check if was displayed inside other menu + if ($extension['godmode_menu']["fatherId"] == '') { + $sub2[$extmenu["sec2"]]["text"] = __($extmenu["name"]); + $sub2[$extmenu["sec2"]]["id"] = $extmenu["name"]; + $sub2[$extmenu["sec2"]]["refr"] = 0; + } + else { + if (array_key_exists('fatherId',$extmenu)) { + if (strlen($extmenu['fatherId']) > 0) { + if (array_key_exists('subfatherId',$extmenu)) { + if (strlen($extmenu['subfatherId']) > 0) { + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["text"] = __($extmenu['name']); + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["id"] = $extmenu['name']; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["refr"] = 0; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["icon"] = $extmenu['icon']; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["sec"] = 'extensions'; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["extension"] = true; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["enterprise"] = $extension['enterprise']; + $menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true; } else { $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']); $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["id"] = $extmenu['name']; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 0; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon']; - $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions'; + if ($extmenu["name"] == 'Cron jobs') + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'extensions'; + else + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions'; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["enterprise"] = $extension['enterprise']; $menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true; } } + else { + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']); + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["id"] = $extmenu['name']; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 0; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon']; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions'; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true; + $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["enterprise"] = $extension['enterprise']; + $menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true; + } } } } - - - + } + + + if (!empty($sub2)) $sub["godmode/extensions"]["sub2"] = $sub2; - - + + if (!empty($sub)) { + $sub["godmode/extensions"]["text"] = __('Extension manager'); + $sub["godmode/extensions"]["id"] = 'Extension manager'; $submenu = array_merge($menu_godmode["gextensions"]["sub"],$sub); $menu_godmode["gextensions"]["sub"] = $submenu; } @@ -452,7 +443,6 @@ if (check_acl ($config['id_user'], 0, "PM")) { $sub["godmode/update_manager/update_manager&tab=messages"]["id"] = 'Messages'; } - $menu_godmode["messages"]["sub"] = $sub; } diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f396d56a14..2354637030 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC160826'; +$build_version = 'PC160829'; $pandora_version = 'v6.1dev'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_extensions.php b/pandora_console/include/functions_extensions.php index afea388b58..5345ba560b 100644 --- a/pandora_console/include/functions_extensions.php +++ b/pandora_console/include/functions_extensions.php @@ -351,7 +351,7 @@ function extensions_load_extensions ($process_login) { * @param string subfatherId Id of the parent submenu item for the current extension * @param string icon Path to the icon image (18x18 px). If this parameter is blank then predefined icon will be used */ -function extensions_add_operation_menu_option ($name, $fatherId = null, $icon = null, $version="N/A", $subfatherId = null) { +function extensions_add_operation_menu_option ($name, $fatherId = null, $icon = null, $version="N/A", $subfatherId = null, $acl = 'AR') { global $config; global $extension_file; @@ -361,7 +361,7 @@ function extensions_add_operation_menu_option ($name, $fatherId = null, $icon = call, we are sure it will be set. */ $option_menu['name'] = $name; - + $option_menu['acl'] = $acl; $extension = &$config['extensions'][$extension_file]; $option_menu['sec2'] = $extension['dir'] . '/' . mb_substr ($extension_file, 0, -4); diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index 5685dda646..81b2dab777 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -204,9 +204,6 @@ li:hover ul { display: block; } #subicon_god-setup { top: -140px; } -#subicon_god-extensions { - top: -262px; -} #subBulk_operations { top: -210px; } diff --git a/pandora_console/install.php b/pandora_console/install.php index 62d1a9a10f..613aa114e7 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
0)) { - if (array_key_exists('subfatherId',$extension_menu)) { - if ((strlen($extension_menu['subfatherId']) > 0)) { - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["text"] = __($extension_menu['name']); - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["id"] = $extension_menu['name']; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["refr"] = 0; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["icon"] = $extension_menu['icon']; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["sec"] = 'extensions'; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["extension"] = true; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["enterprise"] = $extension['enterprise']; - $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; - } - else { - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["text"] = __($extension_menu['name']); - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["id"] = $extension_menu['name']; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["refr"] = 0; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["icon"] = $extension_menu['icon']; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["sec"] = 'extensions'; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["extension"] = true; - $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["enterprise"] = $extension['enterprise']; - $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; - } + $sub[$extension_menu["sec2"]]["text"] = $extension_menu["name"]; + $sub[$extension_menu["sec2"]]["id"] = $extension_menu["name"]; + $sub[$extension_menu["sec2"]]["refr"] = 0; + } + else { + if (array_key_exists('fatherId',$extension_menu)) { + // Check that extension father ID exists previously on the menu + if ((strlen($extension_menu['fatherId']) > 0)) { + if (array_key_exists('subfatherId',$extension_menu)) { + if ((strlen($extension_menu['subfatherId']) > 0)) { + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["text"] = __($extension_menu['name']); + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["id"] = $extension_menu['name']; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["refr"] = 0; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["icon"] = $extension_menu['icon']; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["sec"] = 'extensions'; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["extension"] = true; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]["enterprise"] = $extension['enterprise']; + $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } else { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["text"] = __($extension_menu['name']); @@ -470,13 +476,31 @@ if (check_acl ($config['id_user'], 0, "AR")) { $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } } + else { + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["text"] = __($extension_menu['name']); + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["id"] = $extension_menu['name']; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["refr"] = 0; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["icon"] = $extension_menu['icon']; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["sec"] = 'extensions'; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["extension"] = true; + $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["enterprise"] = $extension['enterprise']; + $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; + } } } } - + } + + + if (!empty($sub)) { + $menu_operation["extensions"]["text"] = __('Tools'); + $menu_operation["extensions"]["sec2"] = "operation/extensions"; + $menu_operation["extensions"]["id"] = "oper-extensions"; $menu_operation["extensions"]["sub"] = $sub; + } } +//~ } // Save operation menu array to use in operation/extensions.php view $operation_menu_array = $menu_operation; diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index cd27f6e15a..bdc9911def 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 6.1dev -%define release 160826 +%define release 160829 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 7362be9828..7b23872cee 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 6.1dev -%define release 160826 +%define release 160829 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql index 4953f7a935..1b8f659b0a 100644 --- a/pandora_console/pandoradb.data.oracle.sql +++ b/pandora_console/pandoradb.data.oracle.sql @@ -66,7 +66,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5'); INSERT INTO tconfig (token, value) VALUES ('step_compact','1'); INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc'); INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.1dev'); -INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160826'); +INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160829'); INSERT INTO tconfig (token, value) VALUES ('show_unknown','0'); INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1'); INSERT INTO tconfig (token, value) VALUES ('style','pandora'); diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 40ecc03d65..a3a882911c 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 6.1dev-160826 +Version: 6.1dev-160829 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 886089aed7..0f7912b202 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="6.1dev-160826" +pandora_version="6.1dev-160829" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index c912b9e3b4..2e7a3c16ca 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -43,7 +43,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "6.1dev"; -my $pandora_build = "160826"; +my $pandora_build = "160829"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 60daf91f3c..7e12a51014 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 6.1dev -%define release 160826 +%define release 160829 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e1d0c8e583..3d818fd283 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 6.1dev -%define release 160826 +%define release 160829 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2cfff15c24..382dbba6e9 100644 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="6.1dev" -PI_BUILD="160826" +PI_BUILD="160829" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ade0528638..26b00cc3b2 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -33,7 +33,7 @@ use PandoraFMS::Tools; use PandoraFMS::DB; # version: define current version -my $version = "6.1dev PS160826"; +my $version = "6.1dev PS160829"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index fc542649d9..0cbbf4e28c 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -35,7 +35,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "6.1dev PS160826"; +my $version = "6.1dev PS160829"; # save program name for logging my $progname = basename($0);