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;
|
|
|
|
|
|
|
|
require_once ('functions_graph.php');
|
|
|
|
|
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
|
|
|
function printButtonEditorVisualConsole($idDiv, $label, $float = 'left', $disabled = false, $class= '', $imageButton = false) {
|
2010-03-31 11:13:54 +02:00
|
|
|
if ($float == 'left') {
|
|
|
|
$margin = 'margin-right';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$margin = 'margin-left';
|
|
|
|
}
|
|
|
|
|
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
|
|
|
print_button($label, 'button_toolbox2', $disabled, "click2('" . $idDiv . "');", 'class="sub ' . $idDiv . ' ' . $class . '" style="float: ' . $float . ';"', false, $imageButton);
|
2010-03-31 11:13:54 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (!$disabled) $disableClass = '';
|
|
|
|
else $disableClass = 'disabled';
|
|
|
|
|
|
|
|
echo '<div class="button_toolbox ' . $disableClass . '" id="' . $idDiv . '"
|
|
|
|
style="font-weight: bolder; text-align: center; float: ' . $float . ';' .
|
|
|
|
'width: 80px; height: 50px; background: #e5e5e5; border: 4px outset black; ' . $margin . ': 5px;">';
|
|
|
|
if ($disabled) {
|
|
|
|
echo '<span class="label" style="color: #aaaaaa;">';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo '<span class="label" style="color: #000000;">';
|
|
|
|
}
|
|
|
|
echo $label;
|
|
|
|
echo '</span>';
|
|
|
|
echo '</div>';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function printItemInVisualConsole($layoutData) {
|
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');
|
|
|
|
|
2010-03-31 11:13:54 +02:00
|
|
|
$width = $layoutData['width'];
|
|
|
|
$height = $max_percentile = $layoutData['height'];
|
|
|
|
$top = $layoutData['pos_y'];
|
|
|
|
$left = $layoutData['pos_x'];
|
|
|
|
$id = $layoutData['id'];
|
|
|
|
$color = $layoutData['label_color'];
|
|
|
|
$label = $layoutData['label'];
|
|
|
|
$id_module = $layoutData['id_agente_modulo'];
|
|
|
|
$type = $layoutData['type'];
|
|
|
|
$period = $layoutData['period'];
|
|
|
|
|
|
|
|
$sizeStyle = '';
|
2010-08-13 13:08:14 +02:00
|
|
|
$borderStyle = '';
|
2010-03-31 11:13:54 +02:00
|
|
|
$imageSize = '';
|
|
|
|
|
|
|
|
$text = '<span id="text_' . $id . '" class="text">' . $label . '</span>';
|
|
|
|
|
|
|
|
switch ($type) {
|
|
|
|
case STATIC_GRAPH:
|
2010-05-05 18:29:03 +02:00
|
|
|
if ($layoutData['image'] != null) {
|
|
|
|
$img = getImageStatusElement($layoutData);
|
2010-08-13 13:08:14 +02:00
|
|
|
if(substr($img,0,1) == '4') {
|
|
|
|
$borderStyle ='border: 2px solid #ffa300;';
|
|
|
|
$img = substr_replace($img, '', 0,1);
|
|
|
|
}
|
2010-05-05 18:29:03 +02:00
|
|
|
$imgSizes = getimagesize($img);
|
|
|
|
}
|
2010-03-31 11:13:54 +02:00
|
|
|
if (($width != 0) && ($height != 0)) {
|
|
|
|
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
|
|
|
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
|
|
|
}
|
2011-02-16 10:22:13 +01:00
|
|
|
echo '<div id="' . $id . '" class="item static_graph" style="left: 0px; top: 0px; text-align: center; color: ' . $color . '; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
2010-05-05 18:29:03 +02:00
|
|
|
if ($layoutData['image'] != null) {
|
2011-02-04 14:30:50 +01:00
|
|
|
if (($width != 0) && ($height != 0))
|
|
|
|
echo print_image($img, true, array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height", "style" => $borderStyle));
|
|
|
|
else
|
|
|
|
echo print_image($img, true, array("class" => "image", "id" => "image_" . $id, "style" => $borderStyle));
|
|
|
|
echo '<br />';
|
2010-05-05 18:29:03 +02:00
|
|
|
}
|
2010-03-31 11:13:54 +02:00
|
|
|
echo $text;
|
|
|
|
echo "</div>";
|
|
|
|
break;
|
|
|
|
case PERCENTILE_BAR:
|
|
|
|
$module_value = get_db_sql ('SELECT datos FROM tagente_estado WHERE id_agente_modulo = ' . $id_module);
|
|
|
|
|
|
|
|
if ( $max_percentile > 0)
|
|
|
|
$percentile = $module_value / $max_percentile * 100;
|
|
|
|
else
|
|
|
|
$percentile = 100;
|
|
|
|
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div id="' . $id . '" class="item percentile_bar" style="left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
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
|
|
|
echo $text . '<br />';
|
|
|
|
echo progress_bar2($percentile, $width, 15);
|
2010-03-31 11:13:54 +02:00
|
|
|
echo $img;
|
|
|
|
echo '</div>';
|
|
|
|
|
|
|
|
break;
|
|
|
|
case MODULE_GRAPH:
|
2011-04-13 17:11:51 +02:00
|
|
|
$img = grafico_modulo_sparse2($id_module, $period, 0, $width,
|
|
|
|
$height, '', null, false, 0, false, 0, 0, 0, true, true);
|
|
|
|
$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
|
2010-03-31 11:13:54 +02:00
|
|
|
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div id="' . $id . '" class="item module_graph" style="left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
2010-03-31 11:13:54 +02:00
|
|
|
echo $text . '<br />';
|
2011-01-12 18:08:50 +01:00
|
|
|
echo $img;
|
2010-03-31 11:13:54 +02:00
|
|
|
echo '</div>';
|
|
|
|
break;
|
|
|
|
case SIMPLE_VALUE:
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div id="' . $id . '" class="item simple_value" style="left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
2010-03-31 16:23:16 +02:00
|
|
|
echo $text;
|
|
|
|
echo ' <strong>' . get_db_value ('datos', 'tagente_estado', 'id_agente_modulo', $id_module) . '</strong>';
|
2010-03-31 11:13:54 +02:00
|
|
|
echo '</div>';
|
|
|
|
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:
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div id="' . $id . '" class="item label" style="left: 0px; top: 0px; text-align: center; color: ' . $color . '; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
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
|
|
|
echo $text;
|
|
|
|
echo "</div>";
|
|
|
|
break;
|
|
|
|
case ICON:
|
|
|
|
if ($layoutData['image'] != null) {
|
|
|
|
$img = getImageStatusElement($layoutData);
|
|
|
|
$imgSizes = getimagesize($img);
|
|
|
|
}
|
|
|
|
if (($width != 0) && ($height != 0)) {
|
|
|
|
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
|
|
|
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
|
|
|
}
|
2011-02-16 14:26:28 +01:00
|
|
|
echo '<div id="' . $id . '" class="item icon" style="left: 0px; top: 0px; text-align: center; color: ' . $color . '; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
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['image'] != null) {
|
2011-02-04 14:30:50 +01:00
|
|
|
|
|
|
|
if (($width != 0) && ($height != 0))
|
|
|
|
echo print_image($img, true, array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height"));
|
|
|
|
else
|
|
|
|
echo print_image($img, true, array("class" => "image", "id" => "image_" . $id));
|
|
|
|
echo '<br />';
|
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
|
|
|
}
|
|
|
|
echo "</div>";
|
|
|
|
break;
|
2010-03-31 11:13:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//Add the line between elements.
|
|
|
|
if ($layoutData['parent_item'] != 0) {
|
|
|
|
echo '<script type="text/javascript">';
|
|
|
|
echo '$(document).ready (function() {
|
|
|
|
lines.push({"id": "' . $id . '" , "node_begin":"' . $layoutData['parent_item'] . '","node_end":"' . $id . '","color":"' . getColorLineStatus($layoutData) . '"});
|
|
|
|
});';
|
|
|
|
echo '</script>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2010-03-30 19:39:32 +02:00
|
|
|
function process_wizard_add ($id_agents, $image, $id_layout, $range, $width = 0, $height = 0) {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
process_sql_insert ('tlayout_data',
|
2010-03-31 11:13:54 +02:00
|
|
|
array ('id_layout' => $id_layout,
|
|
|
|
'pos_x' => $pos_x,
|
|
|
|
'pos_y' => $pos_y,
|
|
|
|
'label' => get_agent_name ($id_agent),
|
|
|
|
'image' => $image,
|
|
|
|
'id_agent' => $id_agent,
|
|
|
|
'width' => $width,
|
|
|
|
'height' => $height,
|
|
|
|
'label_color' => '#000000')
|
|
|
|
);
|
2010-03-30 19:39:32 +02:00
|
|
|
|
|
|
|
$pos_x = $pos_x + $range;
|
|
|
|
}
|
|
|
|
|
|
|
|
$return = print_success_message (__('Agent successfully added to layout'), '', true);
|
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
2010-03-30 19:39:32 +02:00
|
|
|
function process_wizard_add_modules ($id_modules, $image, $id_layout, $range, $width = 0, $height = 0) {
|
|
|
|
if (empty ($id_modules)) {
|
2010-03-31 11:13:54 +02:00
|
|
|
$return = print_error_message (__('No modules selected'), '', true);
|
2010-03-30 19:39:32 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$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;
|
|
|
|
}
|
|
|
|
|
|
|
|
$id_agent = get_agentmodule_agent ($id_module);
|
|
|
|
|
|
|
|
process_sql_insert ('tlayout_data',
|
2010-03-31 11:13:54 +02:00
|
|
|
array ('id_layout' => $id_layout,
|
|
|
|
'pos_x' => $pos_x,
|
|
|
|
'pos_y' => $pos_y,
|
|
|
|
'label' => get_agentmodule_name ($id_module),
|
|
|
|
'image' => $image,
|
|
|
|
'id_agent' => $id_agent,
|
|
|
|
'id_agente_modulo' => $id_module,
|
|
|
|
'width' => $width,
|
|
|
|
'height' => $height,
|
|
|
|
'label_color' => '#000000')
|
|
|
|
);
|
2010-03-30 19:39:32 +02:00
|
|
|
|
|
|
|
$pos_x = $pos_x + $range;
|
|
|
|
}
|
|
|
|
|
|
|
|
$return = print_success_message (__('Modules successfully added to layout'), '', true);
|
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
2010-03-25 17:18:05 +01:00
|
|
|
function getColorLineStatus($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 {
|
|
|
|
switch (getStatusElement($layoutData)) {
|
|
|
|
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.
|
|
|
|
*/
|
2010-03-23 18:46:08 +01:00
|
|
|
function getImageStatusElement($layoutData) {
|
|
|
|
$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 {
|
|
|
|
switch (getStatusElement($layoutData)) {
|
|
|
|
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)
|
2010-10-07 11:27:38 +02:00
|
|
|
$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;
|
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
|
|
|
|
*/
|
2010-03-23 18:46:08 +01:00
|
|
|
function getStatusElement($layoutData) {
|
|
|
|
//Linked to other layout ?? - Only if not module defined
|
|
|
|
if ($layoutData['id_layout_linked'] != 0) {
|
2010-03-25 17:18:05 +01:00
|
|
|
$status = get_layout_status ($layoutData['id_layout_linked']);
|
2010-03-23 18:46:08 +01:00
|
|
|
}
|
|
|
|
else if ($layoutData["type"] == 0) { //Single object
|
|
|
|
//Status for a simple module
|
|
|
|
if ($layoutData['id_agente_modulo'] != 0) {
|
|
|
|
$status = get_agentmodule_status ($layoutData['id_agente_modulo']);
|
|
|
|
|
|
|
|
//Status for a whole agent, if agente_modulo was == 0
|
|
|
|
}
|
|
|
|
else if ($layoutData['id_agent'] != 0) {
|
|
|
|
$status = get_agent_status ($layoutData["id_agent"]);
|
|
|
|
if ($status == -1) // get_agent_status return -1 for unknown!
|
|
|
|
$status = 3;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$status = 3;
|
|
|
|
$id_agent = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
//If it's a graph, a progress bar or a data tag, ALWAYS report status OK
|
|
|
|
//(=0) to avoid confussions here.
|
|
|
|
$status = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $status;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
*/
|
2009-07-27 11:55:11 +02:00
|
|
|
function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines = true, $width = null, $height = null) {
|
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
|
|
|
|
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
|
|
|
$layout = get_db_row ('tlayout', 'id', $id_layout);
|
|
|
|
|
2009-07-27 11:55:11 +02:00
|
|
|
$resizedMap = false;
|
|
|
|
$proportion = 1;
|
|
|
|
if (!is_null($width)) {
|
|
|
|
$resizedMap = true;
|
|
|
|
if (!is_null($height)) {
|
|
|
|
$mapWidth = $width;
|
|
|
|
$mapHeight = $height;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$mapWidth = $width;
|
|
|
|
$proportion = $width / $layout["width"];
|
|
|
|
$mapHeight = $proportion * $layout["height"];
|
|
|
|
}
|
|
|
|
$backgroundImage = 'include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
|
|
|
$config['homeurl'] . '/' . 'images/console/background/'.safe_input ($layout["background"]);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$mapWidth = $layout["width"];
|
|
|
|
$mapHeight = $layout["height"];
|
|
|
|
$backgroundImage = 'images/console/background/'.safe_input ($layout["background"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<div id="layout_map"
|
2011-01-19 21:08:18 +01:00
|
|
|
style="z-index: 0; position:relative; width:'.$mapWidth.'px; height:'.$mapHeight.'px;">';
|
2011-03-02 22:56:48 +01:00
|
|
|
echo "<img src='" . $backgroundImage . "' width='100%' height='100%' />";
|
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
|
|
|
$layout_datas = get_db_all_rows_field_filter ('tlayout_data', 'id_layout', $id_layout);
|
|
|
|
$lines = array ();
|
|
|
|
|
2008-08-28 10:41:51 +02:00
|
|
|
if ($layout_datas !== false) {
|
|
|
|
foreach ($layout_datas as $layout_data) {
|
2010-10-19 17:57:07 +02:00
|
|
|
$layout_data['label'] = safe_output($layout_data['label']);
|
2010-02-01 20:22:34 +01:00
|
|
|
// ****************************************************************
|
|
|
|
// Get parent status (Could be an agent, module, map, others doesnt have parent info)
|
|
|
|
// ****************************************************************
|
2010-07-13 11:25:21 +02:00
|
|
|
|
|
|
|
// Pending delete and disable modules must be ignored
|
|
|
|
$delete_pending_module = get_db_value ("delete_pending", "tagente_modulo", "id_agente_modulo", $layout_data["id_agente_modulo"]);
|
|
|
|
$disabled_module = get_db_value ("disabled", "tagente_modulo", "id_agente_modulo", $layout_data["id_agente_modulo"]);
|
|
|
|
|
|
|
|
if($delete_pending_module == 1 || $disabled_module == 1)
|
|
|
|
continue;
|
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
if ($layout_data["parent_item"] != 0){
|
|
|
|
$id_agent_module_parent = get_db_value ("id_agente_modulo", "tlayout_data", "id", $layout_data["parent_item"]);
|
|
|
|
$id_agent_parent = get_db_value ("id_agent", "tlayout_data", "id", $layout_data["parent_item"]);
|
|
|
|
$id_layout_linked = get_db_value ("id_layout_linked", "tlayout_data", "id", $layout_data["parent_item"]);
|
|
|
|
|
|
|
|
// Module
|
|
|
|
if ($id_agent_module_parent != 0) {
|
|
|
|
$status_parent = get_agentmodule_status ($id_agent_module_parent);
|
|
|
|
// Agent
|
|
|
|
}
|
|
|
|
elseif ($id_agent_parent != 0) {
|
|
|
|
$status_parent = get_agent_status ($id_agent_parent);
|
|
|
|
}
|
|
|
|
// Another layout/map
|
|
|
|
elseif ($id_layout_linked != 0) {
|
|
|
|
$status_parent = get_layout_status ($id_layout_linked);
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
$status_parent = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$id_agent_module_parent = 0;
|
|
|
|
$status_parent = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ****************************************************************
|
|
|
|
// Get STATUS of current object
|
|
|
|
// ****************************************************************
|
|
|
|
|
2008-08-28 10:41:51 +02:00
|
|
|
// Linked to other layout ?? - Only if not module defined
|
2009-05-27 10:00:21 +02:00
|
|
|
if ($layout_data['id_layout_linked'] != 0) {
|
2009-02-23 14:41:40 +01:00
|
|
|
$status = get_layout_status ($layout_data['id_layout_linked']);
|
2010-02-01 20:22:34 +01:00
|
|
|
|
|
|
|
// Single object
|
|
|
|
} elseif ($layout_data["type"] == 0) {
|
2009-01-22 20:34:11 +01:00
|
|
|
// Status for a simple module
|
2009-01-20 17:43:49 +01:00
|
|
|
if ($layout_data['id_agente_modulo'] != 0) {
|
2009-03-02 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php: Rewrote get_agentmodule_sla with
faster calculations (count in SQL).
* include/functions_ui.php: Added print_moduletype_icon that prints the
whole (correct) icon including rollover text
* include/functions_db.php: Updated some documenation and removed
deprecated functions that are now in the auth parts. Renamed
return_status_agent_module to get_agentmodule_status
* operation/agentes/sla_view.php: Made it use the 2.0 SQL and HTML
functions
* godmode/agentes/configurar_agente.php: Fixed tab links
* operation/events/events.php, include/functions_visual_map.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/ver_agente.php,
operation/reporting/custom_reporting.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php: Fixed renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1497 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 20:16:46 +01:00
|
|
|
$status = get_agentmodule_status ($layout_data['id_agente_modulo']);
|
2010-02-01 20:22:34 +01:00
|
|
|
$id_agent = get_db_value ("id_agente", "tagente_estado", "id_agente_modulo", $layout_data['id_agente_modulo']);
|
|
|
|
|
|
|
|
// Status for a whole agent, if agente_modulo was == 0
|
2009-01-22 20:34:11 +01:00
|
|
|
} elseif ($layout_data['id_agent'] != 0) {
|
2009-05-28 15:28:36 +02:00
|
|
|
$status = get_agent_status ($layout_data["id_agent"]);
|
2010-02-01 20:22:34 +01:00
|
|
|
if ($status == -1) // get_agent_status return -1 for unknown!
|
|
|
|
$status = 3;
|
2009-08-24 11:08:24 +02:00
|
|
|
$id_agent = $layout_data["id_agent"];
|
2009-01-22 20:34:11 +01:00
|
|
|
} else {
|
|
|
|
$status = 3;
|
|
|
|
$id_agent = 0;
|
2009-01-20 17:43:49 +01:00
|
|
|
}
|
2010-02-01 20:22:34 +01:00
|
|
|
} else {
|
|
|
|
// If it's a graph, a progress bar or a data tag, ALWAYS report
|
|
|
|
// status OK (=0) to avoid confussions here.
|
|
|
|
$status = 0;
|
2008-08-28 10:41:51 +02:00
|
|
|
}
|
2010-02-01 20:22:34 +01:00
|
|
|
|
|
|
|
// ****************************************************************
|
2008-08-28 10:41:51 +02:00
|
|
|
// STATIC IMAGE (type = 0)
|
2010-02-01 20:22:34 +01:00
|
|
|
// ****************************************************************
|
2008-08-28 10:41:51 +02:00
|
|
|
if ($layout_data['type'] == 0) {
|
|
|
|
// Link image
|
|
|
|
//index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1
|
|
|
|
if ($status == 0) // Bad monitor
|
|
|
|
$z_index = 3;
|
2009-01-22 20:34:11 +01:00
|
|
|
elseif ($status == 2) // Warning
|
|
|
|
$z_index = 2;
|
|
|
|
elseif ($status == 4) // Alert
|
|
|
|
$z_index = 4;
|
2008-08-28 10:41:51 +02:00
|
|
|
else
|
2009-05-27 10:00:21 +02:00
|
|
|
$z_index = 1; // Print BAD over good
|
2009-01-20 17:43:49 +01:00
|
|
|
|
2009-07-27 11:55:11 +02:00
|
|
|
// Draw image
|
|
|
|
if ($resizedMap)
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
2009-07-27 11:55:11 +02:00
|
|
|
else
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
2009-01-22 20:34:11 +01:00
|
|
|
|
2009-05-27 10:00:21 +02:00
|
|
|
if (!isset ($id_agent))
|
2009-01-22 20:34:11 +01:00
|
|
|
$id_agent = 0;
|
|
|
|
|
2008-08-28 10:41:51 +02:00
|
|
|
if ($show_links) {
|
2009-01-22 20:34:11 +01:00
|
|
|
if (($id_agent > 0) && ($layout_data['id_layout_linked'] == "" || $layout_data['id_layout_linked'] == 0)) {
|
2010-02-01 20:22:34 +01:00
|
|
|
|
2011-02-16 18:33:37 +01:00
|
|
|
//Extract id service if it is a prediction module.
|
|
|
|
$id_service = get_db_value_filter('custom_integer_1',
|
|
|
|
'tagente_modulo',
|
|
|
|
array('id_agente_modulo' => $layout_data['id_agente_modulo'],
|
|
|
|
'prediction_module' => 1));
|
|
|
|
|
|
|
|
if ($id_service === false) {
|
|
|
|
$id_service = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($id_service != 0) {
|
|
|
|
//Link to an service page
|
|
|
|
echo '<a href="index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
|
|
|
|
$id_service . '&offset=0">';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Link to an agent
|
|
|
|
echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'">';
|
|
|
|
}
|
2009-05-27 10:00:21 +02:00
|
|
|
} elseif ($layout_data['id_layout_linked'] > 0) {
|
2010-02-01 20:22:34 +01:00
|
|
|
|
2009-05-27 10:00:21 +02:00
|
|
|
// Link to a map
|
2009-02-17 22:37:39 +01:00
|
|
|
echo '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
2010-02-01 20:22:34 +01:00
|
|
|
|
2009-05-27 10:00:21 +02:00
|
|
|
} else {
|
|
|
|
// A void object
|
2009-02-17 22:37:39 +01:00
|
|
|
echo '<a href="#">';
|
2008-08-28 10:41:51 +02:00
|
|
|
}
|
|
|
|
}
|
2009-01-22 20:34:11 +01:00
|
|
|
|
2009-02-17 22:37:39 +01:00
|
|
|
$img_style = array ();
|
|
|
|
$img_style["title"] = $layout_data["label"];
|
|
|
|
|
|
|
|
if (!empty ($layout_data["width"])) {
|
|
|
|
$img_style["width"] = $layout_data["width"];
|
|
|
|
}
|
|
|
|
if (!empty ($layout_data["height"])) {
|
|
|
|
$img_style["height"] = $layout_data["height"];
|
|
|
|
}
|
|
|
|
|
|
|
|
$img = "images/console/icons/".$layout_data["image"];
|
|
|
|
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)
|
|
|
|
$img = "4".$img."_bad.png";
|
|
|
|
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;
|
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";
|
2010-08-13 13:08:14 +02:00
|
|
|
// Default is Grey (Other)
|
|
|
|
}
|
|
|
|
$borderStyle = '';
|
|
|
|
if(substr($img,0,1) == '4') {
|
|
|
|
$img_style['border'] ='2px solid #ffa300;';
|
|
|
|
$img = substr_replace($img, '', 0,1);
|
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-02-17 22:37:39 +01:00
|
|
|
|
2009-07-27 11:55:11 +02:00
|
|
|
if (is_file($img))
|
|
|
|
$infoImage = getimagesize($img);
|
|
|
|
|
|
|
|
if (!empty ($layout_data["width"])) {
|
|
|
|
if ($resizedMap)
|
|
|
|
$img_style["width"] = (integer)($proportion * $layout_data["width"]);
|
|
|
|
else
|
|
|
|
$img_style["width"] = $layout_data["width"];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
$img_style["width"] = (integer)($proportion * $infoImage[0]);
|
|
|
|
|
|
|
|
if (!empty ($layout_data["height"])) {
|
|
|
|
if ($resizedMap)
|
|
|
|
$img_style["height"] = (integer)($proportion * $img_style["height"]);
|
|
|
|
else
|
|
|
|
$img_style["height"] = $layout_data["height"];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
$img_style["height"] = (integer)($proportion * $infoImage[1]);
|
|
|
|
|
2009-02-17 22:37:39 +01:00
|
|
|
print_image ($img, false, $img_style);
|
|
|
|
|
2008-08-28 10:41:51 +02:00
|
|
|
echo "</a>";
|
2009-01-20 17:43:49 +01:00
|
|
|
|
2009-03-09 21:47:42 +01:00
|
|
|
// Print label if valid label_color (only testing for starting with #) otherwise print nothing
|
|
|
|
if ($layout_data['label_color'][0] == '#') {
|
|
|
|
echo "<br />";
|
|
|
|
echo $layout_data['label'];
|
|
|
|
}
|
2008-08-28 10:41:51 +02:00
|
|
|
echo "</div>";
|
|
|
|
}
|
2009-01-22 20:34:11 +01:00
|
|
|
|
2009-05-27 10:00:21 +02:00
|
|
|
switch ($layout_data['type']) {
|
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 4:
|
|
|
|
// ****************************************************************
|
|
|
|
// LABEL (type = 4)
|
|
|
|
// ****************************************************************
|
|
|
|
$z_index = 4;
|
|
|
|
if ($resizedMap)
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
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
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
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
|
|
|
|
|
|
|
$endTagA = false;
|
|
|
|
if ($show_links) {
|
|
|
|
if (!isset($id_agent)) $id_agent = 0;
|
|
|
|
if (($id_agent > 0) && ($layout_data['id_layout_linked'] == "" || $layout_data['id_layout_linked'] == 0)) {
|
|
|
|
// Link to an agent
|
|
|
|
echo '<a style="' . ($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '') . '" href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'">';
|
|
|
|
$endTagA = true;
|
|
|
|
}
|
|
|
|
elseif ($layout_data['id_layout_linked'] > 0) {
|
|
|
|
// Link to a map
|
|
|
|
echo '<a style="' . ($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '') . '" href="index.php?sec=visualc&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
|
|
|
$endTagA = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($layout_data['label_color'][0] == '#') {
|
|
|
|
echo "<br />";
|
|
|
|
echo $layout_data['label'];
|
|
|
|
}
|
|
|
|
if ($endTagA) echo "</a>";
|
|
|
|
echo "</div>";
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
// ****************************************************************
|
|
|
|
// ICON (type = 5)
|
|
|
|
// ****************************************************************
|
|
|
|
$z_index = 4;
|
|
|
|
if ($resizedMap)
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
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
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
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
|
|
|
|
|
|
|
$endTagA = false;
|
|
|
|
if ($show_links) {
|
|
|
|
if (!isset($id_agent)) $id_agent = 0;
|
|
|
|
if (($id_agent > 0) && ($layout_data['id_layout_linked'] == "" || $layout_data['id_layout_linked'] == 0)) {
|
|
|
|
// Link to an agent
|
|
|
|
echo '<a style="' . ($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '') . '" href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'">';
|
|
|
|
$endTagA = true;
|
|
|
|
}
|
|
|
|
elseif ($layout_data['id_layout_linked'] > 0) {
|
|
|
|
// Link to a map
|
|
|
|
echo '<a style="' . ($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '') . '" href="index.php?sec=visualc&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
|
|
|
$endTagA = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$img_style = array ();
|
|
|
|
$img_style["title"] = $layout_data["label"];
|
|
|
|
|
|
|
|
if (!empty ($layout_data["width"])) {
|
|
|
|
$img_style["width"] = $layout_data["width"];
|
|
|
|
}
|
|
|
|
if (!empty ($layout_data["height"])) {
|
|
|
|
$img_style["height"] = $layout_data["height"];
|
|
|
|
}
|
|
|
|
|
|
|
|
$img = "images/console/icons/".$layout_data["image"] . ".png";
|
|
|
|
|
|
|
|
if (is_file($img))
|
|
|
|
$infoImage = getimagesize($img);
|
|
|
|
|
|
|
|
if (!empty ($layout_data["width"])) {
|
|
|
|
if ($resizedMap)
|
|
|
|
$img_style["width"] = (integer)($proportion * $layout_data["width"]);
|
|
|
|
else
|
|
|
|
$img_style["width"] = $layout_data["width"];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
$img_style["width"] = (integer)($proportion * $infoImage[0]);
|
2009-07-27 11:55:11 +02:00
|
|
|
|
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 (!empty ($layout_data["height"])) {
|
|
|
|
if ($resizedMap)
|
|
|
|
$img_style["height"] = (integer)($proportion * $img_style["height"]);
|
|
|
|
else
|
|
|
|
$img_style["height"] = $layout_data["height"];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
$img_style["height"] = (integer)($proportion * $infoImage[1]);
|
|
|
|
|
|
|
|
print_image ($img, false, $img_style);
|
|
|
|
|
|
|
|
if ($endTagA) echo "</a>";
|
|
|
|
|
|
|
|
echo "</div>";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
// ****************************************************************
|
|
|
|
// SIMPLE DATA VALUE (type = 2)
|
|
|
|
// ****************************************************************
|
|
|
|
if ($resizedMap)
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion *$layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion *$layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
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
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
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
|
|
|
echo '<strong>'.$layout_data['label']. ' ';
|
|
|
|
echo get_db_value ('datos', 'tagente_estado', 'id_agente_modulo', $layout_data['id_agente_modulo']);
|
|
|
|
echo '</strong></div>';
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
// ****************************************************************
|
|
|
|
// Progress bar
|
|
|
|
// ****************************************************************
|
2009-07-27 11:55:11 +02:00
|
|
|
if ($resizedMap)
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion *$layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion *$layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
2009-07-27 11:55:11 +02:00
|
|
|
else
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
2009-07-27 11:55:11 +02:00
|
|
|
$valor = get_db_sql ('SELECT datos FROM tagente_estado WHERE id_agente_modulo = '.$layout_data['id_agente_modulo']);
|
|
|
|
$width = $layout_data['width'];
|
|
|
|
if ( $layout_data['height'] > 0)
|
|
|
|
$percentile = $valor / $layout_data['height'] * 100;
|
|
|
|
else
|
|
|
|
$percentile = 100;
|
|
|
|
|
|
|
|
echo $layout_data['label'];
|
|
|
|
echo "<br>";
|
2009-03-31 20:42:36 +02:00
|
|
|
|
2009-07-27 11:55:11 +02:00
|
|
|
if ($resizedMap)
|
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
|
|
|
echo progress_bar2($percentile, ((integer)($proportion * $width)), 15);
|
|
|
|
else
|
|
|
|
echo progress_bar2($percentile, $width, 15);
|
2009-07-27 11:55:11 +02:00
|
|
|
echo '</div>';
|
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 1;
|
|
|
|
// ****************************************************************
|
|
|
|
// Single module graph
|
|
|
|
// ****************************************************************
|
2009-07-27 11:55:11 +02:00
|
|
|
// SINGLE GRAPH (type = 1)
|
|
|
|
if ($resizedMap)
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
2009-07-27 11:55:11 +02:00
|
|
|
else
|
2011-01-19 21:08:18 +01:00
|
|
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
2009-07-27 11:55:11 +02:00
|
|
|
|
2009-08-06 20:55:54 +02:00
|
|
|
echo $layout_data['label'];
|
|
|
|
echo "<br>";
|
|
|
|
|
|
|
|
|
2009-07-27 11:55:11 +02:00
|
|
|
if ($show_links) {
|
|
|
|
if (($layout_data['id_layout_linked'] == "") || ($layout_data['id_layout_linked'] == 0)) {
|
2011-01-12 18:08:50 +01:00
|
|
|
echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$layout_data["id_agent"].'&tab=data">';
|
2009-07-27 11:55:11 +02:00
|
|
|
} else {
|
2011-01-12 18:08:50 +01:00
|
|
|
echo '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data['id_layout_linked'].'">';
|
2009-07-27 11:55:11 +02:00
|
|
|
}
|
2008-08-28 10:41:51 +02:00
|
|
|
}
|
2011-04-13 17:11:51 +02:00
|
|
|
if ($resizedMap) {
|
2009-12-29 17:43:35 +01:00
|
|
|
|
|
|
|
// ATTENTION: DO NOT USE & here because is bad-translated and doesnt work
|
|
|
|
// resulting fault image links :(
|
|
|
|
|
2011-04-13 17:11:51 +02:00
|
|
|
echo grafico_modulo_sparse2 ($layout_data['id_agente_modulo'], $layout_data['period'],
|
|
|
|
false, ((integer)($proportion * $layout_data['width'])), ((integer)($proportion * $layout_data['height'])),
|
|
|
|
'', null, false, 0, false, 0, 0, 0, true, true);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo grafico_modulo_sparse2 ($layout_data['id_agente_modulo'], $layout_data['period'],
|
|
|
|
false, $layout_data['width'], $layout_data['height'],
|
|
|
|
'', null, false, 0, false, 0, 0, 0, true, true);
|
|
|
|
}
|
2011-01-12 18:08:50 +01:00
|
|
|
echo "</a>";
|
2011-01-12 13:03:45 +01:00
|
|
|
echo "</div>";
|
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;
|
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-01-20 17:43:49 +01:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
// ****************************************************************
|
|
|
|
// Lines joining objects
|
|
|
|
// ****************************************************************
|
2008-08-28 10:41:51 +02:00
|
|
|
// Get parent relationship - Create line data
|
|
|
|
if ($layout_data["parent_item"] != "" && $layout_data["parent_item"] != 0) {
|
|
|
|
$line['id'] = $layout_data['id'];
|
|
|
|
$line['node_begin'] = 'layout-data-'.$layout_data["parent_item"];
|
|
|
|
$line['node_end'] = 'layout-data-'.$layout_data["id"];
|
2010-02-01 20:22:34 +01:00
|
|
|
switch ($status_parent) {
|
2010-06-07 15:24:25 +02:00
|
|
|
default:
|
|
|
|
case 3:
|
|
|
|
$line["color"] = "#ccc"; // Gray
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$line["color"] = "#20f6f6"; // Yellow
|
|
|
|
break;
|
|
|
|
case 0:
|
|
|
|
$line["color"] = "#00ff00"; // Green
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 1:
|
|
|
|
$line["color"] = "#ff0000"; // Red
|
|
|
|
break;
|
2010-02-01 20:22:34 +01:00
|
|
|
}
|
2008-08-28 10:41:51 +02:00
|
|
|
array_push ($lines, $line);
|
|
|
|
}
|
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
|
|
|
if ($draw_lines) {
|
|
|
|
/* If you want lines in the map, call using Javascript:
|
|
|
|
draw_lines (lines, id_div);
|
|
|
|
on body load, where id_div is the id of the div which holds the map */
|
2009-02-17 22:37:39 +01:00
|
|
|
echo '<script type="text/javascript">/* <![CDATA[ */'."\n";
|
|
|
|
|
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
|
|
|
echo 'var lines = Array ();'."\n";
|
|
|
|
|
|
|
|
foreach ($lines as $line) {
|
2009-02-17 22:37:39 +01:00
|
|
|
echo 'lines.push (eval ('.json_encode ($line).'));'."\n";
|
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-02-17 22:37:39 +01:00
|
|
|
echo '/* ]]> */</script>';
|
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
|
|
|
|
echo "</div>";
|
|
|
|
}
|
|
|
|
|
2009-01-08 16:52:13 +01:00
|
|
|
/**
|
|
|
|
* @return array Layout data types
|
|
|
|
*/
|
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
|
|
|
function get_layout_data_types () {
|
2009-02-23 14:41:40 +01:00
|
|
|
$types = array ();
|
|
|
|
$types[0] = __('Static graph');
|
|
|
|
$types[1] = __('Module graph');
|
2009-03-31 20:42:36 +02:00
|
|
|
$types[2] = __('Simple value');
|
|
|
|
$types[3] = __('Percentile bar');
|
2009-02-23 14:41:40 +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
|
|
|
return $types;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
* print_select() directly)
|
|
|
|
* @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-02-16 19:39:28 +01:00
|
|
|
function 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 ();
|
|
|
|
|
|
|
|
$where = format_array_to_where_clause_sql ($filter);
|
|
|
|
if ($where != '') {
|
|
|
|
$where .= ' AND ';
|
|
|
|
}
|
2011-02-16 19:39:28 +01:00
|
|
|
if ($returnAllGroup)
|
|
|
|
$groups = get_user_groups ($id_user);
|
|
|
|
else
|
|
|
|
$groups = get_user_groups ($id_user, 'IR', false);
|
2009-02-23 14:41:40 +01:00
|
|
|
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
|
|
|
|
|
|
|
|
$layouts = get_db_all_rows_filter ('tlayout', $where);
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2010-02-01 20:22:34 +01:00
|
|
|
function get_layout_status ($id_layout = 0, $depth = 0) {
|
2009-02-23 14:41:40 +01:00
|
|
|
$temp_status = 0;
|
|
|
|
$temp_total = 0;
|
2010-02-01 20:22:34 +01:00
|
|
|
$depth++; // For recursion depth checking
|
|
|
|
|
|
|
|
// TODO: Implement this limit as a configurable item in setup
|
|
|
|
if ($depth > 10){
|
|
|
|
return 3; // No status data if we need to exit by a excesive recursion
|
|
|
|
}
|
2009-05-27 10:19:31 +02:00
|
|
|
|
|
|
|
$id_layout = (int) $id_layout;
|
2009-02-23 14:41:40 +01:00
|
|
|
|
2009-05-27 10:00:21 +02:00
|
|
|
$result = get_db_all_rows_filter ('tlayout_data', array ('id_layout' => $id_layout),
|
2010-04-29 12:46:16 +02:00
|
|
|
array ('id_agente_modulo', 'parent_item', 'id_layout_linked', 'id_agent', 'type'));
|
2009-02-23 14:41:40 +01:00
|
|
|
if ($result === false)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
foreach ($result as $rownum => $data) {
|
2010-04-29 12:46:16 +02:00
|
|
|
if (($data["id_layout_linked"] == 0 && $data["id_agente_modulo"] == 0 && $data["id_agent"] == 0) || $data['type'] != 0)
|
2009-05-27 10:19:31 +02:00
|
|
|
continue;
|
2009-02-23 14:41:40 +01:00
|
|
|
// Other Layout (Recursive!)
|
|
|
|
if (($data["id_layout_linked"] != 0) && ($data["id_agente_modulo"] == 0)) {
|
2010-02-01 20:22:34 +01:00
|
|
|
$status = get_layout_status ($data["id_layout_linked"], $depth);
|
2009-02-23 14:41:40 +01:00
|
|
|
// Module
|
|
|
|
} elseif ($data["id_agente_modulo"] != 0) {
|
2009-05-27 10:00:21 +02:00
|
|
|
$status = get_agentmodule_status ($data["id_agente_modulo"]);
|
2009-02-23 14:41:40 +01:00
|
|
|
// Agent
|
|
|
|
} else {
|
2009-05-27 10:00:21 +02:00
|
|
|
$status = get_agent_status ($data["id_agent"]);
|
2009-02-23 14:41:40 +01:00
|
|
|
}
|
2009-05-27 10:19:31 +02:00
|
|
|
if ($status == 1)
|
|
|
|
return 1;
|
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.
|
|
|
|
*/
|
|
|
|
function createInternalNameItem($label = null, $type, $image, $agent = null, $id_module, $idData) {
|
|
|
|
$text = '';
|
|
|
|
|
|
|
|
if (empty($label))
|
|
|
|
{
|
|
|
|
switch ($type) {
|
|
|
|
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;
|
|
|
|
case 'icon':
|
|
|
|
case ICON:
|
|
|
|
$text = __('Icon') . " - " .
|
|
|
|
$image;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($agent)) {
|
2011-04-13 18:11:02 +02:00
|
|
|
$text .= " (" . ui_print_truncate_text($agent, 10, false);
|
2011-02-16 16:37:55 +01:00
|
|
|
|
2011-02-16 17:06:42 +01:00
|
|
|
$moduleName = safe_output(get_db_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id_module));
|
2011-02-16 16:37:55 +01:00
|
|
|
if (!empty($moduleName)) {
|
2011-04-13 18:11:02 +02:00
|
|
|
$text .= " - " . ui_print_truncate_text($moduleName, 10, false);
|
2011-02-16 16:37:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$text .= ")";
|
|
|
|
}
|
|
|
|
$text .= ' (' . $idData . ')';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$text = $label;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $text;
|
|
|
|
}
|
|
|
|
|
|
|
|
function get_items_parents($idVisual) {
|
|
|
|
$items = get_db_all_rows_filter('tlayout_data',array('id_layout' => $idVisual));
|
|
|
|
if ($items == false) {
|
|
|
|
$items = array();
|
|
|
|
}
|
|
|
|
|
|
|
|
$return = array();
|
|
|
|
foreach ($items as $item) {
|
|
|
|
$agent = null;
|
|
|
|
if ($item['id_agent'] != 0) {
|
2011-02-16 17:06:42 +01:00
|
|
|
$agent = safe_output(get_agent_name($item['id_agent']));
|
2011-02-16 16:37:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$return[$item['id']] = createInternalNameItem($item['label'],
|
|
|
|
$item['type'], $item['image'], $agent, $item['id_agente_modulo'],
|
|
|
|
$item['id']);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
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
|
|
|
?>
|