2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2009-06-08 20:26:14 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2011-03-02 22:56:48 +01:00
|
|
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
2009-06-08 20:26:14 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
2009-06-08 20:26:14 +02:00
|
|
|
// modify it under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +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
|
|
|
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
/**
|
|
|
|
* @package Include
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/ldap.php,
include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/config_process.php,
include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change or add the subpackage in phpdoc
comment blocks for to organize more the result phpdoc files. Start to
document undocument functions.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1882 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-26 17:37:47 +02:00
|
|
|
* @subpackage Reporting
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
*/
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
|
2011-04-13 17:11:51 +02:00
|
|
|
global $config;
|
2011-05-06 09:12:58 +02:00
|
|
|
|
|
|
|
//Fix ajax include this file.
|
|
|
|
global $ajax;
|
|
|
|
|
|
|
|
if (!isset($ajax)) {
|
|
|
|
require_once ('functions_graph.php');
|
|
|
|
}
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.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/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.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/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.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/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.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/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
require_once ($config['homedir'].'/include/functions_agents.php');
|
|
|
|
require_once ($config['homedir'].'/include/functions_modules.php');
|
|
|
|
require_once ($config['homedir'].'/include/functions_users.php');
|
2015-09-28 09:55:16 +02:00
|
|
|
require_once ($config['homedir'].'/include/functions.php');
|
2011-04-13 17:11:51 +02:00
|
|
|
|
2012-02-21 15:05:57 +01:00
|
|
|
function visual_map_print_item_toolbox($idDiv, $text, $float) {
|
|
|
|
if ($float == 'left') {
|
|
|
|
$margin = 'margin-right';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$margin = 'margin-left';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<div class="button_toolbox" id="' . $idDiv . '"
|
2017-01-16 13:31:56 +01:00
|
|
|
style="font-weight: bolder; text-align:; float: ' . $float . ';'
|
2012-02-21 15:05:57 +01:00
|
|
|
. $margin . ': 5px;">';
|
|
|
|
echo $text;
|
|
|
|
echo '</span>';
|
|
|
|
echo '</div>';
|
|
|
|
}
|
|
|
|
|
2014-11-25 11:52:04 +01:00
|
|
|
function visual_map_print_user_line_handles($layoutData) {
|
|
|
|
$id = $layoutData['id'];
|
|
|
|
|
|
|
|
$start_x = $layoutData['pos_x'];
|
|
|
|
$start_y = $layoutData['pos_y'];
|
|
|
|
$end_x = $layoutData['width'];
|
|
|
|
$end_y = $layoutData['height'];
|
|
|
|
$z_index = 2;
|
|
|
|
|
|
|
|
$sizeStyle = "";
|
|
|
|
|
|
|
|
$radious_handle = 12 / 2;
|
|
|
|
|
|
|
|
|
|
|
|
//Handle of start
|
2014-11-25 13:15:51 +01:00
|
|
|
echo '<div id="handler_start_' . $id . '" class="item handler_start" ' .
|
2014-11-25 11:52:04 +01:00
|
|
|
'style="z-index: ' .$z_index . ';' .
|
|
|
|
'position: absolute; top: ' . ($start_y - $radious_handle) . 'px; ' .
|
|
|
|
'left: ' . ($start_x - $radious_handle) . 'px;' .
|
2017-01-16 13:31:56 +01:00
|
|
|
'text-align: ;' .
|
2014-11-25 11:52:04 +01:00
|
|
|
'display: inline-block; ' . $sizeStyle . '">';
|
|
|
|
|
|
|
|
html_print_image("images/dot_red.png");
|
|
|
|
|
|
|
|
echo "</div>";
|
|
|
|
|
|
|
|
//Handle of end
|
2014-11-25 13:15:51 +01:00
|
|
|
echo '<div id="handler_end_' . $id . '" class="item handler_end" ' .
|
2014-11-25 11:52:04 +01:00
|
|
|
'style="z-index: ' .$z_index . ';' .
|
|
|
|
'position: absolute; top: ' . ($end_y - $radious_handle) . 'px; ' .
|
|
|
|
'left: ' . ($end_x - $radious_handle) . 'px;' .
|
2017-01-16 13:31:56 +01:00
|
|
|
'text-align: ;' .
|
2014-11-25 11:52:04 +01:00
|
|
|
'display: inline-block; ' . $sizeStyle . '">';
|
|
|
|
|
|
|
|
html_print_image("images/dot_green.png");
|
|
|
|
|
|
|
|
echo "</div>";
|
|
|
|
}
|
|
|
|
|
2014-11-11 15:56:31 +01:00
|
|
|
function visual_map_print_item($mode = "read", $layoutData,
|
2016-03-15 09:25:48 +01:00
|
|
|
$proportion = null, $show_links = true, $isExternalLink = false, $graph_javascript = true) {
|
2011-04-13 17:11:51 +02:00
|
|
|
global $config;
|
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/graphs/functions_gd.php,
include/graphs/fgraph.php, include/functions_visual_map.php,
include/fgraph.php, operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php. operation/agentes/stat_win.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
mobile/operation/agents/tactical.php, general/logon_ok.php,
godmode/reporting/graph_builder.preview.php: added function "progress_bar2"
and changed in source code of Pandora.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4199 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 11:29:10 +02:00
|
|
|
require_once ($config["homedir"] . '/include/functions_graph.php');
|
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
|
|
|
require_once ($config["homedir"] . '/include/functions_custom_graphs.php');
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/graphs/functions_gd.php,
include/graphs/fgraph.php, include/functions_visual_map.php,
include/fgraph.php, operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php. operation/agentes/stat_win.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
mobile/operation/agents/tactical.php, general/logon_ok.php,
godmode/reporting/graph_builder.preview.php: added function "progress_bar2"
and changed in source code of Pandora.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4199 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 11:29:10 +02:00
|
|
|
|
2016-09-27 12:16:14 +02:00
|
|
|
//add 60 px for visual console map
|
2016-10-25 11:41:59 +02:00
|
|
|
$width = $layoutData['width'];
|
|
|
|
$height = $layoutData['height'];
|
2016-09-27 12:16:14 +02:00
|
|
|
$max_percentile = $layoutData['height'];
|
2010-03-31 11:13:54 +02:00
|
|
|
$top = $layoutData['pos_y'];
|
|
|
|
$left = $layoutData['pos_x'];
|
|
|
|
$id = $layoutData['id'];
|
2015-08-26 13:30:54 +02:00
|
|
|
$label = io_safe_output($layoutData['label']);
|
2010-03-31 11:13:54 +02:00
|
|
|
$id_module = $layoutData['id_agente_modulo'];
|
|
|
|
$type = $layoutData['type'];
|
|
|
|
$period = $layoutData['period'];
|
2016-11-16 18:58:27 +01:00
|
|
|
$type_graph = $layoutData['type_graph'];
|
2014-11-21 10:42:14 +01:00
|
|
|
$border_width = $layoutData['border_width'];
|
|
|
|
$border_color = $layoutData['border_color'];
|
|
|
|
$fill_color = $layoutData['fill_color'];
|
2017-01-16 13:31:56 +01:00
|
|
|
$label_position = $layoutData['label_position'];
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
$sizeStyle = '';
|
2010-08-13 13:08:14 +02:00
|
|
|
$borderStyle = '';
|
2010-03-31 11:13:54 +02:00
|
|
|
$imageSize = '';
|
|
|
|
|
2014-11-19 16:29:36 +01:00
|
|
|
|
2015-07-27 16:24:04 +02:00
|
|
|
|
2015-07-24 16:43:54 +02:00
|
|
|
if (!empty($proportion)) {
|
|
|
|
$top = $top * $proportion['proportion_height'];
|
|
|
|
$left = $left * $proportion['proportion_width'];
|
|
|
|
}
|
|
|
|
|
2017-01-16 12:05:36 +01:00
|
|
|
$agentname = agents_get_name(agents_get_module_id ($id_module));
|
|
|
|
$label = str_replace($agentname,ui_print_truncate_text($agentname, 'agent_small', false, true, false, '…', false),$label);
|
|
|
|
$text = '<span id="text_' . $id . '" class="text">' . $label .'</span>';
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
if($height == 0){
|
|
|
|
|
|
|
|
switch($type){
|
|
|
|
|
|
|
|
case 0:
|
|
|
|
case 11:
|
|
|
|
$tableheight0 = '70';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
$tableheight0 = '30';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 9:
|
|
|
|
$tableheight0 = '130';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
$tableheight0 = '180';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SERVICE:
|
|
|
|
$tableheight0 = '50';
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$tableheight0 = $height;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($layoutData['width'] == 0 || $layoutData['height'] == 0){
|
|
|
|
switch($type){
|
|
|
|
|
|
|
|
case 0:
|
|
|
|
case 11:
|
|
|
|
$himg = '70';
|
|
|
|
$wimg ='70';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
if(get_parameter('action') == 'edit'){
|
|
|
|
|
|
|
|
$himg = '30';
|
|
|
|
$wimg = '150';
|
|
|
|
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$himg = '15';
|
|
|
|
$wimg = '150';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 9:
|
|
|
|
$himg = '130';
|
|
|
|
$wimg = '130';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
$himg = '180';
|
|
|
|
$wimg = '300';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SERVICE:
|
|
|
|
$himg = '50';
|
|
|
|
$wimg = '150';
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$wimg = $layoutData['width'];
|
|
|
|
$himg = $layoutData['height'];
|
|
|
|
|
|
|
|
if($type == 3){
|
|
|
|
if(get_parameter('action') == 'edit'){
|
|
|
|
|
|
|
|
$himg = '30';
|
|
|
|
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$himg = '15';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($type == 9){
|
|
|
|
$himg = $wimg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if($label_position == 'left'){
|
|
|
|
$text = '<table style="float:left;height:'.$himg.'px;"><tr><td></td></tr><tr><td><span id="text_' . $id . '" class="text">' . $label .'</span></td></tr><tr><td></td></tr></table>';
|
|
|
|
}
|
|
|
|
else if($label_position == 'right'){
|
|
|
|
$text = '<table style="float:right;height:'.$himg.'px;"><tr><td></td></tr><tr><td><span style="" id="text_' . $id . '" class="text">' . $label .'</span></td></tr><tr><td></td></tr></table>';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$text = '<table style="width:'.$wimg.'px;"><tr><td></td></tr><tr><td><span style="" id="text_' . $id . '" class="text">' . $label .'</span></td></tr><tr><td></td></tr></table>';
|
|
|
|
}
|
|
|
|
|
2015-07-24 16:43:54 +02:00
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
|
2014-11-11 12:38:18 +01:00
|
|
|
if (!isset($layoutData['status_calculated'])) {
|
|
|
|
$layoutData['status_calculated'] =
|
|
|
|
visual_map_get_status_element($layoutData);
|
|
|
|
}
|
2014-09-25 13:52:11 +02:00
|
|
|
$status = $layoutData['status_calculated'];
|
2013-06-25 11:34:12 +02:00
|
|
|
|
2014-11-11 12:38:18 +01:00
|
|
|
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
switch ($status) {
|
2012-07-06 13:45:02 +02:00
|
|
|
case VISUAL_MAP_STATUS_CRITICAL_BAD:
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
//Critical (BAD)
|
2013-08-02 12:53:50 +02:00
|
|
|
$colorStatus = COL_CRITICAL;
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
break;
|
2012-07-06 13:45:02 +02:00
|
|
|
case VISUAL_MAP_STATUS_CRITICAL_ALERT:
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
//Critical (ALERT)
|
2013-08-02 12:53:50 +02:00
|
|
|
$colorStatus = COL_ALERTFIRED;
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
break;
|
2012-07-06 13:45:02 +02:00
|
|
|
case VISUAL_MAP_STATUS_NORMAL:
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
//Normal (OK)
|
2013-08-02 12:53:50 +02:00
|
|
|
$colorStatus = COL_NORMAL;
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
break;
|
2012-07-06 13:45:02 +02:00
|
|
|
case VISUAL_MAP_STATUS_WARNING:
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
//Warning
|
2013-08-02 12:53:50 +02:00
|
|
|
$colorStatus = COL_WARNING;
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
break;
|
2013-07-24 13:06:24 +02:00
|
|
|
case VISUAL_MAP_STATUS_UNKNOWN:
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
default:
|
2012-06-11 12:24:02 +02:00
|
|
|
//Unknown
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
// Default is Blue (Other)
|
2013-08-02 12:53:50 +02:00
|
|
|
$colorStatus = COL_UNKNOWN;
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2014-11-18 12:41:15 +01:00
|
|
|
$element_enterprise = array();
|
|
|
|
if (enterprise_installed()) {
|
|
|
|
$element_enterprise = enterprise_visual_map_print_item(
|
2015-10-05 16:45:49 +02:00
|
|
|
$mode, $layoutData, $proportion, $show_links, $isExternalLink);
|
2014-11-18 12:41:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-11-11 15:56:31 +01:00
|
|
|
$link = false;
|
|
|
|
$url = "#";
|
|
|
|
|
|
|
|
if ($show_links && ($mode == 'read')) {
|
|
|
|
switch ($type) {
|
|
|
|
case STATIC_GRAPH:
|
|
|
|
case GROUP_ITEM:
|
|
|
|
if ($layoutData['enable_link']
|
|
|
|
&& can_user_access_node()) {
|
|
|
|
|
|
|
|
$link = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
2014-11-11 17:57:51 +01:00
|
|
|
case LABEL:
|
|
|
|
if ($layoutData['id_layout_linked'] != 0) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
break;
|
2014-11-11 18:29:11 +01:00
|
|
|
case ICON:
|
|
|
|
if ($layoutData['id_layout_linked'] > 0) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
elseif (preg_match('/<a.*href=["\'](.*)["\']>/', $layoutData['label'], $matches)) {
|
|
|
|
// Link to an URL
|
|
|
|
if ($layoutData['enable_link']) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif (preg_match('/^.*(http:\/\/)((.)+).*$/i', $layoutData['label'])) {
|
|
|
|
// Link to an URL
|
|
|
|
if ($layoutData['enable_link']) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2014-11-13 12:53:48 +01:00
|
|
|
case SIMPLE_VALUE:
|
|
|
|
case SIMPLE_VALUE_MAX:
|
|
|
|
case SIMPLE_VALUE_MIN:
|
|
|
|
case SIMPLE_VALUE_AVG:
|
|
|
|
//Extract id service if it is a prediction module.
|
|
|
|
$id_service = db_get_value_filter('custom_integer_1',
|
|
|
|
'tagente_modulo',
|
|
|
|
array('id_agente_modulo' => $layoutData['id_agente_modulo'],
|
|
|
|
'prediction_module' => 1));
|
|
|
|
|
|
|
|
if (!empty($id_service) && can_user_access_node()) {
|
|
|
|
if ($layoutData['enable_link']) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
elseif ($layoutData['id_layout_linked'] > 0) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
elseif ($layoutData['enable_link'] && can_user_access_node()) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
break;
|
2014-11-13 13:56:42 +01:00
|
|
|
case PERCENTILE_BAR:
|
|
|
|
case PERCENTILE_BUBBLE:
|
|
|
|
if (!empty($layoutData['id_agent'])
|
|
|
|
&& empty($layoutData['id_layout_linked'])) {
|
|
|
|
|
|
|
|
|
|
|
|
if ($layoutData['enable_link']
|
|
|
|
&& can_user_access_node()) {
|
|
|
|
|
|
|
|
//Extract id service if it is a prediction module.
|
|
|
|
$id_service = db_get_value_filter('custom_integer_1',
|
|
|
|
'tagente_modulo',
|
|
|
|
array(
|
|
|
|
'id_agente_modulo' => $layoutData['id_agente_modulo'],
|
|
|
|
'prediction_module' => 1));
|
|
|
|
|
|
|
|
if (!empty($id_service)) {
|
|
|
|
//Link to an service page
|
|
|
|
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
else if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
// Link to an module
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Link to an agent
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif ($layoutData['id_layout_linked'] > 0) {
|
|
|
|
// Link to a map
|
|
|
|
$link = true;
|
|
|
|
|
|
|
|
}
|
2014-11-17 18:11:30 +01:00
|
|
|
break;
|
|
|
|
case MODULE_GRAPH:
|
|
|
|
if ((
|
|
|
|
($layoutData['id_layout_linked'] == "")
|
|
|
|
|| ($layoutData['id_layout_linked'] == 0))
|
|
|
|
&& can_user_access_node()) {
|
|
|
|
|
|
|
|
if ($layoutData['enable_link']) {
|
|
|
|
|
|
|
|
//Extract id service if it is a prediction module.
|
|
|
|
$id_service = db_get_value_filter('custom_integer_1',
|
|
|
|
'tagente_modulo',
|
|
|
|
array('id_agente_modulo' => $layoutData['id_agente_modulo'],
|
|
|
|
'prediction_module' => 1));
|
|
|
|
|
|
|
|
if ($id_service === false) {
|
|
|
|
$id_service = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($id_service != 0) {
|
|
|
|
//Link to an service page
|
|
|
|
if (!empty($layoutData['id_metaconsole'])) {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Link to a map
|
|
|
|
$link = true;
|
|
|
|
}
|
|
|
|
|
2014-11-18 15:16:45 +01:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (!empty($element_enterprise)) {
|
|
|
|
$link = $element_enterprise['link'];
|
|
|
|
}
|
2014-11-13 13:56:42 +01:00
|
|
|
break;
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($link) {
|
|
|
|
switch ($type) {
|
|
|
|
case STATIC_GRAPH:
|
|
|
|
$is_a_service = false;
|
|
|
|
$is_a_link_to_other_visualconsole = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (enterprise_installed()) {
|
|
|
|
$id_service = services_service_from_module
|
|
|
|
($layoutData['id_agente_modulo']);
|
|
|
|
|
|
|
|
if (!empty($id_service))
|
|
|
|
$is_a_service = true;
|
|
|
|
}
|
|
|
|
|
2014-11-11 17:16:48 +01:00
|
|
|
if ($layoutData['id_layout_linked'] != 0) {
|
2014-11-11 15:56:31 +01:00
|
|
|
$is_a_link_to_other_visualconsole = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($is_a_service) {
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$server = db_get_row('tmetaconsole_setup',
|
|
|
|
'id', $layoutData['id_metaconsole']);
|
|
|
|
|
|
|
|
$url = $server["server_url"] . "/" .
|
|
|
|
'index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ($is_a_link_to_other_visualconsole) {
|
|
|
|
if (empty($layout_data['id_metaconsole'])) {
|
2015-01-13 12:50:13 +01:00
|
|
|
$url = $config['homeurl'] . "index.php?sec=reporting&sec2=operation/visual_console/render_view&pure=" . $config["pure"] . "&id=" . $layoutData["id_layout_linked"];
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
|
|
|
else {
|
2015-05-20 11:50:30 +02:00
|
|
|
$url = "index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap=" . $layoutData["id_layout_linked"] . "&refr=0";
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
// Link to an module
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'index.php?sec=estado&sec2=operation/agentes/status_monitor&id_module=' . $layoutData['id_agente_modulo'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = ui_meta_get_url_console_child(
|
|
|
|
$layoutData['id_metaconsole'],
|
|
|
|
"estado", "operation/agentes/ver_agente&id_agente=" . $layoutData['id_agent']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Link to an agent
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $layoutData['id_agent'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = ui_meta_get_url_console_child(
|
|
|
|
$layoutData['id_metaconsole'],
|
|
|
|
"estado", "operation/agentes/ver_agente&id_agente=" . $layoutData['id_agent']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
case GROUP_ITEM:
|
2015-01-13 12:50:13 +01:00
|
|
|
$is_a_link_to_other_visualconsole = false;
|
|
|
|
if ($layoutData['id_layout_linked'] != 0) {
|
|
|
|
$is_a_link_to_other_visualconsole = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($is_a_link_to_other_visualconsole) {
|
|
|
|
if (empty($layout_data['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] . "index.php?sec=reporting&sec2=operation/visual_console/render_view&pure=" . $config["pure"] . "&id=" . $layoutData["id_layout_linked"];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = "index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=1&id_visualmap=" . $layoutData["id_layout_linked"] . "&refr=0";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=' .
|
|
|
|
$layoutData['id_group'];
|
|
|
|
}
|
2014-11-11 15:56:31 +01:00
|
|
|
break;
|
2014-11-11 17:57:51 +01:00
|
|
|
case LABEL:
|
|
|
|
if ($layoutData['id_layout_linked'] != 0) {
|
|
|
|
// Link to a map
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
|
|
|
|
}
|
|
|
|
break;
|
2014-11-11 18:29:11 +01:00
|
|
|
case ICON:
|
|
|
|
$url_icon = "";
|
|
|
|
if ($layoutData['id_layout_linked'] != 0) {
|
|
|
|
// Link to a map
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = 'index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$pure = get_parameter('pure', 0);
|
|
|
|
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '&id_visualmap=' . $layoutData["id_layout_linked"] . '&refr=0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif (preg_match('/<a.*href=["\'](.*)["\']>/', $layoutData['label'], $matches)) {
|
|
|
|
// Link to an URL
|
|
|
|
if ($layoutData['enable_link']) {
|
|
|
|
$url = strip_tags($matches[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif (preg_match('/^.*(http:\/\/)((.)+).*$/i', $layoutData['label'])) {
|
|
|
|
// Link to an URL
|
|
|
|
if ($layoutData['enable_link']) {
|
|
|
|
$url = strip_tags($layoutData['label']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2014-11-13 12:53:48 +01:00
|
|
|
case SIMPLE_VALUE:
|
|
|
|
case SIMPLE_VALUE_MAX:
|
|
|
|
case SIMPLE_VALUE_MIN:
|
|
|
|
case SIMPLE_VALUE_AVG:
|
|
|
|
//Extract id service if it is a prediction module.
|
|
|
|
$id_service = db_get_value_filter('custom_integer_1',
|
|
|
|
'tagente_modulo',
|
|
|
|
array('id_agente_modulo' => $layoutData['id_agente_modulo'],
|
|
|
|
'prediction_module' => 1));
|
|
|
|
|
|
|
|
if (!empty($id_service) && can_user_access_node()) {
|
|
|
|
|
|
|
|
//Link to an service page
|
2014-11-13 13:56:42 +01:00
|
|
|
if (!empty($layoutData['id_metaconsole'])) {
|
2014-11-13 12:53:48 +01:00
|
|
|
$server = db_get_row('tmetaconsole_setup',
|
2014-11-13 13:56:42 +01:00
|
|
|
'id', $layoutData['id_metaconsole']);
|
2014-11-13 12:53:48 +01:00
|
|
|
|
|
|
|
$url = $server["server_url"] . "/" .
|
|
|
|
'index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = 'index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2014-11-13 13:56:42 +01:00
|
|
|
elseif ($layoutData['id_layout_linked'] > 0) {
|
2014-11-13 12:53:48 +01:00
|
|
|
|
|
|
|
// Link to a map
|
2014-11-13 13:56:42 +01:00
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = 'index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
|
2014-11-13 12:53:48 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$pure = get_parameter('pure', 0);
|
2014-11-13 13:56:42 +01:00
|
|
|
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '&id_visualmap=' . $layoutData["id_layout_linked"] . '&refr=0';
|
2014-11-13 12:53:48 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
// Link to an module
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'index.php?sec=estado&sec2=operation/agentes/status_monitor&id_module=' . $layoutData['id_agente_modulo'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = ui_meta_get_url_console_child(
|
|
|
|
$layoutData['id_metaconsole'],
|
|
|
|
"estado", "operation/agentes/ver_agente&id_agente=" . $layoutData['id_agent']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2014-11-13 13:56:42 +01:00
|
|
|
case PERCENTILE_BAR:
|
|
|
|
case PERCENTILE_BUBBLE:
|
|
|
|
if (!empty($layoutData['id_agent'])) {
|
|
|
|
|
|
|
|
//Extract id service if it is a prediction module.
|
|
|
|
$id_service = db_get_value_filter('custom_integer_1',
|
|
|
|
'tagente_modulo',
|
|
|
|
array(
|
|
|
|
'id_agente_modulo' => $layoutData['id_agente_modulo'],
|
|
|
|
'prediction_module' => 1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($id_service)) {
|
|
|
|
//Link to an service page
|
|
|
|
|
|
|
|
if (!empty($layoutData['id_metaconsole'])) {
|
|
|
|
$server = db_get_row('tmetaconsole_setup',
|
|
|
|
'id', $layoutData['id_metaconsole']);
|
|
|
|
|
|
|
|
$url =
|
|
|
|
$server["server_url"] . "/" .
|
|
|
|
'index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = 'index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
// Link to an module
|
|
|
|
if (!empty($layoutData['id_metaconsole'])) {
|
|
|
|
$server = db_get_row('tmetaconsole_setup',
|
|
|
|
'id', $layoutData['id_metaconsole']);
|
|
|
|
|
|
|
|
$url =
|
|
|
|
$server["server_url"] .
|
|
|
|
'/index.php?sec=estado&sec2=operation/agentes/status_monitor&id_module=' . $layoutData['id_agente_modulo'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url =
|
|
|
|
$config['homeurl'].'/index.php?sec=estado&sec2=operation/agentes/status_monitor&id_module=' . $layoutData['id_agente_modulo'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Link to an agent
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'index.php?' .
|
|
|
|
'sec=estado&' .
|
|
|
|
'sec2=operation/agentes/ver_agente&id_agente='.$layoutData['id_agent'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = ui_meta_get_url_console_child(
|
|
|
|
$layoutData['id_metaconsole'],
|
|
|
|
"estado", 'operation/agentes/ver_agente&id_agente='.$layoutData['id_agent']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif ($layoutData['id_layout_linked'] > 0) {
|
|
|
|
|
|
|
|
// Link to a map
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = 'index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$pure = get_parameter('pure', 0);
|
|
|
|
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '&id_visualmap=' . $layoutData["id_layout_linked"] . '&refr=0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2014-11-17 18:11:30 +01:00
|
|
|
case MODULE_GRAPH:
|
|
|
|
if ((
|
|
|
|
($layoutData['id_layout_linked'] == "")
|
|
|
|
|| ($layoutData['id_layout_linked'] == 0))
|
|
|
|
&& can_user_access_node()) {
|
|
|
|
|
|
|
|
if ($layoutData['enable_link']) {
|
|
|
|
|
|
|
|
//Extract id service if it is a prediction module.
|
|
|
|
$id_service = db_get_value_filter('custom_integer_1',
|
|
|
|
'tagente_modulo',
|
|
|
|
array('id_agente_modulo' => $layoutData['id_agente_modulo'],
|
|
|
|
'prediction_module' => 1));
|
|
|
|
|
|
|
|
if (!empty($id_service)) {
|
|
|
|
//Link to an service page
|
|
|
|
if (!empty($layoutData['id_metaconsole'])) {
|
|
|
|
$server = db_get_row('tmetaconsole_setup',
|
|
|
|
'id', $layoutData['id_metaconsole']);
|
|
|
|
|
|
|
|
$url =
|
|
|
|
$server["server_url"] .
|
|
|
|
'/index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'/index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'/index.php?sec=estado&sec2=operation/agentes/status_monitor&id_module=' . $layoutData['id_agente_modulo'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = ui_meta_get_url_console_child(
|
|
|
|
$layoutData['id_metaconsole'],
|
|
|
|
"estado", 'operation/agentes/ver_agente&id_agente='.$layoutData["id_agent"].'&tab=data');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Link to a map
|
|
|
|
if (empty($layoutData['id_metaconsole'])) {
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'/index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$pure = get_parameter('pure', 0);
|
|
|
|
$url = $config['homeurl'] .
|
|
|
|
'/index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '&id_visualmap=' . $layoutData["id_layout_linked"] . '&refr=0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2014-11-18 12:41:15 +01:00
|
|
|
default:
|
|
|
|
if (!empty($element_enterprise)) {
|
|
|
|
$url = $element_enterprise['url'];
|
|
|
|
}
|
|
|
|
break;
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-21 10:42:14 +01:00
|
|
|
// + 1 for to avoid the box and lines items are on the top of
|
|
|
|
// others
|
|
|
|
$z_index = 1 + 1;
|
2014-11-11 15:56:31 +01:00
|
|
|
|
|
|
|
switch ($type) {
|
2010-03-31 11:13:54 +02:00
|
|
|
case STATIC_GRAPH:
|
2014-11-11 12:38:18 +01:00
|
|
|
case GROUP_ITEM:
|
2015-12-10 15:35:54 +01:00
|
|
|
//Enter the correct img if the graph has a module selected or not
|
|
|
|
if ($type == STATIC_GRAPH) {
|
|
|
|
//Module
|
|
|
|
if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
$module_status = db_get_sql ('SELECT estado
|
|
|
|
FROM tagente_estado
|
|
|
|
WHERE id_agente_modulo = ' . $layoutData['id_agente_modulo']);
|
|
|
|
switch($module_status) {
|
|
|
|
case AGENT_STATUS_NORMAL:
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_NORMAL;
|
|
|
|
break;
|
|
|
|
case AGENT_MODULE_STATUS_WARNING:
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_WARNING;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_CRITICAL:
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_CRITICAL;
|
|
|
|
break;
|
|
|
|
case AGENT_MODULE_STATUS_NO_DATA:
|
|
|
|
default:
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_UNKNOWN;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//No module
|
|
|
|
else if ($layoutData['id_agent'] != 0) {
|
|
|
|
$agent = db_get_row ("tagente", "id_agente", $layoutData['id_agent']);
|
|
|
|
if ($agent['total_count'] == 0 || $agent['total_count'] == $agent['notinit_count']) {
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_UNKNOWN;
|
|
|
|
}
|
|
|
|
else if ($agent['critical_count'] > 0) {
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_CRITICAL;
|
|
|
|
}
|
|
|
|
else if ($agent['warning_count'] > 0) {
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_WARNING;
|
|
|
|
}
|
|
|
|
else if ($agent['unknown_count'] > 0) {
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_UNKNOWN;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$layoutData['status_calculated'] = AGENT_STATUS_NORMAL;
|
|
|
|
}
|
|
|
|
}
|
2015-10-15 12:33:38 +02:00
|
|
|
}
|
2016-06-06 15:02:27 +02:00
|
|
|
|
2010-05-05 18:29:03 +02:00
|
|
|
if ($layoutData['image'] != null) {
|
2014-09-25 13:52:11 +02:00
|
|
|
$img = visual_map_get_image_status_element($layoutData,
|
|
|
|
$layoutData['status_calculated']);
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
if (substr($img,0,1) == '4') {
|
2014-04-16 16:42:28 +02:00
|
|
|
$borderStyle ='border: 2px solid ' . COL_ALERTFIRED . ';';
|
2010-08-13 13:08:14 +02:00
|
|
|
$img = substr_replace($img, '', 0,1);
|
|
|
|
}
|
2010-05-05 18:29:03 +02:00
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
|
2014-11-11 15:56:31 +01:00
|
|
|
if ($status == VISUAL_MAP_STATUS_CRITICAL_BAD)
|
2014-11-21 10:42:14 +01:00
|
|
|
$z_index = 3 + 1;
|
2014-11-11 15:56:31 +01:00
|
|
|
elseif ($status == VISUAL_MAP_STATUS_WARNING)
|
2014-11-21 10:42:14 +01:00
|
|
|
$z_index = 2 + 1;
|
2014-11-11 15:56:31 +01:00
|
|
|
elseif ($status == VISUAL_MAP_STATUS_CRITICAL_ALERT)
|
2014-11-21 10:42:14 +01:00
|
|
|
$z_index = 4 + 1;
|
2014-11-11 15:56:31 +01:00
|
|
|
else
|
2014-11-21 10:42:14 +01:00
|
|
|
$z_index = 1 + 1;
|
2010-03-31 11:13:54 +02:00
|
|
|
break;
|
2014-11-11 12:38:18 +01:00
|
|
|
case ICON:
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
if ($layoutData['image'] != null) {
|
2014-09-25 13:52:11 +02:00
|
|
|
$img = visual_map_get_image_status_element($layoutData,
|
|
|
|
$layoutData['status_calculated']);
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (($width != 0) && ($height != 0)) {
|
|
|
|
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
|
|
|
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
|
|
|
}
|
2014-11-11 18:29:11 +01:00
|
|
|
|
2014-11-21 10:42:14 +01:00
|
|
|
$z_index = 4 + 1;
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
break;
|
2010-03-31 11:13:54 +02:00
|
|
|
case PERCENTILE_BAR:
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
case PERCENTILE_BUBBLE:
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
//Metaconsole db connection
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
$connection = db_get_row_filter ('tmetaconsole_setup',
|
|
|
|
array('id' => $layoutData['id_metaconsole']));
|
|
|
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
|
|
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$module_value = db_get_sql ('SELECT datos
|
|
|
|
FROM tagente_estado
|
|
|
|
WHERE id_agente_modulo = ' . $id_module);
|
2015-10-15 12:33:38 +02:00
|
|
|
if (empty($module_value) || $module_value == 0) {
|
|
|
|
$colorStatus = COL_UNKNOWN;
|
|
|
|
}
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
$value_text = false;
|
|
|
|
if ($layoutData['image'] == 'percent') {
|
|
|
|
$value_text = false;
|
|
|
|
}
|
|
|
|
elseif ($layoutData['image'] == 'value') {
|
2012-12-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/lib/libupdate_manager_client.php,
extensions/update_manager/lib/libupdate_manager.php,
operation/agentes/ver_agente.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/integria_incidents/incident.php,
operation/reporting/reporting_xml.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.elements.php,
include/functions_visual_map.php,
include/functions_visual_map_editor.php: uploaded the changes of
source code style previous to my next commit for to make the next
commit more easy.
* godmode/reporting/visual_console_builder.php: set empty string
for the new visualmap.
* include/ajax/visual_console_builder.ajax.php: fixed the regular
expresion to extract the url for the graph.
* include/functions_html.php: fixed into the function
"html_print_select_groups" lost code for to show the selectbox.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7230 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-05 15:20:47 +01:00
|
|
|
$unit_text = db_get_sql ('SELECT unit
|
|
|
|
FROM tagente_modulo
|
|
|
|
WHERE id_agente_modulo = ' . $id_module);
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
$unit_text = trim(io_safe_output($unit_text));
|
|
|
|
|
2012-03-12 19:31:15 +01:00
|
|
|
$value_text = format_for_graph($module_value, 2);
|
2017-01-16 13:31:56 +01:00
|
|
|
if($value_text<=0){
|
|
|
|
$value_text = remove_right_zeros(number_format($module_value, $config['graph_precision']));
|
|
|
|
|
|
|
|
}
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
if (!empty($unit_text))
|
|
|
|
$value_text .= " " . $unit_text;
|
|
|
|
}
|
2010-03-31 11:13:54 +02:00
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
//Restore db connection
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
if ( $max_percentile > 0)
|
2012-06-11 12:24:02 +02:00
|
|
|
$percentile = format_numeric($module_value / $max_percentile * 100, 0);
|
2010-03-31 11:13:54 +02:00
|
|
|
else
|
|
|
|
$percentile = 100;
|
|
|
|
break;
|
|
|
|
case MODULE_GRAPH:
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
$imgpos = '';
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$imgpos = 'float:right';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$imgpos = 'float:left';
|
|
|
|
}
|
|
|
|
|
2015-09-28 09:55:16 +02:00
|
|
|
if (!empty($proportion)) {
|
|
|
|
$width =
|
|
|
|
((integer)($proportion['proportion_width'] * $width));
|
|
|
|
$height =
|
|
|
|
((integer)($proportion['proportion_height'] * $height));
|
|
|
|
}
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
//Metaconsole db connection
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
$connection = db_get_row_filter ('tmetaconsole_setup',
|
2012-12-13 18:04:19 +01:00
|
|
|
array('id' => $layoutData['id_metaconsole']));
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
|
|
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-30 15:24:51 +02:00
|
|
|
$only_image = !$graph_javascript || $isExternalLink;
|
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
|
|
|
if ($layoutData['id_custom_graph'] != 0) {
|
2016-05-30 15:24:51 +02:00
|
|
|
// Show only avg on the visual console
|
2016-11-18 17:19:33 +01:00
|
|
|
if(get_parameter('action') == 'edit'){
|
2017-01-16 13:31:56 +01:00
|
|
|
if($width == 0 || $height == 0){
|
|
|
|
$img = '<img src="images/console/signes/custom_graph.png" style="width:300px;height:180px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = '<img src="images/console/signes/custom_graph.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
|
|
if($width == 0 || $height == 0){
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$img = '<div style="float:right;height:'.$himg.'px;">'.custom_graphs_print(
|
|
|
|
$layoutData['id_custom_graph'], 180, 300,
|
|
|
|
$period, null, true, 0, false, $layoutData['image'],
|
|
|
|
array(), '', array(), array(), true,
|
|
|
|
false, false, true, 1, false, true).'</div>';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$img = '<div style="float:left;height:'.$himg.'px;">'.custom_graphs_print(
|
|
|
|
$layoutData['id_custom_graph'], 180, 300,
|
|
|
|
$period, null, true, 0, false, $layoutData['image'],
|
|
|
|
array(), '', array(), array(), true,
|
|
|
|
false, false, true, 1, false, true).'</div>';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = custom_graphs_print(
|
|
|
|
$layoutData['id_custom_graph'], 180, 300,
|
|
|
|
$period, null, true, 0, false, $layoutData['image'],
|
|
|
|
array(), '', array(), array(), true,
|
|
|
|
false, false, true, 1, false, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-12-27 13:10:33 +01:00
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
|
2016-11-18 17:19:33 +01:00
|
|
|
else{
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$img = '<div style="float:right;height:'.$himg.'px;">'.custom_graphs_print(
|
|
|
|
$layoutData['id_custom_graph'],$height,$width,
|
2016-12-27 13:10:33 +01:00
|
|
|
$period, null, true, 0, false, $layoutData['image'],
|
|
|
|
array(), '', array(), array(), true,
|
2017-01-16 13:31:56 +01:00
|
|
|
false, false, true, 1, false, true).'</div>';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$img = '<div style="float:left;height:'.$himg.'px;">'.custom_graphs_print(
|
|
|
|
$layoutData['id_custom_graph'],$height,$width,
|
2016-12-27 13:10:33 +01:00
|
|
|
$period, null, true, 0, false, $layoutData['image'],
|
|
|
|
array(), '', array(), array(), true,
|
2017-01-16 13:31:56 +01:00
|
|
|
false, false, true, 1, false, true).'</div>';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = custom_graphs_print(
|
|
|
|
$layoutData['id_custom_graph'],$height,$width,
|
|
|
|
$period, null, true, 0, false, $layoutData['image'],
|
|
|
|
array(), '', array(), array(), true,
|
|
|
|
false, false, true, 1, false, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-12-27 13:10:33 +01:00
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
|
|
|
}
|
|
|
|
else {
|
2016-04-13 18:24:07 +02:00
|
|
|
if ($isExternalLink)
|
|
|
|
$homeurl = $config['homeurl'];
|
|
|
|
else
|
|
|
|
$homeurl = '';
|
2017-01-16 13:31:56 +01:00
|
|
|
|
2016-11-18 17:19:33 +01:00
|
|
|
if(get_parameter('action') == 'edit'){
|
2017-01-16 13:31:56 +01:00
|
|
|
if($width == 0 || $height == 0){
|
|
|
|
$img = '<img src="images/console/signes/module_graph.png" style="width:300px;height:180px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = '<img src="images/console/signes/module_graph.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
|
|
if($width == 0 || $height == 0){
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$img = '<div style="float:right;height:'.$himg.'px;">'.grafico_modulo_sparse($id_module, $period, 0,300,180,
|
|
|
|
'',null,
|
|
|
|
false, 1, false, 0, '', 0, 0, true, false, '', 1, false,
|
|
|
|
'', false, false, false, $layoutData['image'], null, true, false,$type_graph).'</div>';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$img = '<div style="float:left;height:'.$himg.'px;">'.grafico_modulo_sparse($id_module, $period, 0,300,180,
|
|
|
|
'',null,
|
|
|
|
false, 1, false, 0, '', 0, 0, true, false, '', 1, false,
|
|
|
|
'', false, false, false, $layoutData['image'], null, true, false,$type_graph).'</div>';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = grafico_modulo_sparse($id_module, $period, 0,300,180,
|
|
|
|
'',null,
|
|
|
|
false, 1, false, 0, '', 0, 0, true, false, '', 1, false,
|
|
|
|
'', false, false, false, $layoutData['image'], null, true, false,$type_graph);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$img = '<div style="float:right;height:'.$himg.'px;">'.grafico_modulo_sparse($id_module, $period, 0,$width,$height,
|
|
|
|
'',null,
|
|
|
|
false, 1, false, 0, '', 0, 0, true, false, '', 1, false,
|
|
|
|
'', false, false, false, $layoutData['image'], null, true, false,$type_graph).'</div>';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$img = '<div style="float:left;height:'.$himg.'px;">'.grafico_modulo_sparse($id_module, $period, 0,$width,$height,
|
|
|
|
'',null,
|
|
|
|
false, 1, false, 0, '', 0, 0, true, false, '', 1, false,
|
|
|
|
'', false, false, false, $layoutData['image'], null, true, false,$type_graph).'</div>';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = grafico_modulo_sparse($id_module, $period, 0,$width,$height,
|
|
|
|
'',null,
|
|
|
|
false, 1, false, 0, '', 0, 0, true, false, '', 1, false,
|
|
|
|
'', false, false, false, $layoutData['image'], null, true, false,$type_graph);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
|
|
|
//Restore db connection
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
2015-09-30 10:52:12 +02:00
|
|
|
|
|
|
|
//$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
|
|
|
|
|
2014-11-05 17:59:10 +01:00
|
|
|
break;
|
2014-11-11 17:57:51 +01:00
|
|
|
case LABEL:
|
2014-11-21 10:42:14 +01:00
|
|
|
$z_index = 4 + 1;
|
|
|
|
break;
|
|
|
|
case BOX_ITEM:
|
|
|
|
$z_index = 1;
|
2014-11-11 17:57:51 +01:00
|
|
|
break;
|
2014-11-11 12:38:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$class = "item ";
|
|
|
|
switch ($type) {
|
|
|
|
case STATIC_GRAPH:
|
|
|
|
$class .= "static_graph";
|
|
|
|
break;
|
|
|
|
case GROUP_ITEM:
|
|
|
|
$class .= "group_item";
|
|
|
|
break;
|
|
|
|
case PERCENTILE_BAR:
|
|
|
|
case PERCENTILE_BUBBLE:
|
|
|
|
$class .= "percentile_item";
|
|
|
|
break;
|
|
|
|
case MODULE_GRAPH:
|
|
|
|
$class .= "module_graph";
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE:
|
|
|
|
case SIMPLE_VALUE_MAX:
|
|
|
|
case SIMPLE_VALUE_MIN:
|
|
|
|
case SIMPLE_VALUE_AVG:
|
|
|
|
$class .= "simple_value";
|
|
|
|
break;
|
|
|
|
case LABEL:
|
|
|
|
$class .= "label";
|
|
|
|
break;
|
2014-11-05 17:59:10 +01:00
|
|
|
case ICON:
|
2014-11-11 12:38:18 +01:00
|
|
|
$class .= "icon";
|
|
|
|
break;
|
2014-11-21 10:42:14 +01:00
|
|
|
case BOX_ITEM:
|
|
|
|
$class .= "box_item";
|
|
|
|
break;
|
2014-11-11 12:38:18 +01:00
|
|
|
default:
|
2014-11-18 12:41:15 +01:00
|
|
|
if (!empty($element_enterprise)) {
|
|
|
|
$class .= $element_enterprise['class'];
|
|
|
|
}
|
2014-11-05 17:59:10 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2014-11-11 12:38:18 +01:00
|
|
|
echo '<div id="' . $id . '" class="' . $class . '" ' .
|
2014-11-11 15:56:31 +01:00
|
|
|
'style="z-index: ' .$z_index . ';' .
|
2015-07-27 16:24:04 +02:00
|
|
|
'position: absolute; ' .
|
|
|
|
'top: ' . $top . 'px; ' .
|
2014-11-11 17:16:48 +01:00
|
|
|
'left: ' . $left . 'px;' .
|
2014-11-11 12:38:18 +01:00
|
|
|
'display: inline-block; ' . $sizeStyle . '">';
|
|
|
|
|
2014-11-11 15:56:31 +01:00
|
|
|
if ($link) {
|
|
|
|
echo "<a href=\"$url\">";
|
|
|
|
}
|
2014-11-11 12:38:18 +01:00
|
|
|
|
2014-11-05 17:59:10 +01:00
|
|
|
switch ($type) {
|
2014-11-21 10:42:14 +01:00
|
|
|
case BOX_ITEM:
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
if($width == 0 || $width == 0){
|
2015-09-23 16:52:13 +02:00
|
|
|
$style = "";
|
2017-01-16 13:31:56 +01:00
|
|
|
$style .= "width: 300px; ";
|
|
|
|
$style .= "height: 180px; ";
|
2015-09-23 16:52:13 +02:00
|
|
|
$style .= "border-style: solid; ";
|
|
|
|
$style .= "border-width: " . $border_width . "px; ";
|
|
|
|
$style .= "border-color: " . $border_color . "; ";
|
|
|
|
$style .= "background-color: " . $fill_color . "; ";
|
|
|
|
echo "<div style='" . $style . "'></div>";
|
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
else{
|
|
|
|
if (!empty($proportion)){
|
|
|
|
$style = "";
|
|
|
|
$style .= "width: " . ($width * $proportion['proportion_width']) . "px; ";
|
|
|
|
$style .= "height: " . ($height * $proportion['proportion_height']) . "px; ";
|
|
|
|
$style .= "border-style: solid; ";
|
|
|
|
$style .= "border-width: " . $border_width . "px; ";
|
|
|
|
$style .= "border-color: " . $border_color . "; ";
|
|
|
|
$style .= "background-color: " . $fill_color . "; ";
|
|
|
|
echo "<div style='" . $style . "'></div>";
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$style = "";
|
|
|
|
$style .= "width: " . $width . "px; ";
|
|
|
|
$style .= "height: " . $height . "px; ";
|
|
|
|
$style .= "border-style: solid; ";
|
|
|
|
$style .= "border-width: " . $border_width . "px; ";
|
|
|
|
$style .= "border-color: " . $border_color . "; ";
|
|
|
|
$style .= "background-color: " . $fill_color . "; ";
|
|
|
|
echo "<div style='" . $style . "'></div>";
|
|
|
|
}
|
|
|
|
}
|
2015-09-23 16:52:13 +02:00
|
|
|
|
2014-11-21 10:42:14 +01:00
|
|
|
break;
|
2014-11-05 17:59:10 +01:00
|
|
|
case STATIC_GRAPH:
|
|
|
|
case GROUP_ITEM:
|
|
|
|
if ($layoutData['image'] != null) {
|
2016-11-16 18:58:27 +01:00
|
|
|
|
2014-11-11 15:56:31 +01:00
|
|
|
|
2014-11-18 18:12:47 +01:00
|
|
|
$img_style_title = strip_tags($label);
|
2014-11-11 15:56:31 +01:00
|
|
|
if ($layoutData['type'] == STATIC_GRAPH) {
|
|
|
|
if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
$unit_text = trim(io_safe_output(
|
|
|
|
modules_get_unit($layoutData['id_agente_modulo'])));
|
|
|
|
|
|
|
|
$value = modules_get_last_value(
|
|
|
|
$layoutData['id_agente_modulo']);
|
|
|
|
|
|
|
|
if (!is_string($value)) {
|
|
|
|
$value = format_for_graph($value, 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($unit_text))
|
|
|
|
$value .= " " . $unit_text;
|
|
|
|
|
|
|
|
$img_style_title .= " <br>" . __("Last value: ") .
|
|
|
|
$value;
|
|
|
|
}
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
if(get_parameter('action') == 'edit'){
|
|
|
|
$img_style_title = '';
|
|
|
|
}
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
|
|
|
|
2015-07-24 16:43:54 +02:00
|
|
|
if (!empty($proportion)) {
|
2014-11-11 15:56:31 +01:00
|
|
|
if (is_file($config['homedir'] . '/' . $img))
|
|
|
|
$infoImage = getimagesize($config['homedir'] . '/' . $img);
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
if ($height == 0 || $height == 0) {
|
|
|
|
$height = '70px';
|
|
|
|
$width = '70px';
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
|
|
|
else {
|
2015-07-24 16:43:54 +02:00
|
|
|
$height = (integer)($proportion['proportion_height'] * $height);
|
2017-01-16 13:31:56 +01:00
|
|
|
$width = (integer)($proportion['proportion_width'] * $width);
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$imgpos = '';
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='up'){
|
|
|
|
echo io_safe_output($text);
|
2014-11-11 15:56:31 +01:00
|
|
|
}
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$imgpos = 'float:right';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$imgpos = 'float:left';
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($width == 0 || $height == 0)
|
|
|
|
echo html_print_image($img, true,
|
|
|
|
array("class" => "image",
|
|
|
|
"id" => "image_" . $id,
|
|
|
|
"width" => "70px",
|
|
|
|
"height" => "70px",
|
|
|
|
"title" => $img_style_title,
|
|
|
|
"style" => $borderStyle.$imgpos), false,
|
|
|
|
false, false, $isExternalLink);
|
2014-11-05 17:59:10 +01:00
|
|
|
else
|
2017-01-16 13:31:56 +01:00
|
|
|
echo html_print_image($img, true,
|
|
|
|
array("class" => "image",
|
|
|
|
"id" => "image_" . $id,
|
|
|
|
"width" => $width,
|
|
|
|
"height" => $height,
|
|
|
|
"title" => $img_style_title,
|
|
|
|
"style" => $borderStyle.$imgpos), false,
|
|
|
|
false, false, $isExternalLink);
|
|
|
|
|
2014-11-05 17:59:10 +01:00
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
if($layoutData['label_position']=='down'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='left' || $layoutData['label_position']=='right'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
|
|
|
|
2014-11-05 17:59:10 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PERCENTILE_BAR:
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
$imgpos = '';
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$imgpos = 'float:right;';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$imgpos = 'float:left;';
|
|
|
|
}
|
|
|
|
|
2016-11-18 17:19:33 +01:00
|
|
|
$progress_bar_heigh = 15;
|
|
|
|
if (!empty($proportion)) {
|
|
|
|
if ($width != 0) {
|
|
|
|
$width = (integer)($proportion['proportion_width'] * $width);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$width = (integer)($proportion['proportion_width'] * $infoImage[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($height != 0) {
|
|
|
|
$height = (integer)($proportion['proportion_height'] * $height);
|
|
|
|
$progress_bar_heigh = $progress_bar_heigh * $proportion['proportion_height'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$height = (integer)($proportion['proportion_height'] * $infoImage[1]);
|
|
|
|
}
|
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
if($layoutData['label_position']=='up'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
ob_start();
|
|
|
|
if ($type == PERCENTILE_BUBBLE) {
|
2017-01-16 13:31:56 +01:00
|
|
|
echo progress_bubble($percentile, $width, $width, '', 1, $value_text, $colorStatus,$imgpos);
|
2016-11-18 17:19:33 +01:00
|
|
|
}
|
|
|
|
else {
|
2017-01-16 13:31:56 +01:00
|
|
|
echo progress_bar($percentile, $width, $progress_bar_heigh, '', 1, $value_text, $colorStatus,$imgpos);
|
2016-11-18 17:19:33 +01:00
|
|
|
}
|
|
|
|
$img = ob_get_clean();
|
|
|
|
|
|
|
|
|
|
|
|
if(get_parameter('action') == 'edit'){
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
if($width == 0){
|
|
|
|
$img = '<img src="images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = '<img src="images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
|
2016-11-18 17:19:33 +01:00
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
$img = str_replace('>', 'class="image" style="height:'.$himg.'px;width:'.$wimg.'px;'.$imgpos.'" id="image_' . $id . '" />', $img);
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
echo $img;
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='down'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='left' || $layoutData['label_position']=='right'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
2014-11-05 17:59:10 +01:00
|
|
|
case PERCENTILE_BUBBLE:
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
$imgpos = '';
|
|
|
|
|
|
|
|
if($layoutData['label_position']=='left'){
|
|
|
|
$imgpos = 'float:right;';
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='right'){
|
|
|
|
$imgpos = 'float:left;';
|
|
|
|
}
|
|
|
|
|
2015-10-08 14:58:53 +02:00
|
|
|
$progress_bar_heigh = 15;
|
|
|
|
if (!empty($proportion)) {
|
|
|
|
if ($width != 0) {
|
|
|
|
$width = (integer)($proportion['proportion_width'] * $width);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$width = (integer)($proportion['proportion_width'] * $infoImage[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($height != 0) {
|
|
|
|
$height = (integer)($proportion['proportion_height'] * $height);
|
|
|
|
$progress_bar_heigh = $progress_bar_heigh * $proportion['proportion_height'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$height = (integer)($proportion['proportion_height'] * $infoImage[1]);
|
|
|
|
}
|
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
|
|
|
|
if($layoutData['label_position']=='up'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
2014-11-05 17:59:10 +01:00
|
|
|
|
|
|
|
ob_start();
|
|
|
|
if ($type == PERCENTILE_BUBBLE) {
|
2017-01-16 13:31:56 +01:00
|
|
|
if($width == 0){
|
|
|
|
echo progress_bubble($percentile, 100,100, '', 1, $value_text, $colorStatus,$s);
|
|
|
|
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
echo progress_bubble($percentile, $width,$width, '', 1, $value_text, $colorStatus);
|
|
|
|
}
|
2014-11-05 17:59:10 +01:00
|
|
|
}
|
|
|
|
else {
|
2015-10-08 14:58:53 +02:00
|
|
|
echo progress_bar($percentile, $width, $progress_bar_heigh, '', 1, $value_text, $colorStatus);
|
2014-11-05 17:59:10 +01:00
|
|
|
}
|
|
|
|
$img = ob_get_clean();
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
if(get_parameter('action') == 'edit'){
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
if($width == 0){
|
|
|
|
$img = '<img src="images/console/signes/percentil_bubble.png" style="width:130px;height:130px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$img = '<img src="images/console/signes/percentil_bubble.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
|
|
|
}
|
|
|
|
|
2016-11-18 17:19:33 +01:00
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
$img = str_replace('>', 'class="image" style="width:'.$wimg.'px;height:'.$himg.'px;'.$imgpos.'" id="image_' . $id . '" />', $img);
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
echo $img;
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
if($layoutData['label_position']=='down'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='left' || $layoutData['label_position']=='right'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
|
|
|
|
2014-11-05 17:59:10 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case MODULE_GRAPH:
|
2017-01-16 13:31:56 +01:00
|
|
|
if($layoutData['label_position']=='up'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
2011-01-12 18:08:50 +01:00
|
|
|
echo $img;
|
2017-01-16 13:31:56 +01:00
|
|
|
if($layoutData['label_position']=='down'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
|
|
|
else if($layoutData['label_position']=='left' || $layoutData['label_position']=='right'){
|
|
|
|
echo io_safe_output($text);
|
|
|
|
}
|
2010-03-31 11:13:54 +02:00
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE:
|
2011-07-11 12:16:18 +02:00
|
|
|
case SIMPLE_VALUE_MAX:
|
|
|
|
case SIMPLE_VALUE_MIN:
|
|
|
|
case SIMPLE_VALUE_AVG:
|
2014-11-05 17:59:10 +01:00
|
|
|
$io_safe_output_text = io_safe_output($text);
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
|
|
|
//Metaconsole db connection
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
$connection = db_get_row_filter ('tmetaconsole_setup',
|
|
|
|
array('id' => $layoutData['id_metaconsole']));
|
|
|
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
|
|
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-10 16:11:48 +01:00
|
|
|
$unit_text = db_get_sql ('SELECT unit
|
|
|
|
FROM tagente_modulo
|
|
|
|
WHERE id_agente_modulo = ' . $layoutData['id_agente_modulo']);
|
|
|
|
$unit_text = trim(io_safe_output($unit_text));
|
|
|
|
|
|
|
|
|
2015-11-04 10:11:33 +01:00
|
|
|
//$value = db_get_value ('datos',
|
|
|
|
//'tagente_estado', 'id_agente_modulo', $layoutData['id_agente_modulo']);
|
|
|
|
$value = visual_map_get_simple_value($type,
|
|
|
|
$layoutData['id_agente_modulo'], $period);
|
2014-01-10 16:11:48 +01:00
|
|
|
|
2016-10-18 10:32:10 +02:00
|
|
|
global $config;
|
|
|
|
|
|
|
|
if ($type == SIMPLE_VALUE) {
|
2016-11-15 10:55:41 +01:00
|
|
|
//~ $returnValue_value = explode(' ', $value);
|
|
|
|
|
|
|
|
//~ if ($returnValue_value[1] != "") {
|
|
|
|
//~ $value = remove_right_zeros(number_format($returnValue_value[0], $config['graph_precision'])) . " " . $returnValue_value[1];
|
|
|
|
//~ }
|
|
|
|
//~ else {
|
|
|
|
//~ $value = remove_right_zeros(number_format($returnValue_value[0], $config['graph_precision']));
|
|
|
|
//~ }
|
2016-10-18 10:32:10 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// If the value is a string, dont format it
|
|
|
|
if (!is_string($value)) {
|
2016-11-15 10:55:41 +01:00
|
|
|
//~ $value = remove_right_zeros(format_for_graph($value, $config['graph_precision']));
|
2016-10-18 10:32:10 +02:00
|
|
|
}
|
2014-01-10 16:11:48 +01:00
|
|
|
}
|
2015-11-05 13:48:01 +01:00
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
//$io_safe_output_text = str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text);
|
2015-11-05 13:48:01 +01:00
|
|
|
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
if(get_parameter('action') == 'edit'){
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
//echo 'Data value';
|
|
|
|
|
|
|
|
echo $io_safe_output_text;
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text);
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
}
|
2015-11-05 13:48:01 +01:00
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
|
|
|
//Restore db connection
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
2010-03-31 11:13:54 +02:00
|
|
|
break;
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
case LABEL:
|
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
|
|
|
echo io_safe_output($text);
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
break;
|
|
|
|
case ICON:
|
|
|
|
if ($layoutData['image'] != null) {
|
2011-11-17 17:55:32 +01:00
|
|
|
// If match with protocol://direction
|
2013-10-28 11:27:10 +01:00
|
|
|
if (preg_match('/^(http:\/\/)((.)+)$/i', $text)) {
|
2011-11-17 17:55:32 +01:00
|
|
|
echo '<a href="' . $label . '">' . '</a>' . '<br />';
|
|
|
|
}
|
2015-10-08 14:58:53 +02:00
|
|
|
|
|
|
|
if (!empty($proportion)) {
|
2014-11-11 18:29:11 +01:00
|
|
|
if (is_file($config['homedir'] . '/' . $img))
|
|
|
|
$infoImage = getimagesize($config['homedir'] . '/' . $img);
|
|
|
|
|
|
|
|
if ($width != 0) {
|
2015-07-24 16:43:54 +02:00
|
|
|
$width = (integer)($proportion['proportion_width'] * $width);
|
2014-11-11 18:29:11 +01:00
|
|
|
}
|
|
|
|
else {
|
2015-07-24 16:43:54 +02:00
|
|
|
$width = (integer)($proportion['proportion_width'] * $infoImage[0]);
|
2014-11-11 18:29:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($height != 0) {
|
2015-07-24 16:43:54 +02:00
|
|
|
$height = (integer)($proportion['proportion_height'] * $height);
|
2014-11-11 18:29:11 +01:00
|
|
|
}
|
|
|
|
else {
|
2015-07-24 16:43:54 +02:00
|
|
|
$height = (integer)($proportion['proportion_height'] * $infoImage[1]);
|
2014-11-11 18:29:11 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-04 14:30:50 +01:00
|
|
|
if (($width != 0) && ($height != 0))
|
2014-09-29 13:49:45 +02:00
|
|
|
echo html_print_image($img, true,
|
|
|
|
array("class" => "image",
|
|
|
|
"id" => "image_" . $id,
|
|
|
|
"width" => "$width",
|
2015-10-05 16:45:49 +02:00
|
|
|
"height" => "$height"), false,
|
|
|
|
false, false, $isExternalLink);
|
2011-02-04 14:30:50 +01:00
|
|
|
else
|
2014-09-29 13:49:45 +02:00
|
|
|
echo html_print_image($img, true,
|
2016-11-18 17:19:33 +01:00
|
|
|
array("class" => "image", "id" => "image_" . $id,"width" => "70px",
|
|
|
|
"70px" => "$height"),
|
2015-10-05 16:45:49 +02:00
|
|
|
false, false, false, $isExternalLink);
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
}
|
|
|
|
break;
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
default:
|
2014-11-18 12:41:15 +01:00
|
|
|
if (!empty($element_enterprise)) {
|
|
|
|
echo $element_enterprise['item'];
|
|
|
|
}
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
break;
|
2010-03-31 11:13:54 +02:00
|
|
|
}
|
|
|
|
|
2014-11-11 15:56:31 +01:00
|
|
|
if ($link) {
|
|
|
|
echo "</a>";
|
|
|
|
}
|
|
|
|
|
2014-11-11 12:38:18 +01:00
|
|
|
echo "</div>";
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
//Add the line between elements.
|
|
|
|
if ($layoutData['parent_item'] != 0) {
|
2014-11-24 17:52:28 +01:00
|
|
|
$parent = db_get_row_filter('tlayout_data',
|
|
|
|
array('id' => $layoutData['parent_item']));
|
2013-06-24 12:39:47 +02:00
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
echo '<script type="text/javascript">';
|
|
|
|
echo '$(document).ready (function() {
|
2014-06-17 17:11:50 +02:00
|
|
|
lines.push({"id": "' . $id . '" , "node_begin":"' . $layoutData['parent_item'] . '","node_end":"' . $id . '","color":"' . visual_map_get_color_line_status($parent) . '","thickness":"' . (empty($config["vc_line_thickness"]) ? 2 : $config["vc_line_thickness"]) . '"});
|
2010-03-31 11:13:54 +02:00
|
|
|
});';
|
|
|
|
echo '</script>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-13 13:15:14 +02:00
|
|
|
/**
|
|
|
|
* The function to get simple value type from the value of process type in the form
|
|
|
|
*
|
|
|
|
* @param int process simple value from form
|
|
|
|
*
|
|
|
|
* @return int type among the constants:
|
|
|
|
* SIMPLE_VALUE, SIMPLE_VALUE_MAX, SIMPLE_VALUE_MIN, SIMPLE_VALUE_AVG
|
|
|
|
*/
|
|
|
|
function visual_map_get_simple_value_type($process_simple_value) {
|
2012-06-11 21:13:20 +02:00
|
|
|
switch ($process_simple_value) {
|
|
|
|
case PROCESS_VALUE_NONE:
|
2012-04-13 13:15:14 +02:00
|
|
|
return SIMPLE_VALUE;
|
2012-06-11 21:13:20 +02:00
|
|
|
break;
|
|
|
|
case PROCESS_VALUE_MIN:
|
2012-04-13 13:15:14 +02:00
|
|
|
return SIMPLE_VALUE_MIN;
|
|
|
|
break;
|
2012-06-11 21:13:20 +02:00
|
|
|
case PROCESS_VALUE_MAX:
|
2012-04-13 13:15:14 +02:00
|
|
|
return SIMPLE_VALUE_MAX;
|
|
|
|
break;
|
2012-06-11 21:13:20 +02:00
|
|
|
case PROCESS_VALUE_AVG:
|
2012-04-13 13:15:14 +02:00
|
|
|
return SIMPLE_VALUE_AVG;
|
2012-06-11 21:13:20 +02:00
|
|
|
break;
|
2012-04-13 13:15:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The function to get the simple value of a module
|
|
|
|
*
|
|
|
|
* @param int type of the retrieving choosed among the constants:
|
|
|
|
* SIMPLE_VALUE, SIMPLE_VALUE_MAX, SIMPLE_VALUE_MIN, SIMPLE_VALUE_AVG
|
|
|
|
* @param int id agent module
|
2012-06-11 21:13:20 +02:00
|
|
|
* @param int period The period in seconds for calculate the avg or min or max value.
|
2012-04-13 13:15:14 +02:00
|
|
|
*
|
|
|
|
* @return string value retrieved with units
|
|
|
|
*/
|
2012-06-11 21:13:20 +02:00
|
|
|
function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY) {
|
2016-11-15 10:55:41 +01:00
|
|
|
global $config;
|
|
|
|
|
2012-06-11 21:13:20 +02:00
|
|
|
$unit_text = db_get_sql ('SELECT unit
|
|
|
|
FROM tagente_modulo WHERE id_agente_modulo = ' . $id_module);
|
2012-04-13 13:15:14 +02:00
|
|
|
$unit_text = trim(io_safe_output($unit_text));
|
2012-06-11 21:13:20 +02:00
|
|
|
|
|
|
|
switch ($type) {
|
2012-04-13 13:15:14 +02:00
|
|
|
case SIMPLE_VALUE:
|
2012-06-11 21:13:20 +02:00
|
|
|
$value = db_get_value ('datos', 'tagente_estado',
|
|
|
|
'id_agente_modulo', $id_module);
|
2015-10-15 12:33:38 +02:00
|
|
|
if ($value === false) {
|
|
|
|
$value = __('Unknown');
|
|
|
|
}
|
|
|
|
else {
|
2017-01-17 11:38:00 +01:00
|
|
|
if ( is_numeric($value) ) {
|
|
|
|
if ($config['simple_module_value']) {
|
|
|
|
$value = remove_right_zeros(number_format($value, $config['graph_precision']));
|
|
|
|
}
|
|
|
|
}
|
2015-10-15 12:33:38 +02:00
|
|
|
if (!empty($unit_text)) {
|
|
|
|
$value .= " " . $unit_text;
|
|
|
|
}
|
|
|
|
}
|
2016-10-07 10:57:28 +02:00
|
|
|
|
|
|
|
$value = preg_replace ('/\n/i','<br>',$value);
|
2017-01-16 13:31:56 +01:00
|
|
|
$value = preg_replace ('/\s/i',' ',$value);
|
2016-10-07 10:57:28 +02:00
|
|
|
|
2012-04-13 13:15:14 +02:00
|
|
|
return $value;
|
|
|
|
break;
|
2012-06-11 21:13:20 +02:00
|
|
|
case SIMPLE_VALUE_MAX:
|
|
|
|
$value = reporting_get_agentmodule_data_max ($id_module, $period, 0);
|
2012-04-13 13:15:14 +02:00
|
|
|
if ($value === false) {
|
|
|
|
$value = __('Unknown');
|
|
|
|
}
|
|
|
|
else {
|
2017-01-17 11:38:00 +01:00
|
|
|
if ( is_numeric($value) ) {
|
|
|
|
if ($config['simple_module_value']) {
|
2017-01-31 12:42:10 +01:00
|
|
|
$value = format_for_graph($value, $config['graph_precision']);
|
2017-01-17 11:38:00 +01:00
|
|
|
}
|
|
|
|
}
|
2012-04-13 13:15:14 +02:00
|
|
|
if (!empty($unit_text))
|
|
|
|
$value .= " " . $unit_text;
|
|
|
|
}
|
|
|
|
return $value;
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE_MIN:
|
2012-06-11 21:13:20 +02:00
|
|
|
$value = reporting_get_agentmodule_data_min ($id_module, $period, 0);
|
2012-04-13 13:15:14 +02:00
|
|
|
if ($value === false) {
|
|
|
|
$value = __('Unknown');
|
|
|
|
}
|
|
|
|
else {
|
2017-01-17 11:38:00 +01:00
|
|
|
if ( is_numeric($value) ) {
|
|
|
|
if ($config['simple_module_value']) {
|
2017-01-31 12:42:10 +01:00
|
|
|
$value = format_for_graph($value, $config['graph_precision']);
|
2017-01-17 11:38:00 +01:00
|
|
|
}
|
|
|
|
}
|
2012-04-13 13:15:14 +02:00
|
|
|
if (!empty($unit_text))
|
|
|
|
$value .= " " . $unit_text;
|
2012-06-11 21:13:20 +02:00
|
|
|
}
|
2012-04-13 13:15:14 +02:00
|
|
|
return $value;
|
|
|
|
break;
|
2012-06-11 21:13:20 +02:00
|
|
|
case SIMPLE_VALUE_AVG:
|
|
|
|
$value = reporting_get_agentmodule_data_average ($id_module, $period, 0);
|
2012-04-13 13:15:14 +02:00
|
|
|
if ($value === false) {
|
|
|
|
$value = __('Unknown');
|
|
|
|
}
|
|
|
|
else {
|
2017-01-17 11:38:00 +01:00
|
|
|
if ( is_numeric($value) ) {
|
|
|
|
if ($config['simple_module_value']) {
|
2017-01-31 12:42:10 +01:00
|
|
|
$value = format_for_graph($value, $config['graph_precision']);
|
2017-01-17 11:38:00 +01:00
|
|
|
}
|
|
|
|
}
|
2012-04-13 13:15:14 +02:00
|
|
|
if (!empty($unit_text))
|
|
|
|
$value .= " " . $unit_text;
|
2012-06-11 21:13:20 +02:00
|
|
|
}
|
2012-04-13 13:15:14 +02:00
|
|
|
return $value;
|
|
|
|
break;
|
2012-06-11 21:13:20 +02:00
|
|
|
}
|
2012-04-13 13:15:14 +02:00
|
|
|
}
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
/**
|
|
|
|
* The function to save the new elements of agents make as wizard.
|
|
|
|
*
|
|
|
|
* @param array $id_agents The list of id of agents.
|
|
|
|
* @param string $image The image to set the elements.
|
|
|
|
* @param integer $id_layout The id of visual console to insert the elements.
|
|
|
|
* @param integer $range The distance between elements.
|
|
|
|
* @param integer $width Width of image.
|
|
|
|
* @param integer $height Height of image.
|
|
|
|
*
|
|
|
|
* @return string Return the message status to insert DB.
|
|
|
|
*/
|
2012-03-12 17:23:50 +01:00
|
|
|
function visual_map_process_wizard_add ($id_agents, $image, $id_layout, $range,
|
|
|
|
$width = 0, $height = 0, $period, $process_value, $percentileitem_width,
|
|
|
|
$max_value, $type_percentile, $value_show, $type) {
|
2010-03-30 19:39:32 +02:00
|
|
|
if (empty ($id_agents)) {
|
|
|
|
print_error_message (__('No agents selected'));
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$id_agents = (array) $id_agents;
|
|
|
|
|
|
|
|
$error = false;
|
|
|
|
$pos_y = 10;
|
|
|
|
$pos_x = 10;
|
|
|
|
foreach ($id_agents as $id_agent) {
|
|
|
|
if ($pos_x > 600) {
|
|
|
|
$pos_x = 10;
|
|
|
|
$pos_y = $pos_y + $range;
|
|
|
|
}
|
|
|
|
|
2012-03-12 17:23:50 +01:00
|
|
|
$value_height = $height;
|
|
|
|
$value_image = $image;
|
|
|
|
$value_type = $type;
|
|
|
|
switch ($type) {
|
|
|
|
case PERCENTILE_BAR:
|
|
|
|
case PERCENTILE_BUBBLE:
|
|
|
|
$value_height = $max_value;
|
|
|
|
$value_image = $value_show;
|
|
|
|
if ($type_percentile == 'percentile') {
|
|
|
|
$value_type = PERCENTILE_BAR;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$value_type = PERCENTILE_BUBBLE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE:
|
|
|
|
$value_type = $process_value;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2016-05-17 13:49:45 +02:00
|
|
|
$label = agents_get_name($id_agent);
|
|
|
|
|
|
|
|
$value_label = '(_VALUE_)';
|
|
|
|
if ($type === SIMPLE_VALUE) {
|
|
|
|
$label .= ' ' . $value_label;
|
|
|
|
}
|
|
|
|
|
2012-03-12 17:23:50 +01:00
|
|
|
$values = array ('type' => $value_type,
|
|
|
|
'id_layout' => $id_layout,
|
|
|
|
'pos_x' => $pos_x,
|
|
|
|
'pos_y' => $pos_y,
|
2016-05-17 13:49:45 +02:00
|
|
|
'label' => $label,
|
2012-03-12 17:23:50 +01:00
|
|
|
'image' => $value_image,
|
|
|
|
'id_agent' => $id_agent,
|
|
|
|
'width' => $width,
|
|
|
|
'period' => $period,
|
2014-11-11 17:02:52 +01:00
|
|
|
'height' => $value_height);
|
2012-03-12 17:23:50 +01:00
|
|
|
|
|
|
|
db_process_sql_insert ('tlayout_data', $values);
|
2010-03-30 19:39:32 +02:00
|
|
|
|
|
|
|
$pos_x = $pos_x + $range;
|
|
|
|
}
|
|
|
|
|
2011-07-27 12:06:19 +02:00
|
|
|
$return = ui_print_success_message (__('Agent successfully added to layout'), '', true);
|
2010-03-30 19:39:32 +02:00
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
/**
|
|
|
|
* The function to save the new elements of modules make as wizard.
|
|
|
|
*
|
|
|
|
* @param array $id_modules The list of id of modules.
|
|
|
|
* @param string $image The image to set the elements.
|
|
|
|
* @param integer $id_layout The id of visual console to insert the elements.
|
|
|
|
* @param integer $range The distance between elements.
|
|
|
|
* @param integer $width Width of image.
|
|
|
|
* @param integer $height Height of image.
|
|
|
|
*
|
|
|
|
* @return string Return the message status to insert DB.
|
|
|
|
*/
|
2015-07-08 16:47:00 +02:00
|
|
|
function visual_map_process_wizard_add_modules ($id_modules, $image,
|
|
|
|
$id_layout, $range, $width = 0, $height = 0, $period,
|
|
|
|
$process_value, $percentileitem_width, $max_value, $type_percentile,
|
|
|
|
$value_show, $label_type, $type, $enable_link = true,
|
2014-03-21 15:12:47 +01:00
|
|
|
$id_server = 0, $kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
|
2016-11-16 18:58:27 +01:00
|
|
|
$item_in_the_map = 0,$fontf = 'arial',$fonts = '12pt') {
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
2010-03-30 19:39:32 +02:00
|
|
|
if (empty ($id_modules)) {
|
2015-07-08 16:47:00 +02:00
|
|
|
$return = ui_print_error_message(
|
|
|
|
__('No modules selected'), '', true);
|
2011-07-27 12:06:19 +02:00
|
|
|
return $return;
|
2010-03-30 19:39:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
$id_modules = (array) $id_modules;
|
|
|
|
|
|
|
|
$error = false;
|
|
|
|
$pos_y = 10;
|
|
|
|
$pos_x = 10;
|
|
|
|
|
|
|
|
foreach ($id_modules as $id_module) {
|
|
|
|
if ($pos_x > 600) {
|
|
|
|
$pos_x = 10;
|
|
|
|
$pos_y = $pos_y + $range;
|
|
|
|
}
|
|
|
|
|
2015-07-08 16:47:00 +02:00
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
if ($id_server != 0) {
|
|
|
|
$connection = db_get_row_filter('tmetaconsole_setup',
|
|
|
|
array('id' => $id_server));
|
|
|
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
|
|
|
$return = ui_print_error_message(
|
|
|
|
"Error connecting to " . $server_name, '', true);
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
$id_agent = modules_get_agentmodule_agent ($id_module);
|
2010-03-30 19:39:32 +02:00
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
switch ($label_type) {
|
|
|
|
case 'agent_module':
|
|
|
|
default:
|
2017-01-16 12:05:36 +01:00
|
|
|
$agent_label = agents_get_name ($id_agent);
|
|
|
|
$module_label = modules_get_agentmodule_name($id_module);
|
2016-11-16 18:58:27 +01:00
|
|
|
$label = '<p><span class="visual_font_size_'.$fonts.'" style="font-family:'.$fontf.';">'.$agent_label . " - " . $module_label.'</span></p>';
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
break;
|
|
|
|
case 'module':
|
2017-01-16 12:05:36 +01:00
|
|
|
$module_label = modules_get_agentmodule_name($id_module);
|
2016-11-16 18:58:27 +01:00
|
|
|
$label = '<p><span class="visual_font_size_'.$fonts.'" style="font-family:'.$fontf.';">'.$module_label.'</span></p>';
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
break;
|
|
|
|
case 'agent':
|
2017-01-16 12:05:36 +01:00
|
|
|
$agent_label = agents_get_name ($id_agent);
|
2016-11-16 18:58:27 +01:00
|
|
|
$label = '<p><span class="visual_font_size_'.$fonts.'" style="font-family:'.$fontf.';">'.$agent_label.'</span></p>';
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
break;
|
|
|
|
case 'none':
|
2016-06-01 12:00:45 +02:00
|
|
|
$label = '';
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
$label = io_safe_input($label);
|
|
|
|
|
|
|
|
//Restore db connection
|
|
|
|
if ($id_server != 0) {
|
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
2012-03-12 17:23:50 +01:00
|
|
|
|
|
|
|
$value_height = $height;
|
|
|
|
$value_image = $image;
|
|
|
|
$value_type = $type;
|
|
|
|
$value_width = $width;
|
|
|
|
switch ($type) {
|
|
|
|
case PERCENTILE_BAR:
|
|
|
|
case PERCENTILE_BUBBLE:
|
|
|
|
$value_height = $max_value;
|
|
|
|
$value_width = $percentileitem_width;
|
|
|
|
$value_image = $value_show;
|
|
|
|
if ($type_percentile == 'percentile') {
|
|
|
|
$value_type = PERCENTILE_BAR;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$value_type = PERCENTILE_BUBBLE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE:
|
2016-06-01 12:00:45 +02:00
|
|
|
$label = !empty($label) ? $label . ' (_VALUE_)' : '(_VALUE_)';
|
2012-06-11 21:13:20 +02:00
|
|
|
$value_image = '';
|
|
|
|
switch ($process_value) {
|
|
|
|
case PROCESS_VALUE_NONE:
|
|
|
|
$value_type = SIMPLE_VALUE;
|
|
|
|
break;
|
|
|
|
case PROCESS_VALUE_MIN:
|
|
|
|
$value_type = SIMPLE_VALUE_MIN;
|
|
|
|
break;
|
|
|
|
case PROCESS_VALUE_MAX:
|
|
|
|
$value_type = SIMPLE_VALUE_MAX;
|
|
|
|
break;
|
|
|
|
case PROCESS_VALUE_AVG:
|
|
|
|
$value_type = SIMPLE_VALUE_AVG;
|
|
|
|
break;
|
|
|
|
}
|
2012-03-12 17:23:50 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2014-03-21 15:12:47 +01:00
|
|
|
$parent_item = 0;
|
|
|
|
switch ($kind_relationship) {
|
|
|
|
case VISUAL_MAP_WIZARD_PARENTS_ITEM_MAP:
|
|
|
|
$parent_item = $item_in_the_map;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2013-06-25 11:34:12 +02:00
|
|
|
|
2012-03-12 17:23:50 +01:00
|
|
|
$values = array ('type' => $value_type,
|
|
|
|
'id_layout' => $id_layout,
|
|
|
|
'pos_x' => $pos_x,
|
|
|
|
'pos_y' => $pos_y,
|
|
|
|
'label' => $label,
|
|
|
|
'image' => $value_image,
|
|
|
|
'id_agent' => $id_agent,
|
|
|
|
'id_agente_modulo' => $id_module,
|
|
|
|
'width' => $value_width,
|
|
|
|
'period' => $period,
|
|
|
|
'height' => $value_height,
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
'enable_link' => $enable_link,
|
2014-03-21 15:12:47 +01:00
|
|
|
'id_metaconsole' => $id_server,
|
|
|
|
'parent_item' => $parent_item);
|
2012-03-12 17:23:50 +01:00
|
|
|
|
|
|
|
db_process_sql_insert ('tlayout_data', $values);
|
2010-03-30 19:39:32 +02:00
|
|
|
|
|
|
|
$pos_x = $pos_x + $range;
|
|
|
|
}
|
|
|
|
|
2011-07-27 12:06:19 +02:00
|
|
|
$return = ui_print_success_message (__('Modules successfully added to layout'), '', true);
|
2010-03-30 19:39:32 +02:00
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|
2012-06-25 17:30:05 +02:00
|
|
|
/**
|
|
|
|
* The function to save the new elements of agents make as wizard.
|
|
|
|
*
|
|
|
|
* @param array $id_agents The list of id of agents.
|
|
|
|
* @param string $image The image to set the elements.
|
|
|
|
* @param integer $id_layout The id of visual console to insert the elements.
|
|
|
|
* @param integer $range The distance between elements.
|
|
|
|
* @param integer $width Width of image.
|
|
|
|
* @param integer $height Height of image.
|
|
|
|
*
|
|
|
|
* @return string Return the message status to insert DB.
|
|
|
|
*/
|
2015-07-08 16:47:00 +02:00
|
|
|
function visual_map_process_wizard_add_agents ($id_agents, $image,
|
|
|
|
$id_layout, $range, $width = 0, $height = 0, $period,
|
|
|
|
$process_value, $percentileitem_width, $max_value, $type_percentile,
|
|
|
|
$value_show, $label_type, $type, $enable_link = 1, $id_server = 0,
|
|
|
|
$kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
|
2016-11-16 18:58:27 +01:00
|
|
|
$item_in_the_map = 0,$fontf = 'arial',$fonts = '12pt') {
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
|
|
|
global $config;
|
2012-06-25 17:30:05 +02:00
|
|
|
|
|
|
|
if (empty ($id_agents)) {
|
2015-07-08 16:47:00 +02:00
|
|
|
$return = ui_print_error_message(
|
|
|
|
__('No agents selected'), '', true);
|
|
|
|
|
2012-06-25 17:30:05 +02:00
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|
2015-07-08 16:47:00 +02:00
|
|
|
$id_agents = (array)$id_agents;
|
2012-06-25 17:30:05 +02:00
|
|
|
|
|
|
|
$error = false;
|
|
|
|
$pos_y = 10;
|
|
|
|
$pos_x = 10;
|
|
|
|
|
2014-03-21 15:12:47 +01:00
|
|
|
$relationship = true;
|
|
|
|
$relationships_agents = array();
|
|
|
|
//Check if the set a none relationship
|
|
|
|
if (($kind_relationship == VISUAL_MAP_WIZARD_PARENTS_NONE) ||
|
|
|
|
($kind_relationship == VISUAL_MAP_WIZARD_PARENTS_AGENT_RELANTIONSHIP &&
|
|
|
|
$item_in_the_map = 0)) {
|
|
|
|
|
|
|
|
$relationship = false;
|
|
|
|
}
|
|
|
|
|
2015-07-08 16:47:00 +02:00
|
|
|
|
2012-06-25 17:30:05 +02:00
|
|
|
foreach ($id_agents as $id_agent) {
|
2015-07-08 16:47:00 +02:00
|
|
|
if (is_array($id_agent)) {
|
|
|
|
$id_a = $id_agent['id_agent'];
|
|
|
|
$id_server = $id_agent['id_server'];
|
|
|
|
$id_agent = $id_a;
|
|
|
|
}
|
|
|
|
|
2012-06-25 17:30:05 +02:00
|
|
|
if ($pos_x > 600) {
|
|
|
|
$pos_x = 10;
|
|
|
|
$pos_y = $pos_y + $range;
|
|
|
|
}
|
|
|
|
|
|
|
|
$value_height = $height;
|
|
|
|
$value_image = $image;
|
|
|
|
$value_type = $type;
|
|
|
|
$value_width = $width;
|
|
|
|
|
|
|
|
switch ($type) {
|
|
|
|
case PERCENTILE_BAR:
|
|
|
|
case PERCENTILE_BUBBLE:
|
|
|
|
$value_height = $max_value;
|
|
|
|
$value_width = $percentileitem_width;
|
|
|
|
$value_image = $value_show;
|
|
|
|
if ($type_percentile == 'percentile') {
|
|
|
|
$value_type = PERCENTILE_BAR;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$value_type = PERCENTILE_BUBBLE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE:
|
|
|
|
$value_image = '';
|
|
|
|
switch ($process_value) {
|
|
|
|
case PROCESS_VALUE_NONE:
|
|
|
|
$value_type = SIMPLE_VALUE;
|
|
|
|
break;
|
|
|
|
case PROCESS_VALUE_MIN:
|
|
|
|
$value_type = SIMPLE_VALUE_MIN;
|
|
|
|
break;
|
|
|
|
case PROCESS_VALUE_MAX:
|
|
|
|
$value_type = SIMPLE_VALUE_MAX;
|
|
|
|
break;
|
|
|
|
case PROCESS_VALUE_AVG:
|
|
|
|
$value_type = SIMPLE_VALUE_AVG;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
if ($id_server != 0) {
|
2015-07-08 16:47:00 +02:00
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
$connection = db_get_row_filter('tmetaconsole_setup',
|
|
|
|
array('id' => $id_server));
|
|
|
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
|
|
|
$return = ui_print_error_message(
|
|
|
|
"Error connecting to " . $server_name, '', true);
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-25 17:30:05 +02:00
|
|
|
switch ($label_type) {
|
|
|
|
case 'agent':
|
2017-01-16 12:05:36 +01:00
|
|
|
$agent_label =
|
|
|
|
agents_get_name($id_agent);
|
2012-06-25 17:30:05 +02:00
|
|
|
$label = $agent_label;
|
|
|
|
break;
|
|
|
|
case 'none':
|
2016-06-01 12:00:45 +02:00
|
|
|
$label = '';
|
2012-06-25 17:30:05 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
$label = io_safe_input($label);
|
|
|
|
|
2016-06-01 12:00:45 +02:00
|
|
|
if ($type === SIMPLE_VALUE) $label = !empty($label) ? $label . ' (_VALUE_)' : '(_VALUE_)';
|
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
//Restore db connection
|
|
|
|
if ($id_server != 0) {
|
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
|
|
|
|
2014-03-21 15:12:47 +01:00
|
|
|
$parent_item = 0;
|
|
|
|
if ($relationship) {
|
|
|
|
switch ($kind_relationship) {
|
|
|
|
case VISUAL_MAP_WIZARD_PARENTS_ITEM_MAP:
|
|
|
|
$parent_item = $item_in_the_map;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-25 17:30:05 +02:00
|
|
|
$values = array ('type' => $value_type,
|
|
|
|
'id_layout' => $id_layout,
|
|
|
|
'pos_x' => $pos_x,
|
|
|
|
'pos_y' => $pos_y,
|
|
|
|
'label' => $label,
|
|
|
|
'image' => $value_image,
|
|
|
|
'id_agent' => $id_agent,
|
|
|
|
'id_agente_modulo' => 0,
|
|
|
|
'width' => $value_width,
|
|
|
|
'period' => $period,
|
|
|
|
'height' => $value_height,
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
'enable_link' => $enable_link,
|
2014-03-21 15:12:47 +01:00
|
|
|
'id_metaconsole' => $id_server,
|
|
|
|
'parent_item' => $parent_item);
|
2012-06-25 17:30:05 +02:00
|
|
|
|
2014-03-21 15:12:47 +01:00
|
|
|
$id_item = db_process_sql_insert ('tlayout_data', $values);
|
|
|
|
|
|
|
|
if ($relationship) {
|
|
|
|
switch ($kind_relationship) {
|
|
|
|
case VISUAL_MAP_WIZARD_PARENTS_AGENT_RELANTIONSHIP:
|
|
|
|
|
|
|
|
if (!isset($relationships_agents[$id_agent])) {
|
|
|
|
$relationships_agents[$id_agent]['id_layout_data_parent'] = $id_item;
|
|
|
|
$relationships_agents[$id_agent]['id_layout_data_children'] = array();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$relationships_agents[$id_agent]['id_layout_data_parent'] = $id_item;
|
|
|
|
}
|
|
|
|
|
|
|
|
$agent_id_parent = db_get_value('id_parent', 'tagente',
|
|
|
|
'id_agente', $id_agent);
|
|
|
|
|
|
|
|
//Check in the group of new items is the father
|
|
|
|
if (array_search($agent_id_parent, $id_agents) !== false) {
|
|
|
|
if (isset($relationships_agents[$agent_id_parent])) {
|
|
|
|
$relationships_agents[$agent_id_parent]['id_layout_data_children'][] = $id_item;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$relationships_agents[$agent_id_parent] = array();
|
|
|
|
$relationships_agents[$agent_id_parent]['id_layout_data_parent'] = null;
|
|
|
|
$relationships_agents[$agent_id_parent]['id_layout_data_children'] = array();
|
|
|
|
$relationships_agents[$agent_id_parent]['id_layout_data_children'][] = $id_item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2012-06-25 17:30:05 +02:00
|
|
|
|
|
|
|
$pos_x = $pos_x + $range;
|
|
|
|
}
|
|
|
|
|
2014-03-21 15:12:47 +01:00
|
|
|
foreach ($relationships_agents as $relationship_item) {
|
|
|
|
foreach ($relationship_item['id_layout_data_children'] as $children) {
|
|
|
|
db_process_sql_update('tlayout_data',
|
|
|
|
array('parent_item' => $relationship_item['id_layout_data_parent']),
|
|
|
|
array('id' => $children));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$return = ui_print_success_message(
|
|
|
|
__('Agents successfully added to layout'), '', true);
|
2012-06-25 17:30:05 +02:00
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
/**
|
|
|
|
* Get the color of line between elements in the visual map.
|
|
|
|
*
|
|
|
|
* @param array $layoutData The row of element in DB.
|
|
|
|
*
|
|
|
|
* @return string The color as hexadecimal color in html.
|
|
|
|
*/
|
2011-05-10 10:31:33 +02:00
|
|
|
function visual_map_get_color_line_status($layoutData) {
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
if (($layoutData['type'] == 5) || ($layoutData['type'] == 4)) {
|
|
|
|
//ICON ELEMENT OR LABEL ELEMENT
|
|
|
|
$color = "#cccccc";
|
|
|
|
}
|
|
|
|
else {
|
2011-05-10 10:31:33 +02:00
|
|
|
switch (visual_map_get_status_element($layoutData)) {
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
case 3:
|
|
|
|
$color = "#cccccc"; // Gray
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$color = "#20f6f6"; // Yellow
|
|
|
|
break;
|
|
|
|
case 0:
|
|
|
|
$color = "#00ff00"; // Green
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 1:
|
|
|
|
$color = "#ff0000"; // Red
|
|
|
|
break;
|
|
|
|
}
|
2010-03-25 17:18:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return $color;
|
|
|
|
}
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
/**
|
|
|
|
* Get image of element in the visual console with status.
|
|
|
|
*
|
|
|
|
* @param array $layoutData The row of element in DB.
|
|
|
|
*
|
|
|
|
* @return string The image with the relative path to pandora console directory.
|
|
|
|
*/
|
2014-09-25 13:52:11 +02:00
|
|
|
function visual_map_get_image_status_element($layoutData, $status = false) {
|
2010-03-23 18:46:08 +01:00
|
|
|
$img = "images/console/icons/" . $layoutData["image"];
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
|
|
|
|
if ($layoutData['type'] == 5) {
|
|
|
|
//ICON ELEMENT
|
2010-03-23 18:46:08 +01:00
|
|
|
$img .= ".png";
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
}
|
|
|
|
else {
|
2014-09-25 13:52:11 +02:00
|
|
|
if ($status === false) {
|
|
|
|
$status = visual_map_get_status_element($layoutData);
|
|
|
|
}
|
|
|
|
|
|
|
|
switch ($status) {
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
case 1:
|
2010-08-13 13:08:14 +02:00
|
|
|
//Critical (BAD)
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
$img .= "_bad.png";
|
|
|
|
break;
|
2010-08-13 13:08:14 +02:00
|
|
|
case 4:
|
|
|
|
//Critical (ALERT)
|
2014-03-13 17:58:18 +01:00
|
|
|
$img = "4" . $img . "_bad.png";
|
2010-08-13 13:08:14 +02:00
|
|
|
break;
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
case 0:
|
|
|
|
//Normal (OK)
|
|
|
|
$img .= "_ok.png";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
//Warning
|
|
|
|
$img .= "_warning.png";
|
|
|
|
break;
|
2014-02-05 17:38:05 +01:00
|
|
|
case 10:
|
|
|
|
//Warning (ALERT)
|
2014-03-13 17:58:18 +01:00
|
|
|
$img = "4" . $img . "_warning.png";
|
2014-02-05 17:38:05 +01:00
|
|
|
break;
|
2010-08-13 13:08:14 +02:00
|
|
|
case 3:
|
|
|
|
//Unknown
|
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
* images/mimetypes/text.png: added lost image file in previous commits about
collections.
*images/tag_red.disabled.png, images/cross.disabled.png,
images/chart_curve.disabled.png, images/config.disabled.png,
images/chart_bar.disabled.png, images/photo.disabled.png,
images/camera.disabled.png, images/binary.disabled.png: added image files
for the new palete buttons (when it are disabled) in visual console editor.
* include/styles/pandora.css: added the styles for the new buttons of
visual console editor (label and icon), and some changes for new style for
buttons of the palete in this page.
* include/functions_html.php: in function "print_button" added new
parameter $imageButton to set the button as image button, by default is
false.
* include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: change the buttons
palete for a palete with more small buttons as icon buttons, added new items
for visual map (icon and label). And fixed the dinamic change label color
for any elements.
* include/functions_visual_map.php: added the new items (label and icon)
and cleaned the source code.
Pending task: #3019641
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-26 13:56:04 +02:00
|
|
|
default:
|
|
|
|
$img .= ".png";
|
|
|
|
// Default is Grey (Other)
|
|
|
|
}
|
2010-03-23 18:46:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return $img;
|
|
|
|
}
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
/**
|
|
|
|
* Get the status of element in visual console. Check the agent state or
|
|
|
|
* module or layout linked.
|
|
|
|
*
|
|
|
|
* @param array $layoutData The row of element in DB.
|
|
|
|
*
|
|
|
|
* @return integer
|
|
|
|
*/
|
2011-05-10 10:31:33 +02:00
|
|
|
function visual_map_get_status_element($layoutData) {
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
enterprise_include_once('include/functions_visual_map.php');
|
|
|
|
if (enterprise_installed()) {
|
|
|
|
$status = enterprise_visual_map_get_status_element($layoutData);
|
|
|
|
|
|
|
|
//The function return value.
|
|
|
|
if ($status !== false) {
|
|
|
|
//Return this value as call of open function.
|
|
|
|
return $status;
|
|
|
|
}
|
|
|
|
}
|
2015-10-15 12:33:38 +02:00
|
|
|
|
|
|
|
$module_value = db_get_sql ('SELECT datos
|
|
|
|
FROM tagente_estado
|
|
|
|
WHERE id_agente_modulo = ' . $layoutData['id_agente_modulo']);
|
|
|
|
|
2010-03-23 18:46:08 +01:00
|
|
|
//Linked to other layout ?? - Only if not module defined
|
|
|
|
if ($layoutData['id_layout_linked'] != 0) {
|
2011-05-10 10:31:33 +02:00
|
|
|
$status = visual_map_get_layout_status ($layoutData['id_layout_linked']);
|
2010-03-23 18:46:08 +01:00
|
|
|
}
|
|
|
|
else {
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
switch ($layoutData["type"]) {
|
|
|
|
case STATIC_GRAPH:
|
2015-12-10 15:35:54 +01:00
|
|
|
//Enter the correct img if the graph has a module selected or not
|
|
|
|
//Module
|
|
|
|
if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
$module_status = db_get_sql ('SELECT estado
|
|
|
|
FROM tagente_estado
|
|
|
|
WHERE id_agente_modulo = ' . $layoutData['id_agente_modulo']);
|
|
|
|
switch($module_status) {
|
|
|
|
case AGENT_STATUS_NORMAL:
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_NORMAL;
|
|
|
|
break;
|
|
|
|
case AGENT_MODULE_STATUS_WARNING:
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_WARNING;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_CRITICAL:
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_CRITICAL_BAD;
|
|
|
|
break;
|
|
|
|
case AGENT_MODULE_STATUS_NO_DATA:
|
|
|
|
default:
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_UNKNOWN;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//No module
|
|
|
|
else if ($layoutData['id_agent'] != 0) {
|
|
|
|
$agent = db_get_row ("tagente", "id_agente", $layoutData['id_agent']);
|
|
|
|
if ($agent['total_count'] == 0 || $agent['total_count'] == $agent['notinit_count']) {
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_UNKNOWN;
|
|
|
|
}
|
|
|
|
else if ($agent['critical_count'] > 0) {
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_CRITICAL_BAD;
|
|
|
|
}
|
|
|
|
else if ($agent['warning_count'] > 0) {
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_WARNING;
|
|
|
|
}
|
|
|
|
else if ($agent['unknown_count'] > 0) {
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_UNKNOWN;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_NORMAL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//In other case
|
|
|
|
else {
|
|
|
|
$layoutData['status_calculated'] = VISUAL_MAP_STATUS_UNKNOWN;
|
|
|
|
}
|
|
|
|
$status = $layoutData['status_calculated'];
|
|
|
|
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
//Metaconsole db connection
|
|
|
|
$connection = db_get_row_filter ('tmetaconsole_setup',
|
|
|
|
array('id' => $layoutData['id_metaconsole']));
|
|
|
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
|
|
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
//Restore db connection
|
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2014-03-31 18:28:35 +02:00
|
|
|
case PERCENTILE_BAR:
|
|
|
|
case PERCENTILE_BUBBLE:
|
2015-10-15 12:33:38 +02:00
|
|
|
|
|
|
|
if (empty($module_value) || $module_value == '') {
|
|
|
|
return VISUAL_MAP_STATUS_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
//Metaconsole db connection
|
|
|
|
$connection = db_get_row_filter ('tmetaconsole_setup',
|
|
|
|
array('id' => $layoutData['id_metaconsole']));
|
|
|
|
if (metaconsole_load_external_db($connection) != NOERR) {
|
|
|
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
//Status for a simple module
|
|
|
|
if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
$status = modules_get_agentmodule_status ($layoutData['id_agente_modulo']);
|
2013-08-02 12:53:50 +02:00
|
|
|
|
2013-01-15 11:09:37 +01:00
|
|
|
//We need to get the diference between warning and critical alerts!!!
|
2014-03-13 17:58:18 +01:00
|
|
|
$real_status = db_get_row ("tagente_estado", "id_agente_modulo", $layoutData["id_agente_modulo"]);
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
//Status for a whole agent, if agente_modulo was == 0
|
|
|
|
}
|
|
|
|
else if ($layoutData['id_agent'] != 0) {
|
2014-10-09 19:04:21 +02:00
|
|
|
|
|
|
|
//--------------------------------------------------
|
|
|
|
// ADDED NO CHECK ACL FOR AVOID CHECK TAGS THAT
|
|
|
|
// MAKE VERY SLOW THE VISUALMAPS WITH ACL TAGS
|
|
|
|
//--------------------------------------------------
|
|
|
|
$status = agents_get_status ($layoutData["id_agent"], true);
|
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
if ($status == -1) // agents_get_status return -1 for unknown!
|
2013-07-24 13:06:24 +02:00
|
|
|
$status = VISUAL_MAP_STATUS_UNKNOWN;
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
}
|
|
|
|
else {
|
2013-07-24 13:06:24 +02:00
|
|
|
$status = VISUAL_MAP_STATUS_UNKNOWN;
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
$id_agent = 0;
|
|
|
|
}
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
|
|
|
if ($layoutData['id_metaconsole'] != 0) {
|
|
|
|
//Restore db connection
|
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
break;
|
2012-12-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/lib/libupdate_manager_client.php,
extensions/update_manager/lib/libupdate_manager.php,
operation/agentes/ver_agente.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/integria_incidents/incident.php,
operation/reporting/reporting_xml.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.elements.php,
include/functions_visual_map.php,
include/functions_visual_map_editor.php: uploaded the changes of
source code style previous to my next commit for to make the next
commit more easy.
* godmode/reporting/visual_console_builder.php: set empty string
for the new visualmap.
* include/ajax/visual_console_builder.ajax.php: fixed the regular
expresion to extract the url for the graph.
* include/functions_html.php: fixed into the function
"html_print_select_groups" lost code for to show the selectbox.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7230 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-05 15:20:47 +01:00
|
|
|
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
case GROUP_ITEM:
|
|
|
|
$group_status = groups_get_status($layoutData['id_group']);
|
|
|
|
|
|
|
|
switch ($group_status) {
|
|
|
|
case AGENT_STATUS_ALERT_FIRED:
|
|
|
|
return VISUAL_MAP_STATUS_CRITICAL_ALERT;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_CRITICAL:
|
|
|
|
return VISUAL_MAP_STATUS_CRITICAL_BAD;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_WARNING:
|
|
|
|
return VISUAL_MAP_STATUS_WARNING;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_UNKNOWN:
|
|
|
|
return VISUAL_MAP_STATUS_UNKNOWN;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_NORMAL:
|
|
|
|
default:
|
|
|
|
return VISUAL_MAP_STATUS_NORMAL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
default:
|
|
|
|
//If it's a graph, a progress bar or a data tag, ALWAYS report status OK
|
|
|
|
//(=0) to avoid confussions here.
|
2012-07-06 13:45:02 +02:00
|
|
|
$status = VISUAL_MAP_STATUS_NORMAL;
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
break;
|
2012-12-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/lib/libupdate_manager_client.php,
extensions/update_manager/lib/libupdate_manager.php,
operation/agentes/ver_agente.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/integria_incidents/incident.php,
operation/reporting/reporting_xml.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.elements.php,
include/functions_visual_map.php,
include/functions_visual_map_editor.php: uploaded the changes of
source code style previous to my next commit for to make the next
commit more easy.
* godmode/reporting/visual_console_builder.php: set empty string
for the new visualmap.
* include/ajax/visual_console_builder.ajax.php: fixed the regular
expresion to extract the url for the graph.
* include/functions_html.php: fixed into the function
"html_print_select_groups" lost code for to show the selectbox.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7230 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-05 15:20:47 +01:00
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
}
|
2010-03-23 18:46:08 +01:00
|
|
|
}
|
|
|
|
|
2014-02-07 12:29:20 +01:00
|
|
|
switch ($status) {
|
|
|
|
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
|
2013-11-20 09:56:31 +01:00
|
|
|
$status = VISUAL_MAP_STATUS_CRITICAL_ALERT;
|
2014-02-07 12:29:20 +01:00
|
|
|
break;
|
|
|
|
case AGENT_MODULE_STATUS_WARNING_ALERT:
|
|
|
|
$status = VISUAL_MAP_STATUS_WARNING_ALERT;
|
|
|
|
break;
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
}
|
2013-11-20 09:56:31 +01:00
|
|
|
|
2010-03-23 18:46:08 +01:00
|
|
|
return $status;
|
|
|
|
}
|
|
|
|
|
2015-09-21 13:42:21 +02:00
|
|
|
function visual_map_print_user_lines($layout_data, $proportion = null) {
|
|
|
|
if (empty($proportion)) {
|
|
|
|
$line = array();
|
|
|
|
$line["id"] = $layout_data['id'];
|
|
|
|
$line["start_x"] = $layout_data['pos_x'];
|
|
|
|
$line["start_y"] = $layout_data['pos_y'];
|
|
|
|
$line["end_x"] = $layout_data['width'];
|
|
|
|
$line["end_y"] = $layout_data['height'];
|
|
|
|
$line["line_width"] = $layout_data['border_width'];
|
|
|
|
$line["line_color"] = $layout_data['border_color'];
|
|
|
|
}
|
|
|
|
else {
|
2015-07-24 16:43:54 +02:00
|
|
|
$proportion_width = $proportion['proportion_width'];
|
|
|
|
$proportion_height = $proportion['proportion_height'];
|
|
|
|
|
|
|
|
$proportion_line = $proportion_height;
|
|
|
|
if ($proportion_width > $proportion_height) {
|
|
|
|
$proportion_line = $proportion_width;
|
|
|
|
}
|
2015-09-21 13:42:21 +02:00
|
|
|
|
|
|
|
$line = array();
|
|
|
|
$line["id"] = $layout_data['id'];
|
|
|
|
$line["start_x"] = $layout_data['pos_x'] * $proportion_width;
|
|
|
|
$line["start_y"] = $layout_data['pos_y'] * $proportion_height;
|
|
|
|
$line["end_x"] = $layout_data['width'] * $proportion_width;
|
|
|
|
$line["end_y"] = $layout_data['height'] * $proportion_height;
|
|
|
|
$line["line_width"] = $layout_data['border_width'] * $proportion_line;
|
|
|
|
$line["line_color"] = $layout_data['border_color'];
|
2015-07-24 16:43:54 +02:00
|
|
|
}
|
2015-09-21 13:42:21 +02:00
|
|
|
|
2014-11-24 17:52:28 +01:00
|
|
|
echo '<script type="text/javascript">';
|
|
|
|
echo '$(document).ready (function() {
|
|
|
|
user_lines.push(' . json_encode($line) . ');
|
|
|
|
});';
|
|
|
|
echo '</script>';
|
|
|
|
}
|
|
|
|
|
2009-01-08 16:52:13 +01:00
|
|
|
/**
|
|
|
|
* Prints visual map
|
|
|
|
*
|
|
|
|
* @param int $id_layout Layout id
|
|
|
|
* @param bool $show_links
|
|
|
|
* @param bool $draw_lines
|
|
|
|
*/
|
2014-10-09 12:36:26 +02:00
|
|
|
function visual_map_print_visual_map ($id_layout, $show_links = true,
|
2016-05-25 10:42:42 +02:00
|
|
|
$draw_lines = true, $width = null, $height = null, $home_url = '',
|
|
|
|
$isExternalLink = false, $graph_javascript = true, $keep_aspect_ratio = false) {
|
2015-10-05 16:45:49 +02:00
|
|
|
|
2012-07-06 13:45:02 +02:00
|
|
|
enterprise_include_once('include/functions_visual_map.php');
|
|
|
|
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
global $config;
|
2011-04-13 17:11:51 +02:00
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
$metaconsole_hack = '/';
|
|
|
|
if (defined('METACONSOLE')) {
|
|
|
|
$metaconsole_hack = '../../';
|
|
|
|
}
|
|
|
|
|
2012-12-12 14:51:45 +01:00
|
|
|
enterprise_include_once("meta/include/functions_ui_meta.php");
|
|
|
|
|
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
|
|
|
require_once ($config["homedir"] . '/include/functions_custom_graphs.php');
|
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.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/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.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/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.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/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.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/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$layout = db_get_row ('tlayout', 'id', $id_layout);
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
|
2013-06-25 11:34:12 +02:00
|
|
|
if (empty($layout)) {
|
|
|
|
ui_print_error_message(__('Cannot load the visualmap'));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-07-24 14:32:26 +02:00
|
|
|
?>
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
|
|
/* <![CDATA[ */
|
2016-03-03 13:15:43 +01:00
|
|
|
var id_layout = <?php echo $id_layout; ?>;
|
2015-07-24 14:32:26 +02:00
|
|
|
var lines = Array();
|
|
|
|
|
|
|
|
var user_lines = Array();
|
|
|
|
|
|
|
|
//Fixed to wait the load of images.
|
2016-06-02 15:13:46 +02:00
|
|
|
$(window).load(function () {
|
|
|
|
draw_lines(lines, 'background_'+id_layout);
|
|
|
|
draw_user_lines_read('background_'+id_layout);
|
2017-01-16 13:31:56 +01:00
|
|
|
//center_labels();
|
2016-06-02 15:13:46 +02:00
|
|
|
});
|
2015-07-24 14:32:26 +02:00
|
|
|
/* ]]> */
|
|
|
|
</script>
|
|
|
|
<?php
|
|
|
|
|
2009-07-27 11:55:11 +02:00
|
|
|
$resizedMap = false;
|
2015-07-24 16:43:54 +02:00
|
|
|
|
|
|
|
$dif_height = 0;
|
|
|
|
$dif_width = 0;
|
|
|
|
$proportion_height = 0;
|
|
|
|
$proportion_width = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!is_null($height) && !is_null($width)) {
|
2009-07-27 11:55:11 +02:00
|
|
|
$resizedMap = true;
|
2013-10-08 17:36:42 +02:00
|
|
|
|
2015-07-24 16:43:54 +02:00
|
|
|
|
2016-05-25 10:42:42 +02:00
|
|
|
if ($keep_aspect_ratio) {
|
|
|
|
$ratio = min($width / $layout['width'], $height / $layout['height']);
|
|
|
|
$mapWidth = $ratio * $layout['width'];
|
|
|
|
$mapHeight = $ratio * $layout['height'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$mapWidth = $width;
|
|
|
|
$mapHeight = $height;
|
|
|
|
}
|
|
|
|
|
|
|
|
$dif_height = $layout["height"] - $mapHeight;
|
|
|
|
$dif_width = $layout["width"] - $mapWidth;
|
2015-07-24 16:43:54 +02:00
|
|
|
|
|
|
|
|
2016-05-25 10:42:42 +02:00
|
|
|
$proportion_height = $mapHeight / $layout["height"];
|
|
|
|
$proportion_width = $mapWidth / $layout["width"];
|
2015-07-24 16:43:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
if (is_metaconsole()) {
|
2014-01-23 17:25:54 +01:00
|
|
|
$backgroundImage =
|
|
|
|
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
|
|
|
$config['homeurl'] . 'images/console/background/' .
|
|
|
|
io_safe_input ($layout["background"]);
|
2013-10-08 17:36:42 +02:00
|
|
|
}
|
|
|
|
else {
|
2014-01-23 17:25:54 +01:00
|
|
|
$backgroundImage =
|
|
|
|
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
|
|
|
$config['homedir'] . '/images/console/background/' .
|
|
|
|
io_safe_input ($layout["background"]);
|
2013-10-08 17:36:42 +02:00
|
|
|
}
|
2009-07-27 11:55:11 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$mapWidth = $layout["width"];
|
|
|
|
$mapHeight = $layout["height"];
|
2014-01-23 17:25:54 +01:00
|
|
|
$backgroundImage = $metaconsole_hack . 'images/console/background/' .
|
|
|
|
io_safe_input ($layout["background"]);
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (defined('METACONSOLE')) {
|
2017-01-13 14:09:56 +01:00
|
|
|
echo "<div style='width: 100%; overflow:auto; margin: 0 auto; padding:5px;'>";
|
2009-07-27 11:55:11 +02:00
|
|
|
}
|
|
|
|
|
2017-01-16 13:31:56 +01:00
|
|
|
echo '<div style="';
|
|
|
|
|
|
|
|
if(get_parameter('pure')==1){
|
|
|
|
echo 'width:100%;height:100%;position:absolute;';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
echo 'background-color:'.$layout["background_color"].';"><div id="background_'.$id_layout.'"
|
|
|
|
style="margin:0px auto;';
|
|
|
|
|
|
|
|
if(get_parameter('pure')==1){
|
|
|
|
echo 'top: 50%;
|
|
|
|
transform: translate(-0%, -50%);
|
|
|
|
-webkit-transform: translate(-0%, -50%);';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo 'text-align:;
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
z-index: 0;
|
|
|
|
position:relative;
|
2014-03-13 13:09:06 +01:00
|
|
|
width:' . $mapWidth . 'px;
|
|
|
|
height:' . $mapHeight . 'px;">';
|
2014-01-23 17:25:54 +01:00
|
|
|
echo "<img src='" .
|
|
|
|
ui_get_full_url($backgroundImage) . "' width='100%' height='100%' />";
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
|
|
|
|
2014-01-23 17:25:54 +01:00
|
|
|
$layout_datas = db_get_all_rows_field_filter('tlayout_data',
|
|
|
|
'id_layout', $id_layout);
|
2012-07-06 13:45:02 +02:00
|
|
|
if (empty($layout_datas))
|
|
|
|
$layout_datas = array();
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
$lines = array ();
|
|
|
|
|
2015-07-24 16:43:54 +02:00
|
|
|
|
2012-07-06 13:45:02 +02:00
|
|
|
foreach ($layout_datas as $layout_data) {
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
//Check the items are from disabled or pending delete modules
|
|
|
|
if ($layout_data['id_agente_modulo'] != 0 &&
|
|
|
|
(($layout_data['type'] != LABEL)
|
|
|
|
|| ($layout_data['type'] != ICON)
|
|
|
|
|| ($layout_data['type'] != SERVICE))) {
|
|
|
|
|
|
|
|
$delete_pending_module = db_get_value ("delete_pending",
|
|
|
|
"tagente_modulo", "id_agente_modulo",
|
|
|
|
$layout_data["id_agente_modulo"]);
|
|
|
|
$disabled_module = db_get_value ("disabled", "tagente_modulo",
|
|
|
|
"id_agente_modulo", $layout_data["id_agente_modulo"]);
|
|
|
|
|
|
|
|
if ($delete_pending_module == 1 || $disabled_module == 1)
|
|
|
|
continue;
|
2012-07-06 13:45:02 +02:00
|
|
|
}
|
|
|
|
|
2015-07-27 16:24:04 +02:00
|
|
|
if (($dif_height === 0) && ($dif_width === 0)) {
|
|
|
|
$proportion = null;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$proportion = array(
|
|
|
|
'dif_height' => $dif_height,
|
|
|
|
'dif_width' => $dif_width,
|
|
|
|
'proportion_height' => $proportion_height,
|
|
|
|
'proportion_width' => $proportion_width);
|
|
|
|
}
|
2017-01-16 13:31:56 +01:00
|
|
|
|
2014-11-24 17:52:28 +01:00
|
|
|
switch ($layout_data['type']) {
|
|
|
|
case LINE_ITEM:
|
2015-09-21 13:42:21 +02:00
|
|
|
visual_map_print_user_lines($layout_data, $proportion);
|
2014-11-24 17:52:28 +01:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
visual_map_print_item("read", $layout_data,
|
2016-03-15 09:25:48 +01:00
|
|
|
$proportion, $show_links, $isExternalLink, $graph_javascript);
|
2014-11-24 17:52:28 +01:00
|
|
|
break;
|
|
|
|
}
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
}
|
2009-05-27 10:00:21 +02:00
|
|
|
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
// End main div
|
2016-11-16 18:58:27 +01:00
|
|
|
echo "</div></div>";
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
|
|
|
|
|
2013-06-25 11:34:12 +02:00
|
|
|
|
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
|
|
|
if (defined('METACONSOLE')) {
|
|
|
|
echo "</div>";
|
|
|
|
}
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
}
|
2013-06-25 11:34:12 +02:00
|
|
|
//End function
|
|
|
|
|
|
|
|
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
|
2013-06-25 11:34:12 +02:00
|
|
|
//Start function
|
2009-02-23 14:41:40 +01:00
|
|
|
/**
|
|
|
|
* Get a list with the layouts for a user.
|
|
|
|
*
|
|
|
|
* @param int User id.
|
|
|
|
* @param bool Wheter to return all the fields or only the name (to use in
|
2011-04-27 15:43:31 +02:00
|
|
|
* html_print_select() directly)
|
2009-02-23 14:41:40 +01:00
|
|
|
* @param array Additional filters to filter the layouts.
|
2011-02-16 19:39:28 +01:00
|
|
|
* @param bool Whether to return All group or not.
|
2009-02-23 14:41:40 +01:00
|
|
|
*
|
|
|
|
* @return array A list of layouts the user can see.
|
|
|
|
*/
|
2011-05-10 10:31:33 +02:00
|
|
|
function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter = false, $returnAllGroup = true) {
|
2009-02-23 14:41:40 +01:00
|
|
|
if (! is_array ($filter))
|
|
|
|
$filter = array ();
|
|
|
|
|
2011-02-16 19:39:28 +01:00
|
|
|
if ($returnAllGroup)
|
2016-09-08 16:06:12 +02:00
|
|
|
$groups = users_get_groups ($id_user, 'VR');
|
2011-02-16 19:39:28 +01:00
|
|
|
else
|
2016-09-08 16:06:12 +02:00
|
|
|
$groups = users_get_groups ($id_user, 'VR', false);
|
2012-05-03 11:35:30 +02:00
|
|
|
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php,
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
operation/tree.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php,
operation/agentes/datos_agente.php,
operation/agentes/alerts_status.php, operation/menu.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/servers/manage_recontask.php,
godmode/alerts/alert_compounds.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
godmode/setup/os.php, godmode/users/configure_profile.php,
godmode/events/events.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/graph_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_menu.php, include/functions_visual_map.php,
include/functions_db.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
|
|
|
if (!empty($groups)) {
|
2015-07-16 15:12:47 +02:00
|
|
|
if (empty($where))
|
|
|
|
$where = "";
|
|
|
|
|
2011-07-19 16:29:59 +02:00
|
|
|
if ($where != '') {
|
|
|
|
$where .= ' AND ';
|
|
|
|
}
|
|
|
|
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
|
|
|
|
}
|
2009-02-23 14:41:40 +01:00
|
|
|
|
2015-07-08 16:09:00 +02:00
|
|
|
$where .= db_format_array_where_clause_sql ($filter);
|
|
|
|
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php,
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
operation/tree.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php,
operation/agentes/datos_agente.php,
operation/agentes/alerts_status.php, operation/menu.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/servers/manage_recontask.php,
godmode/alerts/alert_compounds.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
godmode/setup/os.php, godmode/users/configure_profile.php,
godmode/events/events.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/graph_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_menu.php, include/functions_visual_map.php,
include/functions_db.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
|
|
|
if ($where == '') {
|
2011-07-19 16:29:59 +02:00
|
|
|
$where = array();
|
|
|
|
}
|
2012-05-03 11:35:30 +02:00
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.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/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.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/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.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/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.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/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$layouts = db_get_all_rows_filter ('tlayout', $where);
|
2009-02-23 14:41:40 +01:00
|
|
|
|
|
|
|
if ($layouts == false)
|
|
|
|
return array ();
|
|
|
|
|
|
|
|
$retval = array ();
|
|
|
|
foreach ($layouts as $layout) {
|
|
|
|
if ($only_names)
|
|
|
|
$retval[$layout['id']] = $layout['name'];
|
|
|
|
else
|
|
|
|
$retval[$layout['id']] = $layout;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $retval;
|
|
|
|
}
|
|
|
|
|
2013-06-24 12:39:47 +02:00
|
|
|
|
2009-02-23 14:41:40 +01:00
|
|
|
/**
|
|
|
|
* Get the status of a layout.
|
|
|
|
*
|
|
|
|
* It gets all the data of the contained elements (including nested
|
|
|
|
* layouts), and makes an AND operation to be sure that all the items
|
|
|
|
* are OK. If any of them is down, then result is down (0)
|
|
|
|
*
|
|
|
|
* @param int Id of the layout
|
2010-02-01 20:22:34 +01:00
|
|
|
* @param int Depth (for recursion control)
|
2009-02-23 14:41:40 +01:00
|
|
|
*
|
|
|
|
* @return bool The status of the given layout. True if it's OK, false if not.
|
|
|
|
*/
|
2011-05-10 10:31:33 +02:00
|
|
|
function visual_map_get_layout_status ($id_layout = 0, $depth = 0) {
|
2012-07-06 13:45:02 +02:00
|
|
|
$temp_status = VISUAL_MAP_STATUS_NORMAL;
|
|
|
|
$temp_total = VISUAL_MAP_STATUS_NORMAL;
|
2010-02-01 20:22:34 +01:00
|
|
|
$depth++; // For recursion depth checking
|
2012-05-03 11:35:30 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
// TODO: Implement this limit as a configurable item in setup
|
2012-05-03 11:35:30 +02:00
|
|
|
if ($depth > 10) {
|
2013-07-24 13:06:24 +02:00
|
|
|
return VISUAL_MAP_STATUS_UNKNOWN; // No status data if we need to exit by a excesive recursion
|
2010-02-01 20:22:34 +01:00
|
|
|
}
|
2012-05-03 11:35:30 +02:00
|
|
|
|
2009-05-27 10:19:31 +02:00
|
|
|
$id_layout = (int) $id_layout;
|
2009-02-23 14:41:40 +01:00
|
|
|
|
2015-01-12 13:19:14 +01:00
|
|
|
$result = db_get_all_rows_filter ('tlayout_data',
|
|
|
|
array ('id_layout' => $id_layout),
|
|
|
|
array (
|
|
|
|
'id_agente_modulo',
|
|
|
|
'id_group',
|
|
|
|
'parent_item',
|
|
|
|
'id_layout_linked',
|
|
|
|
'id_agent',
|
|
|
|
'type'));
|
2009-02-23 14:41:40 +01:00
|
|
|
if ($result === false)
|
2012-07-06 13:45:02 +02:00
|
|
|
return VISUAL_MAP_STATUS_NORMAL;
|
2009-02-23 14:41:40 +01:00
|
|
|
|
2015-01-12 13:19:14 +01:00
|
|
|
foreach ($result as $data) {
|
|
|
|
switch ($data['type']) {
|
|
|
|
case GROUP_ITEM:
|
2015-01-13 12:40:46 +01:00
|
|
|
if ($data["id_layout_linked"] == 0) {
|
2015-01-12 13:19:14 +01:00
|
|
|
$group_status = groups_get_status($data['id_group']);
|
|
|
|
switch ($group_status) {
|
|
|
|
case AGENT_STATUS_ALERT_FIRED:
|
|
|
|
$status = VISUAL_MAP_STATUS_CRITICAL_ALERT;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_CRITICAL:
|
|
|
|
$status = VISUAL_MAP_STATUS_CRITICAL_BAD;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_WARNING:
|
|
|
|
$status = VISUAL_MAP_STATUS_WARNING;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_UNKNOWN:
|
|
|
|
$status = VISUAL_MAP_STATUS_UNKNOWN;
|
|
|
|
break;
|
|
|
|
case AGENT_STATUS_NORMAL:
|
|
|
|
default:
|
|
|
|
$status = VISUAL_MAP_STATUS_NORMAL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$status = visual_map_get_layout_status(
|
|
|
|
$data["id_layout_linked"], $depth);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (($data["id_layout_linked"] == 0 &&
|
|
|
|
$data["id_agente_modulo"] == 0 &&
|
|
|
|
$data["id_agent"] == 0) ||
|
|
|
|
$data['type'] != 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// Other Layout (Recursive!)
|
|
|
|
if (($data["id_layout_linked"] != 0) && ($data["id_agente_modulo"] == 0)) {
|
|
|
|
$status = visual_map_get_layout_status($data["id_layout_linked"], $depth);
|
|
|
|
}
|
|
|
|
// Module
|
|
|
|
elseif ($data["id_agente_modulo"] != 0) {
|
|
|
|
$status = modules_get_agentmodule_status($data["id_agente_modulo"]);
|
|
|
|
|
|
|
|
}
|
|
|
|
// Agent
|
|
|
|
else {
|
|
|
|
//--------------------------------------------------
|
|
|
|
// ADDED NO CHECK ACL FOR AVOID CHECK TAGS THAT
|
|
|
|
// MAKE VERY SLOW THE VISUALMAPS WITH ACL TAGS
|
|
|
|
//--------------------------------------------------
|
|
|
|
|
|
|
|
$status = agents_get_status($data["id_agent"], true);
|
|
|
|
}
|
|
|
|
break;
|
2012-05-03 11:35:30 +02:00
|
|
|
}
|
|
|
|
|
2012-07-06 13:45:02 +02:00
|
|
|
if ($status == VISUAL_MAP_STATUS_CRITICAL_BAD)
|
|
|
|
return VISUAL_MAP_STATUS_CRITICAL_BAD;
|
2015-01-12 13:19:14 +01:00
|
|
|
|
2009-05-27 10:00:21 +02:00
|
|
|
if ($status > $temp_total)
|
|
|
|
$temp_total = $status;
|
2009-02-23 14:41:40 +01:00
|
|
|
}
|
2009-05-27 10:00:21 +02:00
|
|
|
|
2009-02-23 14:41:40 +01:00
|
|
|
return $temp_total;
|
|
|
|
}
|
2011-02-16 16:37:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Make a text for the parent select, when the label is not empty put this for
|
|
|
|
* the return text. Instead for the empty labels make the text with next form
|
|
|
|
* (<Type>) - <name_image> ( <agent_name> - <module_name> ) (<id item>)
|
|
|
|
*
|
|
|
|
* @param string $label The label of item in visual map.
|
|
|
|
* @param string $type The label of type in visual map.
|
|
|
|
* @param string $image The image of item in visual map.
|
|
|
|
* @param string $agent The agent name of item in visual map.
|
|
|
|
* @param string $id_module The module name of item in visual map.
|
|
|
|
* @param int $idData The id of item in visual map.
|
|
|
|
*
|
|
|
|
* @return string The text for the parent.
|
|
|
|
*/
|
2011-05-10 10:31:33 +02:00
|
|
|
function visual_map_create_internal_name_item($label = null, $type, $image, $agent = null, $id_module, $idData) {
|
2011-02-16 16:37:55 +01:00
|
|
|
$text = '';
|
|
|
|
|
|
|
|
if (empty($label))
|
|
|
|
{
|
|
|
|
switch ($type) {
|
2014-11-24 16:40:59 +01:00
|
|
|
case 'box_item':
|
|
|
|
case BOX_ITEM:
|
|
|
|
$text = __('Box');
|
|
|
|
break;
|
2011-02-16 16:37:55 +01:00
|
|
|
case 'module_graph':
|
|
|
|
case MODULE_GRAPH:
|
|
|
|
$text = __('Module graph');
|
|
|
|
break;
|
|
|
|
case 'percentile_bar':
|
|
|
|
case PERCENTILE_BAR:
|
|
|
|
$text = __('Percentile bar');
|
|
|
|
break;
|
|
|
|
case 'static_graph':
|
|
|
|
case STATIC_GRAPH:
|
|
|
|
$text = __('Static graph') . " - " .
|
|
|
|
$image;
|
|
|
|
break;
|
|
|
|
case 'simple_value':
|
|
|
|
case SIMPLE_VALUE:
|
|
|
|
$text = __('Simple Value');
|
|
|
|
break;
|
|
|
|
case 'label':
|
|
|
|
case LABEL:
|
|
|
|
$text = __('Label');
|
|
|
|
break;
|
2014-12-02 11:39:45 +01:00
|
|
|
case GROUP_ITEM:
|
|
|
|
case 'group_item':
|
|
|
|
$text = __('Group') . " - ";
|
|
|
|
break;
|
2011-02-16 16:37:55 +01:00
|
|
|
case 'icon':
|
|
|
|
case ICON:
|
|
|
|
$text = __('Icon') . " - " .
|
|
|
|
$image;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($agent)) {
|
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
|
|
|
$text .= " (" . ui_print_truncate_text($agent, 'agent_small', false);
|
2011-02-16 16:37:55 +01:00
|
|
|
|
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
|
|
|
$moduleName = io_safe_output(db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id_module));
|
2011-02-16 16:37:55 +01:00
|
|
|
if (!empty($moduleName)) {
|
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
|
|
|
$text .= " - " . ui_print_truncate_text($moduleName, 'module_small', false);
|
2011-02-16 16:37:55 +01:00
|
|
|
}
|
2012-05-03 11:35:30 +02:00
|
|
|
|
2011-02-16 16:37:55 +01:00
|
|
|
$text .= ")";
|
|
|
|
}
|
|
|
|
$text .= ' (' . $idData . ')';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$text = $label;
|
|
|
|
}
|
|
|
|
|
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
|
|
|
return io_safe_output($text);
|
2011-02-16 16:37:55 +01:00
|
|
|
}
|
|
|
|
|
2011-05-10 10:31:33 +02:00
|
|
|
function visual_map_get_items_parents($idVisual) {
|
2015-05-04 20:11:03 +02:00
|
|
|
// Avoid the sort by 'label' in the query cause oracle cannot sort by columns with CLOB type
|
|
|
|
$items = db_get_all_rows_filter('tlayout_data', array('id_layout' => $idVisual));
|
2011-02-16 16:37:55 +01:00
|
|
|
if ($items == false) {
|
|
|
|
$items = array();
|
|
|
|
}
|
2015-05-04 20:11:03 +02:00
|
|
|
else {
|
|
|
|
// Sort by label
|
|
|
|
sort_by_column($items, 'label');
|
|
|
|
}
|
2011-02-16 16:37:55 +01:00
|
|
|
|
|
|
|
$return = array();
|
|
|
|
foreach ($items as $item) {
|
|
|
|
$agent = null;
|
|
|
|
if ($item['id_agent'] != 0) {
|
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.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/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
|
|
|
$agent = io_safe_output(agents_get_name($item['id_agent']));
|
2011-02-16 16:37:55 +01:00
|
|
|
}
|
|
|
|
|
2014-12-02 11:39:45 +01:00
|
|
|
$return[$item['id']] = visual_map_create_internal_name_item(
|
|
|
|
$item['label'],
|
|
|
|
$item['type'],
|
|
|
|
$item['image'],
|
|
|
|
$agent,
|
|
|
|
$item['id_agente_modulo'],
|
2011-02-16 16:37:55 +01:00
|
|
|
$item['id']);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.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/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.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/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.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/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.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/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the X axis coordinate of a layout item
|
|
|
|
*
|
|
|
|
* @param int Id of the layout to get.
|
|
|
|
*
|
|
|
|
* @return int The X axis coordinate value.
|
|
|
|
*/
|
2011-05-10 10:31:33 +02:00
|
|
|
function visual_map_get_layoutdata_x ($id_layoutdata) {
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.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/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.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/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.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/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.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/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
return (float) db_get_value ('pos_x', 'tlayout_data', 'id', (int) $id_layoutdata);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the Y axis coordinate of a layout item
|
|
|
|
*
|
|
|
|
* @param int Id of the layout to get.
|
|
|
|
*
|
|
|
|
* @return int The Y axis coordinate value.
|
|
|
|
*/
|
2015-06-08 11:05:19 +02:00
|
|
|
function visual_map_get_layoutdata_y ($id_layoutdata) {
|
|
|
|
return (float) db_get_value ('pos_y', 'tlayout_data', 'id',
|
|
|
|
(int)$id_layoutdata);
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.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/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.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/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.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/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.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/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
}
|
|
|
|
|
2014-11-19 16:29:36 +01:00
|
|
|
function visual_map_type_in_js($type) {
|
|
|
|
switch ($type) {
|
|
|
|
case STATIC_GRAPH:
|
|
|
|
return 'static_graph';
|
|
|
|
break;
|
|
|
|
case PERCENTILE_BAR:
|
|
|
|
return 'percentile_item';
|
|
|
|
break;
|
|
|
|
case MODULE_GRAPH:
|
|
|
|
return 'module_graph';
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE:
|
|
|
|
return 'simple_value';
|
|
|
|
break;
|
|
|
|
case LABEL:
|
|
|
|
return 'label';
|
|
|
|
break;
|
|
|
|
case ICON:
|
|
|
|
return 'icon';
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE_MAX:
|
|
|
|
return 'simple_value';
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE_MIN:
|
|
|
|
return 'simple_value';
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE_AVG:
|
|
|
|
return 'simple_value';
|
|
|
|
break;
|
|
|
|
case PERCENTILE_BUBBLE:
|
|
|
|
return 'percentile_item';
|
|
|
|
break;
|
|
|
|
case SERVICE:
|
|
|
|
return 'service';
|
|
|
|
break;
|
|
|
|
case GROUP_ITEM:
|
|
|
|
return 'group_item';
|
2014-11-24 16:40:59 +01:00
|
|
|
break;
|
2014-11-21 13:28:11 +01:00
|
|
|
case BOX_ITEM:
|
|
|
|
return 'box_item';
|
2014-11-24 16:40:59 +01:00
|
|
|
break;
|
|
|
|
case LINE_ITEM:
|
|
|
|
return 'line_item';
|
|
|
|
break;
|
2014-11-19 16:29:36 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
* ajax.php: Sed id_user in config array.
* godmode/menu.php, general/header.php, operation/menu.php: Replaced
lang_label with lang_string().
* general/logon_ok.php: Reduced one indentation level.
* godmode/agentes/agent_manager.php: Replaced lang_label with
lang_string(). Use pandora functions.
* include/functions_html.php, godmode/agentes/configurar_agente.php:
Tab and blankspaces style correction.
* godmode/reporting/map_builder.php: Complete rewritten to provide an
intuitive way of build the maps. It's cool, useful and very simple.
* godmode/reporting/reporting_builder.php: Deleted an output debug.
* godmode/setup/setup.php: Rewritten to use pandora functions. Added a
colorpicker for color settings.
* include/config.php: Reset pandora password. We must solve things
with this file...
* include/functions.php: Check if input is an array on safe_input().
Use filename as id in array returned by list_files().
* include/functions_db.php: Renamed return_coordinate_* functions.
Style correction.
* include/javascript/jquery.js: Updated to 1.2.6.
* include/javascript/jquery.ui.datepicker.js: Code minimized.
* include/javascript/pandora.js: Style correction.
* include/javascript/wz_jsgraphics.js: Added a class to the elements
of a line, so it can be modified using javascript.
* /include/styles/pandora.css: Added style to some tables dropdowns.
Added new styles relative to visual map editor.
* operation/reporting/reporting_viewer.php: Style correction. Added
jQuery UI.
* operation/visual_console/index.php: Use Pandora functions.
* operation/visual_console/render_view.php: Drawing the map is now on
functions_visual_map.php. Added a countdown if a refresh time is set.
Use pandora functions. Style correction.
* reporting/fgraph.php: Style correction. Use graphic_error() if
there's no data on grafico_modulo_sparse().
* images/trash.png: Added to repository. Image used on trash area on
visual map editor.
* images/console/background/africa.jpg,
images/console/background/asia.jpg,
images/console/background/europe.jpg,
images/console/background/north_america.jpg,
images/console/background/oceania.jpg,
images/console/background/shouth_america.jpg,
images/console/background/world.jpg: Added to repository. Useful and
cool map backgrounds.
* include/functions_visual_map.php: Added to repository. Implements
visual map functions like drawing the map.
* include/javascript/jquery.colorpicker.js: Added to repository.
Implements a color picker widget.
* /include/javascript/jquery.countdown.js: Added to repository.
Implements a countdown widget.
* include/javascript/jquery.ui.core.js: Added to repository. jQuery UI
core.
* include/javascript/jquery.ui.draggable.js: Added to repository.
jQuery draggable plugin.
* include/javascript/jquery.ui.droppable.js: Added to repository.
jQuery droppable plugin.
* include/javascript/pandora_visual_console.js: Added to repository.
Function useful to visual map interface.
* include/languages/countdown_*.js: Added to repository. Countdown
localization.
* include/languages/date_es_la.js, include/languages/date_gl.js,
include/languages/time_es_la.js, include/languages/time_gl.js: Added
to repository. Missing localizations.
* include/styles/color-picker.css: Added to repository. Colorpicker
style sheet.
* include/styles/countdown.css: Added to repository. Countdown style
sheet.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-26 15:26:48 +02:00
|
|
|
?>
|