pandorafms/pandora_console/ajax.php

105 lines
3.3 KiB
PHP
Raw Normal View History

2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
// GNU General Public License for more details.
2018-11-13 12:55:25 +01:00
// Enable profiler for testing
if (!defined('__PAN_XHPROF__')) {
define('__PAN_XHPROF__', 0);
}
2018-11-13 12:55:25 +01:00
if (__PAN_XHPROF__ === 1) {
if (function_exists('tideways_xhprof_enable')) {
tideways_xhprof_enable();
}
2018-11-13 12:55:25 +01:00
}
if ((! file_exists('include/config.php')) || (! is_readable('include/config.php'))) {
exit;
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
}
2018-11-21 13:08:58 +01:00
// Don't start a session before this import.
// The session is configured and started inside the config process.
require_once 'include/config.php';
require_once 'include/functions.php';
require_once 'include/functions_db.php';
require_once 'include/auth/mysql.php';
// Hash login process
if (isset($_GET['loginhash'])) {
$loginhash_data = get_parameter('loginhash_data', '');
$loginhash_user = str_rot13(get_parameter('loginhash_user', ''));
if ($config['loginhash_pwd'] != ''
&& $loginhash_data == md5($loginhash_user.io_output_password($config['loginhash_pwd']))
) {
db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $loginhash_user;
$config['id_user'] = $loginhash_user;
} else {
include_once 'general/login_page.php';
db_pandora_audit('Logon Failed (loginhash', '', 'system');
while (@ob_end_flush()) {
}
exit('</html>');
}
}
2018-05-09 10:52:06 +02:00
$public_hash = get_parameter('hash', false);
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
// Check user
2018-05-24 16:28:51 +02:00
if ($public_hash == false) {
check_login();
2018-05-09 10:52:06 +02:00
} else {
enterprise_include_once('include/functions_dashboard.php');
if (dashboard_check_public_hash($public_hash) === false) {
db_pandora_audit('Invalid public hash', 'Trying to access public dashboard');
include 'general/noaccess.php';
exit;
}
2018-05-09 10:52:06 +02:00
}
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
define('AJAX', true);
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
// Enterprise support
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
include_once ENTERPRISE_DIR.'/load_enterprise.php';
}
$config['remote_addr'] = $_SERVER['REMOTE_ADDR'];
2009-03-31 Esteban Sanchez <estebans@artica.es> * godmode/agentes/module_manager_editor_plugin.php: Added plugin components select. Fixes #2707900. * godmode/alerts/alert_list.php: Fixed an error when showing agents list. * include/functions_events.php: Added get_similar_events_ids() to get events which are similars (same description and agent module). Renamed process_event_delete() and process_event_validate(). Added similars flag to both delete_event() an validate_event(). * include/functions_reporting.php: Added timestamp parameter to select statements to fix #2707841. * include/functions_ui.php: Added a class to pagination divs. * operation/agentes/estado_generalagente.php: Style correction. Removed period on agent access graph. * operation/agentes/exportdata.php: Fixed many notices by including config.php instead of using global. Style corrections. * operation/events/events.php: When the events were grouped and deleted or validated, only one was being updated. Added AJAX support to validate and delete single operations. Style corrections. Fixed #2707872 * reporting/fgraph.php: Many fixes on agent access graph. Fixes #2707856 * reporting/pandora_graph.php: Added a couple of properties to the class. * reporting/pchart_graph.php: Do not add the grid or axis labels on charts if asked. Show no progress bar if value is 0 and a title is shown. Style corrections. * include/styles/pandora_width.css: Renamed to panoramic theme. Added style for event_control element. * include/styles/pandora.css: Added style for event_control element. * godmode/modules/manage_network_components.php: Fixed table width for panoramic theme. * ajax.php: Added remote_addr to config array. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1582 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-01 10:04:49 +02:00
$page = (string) get_parameter('page');
$page = safe_url_extraclean($page);
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
$page .= '.php';
$config['id_user'] = $_SESSION['id_usuario'];
$isFunctionSkins = enterprise_include_once('include/functions_skins.php');
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$config['relative_path'] = enterprise_hook('skins_set_image_skin_path', [$config['id_user']]);
}
if (isset($config['metaconsole'])) {
// Not cool way of know if we are executing from metaconsole or normal console
if ($config['metaconsole']) {
define('METACONSOLE', true);
}
}
if (file_exists($page)) {
include_once $page;
} else {
echo '<br /><b class="error">Sorry! I can\'t find the page '.$page.'!</b>';
2008-06-17 Esteban Sanchez <estebans@artica.es> * ajax.php: Added to repository. AJAX interface for Pandora. A new time is coming... * pandoradb.sql: Added id_group to treport. A report is now assigned to a group of agents. Changes in treport_content to add an order field, drop sla fields and use an enum for the type. NOTE: This will break all your current defined reports, update under your responsabillity. Added table treport_content_sla_combined to define SLAs in the SLA types reports. * godmode/reporting/graph_builder.php: Use Pandora functions. Adde javascript code to display the module icon when changing from the dropdown menu. * godmode/reporting/reporting_builder.php: Almost complet rewritten to use Pandora HTML functions. Style correction. * include/functions.php: Added new report types. Style correction. * include/functions_db.php: Use Pandora database functions to get simple values. Added functions get_agents_in_group(), get_modules_in_agent(), get_simple_alerts_in_agent(), get_combined_alerts_in_agent(), get_alerts_in_agent(), get_monitor_downs_in_period(), get_monitor_last_down_timestamp_in_period(), get_alert_fires_in_period(), get_alert_last_fire_timestamp_in_period(). Deleted debug output and fixed calling to an inexistent function in return_moduledata_sum_value(). * include/functions_html.php: Tab style correction. Thanks to Ramon for the advice. Fixed some errors on print_table that was causing not to work fine if rowclass or colspan was defined. * include/functions_reporting.php: Adde date support to return_module_SLA(), event_reporting(). Added alert_reporting(), monitor_health_reporting(), general_group_reporting() and agents_detailed_reporting() to implement new report types. Style correction. * include/javascript/pandora.js: Added html_entity_decode() function to decode some AJAX results. * javascript/jquery.js: Added to repository. jQuery version 1.2.4a * include/javascript/jquery.timeentry.js: jQuery plugin to manage time inputs. * include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage date inputs in a dropdown calendar. * include/languages/date_*.js, include/languages/time_*.js: Added to repository. Translation of date and time strings for the new calendar javascript support. * include/languages/language_en.php: Added new strings relatives to reports. * include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_gl.php, include/languages/language_pt_br.php: Fixed a variable name. * godmode/groups/group_list.php: Avoid the use of an extra indentation by returning if no success on comprueba_login(). * include/styles/pandora.css: Add some classes. Tab style correction. * operation/agentes/ver_agente.php: Added AJAX support to agent operations. * operation/reporting/graph_viewer.php: Period dropdown selection improved and printed with Pandora functions. * operation/reporting/reporting_viewer.php: Massive rewritten. Implemented date and time support, added new report types, use Pandora functions... * reporting/fgraph.php: Documentation fix. Added a new graphic to show monitors health. * godmode/agentes/agent_manager.php, operation/reporting/custom_reporting.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
}
2018-11-13 12:55:25 +01:00
if (__PAN_XHPROF__ === 1) {
pandora_xhprof_display_result('ajax', 'console');
2018-11-13 12:55:25 +01:00
}