From 96e78fd22f707f5917f96723ed7809ff6e14ccd1 Mon Sep 17 00:00:00 2001 From: raulmateos Date: Thu, 17 Mar 2011 20:51:46 +0000 Subject: [PATCH] 2011-03-17 Raul Mateos * operation/menu.php, godmode/menu.php, godmode/setup/setup.php, extensions/pandora_logs.php, extensions/dbmanager.php: Cleaned code and updated year. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4107 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++ pandora_console/extensions/dbmanager.php | 17 +++++----- pandora_console/extensions/pandora_logs.php | 12 +++---- pandora_console/godmode/menu.php | 35 +++++---------------- pandora_console/godmode/setup/setup.php | 3 +- pandora_console/operation/menu.php | 15 ++++----- 6 files changed, 35 insertions(+), 53 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 311a8d5fcd..d990e74482 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-03-17 Raul Mateos + + * operation/menu.php, godmode/menu.php, godmode/setup/setup.php, + extensions/pandora_logs.php, extensions/dbmanager.php: + Cleaned code and updated year. + 2011-03-17 Sergio Martin * operation/integria_incidents diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index 42e87459a5..2aa97f2dfb 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -2,7 +2,7 @@ //Pandora FMS- http://pandorafms.com // ================================================== -// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -78,21 +78,20 @@ function dbmanager_query ($sql, &$error) { function dbmgr_extension_main () { require_css_file ('dbmanager', 'extensions/dbmanager/'); - global $config; - - if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { - pandora_audit("ACL Violation", "Trying to access Setup Management"); - require ("general/noaccess.php"); - return; - } + global $config; + if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { + pandora_audit("ACL Violation", "Trying to access Setup Management"); + require ("general/noaccess.php"); + return; + } $sql = (string) get_parameter ('sql'); print_page_header (__('Database interface'), "", false, false, true); echo '
'; - echo "This is an advanced extension to interface with Pandora FMS database directly from WEB console using native SQL sentences. Please note that you can damage your Pandora FMS installation if you don't know exactly what are you doing, this means that you can severily damage your setup using this extension. This extension is intended to be used only by experienced users with a depth knowledgue of Pandora FMS internals."; + echo "This is an advanced extension to interface with Pandora FMS database directly from WEB console using native SQL sentences. Please note that you can damage your Pandora FMS installation if you don't know exactly what are you are doing, this means that you can severily damage your setup using this extension. This extension is intended to be used only by experienced users with a depth knowledge of Pandora FMS internals."; echo '
'; echo "
"; diff --git a/pandora_console/extensions/pandora_logs.php b/pandora_console/extensions/pandora_logs.php index d9c1fb889a..f6beabbe5c 100644 --- a/pandora_console/extensions/pandora_logs.php +++ b/pandora_console/extensions/pandora_logs.php @@ -2,7 +2,7 @@ //Pandora FMS- http://pandorafms.com // ================================================== -// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -38,11 +38,11 @@ function view_logfile ($file_name) { function pandoralogs_extension_main () { global $config; - if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { - pandora_audit("ACL Violation", "Trying to access Setup Management"); - require ("general/noaccess.php"); - return; - } + if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { + pandora_audit("ACL Violation", "Trying to access Setup Management"); + require ("general/noaccess.php"); + return; + } print_page_header (__("System logfile viewer"), "images/extensions.png", false, "", true, "" ); diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 1a22b9e235..2b6e8684d7 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -34,7 +34,6 @@ if (check_acl ($config['id_user'], 0, "AW")) { if (check_acl ($config["id_user"], 0, "PM")) { $sub["godmode/groups/group_list"]["text"] = __('Manage groups'); $sub["godmode/groups/modu_group_list"]["text"] = __('Module groups'); - $sub["godmode/agentes/planned_downtime"]["text"] = __('Scheduled downtime'); $sub["godmode/agentes/fields_manager"]["text"] = __('Manage custom fields'); } @@ -50,11 +49,8 @@ if (check_acl ($config['id_user'], 0, "AW")) { $sub = array (); $sub["godmode/massive/massive_operations&tab=massive_agents"]["text"] = __('Agents operations'); - $sub["godmode/massive/massive_operations&tab=massive_modules"]["text"] = __('Modules operations'); - $sub["godmode/massive/massive_operations&tab=massive_alerts"]["text"] = __('Alerts operations'); - enterprise_hook('massivepolicies_submenu'); $menu["gmassive"]["sub"] = $sub; @@ -71,15 +67,11 @@ if (check_acl ($config['id_user'], 0, "PM")) { $sub = array (); $sub["godmode/modules/manage_nc_groups"]["text"] = __('Component groups'); - $sub["godmode/modules/manage_network_components"]["text"] = __('Network components'); - enterprise_hook ('components_submenu'); - $sub["godmode/modules/manage_network_templates"]["text"] = __('Module templates'); - enterprise_hook ('inventory_submenu'); - + $menu["gmodules"]["sub"] = $sub; } @@ -90,9 +82,8 @@ if (check_acl ($config['id_user'], 0, "LM")) { $sub = array (); $sub["godmode/alerts/alert_templates"]["text"] = __('Templates'); - $sub["godmode/alerts/alert_actions"]["text"] = __('Actions'); - + if (check_acl ($config['id_user'], 0, "PM")) { $sub["godmode/alerts/alert_commands"]["text"] = __('Commands'); } @@ -121,7 +112,6 @@ if (check_acl($config['id_user'], 0, "LW")) { $sub = array (); //$sub["godmode/snmpconsole/snmp_alert"]["text"] = __('Component groups'); $sub['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters'); - enterprise_hook ('snmpconsole_submenu'); $menu["gsnmpconsole"]["sub"] = $sub; @@ -139,9 +129,8 @@ if (check_acl ($config['id_user'], 0, "IW")) { // Custom graph builder $sub["godmode/reporting/graphs"]["text"] = __('Graph builder'); - enterprise_hook ('reporting_godmenu'); - + $menu["greporting"]["sub"] = $sub; } if (check_acl ($config['id_user'], 0, "IW")) { @@ -164,16 +153,13 @@ if (check_acl ($config['id_user'], 0, "PM")) { $menu["gservers"]["text"] = __('Manage servers'); $menu["gservers"]["sec2"] = "godmode/servers/modificar_server"; $menu["gservers"]["id"] = "god-servers"; - + $sub = array (); $sub["godmode/servers/manage_recontask"]["text"] = __('Manage recontask'); - $sub["godmode/servers/plugin"]["text"] = __('Manage plugins'); - $sub["godmode/servers/recon_script"]["text"] = __('Manage recon script'); - enterprise_hook('export_target_submenu'); - + $menu["gservers"]["sub"] = $sub; } @@ -186,7 +172,7 @@ if (check_acl ($config['id_user'], 0, "PM")) { $menu["glog"]["text"] = __('System audit log'); $menu["glog"]["sec2"] = "godmode/admin_access_logs"; $menu["glog"]["id"] = "god-audit"; - + // Setup $menu["gsetup"]["text"] = __('Setup'); $menu["gsetup"]["sec2"] = "godmode/setup/setup"; @@ -206,8 +192,8 @@ if (check_acl ($config['id_user'], 0, "PM")) { enterprise_hook ('historydb_submenu'); enterprise_hook ('enterprise_acl_submenu'); enterprise_hook ('skins_submenu'); - $sub["extras/pandora_diag"]["text"] = __('Diagnostic info'); + $menu["gsetup"]["sub"] = $sub; } @@ -218,15 +204,10 @@ if (check_acl ($config['id_user'], 0, "DM")) { $sub = array (); $sub["godmode/db/db_info"]["text"] = __('DB information'); - $sub["godmode/db/db_purge"]["text"] = __('Database purge'); - $sub["godmode/db/db_refine"]["text"] = __('Database debug'); - $sub["godmode/db/db_audit"]["text"] = __('Database audit'); - $sub["godmode/db/db_event"]["text"] = __('Database event'); - $sub["godmode/db/db_sanity"]["text"] = __('Database sanity'); $menu["gdbman"]["sub"] = $sub; diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 2035e16253..7e5e9c2c72 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -99,7 +99,6 @@ $table->data[11][0] = __('Enforce https'); $table->data[11][1] = __('Yes').' '.print_radio_button_extended ('https', 1, '', $config["https"], false, "if (! confirm ('" . __('If SSL is not properly configured you will lose access to Pandora FMS Console. Do you want to continue?') . "')) return false", '', true) .'  '; $table->data[11][1] .= __('No').' '.print_radio_button ('https', 0, '', $config["https"], true); - $table->data[14][0] = __('Attachment store'); $table->data[14][1] = print_input_text ('attachment_store', $config["attachment_store"], '', 50, 255, true); diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index f075182e15..dd06e88631 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -29,9 +29,7 @@ $menu['class'] = 'operation'; if (check_acl ($config['id_user'], 0, "AR")) { enterprise_hook ('metaconsole_menu'); - enterprise_hook ('dashboard_menu'); - enterprise_hook ('services_menu'); //View agents @@ -225,11 +223,11 @@ if (check_acl ($config['id_user'], 0, "AR")) { $menu["eventos"]["sub"] = $sub; } -// ANY user can view itself ! - // Users - $menu["usuarios"]["text"] = __('Edit my user'); - $menu["usuarios"]["sec2"] = "operation/users/user_edit"; - $menu["usuarios"]["id"] = "oper-users"; +// ANY user can view him/herself ! +// Users +$menu["usuarios"]["text"] = __('Edit my user'); +$menu["usuarios"]["sec2"] = "operation/users/user_edit"; +$menu["usuarios"]["id"] = "oper-users"; //End of Users @@ -260,7 +258,6 @@ if (check_acl ($config['id_user'], 0, "AR")) { $sub = array (); $sub["operation/reporting/custom_reporting"]["text"] = __('Custom reporting'); - $sub["operation/reporting/graph_viewer"]["text"] = __('Custom graphs'); $menu["reporting"]["sub"] = $sub;