2006-03-27 05:37:27 +02:00
< ? php
2008-08-22 20:07:32 +02:00
2009-06-08 20:26:14 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
2007-04-18 11:58:26 +02:00
2006-07-06 19:06:59 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
2008-08-22 20:07:32 +02:00
// as published by the Free Software Foundation for version 2.
2006-07-06 19:06:59 +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
// GNU General Public License for more details.
2009-06-08 20:26:14 +02:00
2011-07-28 11:25:42 +02:00
if ( ! isset ( $_SESSION [ 'id_usuario' ])) {
2008-06-16 20:09:56 +02:00
session_start ();
session_write_close ();
}
2007-04-18 11:58:26 +02:00
2012-03-01 17:41:02 +01:00
// Global & session management
require_once ( '../../include/config.php' );
require_once ( '../../include/auth/mysql.php' );
2011-07-28 11:25:42 +02:00
require_once ( $config [ 'homedir' ] . '/include/functions.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_db.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_reporting.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_graph.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_modules.php' );
2006-07-09 01:32:38 +02:00
2008-08-12 Esteban Sanchez <estebans@artica.es>
* pandoradb_data.sql: Added default languages.
* include/streams.php, include/gettext.php: Added to repository. New
files to add gettext support of mo files.
* include/functions_db.php: Function lang_string() functionallity
changed to use gettext library.
* include/languages/language_es_es.php,
include/languages/language_gl.php, include/languages/language_en.php,
include/languages/language_pt_br.php,
include/languages/language_it.php,
include/languages/language_ast_es.php,
include/languages/language_es_la.php,
include/languages/language_de.php, include/languages/language_fr.php,
include/languages/language_ca.php: Files deleted, they are
deprecated since we have moved to gettext.
* lude/languages/pt_br.mo, include/languages/es.mo,
include/languages/fr.po, include/languages/it.po,
include/languages/ca.po, include/languages/ast.po,
include/languages/de.po, include/languages/gl.mo: Gettext translations
of the previous languages we have in language_*.php files.
* include/languages/Makefile: Added to repository to generate
index.pot and mo files of each translation.
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/config_process.php,
include/functions.php, include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/sla_view.php, operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, general/logoff.php,
general/pandora_help.php, general/footer.php, general/noaccess.php,
general/logon_failed.php, general/links_menu.php,
general/login_page.php, general/logon_ok.php, general/header.php,
general/main_menu.php, godmode/groups/configure_group.php,
godmode/groups/group_list.php, godmode/setup/news.php,
godmode/setup/links.php, godmode/setup/setup.php,
godmode/users/user_list.php, godmode/users/configure_user.php,
godmode/profiles/profile_list.php, godmode/admin_access_logs.php,
godmode/db/db_info_data.php, godmode/db/db_main.php,
godmode/db/db_audit.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced string parameters of __() callings to
plain english. Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
check_login ();
2011-04-18 16:05:54 +02:00
2012-03-01 17:41:02 +01:00
echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css"/>' ;
2011-04-18 16:05:54 +02:00
$id = get_parameter ( 'id' );
$label = base64_decode ( get_parameter ( 'label' , '' ));
2009-10-06 21:33:25 +02:00
?>
<! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
< html xmlns = " http://www.w3.org/1999/xhtml " >
< head >
< ? php
2007-04-18 11:58:26 +02:00
// Parsing the refresh before sending any header
2009-01-21 19:55:29 +01:00
$refresh = ( int ) get_parameter ( " refresh " , - 1 );
if ( $refresh > 0 ) {
2011-04-13 18:11:02 +02:00
$query = ui_get_url_refresh ( false );
2009-10-06 21:33:25 +02:00
echo '<meta http-equiv="refresh" content="' . $refresh . '; URL=' . $query . '" />' ;
2009-01-21 19:55:29 +01:00
}
?>
< meta http - equiv = " Content-Type " content = " text/html; charset=utf-8 " />
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
< title > Pandora FMS Graph ( < ? php echo modules_get_agentmodule_agent_name ( $id ) . ' - ' . $label ; ?> )</title>
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
< link rel = " stylesheet " href = " ../../include/styles/pandora_minimal.css " type = " text/css " />
< script type = 'text/javaScript' src = '../../include/javascript/calendar.js' ></ script >
< script type = 'text/javascript' src = '../../include/javascript/x_core.js' ></ script >
< script type = 'text/javascript' src = '../../include/javascript/x_event.js' ></ script >
< script type = 'text/javascript' src = '../../include/javascript/x_slide.js' ></ script >
2012-03-22 12:22:07 +01:00
< script type = 'text/javascript' src = '../../include/javascript/pandora.js' ></ script >
2012-03-08 17:32:11 +01:00
< script type = 'text/javascript' src = '../../include/javascript/jquery-1.7.1.js' ></ script >
2009-01-21 19:55:29 +01:00
< script type = 'text/javascript' ><!--
var defOffset = 2 ;
var defSlideTime = 220 ;
var tnActive = 0 ;
var visibleMargin = 15 ;
2009-10-06 21:27:57 +02:00
var menuW = 400 ;
2009-01-21 19:55:29 +01:00
var menuH = 310 ;
window . onload = function () {
var d ;
d = xGetElementById ( 'divmenu' );
d . termNumber = 1 ;
xMoveTo ( d , visibleMargin - menuW , 0 );
xShow ( d );
xAddEventListener ( document , 'mousemove' , docOnMousemove , false );
2010-06-01 12:03:07 +02:00
};
2008-06-16 20:09:56 +02:00
2009-01-21 19:55:29 +01:00
function docOnMousemove ( evt ) {
var e = new xEvent ( evt );
var d = getTermEle ( e . target );
if ( ! tnActive ) { // no def is active
if ( d ) { // mouse is over a term, activate its def
xSlideTo ( 'divmenu' , 0 , xPageY ( d ), defSlideTime );
tnActive = 1 ;
}
}
else { // a def is active
if ( ! d ) { // mouse is not over a term, deactivate active def
xSlideTo ( 'divmenu' , visibleMargin - menuW , xPageY ( d ), defSlideTime );
tnActive = 0 ;
}
}
}
2007-05-18 14:56:05 +02:00
2009-01-21 19:55:29 +01:00
function getTermEle ( ele ) {
//window.status = ele;
while ( ele && ! ele . termNumber ) {
if ( ele == document ) return null ;
ele = xParent ( ele );
}
return ele ;
}
2011-08-16 19:09:43 +02:00
function show_others () {
if ( ! $ ( " #checkbox-avg_only " ) . attr ( 'checked' )) {
$ ( " #hidden-show_other " ) . val ( 1 );
}
else {
$ ( " #hidden-show_other " ) . val ( 0 );
}
}
2009-01-21 19:55:29 +01:00
//-->
</ script >
2010-09-13 12:26:33 +02:00
</ head >
2012-03-01 17:41:02 +01:00
< body bgcolor = " #ffffff " style = 'background:#ffffff;' >
2009-01-21 19:55:29 +01:00
< ? php
2006-07-09 01:32:38 +02:00
2009-01-21 19:55:29 +01:00
// Get input parameters
2008-06-16 20:09:56 +02:00
$label = get_parameter ( " label " , " " );
2007-04-18 11:58:26 +02:00
if ( ! isset ( $_GET [ " period " ]) OR ( ! isset ( $_GET [ " id " ]))) {
2008-08-12 Esteban Sanchez <estebans@artica.es>
* pandoradb_data.sql: Added default languages.
* include/streams.php, include/gettext.php: Added to repository. New
files to add gettext support of mo files.
* include/functions_db.php: Function lang_string() functionallity
changed to use gettext library.
* include/languages/language_es_es.php,
include/languages/language_gl.php, include/languages/language_en.php,
include/languages/language_pt_br.php,
include/languages/language_it.php,
include/languages/language_ast_es.php,
include/languages/language_es_la.php,
include/languages/language_de.php, include/languages/language_fr.php,
include/languages/language_ca.php: Files deleted, they are
deprecated since we have moved to gettext.
* lude/languages/pt_br.mo, include/languages/es.mo,
include/languages/fr.po, include/languages/it.po,
include/languages/ca.po, include/languages/ast.po,
include/languages/de.po, include/languages/gl.mo: Gettext translations
of the previous languages we have in language_*.php files.
* include/languages/Makefile: Added to repository to generate
index.pot and mo files of each translation.
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/config_process.php,
include/functions.php, include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/sla_view.php, operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, general/logoff.php,
general/pandora_help.php, general/footer.php, general/noaccess.php,
general/logon_failed.php, general/links_menu.php,
general/login_page.php, general/logon_ok.php, general/header.php,
general/main_menu.php, godmode/groups/configure_group.php,
godmode/groups/group_list.php, godmode/setup/news.php,
godmode/setup/links.php, godmode/setup/setup.php,
godmode/users/user_list.php, godmode/users/configure_user.php,
godmode/profiles/profile_list.php, godmode/admin_access_logs.php,
godmode/db/db_info_data.php, godmode/db/db_main.php,
godmode/db/db_audit.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced string parameters of __() callings to
plain english. Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
echo " <h3 class='error'> " . __ ( 'There was a problem locating the source of the graph' ) . " </h3> " ;
2007-04-18 11:58:26 +02:00
exit ;
}
2008-06-16 20:09:56 +02:00
$period = get_parameter ( " period " , 3600 );
$draw_alerts = get_parameter ( " draw_alerts " , 0 );
2011-08-16 19:09:43 +02:00
$avg_only = get_parameter ( " avg_only " , 1 );
$show_other = ( bool ) get_parameter ( 'show_other' , false );
if ( $show_other ) {
$avg_only = 0 ;
}
2008-06-16 20:09:56 +02:00
$period = get_parameter ( " period " , 86400 );
$id = get_parameter ( " id " , 0 );
$width = get_parameter ( " width " , 555 );
$height = get_parameter ( " height " , 245 );
$label = get_parameter ( " label " , " " );
$start_date = get_parameter ( " start_date " , date ( " Y-m-d " ));
$draw_events = get_parameter ( " draw_events " , 0 );
$graph_type = get_parameter ( " type " , " sparse " );
$zoom = get_parameter ( " zoom " , 1 );
2010-10-22 19:55:54 +02:00
$baseline = get_parameter ( " baseline " , 0 );
2012-02-13 11:54:45 +01:00
$show_events_graph = get_parameter ( " show_events_graph " , 0 );
2007-04-18 11:58:26 +02:00
2007-08-06 13:44:49 +02:00
if ( $zoom > 1 ) {
2009-01-21 19:55:29 +01:00
$height = $height * ( $zoom / 2.1 );
$width = $width * ( $zoom / 1.4 );
2012-02-13 11:54:45 +01:00
echo " <script type='text/javascript'>window.resizeTo( $width + 10, $height + 280);</script> " ;
2007-08-06 13:44:49 +02:00
}
2009-01-21 19:55:29 +01:00
$utime = get_system_time ();
$current = date ( " Y-m-d " , $utime );
2009-10-06 21:33:25 +02:00
if ( $start_date != $current )
$date = strtotime ( $start_date );
else
$date = $utime ;
2011-04-18 16:05:54 +02:00
$urlImage = 'http://' ;
if ( $config [ 'https' ]) {
$urlImage = 'https://' ;
}
2011-08-11 13:54:35 +02:00
$urlImage .= $_SERVER [ 'SERVER_NAME' ] . $config [ 'homeurl' ] . '/' ;
2010-03-18 21:01:48 +01:00
// log4x doesnt support flash yet
//
2012-02-13 11:54:45 +01:00
echo " <br> " ;
2012-03-01 17:41:02 +01:00
2012-03-08 17:32:11 +01:00
echo " <div style='margin-left:30px'> " ;
2012-03-01 17:41:02 +01:00
2011-04-18 16:05:54 +02:00
switch ( $graph_type ) {
2011-04-19 14:11:00 +02:00
case 'boolean' :
2011-07-19 11:28:09 +02:00
echo grafico_modulo_boolean ( $id , $period , $draw_events , $width , $height ,
2012-03-08 13:32:59 +01:00
$label , null , $draw_alerts , $avg_only , false , $date , false , $urlImage , 'adapter_' . $graph_type );
2012-02-13 11:54:45 +01:00
echo '<br><br><br>' ;
if ( $show_events_graph )
2012-03-08 13:32:59 +01:00
echo graphic_module_events ( $id , $width , $height , $period , $config [ 'homeurl' ] . '/' , $zoom , 'adapted_' . $graph_type );
2011-04-19 14:11:00 +02:00
break ;
2011-04-18 16:05:54 +02:00
case 'sparse' :
2011-07-19 11:28:09 +02:00
echo grafico_modulo_sparse ( $id , $period , $draw_events , $width , $height ,
2011-06-13 13:12:32 +02:00
$label , null , $draw_alerts , $avg_only , false , $date , '' , $baseline ,
2012-03-08 13:32:59 +01:00
0 , true , false , $urlImage , 1 , false , 'adapter_' . $graph_type );
2012-02-13 11:54:45 +01:00
echo '<br><br><br>' ;
if ( $show_events_graph )
2012-03-08 13:32:59 +01:00
echo graphic_module_events ( $id , $width , $height , $period , $config [ 'homeurl' ] . '/' , $zoom , 'adapted_' . $graph_type );
2011-04-18 16:05:54 +02:00
break ;
2011-04-19 14:11:00 +02:00
case 'string' :
2011-07-19 11:28:09 +02:00
echo grafico_modulo_string ( $id , $period , $draw_events , $width , $height ,
2012-03-08 13:32:59 +01:00
$label , null , $draw_alerts , 1 , false , $date , false , $urlImage , 'adapter_' . $graph_type );
2012-02-13 11:54:45 +01:00
echo '<br><br><br>' ;
if ( $show_events_graph )
2012-03-08 13:32:59 +01:00
echo graphic_module_events ( $id , $width , $height , $period , $config [ 'homeurl' ] . '/' , $zoom , 'adapted_' . $graph_type );
2011-04-19 14:11:00 +02:00
break ;
case 'log4x' :
2011-07-19 11:28:09 +02:00
echo grafico_modulo_log4x ( $id , $period , $draw_events , $width , $height ,
2012-03-08 13:32:59 +01:00
$label , $unit_name , $draw_alerts , 1 , $pure , $date );
2012-02-13 11:54:45 +01:00
echo '<br><br><br>' ;
if ( $show_events_graph )
echo graphic_module_events ( $id , $width , $height , $period , $config [ 'homeurl' ] . '/' , $zoom );
2011-04-19 14:11:00 +02:00
break ;
2011-04-18 16:05:54 +02:00
default :
2011-07-19 11:28:09 +02:00
echo fs_error_image ( '../images' );
2011-04-18 16:05:54 +02:00
break ;
}
2012-03-01 17:41:02 +01:00
echo " </div> " ;
2007-08-06 13:44:49 +02:00
2009-10-06 21:33:25 +02:00
//z-index is 1 because 2 made the calendar show under the divmenu.
2012-02-13 11:54:45 +01:00
echo '<div id="divmenu" class="menu" style="z-index:1; height:280px;"><b>' . __ ( 'Pandora FMS Graph configuration menu' ) . '</b><br />' . __ ( 'Please, make your changes and apply with the <i>Reload</i> button' );
2009-01-21 19:55:29 +01:00
echo '<form method="get" action="stat_win.php">' ;
2011-04-27 15:43:31 +02:00
html_print_input_hidden ( " id " , $id );
html_print_input_hidden ( " label " , $label );
2006-07-09 21:11:59 +02:00
2009-01-21 19:55:29 +01:00
if ( isset ( $_GET [ " type " ])) {
$type = get_parameter_get ( " type " );
2011-04-27 15:43:31 +02:00
html_print_input_hidden ( " type " , $type );
2009-01-21 19:55:29 +01:00
}
echo '<table class="databox_frame" cellspacing="5">' ;
echo '<tr><td>' . __ ( 'Refresh time' ) . '</td><td colspan="2">' ;
2007-05-20 19:12:31 +02:00
2011-04-27 15:43:31 +02:00
html_print_input_text ( " refresh " , $refresh , '' , 5 );
2009-01-21 19:55:29 +01:00
echo ' ' . __ ( 'Avg. Only' );
2011-08-16 19:09:43 +02:00
html_print_checkbox ( " avg_only " , 1 , ( bool ) $avg_only , false , false , 'show_others()' );
html_print_input_hidden ( 'show_other' , 0 );
2009-01-21 19:55:29 +01:00
echo '<tr><td>' . __ ( 'Begin date' ) . '</td><td>' ;
2011-04-27 15:43:31 +02:00
html_print_input_text ( " start_date " , substr ( $start_date , 0 , 10 ), '' , 10 );
html_print_image ( " images/calendar_view_day.png " , false , array ( " onclick " => " scwShow(scwID('text-start_date'),this); " ));
2009-01-21 19:55:29 +01:00
echo '</td></tr><tr><td>' . __ ( 'Zoom factor' ) . '</td>' ;
echo '<td>' ;
$options = array ();
$options [ $zoom ] = 'x' . $zoom ;
$options [ 1 ] = 'x1' ;
$options [ 2 ] = 'x2' ;
$options [ 3 ] = 'x3' ;
$options [ 4 ] = 'x4' ;
2011-04-27 15:43:31 +02:00
html_print_select ( $options , " zoom " , $zoom );
2009-01-21 19:55:29 +01:00
echo '</td></tr><tr><td>' . __ ( 'Time range' ) . '</td><td>' ;
2012-03-15 17:03:51 +01:00
html_print_extended_select_for_time ( 'period' , $period , '' , '' , 0 , 7 );
2009-01-21 19:55:29 +01:00
echo '</td></tr><tr><td>' . __ ( 'Show events' ) . '</td><td>' ;
2011-04-27 15:43:31 +02:00
html_print_checkbox ( " draw_events " , 1 , ( bool ) $draw_events );
2009-01-21 19:55:29 +01:00
echo '</td></tr><tr><td>' . __ ( 'Show alerts' ) . '</td><td>' ;
2011-04-27 15:43:31 +02:00
html_print_checkbox ( " draw_alerts " , 1 , ( bool ) $draw_alerts );
2009-01-21 19:55:29 +01:00
2010-10-26 15:18:34 +02:00
if ( $config [ 'enterprise_installed' ] && $graph_type == " sparse " ) {
echo '</td></tr><tr><td>' . __ ( 'Draw baseline' ) . '</td><td>' ;
2011-04-27 15:43:31 +02:00
html_print_checkbox ( " baseline " , 1 , ( bool ) $baseline );
2010-10-26 15:18:34 +02:00
}
2010-10-22 19:55:54 +02:00
2009-01-21 19:55:29 +01:00
echo '</td><td>' ;
2012-02-13 11:54:45 +01:00
echo '</td></tr><tr><td>' . __ ( 'Show event graph' ) . '</td><td>' ;
html_print_checkbox ( " show_events_graph " , 1 , ( bool ) $show_events_graph );
echo '</td><td>' ;
2012-03-01 17:41:02 +01:00
html_print_submit_button ( __ ( 'GO' ), " submit " , false , 'class="sub next"' );
2006-03-27 05:37:27 +02:00
2009-06-08 20:26:14 +02:00
echo '</td></tr></table></form></div></body></html>' ;
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
?>
2010-09-13 12:26:33 +02:00
</ body >
</ html >