2009-01-07 11:42:38 +01:00
< ? php
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
2009-01-07 11:42:38 +01: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
2009-01-07 11:42:38 +01: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-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 UI
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
*/
2013-04-22 12:31:20 +02:00
// Check to avoid error when load this library in error screen situations
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( isset ( $config [ 'homedir' ])) {
2013-04-22 12:31:20 +02:00
require_once ( $config [ 'homedir' ] . '/include/functions_agents.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_modules.php' );
require_once ( $config [ 'homedir' ] . '/include/functions.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_groups.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_users.php' );
require_once ( $config [ 'homedir' ] . '/include/functions_html.php' );
}
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
2014-12-02 16:38:07 +01:00
function ui_bbcode_to_html ( $text , $allowed_tags = array ( '[url]' )) {
$return = $text ;
if ( array_search ( '[url]' , $allowed_tags ) !== false ) {
2016-06-08 19:15:43 +02:00
$return = preg_replace ( " / \ [url=([^ \ ]]*) \ ]/ " ,
" <a target= \" _blank \" rel= \" noopener noreferrer \" href= \" $ 1 \" > " , $return );
2014-12-02 16:38:07 +01:00
$return = str_replace ( '[/url]' , '</a>' , $return );
}
return $return ;
}
2010-04-29 17:39:19 +02:00
/**
* Truncate a text to num chars ( pass as parameter ) and if flag show tooltip is
* true the html artifal to show the tooltip with rest of text .
*
* @ param string $text The text to truncate .
2012-06-13 20:01:43 +02:00
* @ param mixed $numChars Number chars ( - 3 for char " [...] " ) max the text . Or the strings " agent_small " , " agent_medium " , " module_small " , " module_medium " , " description " or " generic " for to take the values from user config .
2010-04-29 17:39:19 +02:00
* @ param boolean $showTextInAToopTip Flag to show the tooltip .
* @ param boolean $return Flag to return as string or not .
2010-04-30 13:07:26 +02:00
* @ param boolean $showTextInTitle Flag to show the text on title .
2010-06-25 10:12:25 +02:00
* @ param string $suffix String at the end of a strimmed string .
2011-07-06 13:57:27 +02:00
* @ param string $style Style associated to the text .
2011-04-13 18:11:02 +02:00
*
* @ return string Truncated text .
2010-04-29 17:39:19 +02:00
*/
2013-04-10 09:57:54 +02:00
function ui_print_truncate_text ( $text , $numChars = GENERIC_SIZE_TEXT , $showTextInAToopTip = true , $return = true , $showTextInTitle = true , $suffix = '…' , $style = false ) {
2012-06-13 20:01:43 +02:00
global $config ;
if ( is_string ( $numChars )) {
switch ( $numChars ) {
case 'agent_small' :
$numChars = $config [ 'agent_size_text_small' ];
break ;
case 'agent_medium' :
$numChars = $config [ 'agent_size_text_medium' ];
break ;
case 'module_small' :
$numChars = $config [ 'module_size_text_small' ];
break ;
case 'module_medium' :
$numChars = $config [ 'module_size_text_medium' ];
break ;
case 'description' :
$numChars = $config [ 'description_size_text' ];
break ;
case 'item_title' :
$numChars = $config [ 'item_title_size_text' ];
break ;
default :
$numChars = ( int ) $numChars ;
break ;
}
}
2013-05-16 10:23:51 +02:00
2011-01-20 14:47:27 +01:00
if ( $numChars == 0 ) {
if ( $return == true ) {
return $text ;
}
else {
echo $text ;
}
2016-03-30 13:05:08 +02:00
}
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
2017-10-27 13:25:17 +02:00
$text_html_decoded = io_safe_output ( $text );
$text_has_entities = $text != $text_html_decoded ;
2017-11-06 15:18:55 +01:00
if ( mb_strlen ( $text_html_decoded , " UTF-8 " ) > ( $numChars )) {
2013-05-16 10:23:51 +02:00
// '/2' because [...] is in the middle of the word.
$half_length = intval (( $numChars - 3 ) / 2 );
2012-06-20 17:43:41 +02:00
2012-06-07 11:54:03 +02:00
// Depending on the strange behavior of mb_strimwidth() itself,
2013-05-16 10:23:51 +02:00
// the 3rd parameter is not to be $numChars but the length of
// original text (just means 'large enough').
2017-10-27 13:25:17 +02:00
$truncateText2 = mb_strimwidth ( $text_html_decoded ,
( mb_strlen ( $text_html_decoded , " UTF-8 " ) - $half_length ),
mb_strlen ( $text_html_decoded , " UTF-8 " ), " " , " UTF-8 " );
2012-06-20 17:43:41 +02:00
2017-10-27 13:25:17 +02:00
$truncateText = mb_strimwidth ( $text_html_decoded , 0 ,
( $numChars - $half_length ), " " , " UTF-8 " );
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
2017-10-27 13:25:17 +02:00
// Recover the html entities to avoid XSS attacks
$truncateText = ( $text_has_entities )
? io_safe_input ( $truncateText ) . $suffix . io_safe_input ( $truncateText2 )
: $truncateText . $suffix . $truncateText2 ;
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
2010-04-30 13:07:26 +02:00
if ( $showTextInTitle ) {
2012-06-20 17:43:41 +02:00
if ( $style === null ) {
$truncateText = $truncateText ;
}
else if ( $style !== false ) {
2013-05-16 10:23:51 +02:00
$truncateText = '<span style="' . $style . '" title="' . $text . '">' .
$truncateText . '</span>' ;
2011-07-06 13:57:27 +02:00
}
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
else {
2013-05-16 10:23:51 +02:00
$truncateText = '<span title="' . $text . '">' . $truncateText . '</span>' ;
2011-07-06 13:57:27 +02:00
}
2010-04-29 17:39:19 +02:00
}
2012-03-12 17:23:50 +01:00
if ( $showTextInAToopTip ) {
2017-03-29 11:25:50 +02:00
$truncateText = $truncateText . ui_print_help_tip ( htmlspecialchars ( $text ), true );
2011-07-06 13:57:27 +02:00
}
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
else {
if ( $style !== false ) {
2013-05-16 10:23:51 +02:00
$truncateText = '<span style="' . $style . '">' . $truncateText . '</span>' ;
2012-04-18 14:56:14 +02:00
}
2010-04-29 17:39:19 +02:00
}
}
else {
2016-03-30 13:05:08 +02:00
if ( $style !== false ) {
2011-07-06 13:57:27 +02:00
$truncateText = '<span style="' . $style . '">' . $text . '</span>' ;
}
2016-03-30 13:05:08 +02:00
else {
2012-04-18 14:56:14 +02:00
$truncateText = $text ;
2011-07-06 13:57:27 +02:00
}
2010-04-29 17:39:19 +02:00
}
if ( $return == true ) {
return $truncateText ;
}
else {
echo $truncateText ;
}
}
2011-04-12 19:20:16 +02:00
/**
* Print a string with a smaller font depending on its size .
*
* @ param string $string String to be display with a smaller font .
* @ param boolean $return Flag to return as string or not .
*/
function printSmallFont ( $string , $return = true ) {
2012-03-06 18:23:46 +01:00
$str = io_safe_output ( $string );
2011-04-12 19:20:16 +02:00
$length = strlen ( $str );
if ( $length >= 30 ) {
$size = 0.7 ;
2012-04-09 17:23:51 +02:00
}
elseif ( $length >= 20 ) {
2011-04-12 19:20:16 +02:00
$size = 0.8 ;
2012-04-09 17:23:51 +02:00
}
elseif ( $length >= 10 ) {
2011-04-12 19:20:16 +02:00
$size = 0.9 ;
2012-04-09 17:23:51 +02:00
}
elseif ( $length < 10 ) {
2011-04-12 19:20:16 +02:00
$size = 1 ;
}
$s = '<span style="font-size: ' . $size . 'em;">' ;
$s .= $string ;
$s .= '</span>' ;
if ( $return ) {
return $s ;
2012-04-09 17:23:51 +02:00
}
else {
2011-04-12 19:20:16 +02:00
echo $s ;
}
}
2016-03-30 13:05:08 +02:00
/**
2009-03-30 11:27:04 +02:00
* Prints a generic message between tags .
*
2012-04-16 13:24:47 +02:00
* @ param mixed The string message or array ( 'title' , 'message' , 'icon' , 'no_close' , 'force_style' ) to be displayed
2009-03-30 11:27:04 +02:00
* @ param string the class to user
* @ param string Any other attributes to be set for the tag .
* @ param bool Whether to output the string or return it
* @ param string What tag to use ( you could specify something else than
* h3 like div or h2 )
*
* @ return string HTML code if return parameter is true .
*/
2011-04-13 18:11:02 +02:00
function ui_print_message ( $message , $class = '' , $attributes = '' , $return = false , $tag = 'h3' ) {
2012-04-12 14:20:38 +02:00
static $first_execution = true ;
$text_title = '' ;
$text_message = '' ;
$icon_image = '' ;
$no_close_bool = false ;
2012-04-16 13:24:47 +02:00
$force_style = '' ;
2012-04-12 14:20:38 +02:00
if ( is_array ( $message )) {
if ( ! empty ( $message [ 'title' ]))
$text_title = $message [ 'title' ];
if ( ! empty ( $message [ 'message' ]))
$text_message = $message [ 'message' ];
if ( ! empty ( $message [ 'icon' ]))
$icon_image = $message [ 'icon' ];
if ( ! empty ( $message [ 'no_close' ]))
$no_close_bool = $message [ 'no_close' ];
2012-04-16 13:24:47 +02:00
if ( ! empty ( $message [ 'force_style' ]))
$force_style = $message [ 'force_style' ];
2012-04-12 14:20:38 +02:00
}
else {
$text_message = $message ;
}
if ( empty ( $text_title )) {
switch ( $class ) {
default :
case 'info' :
$text_title = __ ( 'Information' );
break ;
case 'error' :
$text_title = __ ( 'Error' );
break ;
case 'suc' :
$text_title = __ ( 'Success' );
break ;
2015-04-21 17:26:20 +02:00
case 'warning' :
$text_title = __ ( 'Warning' );
break ;
2012-04-12 14:20:38 +02:00
}
}
if ( empty ( $icon_image )) {
switch ( $class ) {
default :
case 'info' :
2013-04-16 10:06:42 +02:00
$icon_image = 'images/information_big.png' ;
2012-04-12 14:20:38 +02:00
break ;
case 'error' :
$icon_image = 'images/err.png' ;
break ;
case 'suc' :
$icon_image = 'images/suc.png' ;
break ;
2015-04-21 17:26:20 +02:00
case 'warning' :
2015-04-21 18:03:08 +02:00
$icon_image = 'images/warning_big.png' ;
2015-04-21 17:26:20 +02:00
break ;
2012-04-12 14:20:38 +02:00
}
2012-10-09 17:51:33 +02:00
2013-11-20 17:57:53 +01:00
$icon_image = $icon_image ;
2012-04-12 14:20:38 +02:00
}
$id = 'info_box_' . uniqid ();
2015-08-17 14:54:04 +02:00
//Use the no_meta parameter because this image is only in the base console
2012-04-12 14:20:38 +02:00
$output = '<table cellspacing="0" cellpadding="0" id="' . $id . '" ' . $attributes . '
2016-09-28 13:26:58 +02:00
class = " info_box ' . $id . ' ' . $class . ' textodialogo " style = " ' . $force_style . ' " >
2012-04-12 14:20:38 +02:00
< tr >
2015-08-17 14:54:04 +02:00
< td class = " icon " rowspan = " 2 " style = " padding-right: 10px; padding-top: 3px; " > ' . html_print_image($icon_image, true, false, false, false, true) . ' </ td >
2013-04-15 18:04:39 +02:00
< td class = " title " style = " text-transform: uppercase; padding-top: 10px; " >< b > ' . $text_title . ' </ b ></ td >
< td class = " icon " style = " text-align: right; padding-right: 3px; " > ' ;
2012-04-12 14:20:38 +02:00
if ( ! $no_close_bool ) {
2016-03-30 13:05:08 +02:00
//Use the no_meta parameter because this image is only in the base console
2012-04-12 14:20:38 +02:00
$output .= '<a href="javascript: close_info_box(\'' . $id . '\')">' .
2015-08-17 14:54:04 +02:00
html_print_image ( 'images/blade.png' , true , false , false , false , true ) . '</a>' ;
2012-04-12 14:20:38 +02:00
}
$output .= ' </ td >
</ tr >
< tr >
2018-01-05 11:32:16 +01:00
< td style = " color:#333;padding-top:10px " > ' . $text_message . ' </ td >
2012-04-12 14:20:38 +02:00
< td ></ td >
</ tr >
</ table > ' ;
2012-04-17 15:08:08 +02:00
if (( $first_execution ) && ( ! $no_close_bool )) {
2012-04-12 14:20:38 +02:00
$first_execution = false ;
$output .= '
< script type = " text/javascript " >
function close_info_box ( id ) {
2013-02-01 13:53:33 +01:00
$ ( " . " + id ) . hide ();
2012-04-12 14:20:38 +02:00
}
</ script >
' ;
}
2009-03-30 11:27:04 +02:00
if ( $return )
return $output ;
2012-07-18 15:25:51 +02:00
else
echo $output ;
2016-03-30 13:05:08 +02:00
2013-05-23 17:42:32 +02:00
return '' ;
2009-03-30 11:27:04 +02:00
}
2016-03-30 13:05:08 +02:00
/**
2009-03-30 11:27:04 +02:00
* Prints an error message .
*
2012-04-12 14:20:38 +02:00
* @ param mixed The string error message or array ( 'title' , 'message' , 'icon' , 'no_close' ) to be displayed
2009-03-30 11:27:04 +02:00
* @ param string Any other attributes to be set for the tag .
* @ param bool Whether to output the string or return it
* @ param string What tag to use ( you could specify something else than
* h3 like div or h2 )
*
* @ return string HTML code if return parameter is true .
*/
2011-04-13 18:11:02 +02:00
function ui_print_error_message ( $message , $attributes = '' , $return = false , $tag = 'h3' ) {
return ui_print_message ( $message , 'error' , $attributes , $return , $tag );
2009-03-30 11:27:04 +02:00
}
2016-03-30 13:05:08 +02:00
/**
2009-03-30 11:27:04 +02:00
* Prints an operation success message .
*
2012-04-12 14:20:38 +02:00
* @ param mixed The string message or array ( 'title' , 'message' , 'icon' , 'no_close' ) to be displayed
2009-03-30 11:27:04 +02:00
* @ param string Any other attributes to be set for the tag .
* @ param bool Whether to output the string or return it
* @ param string What tag to use ( you could specify something else than
* h3 like div or h2 )
*
* @ return string HTML code if return parameter is true .
*/
2011-04-13 18:11:02 +02:00
function ui_print_success_message ( $message , $attributes = '' , $return = false , $tag = 'h3' ) {
return ui_print_message ( $message , 'suc' , $attributes , $return , $tag );
2009-03-30 11:27:04 +02:00
}
2016-03-30 13:05:08 +02:00
/**
2012-04-12 14:20:38 +02:00
* Prints an operation info message .
*
* @ param mixed The string message or array ( 'title' , 'message' , 'icon' , 'no_close' ) to be displayed
* @ param string Any other attributes to be set for the tag .
* @ param bool Whether to output the string or return it
* @ param string What tag to use ( you could specify something else than
* h3 like div or h2 )
*
* @ return string HTML code if return parameter is true .
*/
function ui_print_info_message ( $message , $attributes = '' , $return = false , $tag = 'h3' ) {
return ui_print_message ( $message , 'info' , $attributes , $return , $tag );
}
2013-05-17 14:26:16 +02:00
function ui_print_empty_data ( $message , $attributes = '' , $return = false , $tag = 'h3' ) {
return ui_print_message ( $message , 'info' , $attributes , $return , $tag );
}
2016-03-30 13:05:08 +02:00
/**
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
* Evaluates a result using empty () and then prints an error or success message
2009-01-07 11:42:38 +01:00
*
2016-03-30 13:05:08 +02:00
* @ param mixed The results to evaluate . 0 , NULL , false , '' or
2009-01-08 16:52:13 +01:00
* array () is bad , the rest is good
2012-04-12 14:20:38 +02:00
* @ param mixed The string or array ( 'title' , 'message' ) to be displayed if the result was good
* @ param mixed The string or array ( 'title' , 'message' ) to be displayed if the result was bad
2009-03-30 11:27:04 +02:00
* @ param string Any other attributes to be set for the h3
* @ param bool Whether to output the string or return it
* @ param string What tag to use ( you could specify something else than
2009-01-08 16:52:13 +01:00
* h3 like div or h2 )
2009-01-07 11:42:38 +01:00
*
2009-03-30 11:27:04 +02:00
* @ return string HTML code if return parameter is true .
2009-01-08 16:52:13 +01:00
*/
2011-04-13 18:11:02 +02:00
function ui_print_result_message ( $result , $good = '' , $bad = '' , $attributes = '' , $return = false , $tag = 'h3' ) {
2009-01-07 11:42:38 +01:00
if ( $good == '' || $good === false )
$good = __ ( 'Request successfully processed' );
if ( $bad == '' || $bad === false )
$bad = __ ( 'Error processing request' );
if ( empty ( $result )) {
2011-04-13 18:11:02 +02:00
return ui_print_error_message ( $bad , $attributes , $return , $tag );
2009-01-07 11:42:38 +01:00
}
2012-07-18 15:25:51 +02:00
else {
return ui_print_success_message ( $good , $attributes , $return , $tag );
}
2009-01-07 11:42:38 +01:00
}
2016-03-30 13:05:08 +02:00
/**
2015-04-21 17:26:20 +02:00
* Prints an warning message .
*
* @ param mixed The string warning message or array ( 'title' , 'message' , 'icon' , 'no_close' ) to be displayed
* @ param string Any other attributes to be set for the tag .
* @ param bool Whether to output the string or return it
* @ param string What tag to use ( you could specify something else than
* h3 like div or h2 )
*
* @ return string HTML code if return parameter is true .
*/
function ui_print_warning_message ( $message , $attributes = '' , $return = false , $tag = 'h3' ) {
return ui_print_message ( $message , 'warning' , $attributes , $return , $tag );
}
2009-01-07 11:42:38 +01:00
/**
* Evaluates a unix timestamp and returns a span ( or whatever tag specified )
* with as title the correctly formatted full timestamp and a time comparation
* in the tag
*
2009-03-30 11:27:04 +02:00
* @ param int Any type of timestamp really , but we prefer unixtime
* @ param bool Whether to output the string or return it
* @ param array An array with different options for this function
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
* Key html_attr : which html attributes to add ( defaults to none )
* Key tag : Which html tag to use ( defaults to span )
* Key prominent : Overrides user preference and display " comparation " or " timestamp "
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
* key units : The type of units .
2009-01-07 11:42:38 +01:00
*
* @ return string HTML code if return parameter is true .
*/
2011-04-13 18:11:02 +02:00
function ui_print_timestamp ( $unixtime , $return = false , $option = array ()) {
2009-01-07 11:42:38 +01:00
global $config ;
//TODO: Add/use a javascript timer for the seconds so it automatically updates as time passes by
if ( isset ( $option [ " html_attr " ])) {
$attributes = $option [ " html_attr " ];
2012-04-09 17:23:51 +02:00
}
else {
2009-01-07 11:42:38 +01:00
$attributes = " " ;
}
if ( isset ( $option [ " tag " ])) {
$tag = $option [ " tag " ];
2012-04-09 17:23:51 +02:00
}
else {
2009-01-07 11:42:38 +01:00
$tag = " span " ;
}
2009-03-20 20:57:13 +01:00
if ( empty ( $option [ " style " ])) {
$style = 'style="white-space:nowrap;"' ;
2012-04-09 17:23:51 +02:00
}
else {
2016-01-18 11:54:17 +01:00
$style = 'style="' . $option [ " style " ] . '"' ;
2009-03-20 20:57:13 +01:00
}
2009-01-07 11:42:38 +01:00
if ( ! empty ( $option [ " prominent " ])) {
$prominent = $option [ " prominent " ];
2012-04-09 17:23:51 +02:00
}
else {
2009-01-07 11:42:38 +01:00
$prominent = $config [ " prominent_time " ];
}
2012-04-09 17:23:51 +02:00
2009-01-07 11:42:38 +01:00
if ( ! is_numeric ( $unixtime )) {
2018-06-11 16:40:10 +02:00
$unixtime = time_w_fixed_tz ( $unixtime );
2009-01-07 11:42:38 +01:00
}
2012-04-09 17:23:51 +02:00
2009-01-07 11:42:38 +01:00
//prominent_time is either timestamp or comparation
2010-05-13 16:45:52 +02:00
if ( $unixtime <= 0 ) {
2016-01-18 11:54:17 +01:00
$title = __ ( 'Unknown' ) . '/' . __ ( 'Never' );
2009-03-20 20:57:13 +01:00
$data = __ ( 'Unknown' );
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
}
elseif ( $prominent == " timestamp " ) {
2016-01-18 11:54:17 +01:00
pandora_setlocale ();
2009-01-07 11:42:38 +01:00
$title = human_time_comparation ( $unixtime );
2016-01-18 11:54:17 +01:00
$data = strftime ( date2strftime_format ( $config [ " date_format " ]),
$unixtime );
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
}
else {
2009-01-07 11:42:38 +01:00
$title = date ( $config [ " date_format " ], $unixtime );
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
$units = 'large' ;
if ( isset ( $option [ 'units' ])) {
$units = $option [ 'units' ];
}
$data = human_time_comparation ( $unixtime , $units );
2009-01-07 11:42:38 +01:00
}
$output = '<' . $tag ;
switch ( $tag ) {
2012-04-09 17:23:51 +02:00
default :
//Usually tags have title attributes, so by default we add,
//then fall through to add attributes and data
2013-03-15 13:06:49 +01:00
$output .= ' title="' . $title . '" ' . $style . '>' . $data . '</' . $tag . '>' ;
2012-04-09 17:23:51 +02:00
break ;
case " h1 " :
case " h2 " :
case " h3 " :
//Above tags don't have title attributes
$output .= ' ' . $attributes . ' ' . $style . '>' . $data . '</' . $tag . '>' ;
break ;
2009-01-07 11:42:38 +01:00
}
2012-04-09 17:23:51 +02:00
2009-01-07 11:42:38 +01:00
if ( $return )
return $output ;
echo $output ;
}
/**
* Prints a username with real name , link to the user_edit page etc .
*
2009-03-30 11:27:04 +02:00
* @ param string The username to render
* @ param bool Whether to return or print
2009-01-07 11:42:38 +01:00
*
* @ return string HTML code if return parameter is true .
*/
2011-04-13 18:11:02 +02:00
function ui_print_username ( $username , $return = false ) {
2009-02-19 22:34:27 +01:00
$string = '<a href="index.php?sec=usuario&sec2=operation/users/user_edit&id=' . $username . '">' . get_user_fullname ( $username ) . '</a>' ;
2009-01-07 11:42:38 +01:00
if ( $return )
return $string ;
echo $string ;
}
2013-01-10 17:00:30 +01:00
function ui_print_tags_warning ( $return = false ) {
$msg = '<div id="notify_conf" class="notify">' ;
$msg .= __ ( " Is possible that this view uses part of information which your user has not access " );
$msg .= '</div>' ;
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( $return ) {
2013-01-10 17:00:30 +01:00
return $msg ;
}
else {
echo $msg ;
}
}
2016-03-30 13:05:08 +02:00
/**
2009-01-07 11:42:38 +01:00
* Print group icon within a link
*
2009-03-30 11:27:04 +02:00
* @ param int Group id
* @ param bool Whether to return or print
* @ param string What path to use ( relative to images / ) . Defaults to groups_small
2011-07-06 13:57:27 +02:00
* @ param string Style for group image
* @ param bool Whether the group have link or not
2009-01-07 11:42:38 +01:00
*
* @ return string HTML code if return parameter is true .
*/
2014-11-20 15:06:11 +01:00
function ui_print_group_icon ( $id_group , $return = false , $path = " groups_small " , $style = '' , $link = true , $force_show_image = false , $show_as_image = false ) {
global $config ;
2013-04-02 15:44:48 +02:00
if ( $id_group > 0 )
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
$icon = ( string ) db_get_value ( 'icon' , 'tgrupo' , 'id_grupo' , ( int ) $id_group );
2010-04-22 18:51:23 +02:00
else
$icon = " world " ;
2009-01-07 11:42:38 +01:00
2013-07-03 10:50:50 +02:00
2009-08-01 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php: fix bug that introduce obligatory autorefresh
and maybe some extension run bad with autorefresh.
*include/functions_reporting.php: add function
"get_agent_module_info_with_filter", this function is similar more or less
at "get_agent_module_info" but the function can set SQL filter for
tune the result.
*include/functions_ui.php: add more features at function "print_group_icon"
can set style and only icon not link.
*images/so_aix_small.png, images/network_small.png, images/so_bsd_small.png,
images/so_solaris_small.png, images/so_other_small.png,
images/so_cisco_small.png,
images/status_sets/default/agent_critical_ball.png,
images/status_sets/default/module_warning_ball.png,
images/status_sets/default/module_ok_ball.png,
images/status_sets/default/alert_fired_ball.png,
images/status_sets/default/agent_warning_ball.png,
images/status_sets/default/agent_no_data_ball.png,
images/status_sets/default/alert_disabled_square.png,
images/status_sets/default/agent_no_monitors_ball.png,
images/status_sets/default/agent_down_ball.png,
images/status_sets/default/agent_ok_ball.png,
images/status_sets/default/alert_disabled_ball.png,
images/status_sets/default/module_critical_ball.png,
images/status_sets/default/alert_not_fired_ball.png,
images/so_win_small.png, images/so_hpux_small.png, images/so_mac_small.png,
images/so_linux_small.png: add many icons for many purposes and new
features near in the time.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1913 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-03 20:15:40 +02:00
$output = '' ;
2012-12-12 20:37:35 +01:00
// Don't show link in metaconsole
if ( defined ( 'METACONSOLE' ))
$link = false ;
2016-03-30 13:05:08 +02:00
if ( $link )
2010-04-30 13:41:43 +02:00
$output = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id=' . $id_group . '">' ;
2014-11-20 15:06:11 +01:00
if ( $config [ 'show_group_name' ]) {
$output .= '<span title="' . groups_get_name ( $id_group , true ) . '">' .
2015-03-16 17:47:19 +01:00
groups_get_name ( $id_group , true ) . ' </span>' ;
2014-11-20 15:06:11 +01:00
}
2012-10-09 17:51:33 +02:00
else {
2014-11-20 15:06:11 +01:00
if ( empty ( $icon ))
2015-03-18 11:46:27 +01:00
$output .= '<span title="' . groups_get_name ( $id_group , true ) . '"> </span>' ;
2014-11-20 15:06:11 +01:00
else {
$output .= html_print_image ( " images/ " . $path . " / " . $icon . " .png " ,
2016-09-28 16:56:05 +02:00
true , array ( " style " => $style , " class " => " bot " , " alt " => groups_get_name ( $id_group , true ), " title " => groups_get_name ( $id_group , true )), false , false , false , true );
2014-11-20 15:06:11 +01:00
}
2012-10-09 17:51:33 +02:00
}
2010-04-30 13:41:43 +02:00
2016-03-30 13:05:08 +02:00
if ( $link )
2010-04-30 13:41:43 +02:00
$output .= '</a>' ;
2009-01-07 11:42:38 +01:00
2009-04-09 23:06:17 +02:00
if ( ! $return )
echo $output ;
2009-01-07 11:42:38 +01:00
2009-04-09 23:06:17 +02:00
return $output ;
2009-01-07 11:42:38 +01:00
}
2016-03-30 13:05:08 +02:00
/**
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
* Print group icon within a link . Other version .
*
* @ param int Group id
* @ param bool Whether to return or print
* @ param string What path to use ( relative to images / ) . Defaults to groups_small
*
* @ return string HTML code if return parameter is true .
*/
2011-04-13 18:11:02 +02:00
function ui_print_group_icon_path ( $id_group , $return = false , $path = " images/groups_small " , $style = '' , $link = true ) {
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( $id_group > 0 )
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
$icon = ( string ) db_get_value ( 'icon' , 'tgrupo' , 'id_grupo' , ( int ) $id_group );
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
else
$icon = " world " ;
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( $style == '' )
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
$style = 'width: 16px; height: 16px;' ;
2012-07-18 15:25:51 +02:00
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
$output = '' ;
2016-03-30 13:05:08 +02:00
if ( $link )
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
$output = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id=' . $id_group . '">' ;
if ( empty ( $icon ))
2011-04-27 15:43:31 +02:00
$output .= '<span title="' . groups_get_name ( $id_group , true ) . '"> - </span>' ;
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
else
2011-04-27 15:43:31 +02:00
$output .= '<img style="' . $style . '" class="bot" src="' . $path . '/' . $icon . '.png" alt="' . groups_get_name ( $id_group , true ) . '" title="' . groups_get_name ( $id_group , true ) . '" />' ;
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
2016-03-30 13:05:08 +02:00
if ( $link )
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
$output .= '</a>' ;
if ( ! $return )
echo $output ;
return $output ;
}
2016-03-30 13:05:08 +02:00
/**
2009-01-07 11:42:38 +01:00
* Get the icon of an operating system .
*
* @ param int Operating system id
* @ param bool Whether to also append the name of the OS after the icon
2016-03-30 13:05:08 +02:00
* @ param bool Whether to return or echo the result
2011-06-28 15:31:52 +02:00
* @ param bool Whether to apply skin or not
2009-01-07 11:42:38 +01:00
*
* @ return string HTML with icon of the OS
*/
2014-12-19 13:15:55 +01:00
function ui_print_os_icon ( $id_os , $name = true , $return = false ,
$apply_skin = true , $networkmap = false , $only_src = false ,
2017-02-13 16:06:17 +01:00
$relative = false , $options = false , $big_icons = false ) {
2014-12-19 13:15:55 +01:00
2017-02-13 16:06:17 +01:00
$subfolder = 'os_icons' ;
2011-08-17 18:22:29 +02:00
if ( $networkmap ) {
2017-02-13 16:06:17 +01:00
$subfolder = 'networkmap' ;
2011-08-17 18:22:29 +02:00
}
2017-02-13 16:06:17 +01:00
if ( $big_icons )
$subfolder .= '/so_big_icons' ;
2013-07-03 10:50:50 +02:00
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
$icon = ( string ) db_get_value ( 'icon_name' , 'tconfig_os' , 'id_os' , ( int ) $id_os );
2009-01-07 11:42:38 +01:00
$os_name = get_os_name ( $id_os );
if ( empty ( $icon )) {
2011-08-17 18:22:29 +02:00
if ( $only_src ) {
2017-02-13 16:06:17 +01:00
$output = html_print_image ( " images/ " . $subfolder . " /unknown.png " ,
2016-09-28 16:56:05 +02:00
true , $options , true , $relative , false , true );
2011-08-17 18:22:29 +02:00
}
else {
return " - " ;
}
2009-01-07 11:42:38 +01:00
}
2016-03-30 13:05:08 +02:00
else if ( $apply_skin ) {
2011-08-17 18:22:29 +02:00
if ( $only_src ) {
2017-02-13 16:06:17 +01:00
$output = html_print_image ( " images/ " . $subfolder . " / " . $icon , true , $options , true , $relative , false , true );
2011-08-17 18:22:29 +02:00
}
else {
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( ! isset ( $options [ 'title' ])) {
2013-05-23 17:42:32 +02:00
$options [ 'title' ] = $os_name ;
}
2017-02-13 16:06:17 +01:00
$output = html_print_image ( " images/ " . $subfolder . " / " . $icon , true , $options , false , $relative , false , true );
2011-08-17 18:22:29 +02:00
}
}
2011-06-28 15:31:52 +02:00
else
//$output = "<img src='images/os_icons/" . $icon . "' alt='" . $os_name . "' title='" . $os_name . "'>";
2017-02-15 13:43:15 +01:00
$output = " images/ " . $subfolder . " / " . $icon ;
2009-01-07 11:42:38 +01:00
if ( $name === true ) {
2013-04-10 09:57:54 +02:00
$output .= ' ' . $os_name ;
2009-01-07 11:42:38 +01:00
}
2009-04-09 23:06:17 +02:00
if ( ! $return )
echo $output ;
2009-01-07 11:42:38 +01:00
2009-04-09 23:06:17 +02:00
return $output ;
2009-01-07 11:42:38 +01:00
}
2017-07-24 15:53:31 +02:00
function ui_print_type_agent_icon ( $id_os = false , $remote_contact = false , $contact = false ,
$return = false , $remote = 0 , $version = " " ){
if ( $id_os == 19 ){
//Satellite
$options [ 'title' ] = __ ( 'Satellite' );
$output = html_print_image ( " images/op_satellite.png " , true , $options , false , false , false , true );
}
else if ( $remote_contact == $contact && $remote == 0 && $version == " " ){
//Network
$options [ 'title' ] = __ ( 'Network' );
$output = html_print_image ( " images/network.png " , true , $options , false , false , false , true );
}
else {
//Software
$options [ 'title' ] = __ ( 'Software' );
$output = html_print_image ( " images/data.png " , true , $options , false , false , false , true );
}
return $output ;
}
2009-01-07 11:42:38 +01:00
/**
* Prints an agent name with the correct link
*
2009-03-30 11:27:04 +02:00
* @ param int Agent id
* @ param bool Whether to return the string or echo it too
2009-04-09 23:06:17 +02:00
* @ param int Now uses styles to accomplish this
2009-10-21 22:25:26 +02:00
* @ param string Style of name in css .
2012-12-21 12:11:22 +01:00
* @ param string server url to concatenate at the begin of the link
* @ param string extra parameters to concatenate in the link
2013-05-30 17:48:22 +02:00
* @ param string name of the agent to avoid the query in some cases
2013-07-22 16:04:06 +02:00
* @ param bool if the agent will provided with link or not
2017-02-22 12:50:36 +01:00
* @ param bool use the agent alias or the name
2009-01-07 11:42:38 +01:00
*
* @ return string HTML with agent name and link
2009-01-08 16:52:13 +01:00
*/
2017-02-22 12:50:36 +01:00
function ui_print_agent_name ( $id_agent , $return = false , $cutoff = 'agent_medium' , $style = '' , $cutname = false , $server_url = '' , $extra_params = '' , $known_agent_name = false , $link = true , $alias = true ) {
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( $known_agent_name === false ) {
2017-02-22 12:50:36 +01:00
if ( $alias ) {
$agent_name = ( string ) agents_get_alias ( $id_agent );
}
else {
$agent_name = ( string ) agents_get_name ( $id_agent );
}
2013-05-30 17:48:22 +02:00
}
else {
$agent_name = $known_agent_name ;
}
2017-02-22 12:50:36 +01:00
if ( $alias ) {
$agent_name_full = ( string ) agents_get_name ( $id_agent );
}
else {
$agent_name_full = $agent_name ;
}
2011-01-20 14:47:27 +01:00
if ( $cutname ) {
2011-07-06 13:57:27 +02:00
$agent_name = ui_print_truncate_text ( $agent_name , $cutoff , true , true , true , '[…]' , $style );
2010-08-04 13:08:16 +02:00
}
2013-03-26 18:15:49 +01:00
2013-07-22 16:04:06 +02:00
if ( $link ) {
2016-03-30 13:05:08 +02:00
$url = $server_url . 'index.php?sec=estado&' .
2013-07-22 16:04:06 +02:00
'sec2=operation/agentes/ver_agente&' .
'id_agente=' . $id_agent . $extra_params ;
$output = '<a style="' . $style . '"' .
' href="' . $url . '"' .
' title="' . $agent_name_full . '"><b><span style="' . $style . '">' . $agent_name . '</span></b></a>' ;
}
else {
$output = '<b><span style="' . $style . '">' . $agent_name . '</span></b>' ;
}
2009-01-07 11:42:38 +01:00
//TODO: Add a pretty javascript (using jQuery) popup-box with agent details
if ( $return )
return $output ;
echo $output ;
}
2009-01-15 11:21:38 +01:00
2016-03-30 13:05:08 +02:00
/**
2009-01-15 11:21:38 +01:00
* Formats a row from the alert table and returns an array usable in the table function
*
* @ param array A valid ( non empty ) row from the alert table
* @ param bool Whether or not this is a combined alert
* @ param bool Whether to print the agent information with the module information
* @ param string Tab where the function was called from ( used for urls )
2011-07-06 13:57:27 +02:00
* @ param mixed Style for agent name or default ( false )
2009-01-15 11:21:38 +01:00
*
* @ return array A formatted array with proper html for use in $table -> data ( 6 columns )
*/
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/reporting_builder.php,
godmode/agentes/configurar_agente.php, godmode/menu.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_alerts.php, include/functions_menu.php,
include/functions_networkmap.php,
include/help/en/help_alert_type.php,
include/help/es/help_alert_type.php,
include/functions_reporting.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/alerts_status.php: erased the ocurrences about
the deprecated alert compounds.
Fixes: #3602487
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-29 15:42:55 +01:00
function ui_format_alert_row ( $alert , $agent = true , $url = '' , $agent_style = false ) {
2011-07-29 17:12:32 +02:00
global $config ;
2012-04-09 17:23:51 +02:00
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( ! isset ( $alert [ 'server_data' ])) {
2013-05-30 17:48:22 +02:00
$server_name = '' ;
$server_id = '' ;
$url_hash = '' ;
$console_url = '' ;
}
else {
$server_data = $alert [ 'server_data' ];
$server_name = $server_data [ 'server_name' ];
$server_id = $server_data [ 'id' ];
$console_url = $server_data [ 'server_url' ] . '/' ;
$url_hash = metaconsole_get_servers_url_hash ( $server_data );
}
2011-03-02 22:56:48 +01:00
$actionText = " " ;
2013-05-28 17:18:41 +02:00
require_once ( $config [ 'homedir' ] . " /include/functions_alerts.php " );
2009-10-21 22:25:26 +02:00
$isFunctionPolicies = enterprise_include_once ( 'include/functions_policies.php' );
2011-07-29 17:12:32 +02:00
$id_group = ( int ) get_parameter ( " ag_group " , 0 ); //0 is the All group (selects all groups)
2012-04-09 17:23:51 +02:00
2010-04-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_ui.php: changed some parts of source code in the
functions "format_alert_row" for show column modules in general view. In the
function "pagination" added the parameter $offset_name with default value
'offset' for to use several paginations in one page.
* include/functions_agents.php: added the parameters $limit, $idGroup,
$count in the function "get_agent_alerts_simple", and now you can limit the
rows, search by id group and return the count of rows (without limit). And
in the function "get_agent_alerts_compound" added the same parameters to
another function $idGroup, $limit, $count for similar uses.
* operation/agentes/alerts_status.php: cleaned more parts of source code,
fixed the mad array_merge of alerts, fixed SQL with the searchs IN
(large large list ids), fixed the pagination before loop all rows, now
only loop the block page rows.
* operation/agentes/alerts_status.functions.php: new file with the functions
"forceExecution", "validateAlert", and "printFormFilterAlert".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2542 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-06 14:46:34 +02:00
if ( $isFunctionPolicies !== ENTERPRISE_NOT_HOOK ) {
if ( $agent ) {
2010-09-17 14:34:11 +02:00
$index = array ( 'policy' => 0 , 'standby' => 1 , 'force_execution' => 2 , 'agent_name' => 3 , 'module_name' => 4 ,
'description' => 5 , 'template' => 5 , 'action' => 6 , 'last_fired' => 7 , 'status' => 8 ,
'validate' => 9 );
2010-04-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_ui.php: changed some parts of source code in the
functions "format_alert_row" for show column modules in general view. In the
function "pagination" added the parameter $offset_name with default value
'offset' for to use several paginations in one page.
* include/functions_agents.php: added the parameters $limit, $idGroup,
$count in the function "get_agent_alerts_simple", and now you can limit the
rows, search by id group and return the count of rows (without limit). And
in the function "get_agent_alerts_compound" added the same parameters to
another function $idGroup, $limit, $count for similar uses.
* operation/agentes/alerts_status.php: cleaned more parts of source code,
fixed the mad array_merge of alerts, fixed SQL with the searchs IN
(large large list ids), fixed the pagination before loop all rows, now
only loop the block page rows.
* operation/agentes/alerts_status.functions.php: new file with the functions
"forceExecution", "validateAlert", and "printFormFilterAlert".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2542 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-06 14:46:34 +02:00
}
else {
2010-09-17 14:34:11 +02:00
$index = array ( 'policy' => 0 , 'standby' => 1 , 'force_execution' => 2 , 'agent_name' => 3 , 'module_name' => 3 ,
'description' => 4 , 'template' => 4 , 'action' => 5 , 'last_fired' => 6 , 'status' => 7 ,
'validate' => 8 );
2010-04-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_ui.php: changed some parts of source code in the
functions "format_alert_row" for show column modules in general view. In the
function "pagination" added the parameter $offset_name with default value
'offset' for to use several paginations in one page.
* include/functions_agents.php: added the parameters $limit, $idGroup,
$count in the function "get_agent_alerts_simple", and now you can limit the
rows, search by id group and return the count of rows (without limit). And
in the function "get_agent_alerts_compound" added the same parameters to
another function $idGroup, $limit, $count for similar uses.
* operation/agentes/alerts_status.php: cleaned more parts of source code,
fixed the mad array_merge of alerts, fixed SQL with the searchs IN
(large large list ids), fixed the pagination before loop all rows, now
only loop the block page rows.
* operation/agentes/alerts_status.functions.php: new file with the functions
"forceExecution", "validateAlert", and "printFormFilterAlert".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2542 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-06 14:46:34 +02:00
}
}
else {
if ( $agent ) {
2010-09-17 14:34:11 +02:00
$index = array ( 'standby' => 0 , 'force_execution' => 1 , 'agent_name' => 2 , 'module_name' => 3 ,
'description' => 4 , 'template' => 4 , 'action' => 5 , 'last_fired' => 6 , 'status' => 7 ,
2011-07-29 17:12:32 +02:00
'validate' => 8 );
2010-04-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_ui.php: changed some parts of source code in the
functions "format_alert_row" for show column modules in general view. In the
function "pagination" added the parameter $offset_name with default value
'offset' for to use several paginations in one page.
* include/functions_agents.php: added the parameters $limit, $idGroup,
$count in the function "get_agent_alerts_simple", and now you can limit the
rows, search by id group and return the count of rows (without limit). And
in the function "get_agent_alerts_compound" added the same parameters to
another function $idGroup, $limit, $count for similar uses.
* operation/agentes/alerts_status.php: cleaned more parts of source code,
fixed the mad array_merge of alerts, fixed SQL with the searchs IN
(large large list ids), fixed the pagination before loop all rows, now
only loop the block page rows.
* operation/agentes/alerts_status.functions.php: new file with the functions
"forceExecution", "validateAlert", and "printFormFilterAlert".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2542 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-06 14:46:34 +02:00
}
else {
2010-09-17 14:34:11 +02:00
$index = array ( 'standby' => 0 , 'force_execution' => 1 , 'agent_name' => 2 , 'module_name' => 2 ,
'description' => 3 , 'template' => 3 , 'action' => 4 , 'last_fired' => 5 , 'status' => 6 ,
'validate' => 7 );
2010-04-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_ui.php: changed some parts of source code in the
functions "format_alert_row" for show column modules in general view. In the
function "pagination" added the parameter $offset_name with default value
'offset' for to use several paginations in one page.
* include/functions_agents.php: added the parameters $limit, $idGroup,
$count in the function "get_agent_alerts_simple", and now you can limit the
rows, search by id group and return the count of rows (without limit). And
in the function "get_agent_alerts_compound" added the same parameters to
another function $idGroup, $limit, $count for similar uses.
* operation/agentes/alerts_status.php: cleaned more parts of source code,
fixed the mad array_merge of alerts, fixed SQL with the searchs IN
(large large list ids), fixed the pagination before loop all rows, now
only loop the block page rows.
* operation/agentes/alerts_status.functions.php: new file with the functions
"forceExecution", "validateAlert", and "printFormFilterAlert".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2542 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-06 14:46:34 +02:00
}
}
2009-10-21 22:25:26 +02:00
if ( $alert [ 'disabled' ]) {
2016-03-30 13:05:08 +02:00
$disabledHtmlStart = '<span style="font-style: italic; color: #aaaaaa;">' ;
2009-10-21 22:25:26 +02:00
$disabledHtmlEnd = '</span>' ;
$styleDisabled = " font-style: italic; color: #aaaaaa; " ;
}
else {
2016-03-30 13:05:08 +02:00
$disabledHtmlStart = '' ;
2009-10-21 22:25:26 +02:00
$disabledHtmlEnd = '' ;
$styleDisabled = " " ;
}
2009-01-15 11:21:38 +01:00
if ( empty ( $alert ))
2009-10-21 22:25:26 +02:00
{
if ( $isFunctionPolicies !== ENTERPRISE_NOT_HOOK )
return array ( " " , " " , " " , " " , " " , " " , " " , " " );
else
return array ( " " , " " , " " , " " , " " , " " , " " );
}
2009-01-15 11:21:38 +01:00
// Get agent id
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/reporting_builder.php,
godmode/agentes/configurar_agente.php, godmode/menu.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_alerts.php, include/functions_menu.php,
include/functions_networkmap.php,
include/help/en/help_alert_type.php,
include/help/es/help_alert_type.php,
include/functions_reporting.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/alerts_status.php: erased the ocurrences about
the deprecated alert compounds.
Fixes: #3602487
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-29 15:42:55 +01:00
$id_agent = modules_get_agentmodule_agent ( $alert [ 'id_agent_module' ]);
2017-02-21 15:31:20 +01:00
$agente = db_get_row ( 'tagente' , 'id_agente' , $id_agent );
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/reporting_builder.php,
godmode/agentes/configurar_agente.php, godmode/menu.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_alerts.php, include/functions_menu.php,
include/functions_networkmap.php,
include/help/en/help_alert_type.php,
include/help/es/help_alert_type.php,
include/functions_reporting.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/alerts_status.php: erased the ocurrences about
the deprecated alert compounds.
Fixes: #3602487
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-29 15:42:55 +01:00
$template = alerts_get_alert_template ( $alert [ 'id_alert_template' ]);
$description = io_safe_output ( $template [ 'name' ]);
2009-01-15 11:21:38 +01:00
$data = array ();
2018-07-26 12:41:09 +02:00
if ( $isFunctionPolicies !== ENTERPRISE_NOT_HOOK ) {
if ( is_metaconsole ()){
$node = metaconsole_get_connection_by_id ( $alert [ 'server_data' ][ 'id' ]);
if ( metaconsole_load_external_db ( $node ) !== NOERR ) {
// Restore the default connection.
metaconsole_restore_db ();
$errors ++ ;
break ;
}
}
$policyInfo = policies_is_alert_in_policy2 ( $alert [ 'id' ], false );
if ( $policyInfo === false )
$data [ $index [ 'policy' ]] = '' ;
else {
$img = 'images/policies.png' ;
if ( ! is_metaconsole ()){
2017-03-24 13:07:49 +01:00
$data [ $index [ 'policy' ]] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo [ 'id' ] . '">' .
2013-05-28 17:18:41 +02:00
html_print_image ( $img , true , array ( 'title' => $policyInfo [ 'name' ])) .
'</a>' ;
2018-07-26 12:41:09 +02:00
} else {
$data [ $index [ 'policy' ]] = '<a href="?sec=gmodules&sec2=advanced/policymanager&id=' . $policyInfo [ 'id' ] . '">' .
html_print_image ( $img , true , array ( 'title' => $policyInfo [ 'name' ])) .
'</a>' ;
2013-05-28 17:18:41 +02:00
}
2009-10-21 22:25:26 +02:00
}
2018-07-26 12:41:09 +02:00
if ( is_metaconsole ()){
metaconsole_restore_db ();
}
2009-10-21 22:25:26 +02:00
}
2018-07-26 12:41:09 +02:00
2010-09-17 14:34:11 +02:00
// Standby
$data [ $index [ 'standby' ]] = '' ;
2010-11-04 19:31:37 +01:00
if ( isset ( $alert [ " standby " ]) && $alert [ " standby " ] == 1 ) {
2011-04-27 15:43:31 +02:00
$data [ $index [ 'standby' ]] = html_print_image ( 'images/bell_pause.png' , true , array ( 'title' => __ ( 'Standby on' )));
2016-03-30 13:05:08 +02:00
}
2010-09-17 14:34:11 +02:00
2013-05-28 17:18:41 +02:00
if ( ! defined ( 'METACONSOLE' )) {
// Force alert execution
2016-11-03 15:41:31 +01:00
if ( check_acl ( $config [ " id_user " ], $id_group , " AW " ) || check_acl ( $config [ " id_user " ], $id_group , " LM " )) {
if ( $alert [ " force_execution " ] == 0 ) {
$data [ $index [ 'force_execution' ]] =
'<a href="' . $url . '&id_alert=' . $alert [ " id " ] . '&force_execution=1&refr=60">' . html_print_image ( " images/target.png " , true , array ( " border " => '0' , " title " => __ ( 'Force' ))) . '</a>' ;
}
else {
$data [ $index [ 'force_execution' ]] =
'<a href="' . $url . '&id_alert=' . $alert [ " id " ] . '&refr=60">' . html_print_image ( " images/refresh.png " , true ) . '</a>' ;
}
2013-05-28 17:18:41 +02:00
}
2009-01-15 11:21:38 +01:00
}
2013-05-28 17:18:41 +02:00
2009-10-21 22:25:26 +02:00
$data [ $index [ 'agent_name' ]] = $disabledHtmlStart ;
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/reporting_builder.php,
godmode/agentes/configurar_agente.php, godmode/menu.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_alerts.php, include/functions_menu.php,
include/functions_networkmap.php,
include/help/en/help_alert_type.php,
include/help/es/help_alert_type.php,
include/functions_reporting.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/alerts_status.php: erased the ocurrences about
the deprecated alert compounds.
Fixes: #3602487
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-29 15:42:55 +01:00
if ( $agent == 0 ) {
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
$data [ $index [ 'module_name' ]] .=
2013-05-28 17:18:41 +02:00
ui_print_truncate_text ( isset ( $alert [ 'agent_module_name' ]) ? $alert [ 'agent_module_name' ] : modules_get_agentmodule_name ( $alert [ " id_agent_module " ]), 'module_small' , false , true , true , '[…]' , 'font-size: 7.2pt' );
2016-03-30 13:05:08 +02:00
}
2009-10-21 22:25:26 +02:00
else {
2013-05-28 17:18:41 +02:00
if ( defined ( 'METACONSOLE' )) {
2013-05-30 17:48:22 +02:00
$agent_name = $alert [ 'agent_name' ];
$id_agent = $alert [ 'id_agent' ];
2011-07-06 13:57:27 +02:00
}
else {
2013-05-30 17:48:22 +02:00
$agent_name = false ;
$id_agent = modules_get_agentmodule_agent ( $alert [ " id_agent_module " ]);
}
2018-07-26 12:41:09 +02:00
if ( defined ( 'METACONSOLE' ) || ! can_user_access_node ()) {
2013-06-11 17:51:28 +02:00
$data [ $index [ 'agent_name' ]] = ui_print_truncate_text ( $agent_name , 'agent_small' , false , true , false , '[…]' , 'font-size:7.5pt;' );
2013-05-30 17:48:22 +02:00
}
else {
2013-06-11 17:51:28 +02:00
if ( $agent_style !== false ) {
2017-02-21 15:31:20 +01:00
$data [ $index [ 'agent_name' ]] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $id_agent . '"> <span style="font-size: 7pt;font-weight:bold" title ="' . $agente [ 'nombre' ] . '">' . $agente [ " alias " ] . '</span></a>' ;
2013-06-11 17:51:28 +02:00
}
else {
2017-02-21 15:31:20 +01:00
$data [ $index [ 'agent_name' ]] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $id_agent . '"> <span style="font-size: 7pt;font-weight:bold" title ="' . $agente [ 'nombre' ] . '">' . $agente [ " alias " ] . '</span></a>' ;
2013-06-11 17:51:28 +02:00
}
2011-07-06 13:57:27 +02:00
}
2018-07-26 12:41:09 +02:00
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
$data [ $index [ 'module_name' ]] =
2013-05-28 17:18:41 +02:00
ui_print_truncate_text ( isset ( $alert [ 'agent_module_name' ]) ? $alert [ 'agent_module_name' ] : modules_get_agentmodule_name ( $alert [ " id_agent_module " ]), 'module_small' , false , true , true , '[…]' , 'font-size: 7.2pt' );
2009-01-15 11:21:38 +01:00
}
2013-05-28 17:18:41 +02:00
2009-10-21 22:25:26 +02:00
$data [ $index [ 'agent_name' ]] .= $disabledHtmlEnd ;
2009-01-15 11:21:38 +01:00
2009-10-21 22:25:26 +02:00
$data [ $index [ 'description' ]] = '' ;
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/reporting_builder.php,
godmode/agentes/configurar_agente.php, godmode/menu.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_alerts.php, include/functions_menu.php,
include/functions_networkmap.php,
include/help/en/help_alert_type.php,
include/help/es/help_alert_type.php,
include/functions_reporting.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/alerts_status.php: erased the ocurrences about
the deprecated alert compounds.
Fixes: #3602487
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-29 15:42:55 +01:00
2013-05-28 17:18:41 +02:00
if ( defined ( 'METACONSOLE' )) {
2013-05-30 17:48:22 +02:00
$data [ $index [ 'template' ]] .= '<a class="template_details" href="' . ui_get_full_url ( '/' , false , false , false ) . '/ajax.php?page=enterprise/meta/include/ajax/tree_view.ajax&action=get_template_tooltip&id_template=' . $template [ 'id' ] . '&server_name=' . $alert [ 'server_data' ][ 'server_name' ] . '">' ;
2013-05-28 17:18:41 +02:00
}
else {
$data [ $index [ 'template' ]] .= '<a class="template_details" href="ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template=' . $template [ 'id' ] . '">' ;
}
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/reporting_builder.php,
godmode/agentes/configurar_agente.php, godmode/menu.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_alerts.php, include/functions_menu.php,
include/functions_networkmap.php,
include/help/en/help_alert_type.php,
include/help/es/help_alert_type.php,
include/functions_reporting.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/alerts_status.php: erased the ocurrences about
the deprecated alert compounds.
Fixes: #3602487
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-29 15:42:55 +01:00
$data [ $index [ 'template' ]] .= html_print_image ( 'images/zoom.png' , true );
$data [ $index [ 'template' ]] .= '</a> ' ;
$actionDefault = db_get_value_sql ( " SELECT id_alert_action
FROM talert_templates WHERE id = " . $alert['id_alert_template'] );
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
$data [ $index [ 'description' ]] .= $disabledHtmlStart .
ui_print_truncate_text ( io_safe_output ( $description ), 'description' , false , true , true , '[…]' , 'font-size: 7.1pt' ) .
$disabledHtmlEnd ;
2009-01-15 11:21:38 +01:00
2013-01-29 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/reporting_builder.php,
godmode/agentes/configurar_agente.php, godmode/menu.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_alerts.php, include/functions_menu.php,
include/functions_networkmap.php,
include/help/en/help_alert_type.php,
include/help/es/help_alert_type.php,
include/functions_reporting.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/alerts_status.php: erased the ocurrences about
the deprecated alert compounds.
Fixes: #3602487
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-29 15:42:55 +01:00
$actions = alerts_get_alert_agent_module_actions ( $alert [ 'id' ], false );
2012-04-09 17:23:51 +02:00
2010-10-21 17:06:53 +02:00
if ( ! empty ( $actions )) {
2015-04-22 09:51:34 +02:00
$actionText = '<div><ul class="action_list">' ;
2010-02-25 19:48:36 +01:00
foreach ( $actions as $action ) {
2015-04-22 09:51:34 +02:00
$actionText .= '<div style="margin-bottom: 5px;" ><span class="action_name"><li>' . $action [ 'name' ];
2015-06-08 11:05:19 +02:00
if ( $action [ " fires_min " ] != $action [ " fires_max " ]) {
2010-02-25 19:48:36 +01:00
$actionText .= " ( " . $action [ " fires_min " ] . " / " . $action [ " fires_max " ] . " ) " ;
}
2015-04-22 09:51:34 +02:00
$actionText .= '</li></span></div>' ;
2009-11-30 16:42:57 +01:00
}
2011-02-21 19:38:36 +01:00
$actionText .= '</ul></div>' ;
2010-02-25 19:48:36 +01:00
}
else {
if ( $actionDefault != " " )
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
$actionText = db_get_sql ( " SELECT name FROM talert_actions WHERE id = $actionDefault " ) . " <i>( " . __ ( " Default " ) . " )</i> " ;
2009-11-30 16:42:57 +01:00
}
2012-04-09 17:23:51 +02:00
2009-11-25 12:00:59 +01:00
$data [ $index [ 'action' ]] = $actionText ;
2011-04-13 18:11:02 +02:00
$data [ $index [ 'last_fired' ]] = $disabledHtmlStart . ui_print_timestamp ( $alert [ " last_fired " ], true ) . $disabledHtmlEnd ;
2009-01-15 11:21:38 +01:00
2012-04-09 17:23:51 +02:00
2009-04-06 13:02:05 +02:00
$status = STATUS_ALERT_NOT_FIRED ;
$title = " " ;
2009-01-15 11:21:38 +01:00
if ( $alert [ " times_fired " ] > 0 ) {
2009-04-06 13:02:05 +02:00
$status = STATUS_ALERT_FIRED ;
$title = __ ( 'Alert fired' ) . ' ' . $alert [ " times_fired " ] . ' ' . __ ( 'times' );
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
}
elseif ( $alert [ " disabled " ] > 0 ) {
2009-04-06 13:02:05 +02:00
$status = STATUS_ALERT_DISABLED ;
$title = __ ( 'Alert disabled' );
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
}
else {
2009-04-06 13:02:05 +02:00
$status = STATUS_ALERT_NOT_FIRED ;
$title = __ ( 'Alert not fired' );
2009-01-15 11:21:38 +01:00
}
2011-04-13 18:11:02 +02:00
$data [ $index [ 'status' ]] = ui_print_status_image ( $status , $title , true );
2009-01-15 11:21:38 +01:00
2013-05-28 17:18:41 +02:00
if ( ! defined ( 'METACONSOLE' )) {
if ( check_acl ( $config [ " id_user " ], $id_group , " LW " ) || check_acl ( $config [ " id_user " ], $id_group , " LM " )) {
$data [ $index [ 'validate' ]] = '' ;
2018-03-14 17:24:34 +01:00
$data [ $index [ 'validate' ]] .= html_print_checkbox (
" validate[] " ,
$alert [ " id " ],
false ,
true ,
false ,
'' ,
true );
2013-05-28 17:18:41 +02:00
}
2009-02-11 17:55:04 +01:00
}
2012-04-09 17:23:51 +02:00
2009-01-15 11:21:38 +01:00
return $data ;
}
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
/**
2016-03-30 13:05:08 +02:00
* Prints a substracted string , length specified by cutoff , the full string will be in a rollover .
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
*
* @ param string The string to be cut
* @ param int At how much characters to cut
* @ param bool Whether to return or print it out
2011-06-22 19:21:50 +02:00
* @ param int Size font ( fixed ) in px , applyed as CSS style ( optional )
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
*
* @ return An HTML string
*/
2011-06-22 19:21:50 +02:00
function ui_print_string_substr ( $string , $cutoff = 16 , $return = false , $fontsize = 0 ) {
2009-02-17 19:20:04 +01:00
if ( empty ( $string )) {
return " " ;
}
2012-03-12 17:23:50 +01:00
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$string2 = io_safe_output ( $string );
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
if ( mb_strlen ( $string2 , " UTF-8 " ) > $cutoff ) {
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
$string3 = " ... " ;
2012-07-18 15:25:51 +02:00
}
else {
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
$string3 = " " ;
}
2012-03-12 17:23:50 +01:00
2011-06-22 19:21:50 +02:00
$font_size_mod = " " ;
2012-03-12 17:23:50 +01:00
2012-04-09 17:23:51 +02:00
if ( $fontsize > 0 ) {
2015-04-15 09:45:13 +02:00
$font_size_mod = " style='font-size: " . $fontsize . " pt' " ;
2012-03-12 17:23:50 +01:00
}
2011-06-22 19:21:50 +02:00
$string = '<span ' . $font_size_mod . ' title="' . io_safe_input ( $string2 ) . '">' . mb_substr ( $string2 , 0 , $cutoff , " UTF-8 " ) . $string3 . '</span>' ;
2012-03-12 17:23:50 +01:00
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
if ( $return === false ) {
echo $string ;
2012-04-09 17:23:51 +02:00
}
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
return $string ;
}
2009-01-21 15:56:55 +01:00
/**
* Gets a helper text explaining the requirement needs for an alert template
* to get it fired .
*
* @ param int Alert template id .
* @ param bool Wheter to return or print it out .
2009-01-29 10:06:38 +01:00
* @ param bool Wheter to put the values in the string or not .
2009-01-21 15:56:55 +01:00
*
* @ return An HTML string if return was true .
*/
2011-04-13 18:11:02 +02:00
function ui_print_alert_template_example ( $id_alert_template , $return = false , $print_values = true ) {
2009-01-21 15:56:55 +01:00
$output = '' ;
2011-04-27 15:43:31 +02:00
$output .= html_print_image ( " images/information.png " , true );
2009-01-21 15:56:55 +01:00
$output .= '<span id="example">' ;
2011-04-15 12:57:43 +02:00
$template = alerts_get_alert_template ( $id_alert_template );
2009-01-26 11:44:26 +01:00
switch ( $template [ 'type' ]) {
2012-04-09 17:23:51 +02:00
case 'equal' :
2009-01-21 15:56:55 +01:00
/* Do not translate the HTML attributes */
2012-04-09 17:23:51 +02:00
$output .= __ ( 'The alert would fire when the value is <span id="value"></span>' );
break ;
case 'not_equal' :
2009-01-21 15:56:55 +01:00
/* Do not translate the HTML attributes */
2012-04-09 17:23:51 +02:00
$output .= __ ( 'The alert would fire when the value is not <span id="value"></span>' );
break ;
case 'regex' :
if ( $template [ 'matches_value' ])
/* Do not translate the HTML attributes */
$output .= __ ( 'The alert would fire when the value matches <span id="value"></span>' );
else
/* Do not translate the HTML attributes */
$output .= __ ( 'The alert would fire when the value doesn\'t match <span id="value"></span>' );
$value = $template [ 'value' ];
break ;
case 'max_min' :
if ( $template [ 'matches_value' ])
/* Do not translate the HTML attributes */
$output .= __ ( 'The alert would fire when the value is between <span id="min"></span> and <span id="max"></span>' );
else
/* Do not translate the HTML attributes */
$output .= __ ( 'The alert would fire when the value is not between <span id="min"></span> and <span id="max"></span>' );
break ;
case 'max' :
2009-01-21 15:56:55 +01:00
/* Do not translate the HTML attributes */
2012-04-09 17:23:51 +02:00
$output .= __ ( 'The alert would fire when the value is over <span id="max"></span>' );
break ;
case 'min' :
2009-01-21 15:56:55 +01:00
/* Do not translate the HTML attributes */
2012-04-09 17:23:51 +02:00
$output .= __ ( 'The alert would fire when the value is under <span id="min"></span>' );
break ;
case 'warning' :
/* Do not translate the HTML attributes */
$output .= __ ( 'The alert would fire when the module is in warning status' );
break ;
case 'critical' :
/* Do not translate the HTML attributes */
$output .= __ ( 'The alert would fire when the module is in critical status' );
break ;
2009-01-21 15:56:55 +01:00
}
2009-01-29 10:06:38 +01:00
if ( $print_values ) {
/* Replace span elements with real values . This is done in such way to avoid
duplicating strings and make it easily modificable via Javascript . */
$output = str_replace ( '<span id="value"></span>' , $template [ 'value' ], $output );
$output = str_replace ( '<span id="max"></span>' , $template [ 'max_value' ], $output );
$output = str_replace ( '<span id="min"></span>' , $template [ 'min_value' ], $output );
}
2009-01-21 15:56:55 +01:00
$output .= '</span>' ;
if ( $return )
return $output ;
echo $output ;
}
2009-02-13 21:23:44 +01:00
/**
* Prints a help tip icon .
*
2009-03-30 11:27:04 +02:00
* @ param string Id of the help article
* @ param bool Whether to return or output the result
2016-03-30 13:05:08 +02:00
* @ param string Home url if its necessary
2013-04-10 09:57:54 +02:00
* @ param string Image path
2018-02-28 12:08:15 +01:00
* @ param bool Route is relative or not
2009-02-13 21:23:44 +01:00
*
* @ return string The help tip
*/
2018-02-28 12:08:15 +01:00
function ui_print_help_icon ( $help_id , $return = false , $home_url = '' , $image = " images/help.png " , $is_relative = false ) {
2017-04-27 15:49:23 +02:00
global $config ;
2018-05-25 10:29:40 +02:00
// Do not display the help icon if help is disabled
if ( $config [ 'disable_help' ]) return '' ;
2012-12-11 18:39:48 +01:00
if ( empty ( $home_url ))
$home_url = " " ;
2013-01-30 09:18:40 +01:00
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( defined ( 'METACONSOLE' )) {
2013-01-30 09:18:40 +01:00
$home_url = " ../../ " . $home_url ;
}
2018-02-28 12:08:15 +01:00
$output = html_print_image (
$image ,
true ,
2009-03-24 Esteban Sanchez <estebans@artica.es>
* general/pandora_help.php: Added support for enterprise help files.
* include/javascript/pandora.js: Renamed pandora_help() to
open_help().
* include/functions_ui.php: Renamed event function on
print_help_icon(). Removed deprecated pandora_help().
* godmode/agentes/module_manager.php: Added enterprise hooks.
* godmode/agentes/module_manager_editor.php: Added categories
construction here. Added enterprise hooks.
* godmode/agentes/module_manager_editor_common.php: Replaced
deprecated pandora_help() with print_help_icon(). Moved categories
construction to module_manager_editor.
* include/config_process.php: Updated build version.
* include/styles/pandora.css: Fixed textarea height.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/massive_config.php,
godmode/agentes/massive_edit_modules.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/map_builder.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php,
godmode/setup/setup.php, operation/agentes/alerts_status.php,
operation/agentes/tactical.php,
godmode/agentes/agent_manager.php: Replaced deprecated pandora_help()
with print_help_icon().
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-24 16:38:54 +01:00
array ( " class " => " img_help " ,
" title " => __ ( 'Help' ),
2018-02-28 12:08:15 +01:00
" onclick " => " open_help (' " . $help_id . " ',' " . $home_url . " ',' " . $config [ 'id_user' ] . " ') "
),
false ,
2018-02-28 12:16:43 +01:00
$is_relative && is_metaconsole ()
2018-02-28 12:08:15 +01:00
);
2009-02-13 21:23:44 +01:00
if ( ! $return )
echo $output ;
return $output ;
}
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
/**
* Add a CSS file to the HTML head tag .
*
* To make a CSS file available just put it in include / styles . The
* file name should be like " name.css " . The " name " would be the value
* needed to pass to this function .
2011-04-13 18:11:02 +02:00
*
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
* @ param string Script name to add without the " jquery. " prefix and the " .js "
* suffix . Example :
2011-04-13 18:11:02 +02:00
* < code >
* ui_require_css_file ( 'pandora' );
* // Would include include/styles/pandora.js
* </ code >
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
*
* @ return bool True if the file was added . False if the file doesn ' t exist .
*/
2011-04-13 18:11:02 +02:00
function ui_require_css_file ( $name , $path = 'include/styles/' ) {
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
global $config ;
2014-05-07 19:15:48 +02:00
$filename = $path . $name . '.css' ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
if ( ! isset ( $config [ 'css' ]))
$config [ 'css' ] = array ();
2014-05-07 19:15:48 +02:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
if ( isset ( $config [ 'css' ][ $name ]))
return true ;
2014-05-07 19:15:48 +02:00
if ( ! file_exists ( $filename ) &&
! file_exists ( $config [ 'homedir' ] . '/' . $filename ))
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
return false ;
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
$config [ 'css' ][ $name ] = $filename ;
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
return true ;
}
/**
* Add a javascript file to the HTML head tag .
*
* To make a javascript file available just put it in include / javascript . The
* file name should be like " name.js " . The " name " would be the value
* needed to pass to this function .
2011-04-13 18:11:02 +02:00
*
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
* @ param string Script name to add without the " jquery. " prefix and the " .js "
* suffix . Example :
2011-04-13 18:11:02 +02:00
* < code >
* ui_require_javascript_file ( 'pandora' );
* // Would include include/javascript/pandora.js
* </ code >
2015-08-10 17:03:40 +02:00
* @ param bool Just echo the script tag of the file .
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
*
* @ return bool True if the file was added . False if the file doesn ' t exist .
*/
2015-08-10 17:03:40 +02:00
function ui_require_javascript_file ( $name , $path = 'include/javascript/' , $echo_tag = false ) {
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
global $config ;
2013-06-10 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/jquery.ui-timepicker-addon.js: updated the
datepicker for to avoid some found bugs.
* include/javascript/i18n: added translations for the datepicker.
* godmode/alerts/configure_alert_template.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/agentes/planned_downtime.editor.php,
include/ajax/module.php, include/functions_ui.php,
operation/tree.php, operation/agentes/status_monitor.php,
operation/agentes/datos_agente.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php, extensions/insert_data.php:
changed the code for to use the user/system language in the
datepicker.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8284 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-06-10 18:19:48 +02:00
$filename = $path . $name . '.js' ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
2015-08-10 17:03:40 +02:00
if ( $echo_tag ) {
echo '<script type="text/javascript" src="' .
ui_get_full_url ( false , false , false , false ) .
$filename . '"></script>' ;
return ;
}
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
if ( ! isset ( $config [ 'js' ]))
$config [ 'js' ] = array ();
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
if ( isset ( $config [ 'js' ][ $name ]))
return true ;
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
/* We checks two paths because it may fails on enterprise */
2013-06-10 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/jquery.ui-timepicker-addon.js: updated the
datepicker for to avoid some found bugs.
* include/javascript/i18n: added translations for the datepicker.
* godmode/alerts/configure_alert_template.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/agentes/planned_downtime.editor.php,
include/ajax/module.php, include/functions_ui.php,
operation/tree.php, operation/agentes/status_monitor.php,
operation/agentes/datos_agente.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php, extensions/insert_data.php:
changed the code for to use the user/system language in the
datepicker.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8284 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-06-10 18:19:48 +02:00
if ( ! file_exists ( $filename ) && ! file_exists ( $config [ 'homedir' ] . '/' . $filename ))
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
return false ;
2012-11-13 20:08:41 +01:00
if ( defined ( 'METACONSOLE' )) {
$config [ 'js' ][ $name ] = " ../../ " . $filename ;
}
else {
$config [ 'js' ][ $name ] = $filename ;
}
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
return true ;
}
/**
* Add a enteprise javascript file to the HTML head tag .
*
* To make a javascript file available just put it in < ENTERPRISE_DIR >/ include / javascript . The
* file name should be like " name.js " . The " name " would be the value
* needed to pass to this function .
*
* @ param string Script name to add without the " jquery. " prefix and the " .js "
* suffix . Example :
* < code >
* ui_require_javascript_file ( 'pandora' );
* // Would include include/javascript/pandora.js
* </ code >
*
* @ return bool True if the file was added . False if the file doesn ' t exist .
*/
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
function ui_require_javascript_file_enterprise ( $name , $disabled_metaconsole = false ) {
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
global $config ;
2012-12-11 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: in the table
"tlayout_data" added the column "id_metaconsole" for to show
visualmaps in the metaconsole.
* operation/visual_console/render_view.php,
include/functions_visual_map.php, operation/agentes/ver_agente.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/map_builder.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/agent.php, include/functions_visual_map_editor.php,
* operation/agentes/datos_agente.php,
include/functions_netflow.php: cleaned source code style.
* include/functions_ui.php: in function
"ui_require_javascript_file_enterprise" fixed when need a
enterprise javascript instead metaconsole enterprise path.
* include/javascript/pandora.js: fixed the function
"agent_changed_by_multiple_agents" that needs in the metaconsole.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-11 16:01:45 +01:00
$metaconsole_hack = '' ;
if ( $disabled_metaconsole ) {
$metaconsole_hack = '../../' ;
}
$filename = $metaconsole_hack . ENTERPRISE_DIR . '/include/javascript/' . $name . '.js' ;
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
if ( ! isset ( $config [ 'js' ]))
$config [ 'js' ] = array ();
if ( isset ( $config [ 'js' ][ $name ]))
return true ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
/* We checks two paths because it may fails on enterprise */
2013-04-23 16:51:09 +02:00
if ( ! file_exists ( $filename ) &&
! file_exists ( $config [ 'homedir' ] . '/' . $filename )) {
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
return false ;
2013-04-23 16:51:09 +02:00
}
2010-02-10 11:16:51 +01:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
$config [ 'js' ][ $name ] = $filename ;
2010-02-10 11:16:51 +01:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
return true ;
}
/**
* Add a jQuery file to the HTML head tag .
*
* To make a jQuery script available just put it in include / javascript . The
* file name should be like " jquery.name.js " . The " name " would be the value
* needed to pass to this function . Notice that this function does not manage
* jQuery denpendencies .
2011-04-13 18:11:02 +02:00
*
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
* @ param string Script name to add without the " jquery. " prefix and the " .js "
* suffix . Example :
2011-04-13 18:11:02 +02:00
* < code >
* ui_require_jquery_file ( 'form' );
* // Would include include/javascript/jquery.form.js
* </ code >
2015-08-10 17:03:40 +02:00
* @ param bool Just echo the script tag of the file .
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
*
* @ return bool True if the file was added . False if the file doesn ' t exist .
*/
2015-08-10 17:03:40 +02:00
function ui_require_jquery_file ( $name , $path = 'include/javascript/' , $echo_tag = false ) {
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
global $config ;
$filename = $path . 'jquery.' . $name . '.js' ;
2015-08-10 17:03:40 +02:00
if ( $echo_tag ) {
echo '<script type="text/javascript" src="' .
ui_get_full_url ( false , false , false , false ) .
$filename . '"></script>' ;
return ;
}
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
if ( ! isset ( $config [ 'jquery' ]))
$config [ 'jquery' ] = array ();
if ( isset ( $config [ 'jquery' ][ $name ]))
return true ;
/* We checks two paths because it may fails on enterprise */
if ( ! file_exists ( $filename ) && ! file_exists ( $config [ 'homedir' ] . '/' . $filename ))
return false ;
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
2012-11-26 11:27:16 +01:00
$config [ 'jquery' ][ $name ] = $filename ;
2012-02-22 12:23:27 +01:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
return true ;
}
/**
* Callback function to add stuff to the head . This allows us to add scripts
* to the header after the fact as well as extensive validation .
*
* DO NOT CALL print_f , echo , ob_start , ob_flush , ob_end functions here .
*
* To add css just put them in include / styles and then add them to the
* $config [ 'css' ] array
*
* @ param string Callback will fill this with the current buffer .
* @ param bitfield Callback will fill this with a bitfield ( see ob_start )
*
2016-03-30 13:05:08 +02:00
* @ return string String to return to the browser
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
*/
2011-04-13 18:11:02 +02:00
function ui_process_page_head ( $string , $bitfield ) {
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
global $config ;
2012-07-02 13:11:21 +02:00
global $vc_public_view ;
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
2009-05-19 21:04:43 +02:00
if ( isset ( $config [ 'ignore_callback' ]) && $config [ 'ignore_callback' ] == true ) {
return ;
}
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
$output = '' ;
2012-07-06 13:45:02 +02:00
2014-03-13 12:00:12 +01:00
$config_refr = - 1 ;
if ( isset ( $config [ " refr " ]))
$config_refr = $config [ " refr " ];
2012-07-02 13:11:21 +02:00
// If user is logged or displayed view is the public view of visual console
2014-03-13 12:00:12 +01:00
if ( $config_refr > 0 &&
( isset ( $config [ 'id_user' ]) || $vc_public_view == 1 )) {
if ( $config [ 'enable_refr' ] ||
2014-03-19 12:21:11 +01:00
$_GET [ 'sec2' ] == 'operation/agentes/estado_agente' ||
$_GET [ 'sec2' ] == 'operation/agentes/tactical' ||
$_GET [ 'sec2' ] == 'operation/agentes/group_view' ||
2014-03-13 12:00:12 +01:00
$_GET [ 'sec2' ] == 'operation/events/events' ||
2014-03-19 12:21:11 +01:00
$_GET [ 'sec2' ] == 'operation/snmpconsole/snmp_view' ||
$_GET [ 'sec2' ] == 'enterprise/dashboard/main_dashboard' ) {
2012-09-05 09:50:07 +02:00
2015-01-08 19:05:43 +01:00
$query = ui_get_url_refresh ( false , false );
2017-06-14 12:06:41 +02:00
//$output .= '<meta http-equiv="refresh" content="' .
//$config_refr . '; URL=' . $query . '" />';
2012-09-05 09:50:07 +02:00
}
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
}
$output .= " \n \t " ;
2018-05-11 12:49:16 +02:00
$output .= '<title>' . get_product_name () . ' - ' . __ ( 'the Flexible Monitoring System' ) . ' </ title >
2014-03-13 12:00:12 +01:00
< meta http - equiv = " expires " content = " never " />
< meta http - equiv = " content-type " content = " text/html; charset=utf-8 " />
< meta http - equiv = " Content-Style-Type " content = " text/css " />
< meta name = " resource-type " content = " document " />
< meta name = " distribution " content = " global " />
2018-05-23 18:19:24 +02:00
< meta name = " author " content = " ' . get_copyright_notice() . ' " />
< meta name = " copyright " content = " (c) ' . get_copyright_notice() . ' " />
2016-09-28 13:26:58 +02:00
< meta name = " robots " content = " index, follow " /> ' ;
2018-05-24 16:59:50 +02:00
$output .= '<link rel="icon" href="' . ui_get_favicon () . '" type="image/ico" />' ;
2016-09-28 13:26:58 +02:00
$output .= '
2018-05-24 16:59:50 +02:00
< link rel = " shortcut icon " href = " ' . ui_get_favicon() . ' " type = " image/x-icon " />
2014-03-13 12:00:12 +01:00
< link rel = " alternate " href = " operation/events/events_rss.php " title = " Pandora RSS Feed " type = " application/rss+xml " /> ' ;
2012-04-24 15:45:02 +02:00
2009-02-19 22:34:27 +01:00
if ( $config [ " language " ] != " en " ) {
2009-02-24 17:31:02 +01:00
//Load translated strings - load them last so they overload all the objects
2011-04-13 18:11:02 +02:00
ui_require_javascript_file ( " time_ " . $config [ " language " ]);
ui_require_javascript_file ( " date " . $config [ " language " ]);
ui_require_javascript_file ( " countdown_ " . $config [ " language " ]);
2009-02-19 22:34:27 +01:00
}
$output .= " \n \t " ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
//Load CSS
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
if ( empty ( $config [ 'css' ])) {
2009-03-02 Esteban Sanchez <estebans@artica.es>
* include/functions_menu.php: Added to repository. Functions for menu.
* operation/menu.php, godmode/menu.php: Added class to menu due to
changes in print_menu().
* general/main_menu.php: temp_print_menu() moved to functions_menu.php
* include/functions_themes.php: Added to repository. Implement
functions relative to themes (only CSS themes list at this moment).
* include/styles/pandora.css, include/styles/pandora_black.css,
include/styles/pandora_minimal.css, include/styles/pandora_red.css:
Added author, name and description comments to adopt to new
get_themes() interface.
* include/styles/pandora_width.css: Improved and make lighter by
simply rewrite some classes.
* include/functions.php: Added is_ajax().
* godmode/agentes/module_manager_editor.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php, godmode/groups/group_list.php,
godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php,
operation/agentes/estado_agente.php, operation/agentes/ver_agente.php,
operation/events/events.php, operation/messages/message.php: Use
is_ajax()
* godmode/setup/setup.php: Use enterprise_include() instead of manual
checking. Use get_css_themes() to show the theme list.
* include/styles/common.css: Added to repository. Minimal styles to
make pandora works and common with all the CSS themes.
* include/functions_ui.php: Added common.css file.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$config [ 'css' ] = array ();
2009-02-24 17:31:02 +01:00
}
2012-04-24 15:45:02 +02:00
2012-03-12 18:40:53 +01:00
$login_ok = true ;
if ( ! isset ( $config [ 'id_user' ]) && isset ( $_GET [ " login " ])) {
if ( isset ( $_POST [ 'nick' ]) and isset ( $_POST [ 'pass' ])) {
$nick = get_parameter_post ( " nick " ); //This is the variable with the login
$pass = get_parameter_post ( " pass " ); //This is the variable with the password
$nick = db_escape_string_sql ( $nick );
$pass = db_escape_string_sql ( $pass );
2012-04-24 15:45:02 +02:00
2012-03-12 18:40:53 +01:00
// process_user_login is a virtual function which should be defined in each auth file.
// It accepts username and password. The rest should be internal to the auth file.
// The auth file can set $config["auth_error"] to an informative error output or reference their internal error messages to it
// process_user_login should return false in case of errors or invalid login, the nickname if correct
2012-09-25 Miguel de Dios <miguel.dedios@artica.es>
* general/login_page.php, general/logoff.php, general/header.php,
general/login_help_dialog.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/agentes/planned_downtime.editor.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
include/styles/jquery-ui-1.8.23.custom.css,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js,
include/javascript/jquery.timeentry.js,
include/javascript/jquery.ui.droppable.js,
include/javascript/jquery.ui.draggable.js,
include/javascript/jquery.ui-timepicker-addon.js,
include/javascript/jquery.ui.resizable.js,
include/javascript/jquery.autocomplete.js,
include/javascript/jquery.ui.core.js,
include/javascript/jquery-1.8.2.js,
include/javascript/jquery.ui.dialog.js,
include/javascript/jquery.jquery-ui-1.8.23.custom.min.js,
include/functions_ui.php, index.php,
extensions/update_manager/update_pandora.php,
extensions/insert_data.php, operation/agentes/datos_agente.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php: updated the jquery and
jquery.ui, and removed old useless files. And added the jquery
library to timepicker and implemented the calls into the code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-25 17:34:36 +02:00
$nick_in_db = process_user_login ( $nick , $pass );
2012-03-12 18:40:53 +01:00
if ( $nick_in_db === false ) {
$login_ok = false ;
}
}
}
2012-04-24 15:45:02 +02:00
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
//First, if user has assigned a skin then try to use css files of
//skin subdirectory
2011-03-01 16:47:48 +01:00
$isFunctionSkins = enterprise_include_once ( 'include/functions_skins.php' );
2012-03-12 18:40:53 +01:00
if ( ! $login_ok ) {
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
enterprise_hook ( 'skins_cleanup' );
}
}
2012-04-24 15:45:02 +02:00
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
2012-03-12 18:40:53 +01:00
$exists_css = false ;
if ( $login_ok and $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
2016-03-30 13:05:08 +02:00
//Checks if user's skin is available
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
$exists_skin = enterprise_hook ( 'skins_is_path_set' );
2015-06-08 11:05:19 +02:00
if ( $exists_skin ) {
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
$skin_path = enterprise_hook ( 'skins_get_skin_path' );
2011-05-10 10:31:33 +02:00
$skin_styles = themes_get_css ( $skin_path . 'include/styles/' );
2011-03-01 16:47:48 +01:00
$exists_css = ! empty ( $skin_styles );
2012-04-24 15:45:02 +02:00
}
2011-03-01 16:47:48 +01:00
}
//If skin's css files exists then add them
2012-04-24 15:45:02 +02:00
if ( $exists_css ) {
2015-06-08 11:05:19 +02:00
foreach ( $skin_styles as $filename => $name ) {
2011-03-01 16:47:48 +01:00
$style = substr ( $filename , 0 , strlen ( $filename ) - 4 );
2016-03-30 13:05:08 +02:00
$config [ 'css' ][ $style ] = $skin_path . 'include/styles/' . $filename ;
2011-03-01 16:47:48 +01:00
}
2016-03-30 13:05:08 +02:00
}
2011-03-01 16:47:48 +01:00
//Otherwise assign default and user's css
2012-04-24 15:45:02 +02:00
else {
2011-03-01 16:47:48 +01:00
//User style should go last so it can rewrite common styles
$config [ 'css' ] = array_merge ( array (
2016-03-30 13:05:08 +02:00
" common " => " include/styles/common.css " ,
" menu " => " include/styles/menu.css " ,
2014-05-30 12:51:33 +02:00
$config [ 'style' ] => " include/styles/ " . $config [ 'style' ] . " .css " ),
$config [ 'css' ]);
2012-04-24 15:45:02 +02:00
}
2009-02-24 17:31:02 +01:00
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
2013-02-11 13:40:43 +01:00
// Add the jquery UI styles CSS
$config [ 'css' ][ 'jquery-UI' ] = " include/styles/jquery-ui-1.10.0.custom.css " ;
2013-10-11 11:19:59 +02:00
// Add the dialog styles CSS
$config [ 'css' ][ 'dialog' ] = " include/styles/dialog.css " ;
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
// Add the dialog styles CSS
$config [ 'css' ][ 'dialog' ] = " include/javascript/introjs.css " ;
2013-02-11 13:40:43 +01:00
2009-02-24 17:31:02 +01:00
//We can't load empty and we loaded (conditionally) ie
$loaded = array ( '' , 'ie' );
2012-04-24 15:45:02 +02:00
2009-02-24 17:31:02 +01:00
foreach ( $config [ 'css' ] as $name => $filename ) {
if ( in_array ( $name , $loaded ))
continue ;
array_push ( $loaded , $name );
2015-06-08 09:18:00 +02:00
$url_css = ui_get_full_url ( $filename );
$output .= '<link rel="stylesheet" href="' . $url_css . '" type="text/css" />' . " \n \t " ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
}
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
//End load CSS
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
//Load JS
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
if ( empty ( $config [ 'js' ])) {
$config [ 'js' ] = array (); //If it's empty, false or not init set array to empty just in case
}
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
2009-02-24 17:31:02 +01:00
//Pandora specific JavaScript should go first
$config [ 'js' ] = array_merge ( array ( " pandora " => " include/javascript/pandora.js " ), $config [ 'js' ]);
2013-02-11 13:40:43 +01:00
//Load base64 javascript library
$config [ 'js' ][ 'base64' ] = " include/javascript/encode_decode_base64.js " ;
//Load webchat javascript library
$config [ 'js' ][ 'webchat' ] = " include/javascript/webchat.js " ;
2014-05-30 12:51:33 +02:00
//Load qrcode library
$config [ 'js' ][ 'qrcode' ] = " include/javascript/qrcode.js " ;
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
//Load intro.js library (for bubbles and clippy)
$config [ 'js' ][ 'intro' ] = " include/javascript/intro.js " ;
$config [ 'js' ][ 'clippy' ] = " include/javascript/clippy.js " ;
2015-06-24 13:39:37 +02:00
//Load Underscore.js library
$config [ 'js' ][ 'underscore' ] = " include/javascript/underscore-min.js " ;
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
2014-05-30 12:51:33 +02:00
2009-02-24 17:31:02 +01:00
//Load other javascript
//We can't load empty
$loaded = array ( '' );
foreach ( $config [ 'js' ] as $name => $filename ) {
if ( in_array ( $name , $loaded ))
continue ;
2012-09-25 Miguel de Dios <miguel.dedios@artica.es>
* general/login_page.php, general/logoff.php, general/header.php,
general/login_help_dialog.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/agentes/planned_downtime.editor.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
include/styles/jquery-ui-1.8.23.custom.css,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js,
include/javascript/jquery.timeentry.js,
include/javascript/jquery.ui.droppable.js,
include/javascript/jquery.ui.draggable.js,
include/javascript/jquery.ui-timepicker-addon.js,
include/javascript/jquery.ui.resizable.js,
include/javascript/jquery.autocomplete.js,
include/javascript/jquery.ui.core.js,
include/javascript/jquery-1.8.2.js,
include/javascript/jquery.ui.dialog.js,
include/javascript/jquery.jquery-ui-1.8.23.custom.min.js,
include/functions_ui.php, index.php,
extensions/update_manager/update_pandora.php,
extensions/insert_data.php, operation/agentes/datos_agente.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php: updated the jquery and
jquery.ui, and removed old useless files. And added the jquery
library to timepicker and implemented the calls into the code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-25 17:34:36 +02:00
2009-02-24 17:31:02 +01:00
array_push ( $loaded , $name );
2015-06-08 09:18:00 +02:00
$url_js = ui_get_full_url ( $filename );
$output .= '<script type="text/javascript" src="' . $url_js . '"></script>' . " \n \t " ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
}
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
//End load JS
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2012-04-24 15:45:02 +02:00
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
//Load jQuery
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
2009-02-24 17:31:02 +01:00
if ( empty ( $config [ 'jquery' ])) {
$config [ 'jquery' ] = array (); //If it's empty, false or not init set array to empty just in case
}
//Pandora specific jquery should go first
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
$black_list_pages_old_jquery = array ( 'operation/gis_maps/index' );
if ( in_array ( get_parameter ( 'sec2' ), $black_list_pages_old_jquery )) {
2012-09-25 Miguel de Dios <miguel.dedios@artica.es>
* general/login_page.php, general/logoff.php, general/header.php,
general/login_help_dialog.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/agentes/planned_downtime.editor.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
include/styles/jquery-ui-1.8.23.custom.css,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js,
include/javascript/jquery.timeentry.js,
include/javascript/jquery.ui.droppable.js,
include/javascript/jquery.ui.draggable.js,
include/javascript/jquery.ui-timepicker-addon.js,
include/javascript/jquery.ui.resizable.js,
include/javascript/jquery.autocomplete.js,
include/javascript/jquery.ui.core.js,
include/javascript/jquery-1.8.2.js,
include/javascript/jquery.ui.dialog.js,
include/javascript/jquery.jquery-ui-1.8.23.custom.min.js,
include/functions_ui.php, index.php,
extensions/update_manager/update_pandora.php,
extensions/insert_data.php, operation/agentes/datos_agente.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php: updated the jquery and
jquery.ui, and removed old useless files. And added the jquery
library to timepicker and implemented the calls into the code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-25 17:34:36 +02:00
$config [ 'jquery' ] = array_merge (
array ( " jquery " => " include/javascript/jquery.js " ,
" ui " => " include/javascript/jquery.ui.core.js " ,
" dialog " => " include/javascript/jquery.ui.dialog.js " ,
" pandora " => " include/javascript/jquery.pandora.js " ),
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
$config [ 'jquery' ]);
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
}
else {
2012-09-25 Miguel de Dios <miguel.dedios@artica.es>
* general/login_page.php, general/logoff.php, general/header.php,
general/login_help_dialog.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/agentes/planned_downtime.editor.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
include/styles/jquery-ui-1.8.23.custom.css,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js,
include/javascript/jquery.timeentry.js,
include/javascript/jquery.ui.droppable.js,
include/javascript/jquery.ui.draggable.js,
include/javascript/jquery.ui-timepicker-addon.js,
include/javascript/jquery.ui.resizable.js,
include/javascript/jquery.autocomplete.js,
include/javascript/jquery.ui.core.js,
include/javascript/jquery-1.8.2.js,
include/javascript/jquery.ui.dialog.js,
include/javascript/jquery.jquery-ui-1.8.23.custom.min.js,
include/functions_ui.php, index.php,
extensions/update_manager/update_pandora.php,
extensions/insert_data.php, operation/agentes/datos_agente.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php: updated the jquery and
jquery.ui, and removed old useless files. And added the jquery
library to timepicker and implemented the calls into the code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-25 17:34:36 +02:00
$config [ 'jquery' ] = array_merge (
2013-01-31 Miguel de Dios <miguel.dedios@artica.es>
* include/styles/jquery-ui-1.10.0.custom.css,
include/styles/images/ui-*,
include/javascript/jquery.jquery-ui-1.10.0.custom.js,
include/javascript/jquery-1.9.0.js: added the last version of
jquery and jqueryUI.
* godmode/reporting/visual_console_builder.editor.js,
include/ajax/events.php, include/functions_events.php,
include/functions_reporting.php,
include/javascript/pandora_events.js,
include/javascript/jquery.scrollTo.js,
include/javascript/jquery.tablesorter.pager.js,
include/javascript/jquery.tablesorter.js, include/functions_ui.php,
extensions/update_manager/lib/functions.php,
extensions/update_manager/main.php, extensions/agents_alerts.php,
operation/events/events.php, general/login_page.php,
general/logoff.php, general/header.php,
general/login_help_dialog.php: fixes about the new jquery and
jqueryUI version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-31 17:49:08 +01:00
array ( " jquery " => " include/javascript/jquery-1.9.0.js " ,
2013-02-15 13:04:27 +01:00
" pandora " => " include/javascript/jquery.pandora.js " ,
'jquery-ui' => 'include/javascript/jquery.jquery-ui-1.10.0.custom.js' ),
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
$config [ 'jquery' ]);
}
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
2012-03-28 13:55:23 +02:00
// Include the datapicker language if exists
2013-02-15 13:04:27 +01:00
if ( file_exists ( 'include/languages/datepicker/jquery.ui.datepicker-' . $config [ 'language' ] . '.js' )) {
2012-03-28 13:55:23 +02:00
$config [ 'jquery' ][ 'datepicker_language' ] = 'include/languages/datepicker/jquery.ui.datepicker-' . $config [ 'language' ] . '.js' ;
}
2013-02-15 13:04:27 +01:00
2013-02-11 13:40:43 +01:00
// Include countdown library
$config [ 'jquery' ][ 'countdown' ] = 'include/javascript/jquery.countdown.js' ;
2013-02-15 13:04:27 +01:00
2009-02-24 17:31:02 +01:00
//Then add each script as necessary
$loaded = array ( '' );
foreach ( $config [ 'jquery' ] as $name => $filename ) {
if ( in_array ( $name , $loaded ))
continue ;
array_push ( $loaded , $name );
2015-06-08 09:18:00 +02:00
$url_js = ui_get_full_url ( $filename );
$output .= '<script type="text/javascript" src="' . $url_js . '"></script>' . " \n \t " ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
}
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
////////////////////////////////////////////////////////////////////
//End load JQuery
////////////////////////////////////////////////////////////////////
2009-03-13 12:22:07 +01:00
2012-03-05 20:25:02 +01:00
if ( $config [ 'flash_charts' ]) {
//Include the javascript for the js charts library
2013-04-10 18:59:42 +02:00
include_once ( $config [ " homedir " ] . '/include/graphs/functions_flot.php' );
2012-03-05 20:25:02 +01:00
$output .= include_javascript_dependencies_flot_graph ( true );
}
2009-03-13 12:22:07 +01:00
$output .= ' <!-- [ if gte IE 6 ] >
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
< link rel = " stylesheet " href = " include/styles/ie.css " type = " text/css " />
<! [ endif ] --> ' ;
2012-04-24 15:45:02 +02:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
$output .= $string ;
2012-04-24 15:45:02 +02:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
return $output ;
}
/**
* Callback function to add stuff to the body
*
* @ param string Callback will fill this with the current buffer .
* @ param bitfield Callback will fill this with a bitfield ( see ob_start )
*
2011-03-02 22:56:48 +01:00
* @ return string String to return to the browser
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
*/
2011-04-13 18:11:02 +02:00
function ui_process_page_body ( $string , $bitfield ) {
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
global $config ;
2012-07-18 15:25:51 +02:00
if ( isset ( $config [ 'ignore_callback' ]) &&
$config [ 'ignore_callback' ] == true ) {
2009-05-19 21:04:43 +02:00
return ;
}
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
// Show custom background
2009-05-29 11:28:48 +02:00
$output = '<body' . ( $config [ " pure " ] ? ' class="pure"' : '' ) . '>' ;
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
2015-06-08 09:18:00 +02:00
$output .= $string ;
2012-07-18 15:25:51 +02:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
$output .= '</body>' ;
2012-07-18 15:25:51 +02:00
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
return $output ;
}
2009-02-20 22:48:09 +01:00
2016-03-30 13:05:08 +02:00
/**
2009-02-20 22:48:09 +01:00
* Prints a pagination menu to browse into a collection of data .
*
* @ param int $count Number of elements in the collection .
* @ param string $url URL of the pagination links . It must include all form
* values as GET form .
* @ param int $offset Current offset for the pagination . Default value would be
* taken from $_REQUEST [ 'offset' ]
* @ param int $pagination Current pagination size . If a user requests a larger
* pagination than config [ " block_size " ]
2016-03-30 13:05:08 +02:00
* @ param bool $return Whether to return or print this
2013-09-03 10:59:19 +02:00
* @ param string $offset_name The name of parameter for the offset .
* @ param bool $print_total_items Show the text with the total items . By default true .
2017-06-01 16:54:51 +02:00
* @ param string $set_id Set id of div .
2009-02-20 22:48:09 +01:00
*
* @ return string The pagination div or nothing if no pagination needs to be done
*/
2014-10-10 14:42:50 +02:00
function ui_pagination ( $count , $url = false , $offset = 0 ,
$pagination = 0 , $return = false , $offset_name = 'offset' ,
2014-12-03 16:30:11 +01:00
$print_total_items = true , $other_class = '' ,
$script = " " ,
2017-06-01 16:54:51 +02:00
$parameter_script = array ( 'count' => '' , 'offset' => 'offset_param' ), $set_id = '' ) {
2014-10-10 14:42:50 +02:00
2009-02-20 22:48:09 +01:00
global $config ;
if ( empty ( $pagination )) {
2009-05-18 Esteban Sanchez <estebans@artica.es>
* images/award_star_bronze_1.png, images/award_star_bronze_2.png,
images/award_star_bronze_3.png, images/award_star_gold_2.png,
images/award_star_silver_1.png, images/bullet_add.png,
images/bullet_black.png, images/bullet_blue.png,
images/bullet_delete.png, images/bullet_disk.png,
images/bullet_error.png, images/bullet_go.png,
images/bullet_green.png, images/bullet_key.png,
images/bullet_white.png, images/bullet_wrench.png,
images/bullet_yellow.png, images/dot_down.png, images/exclamation.png,
images/flag_blue.png, images/flag_green.png, images/flag_yellow.png,
images/help_small.jpg, images/lock_open.png, images/mod_udp_proc.png,
images/newspaper.png, images/phone_sound.png, images/pixel_blue.png,
images/plugin_disabled.png, images/plugin_enabled.png,
images/pulpo_lupa.png, images/shield.png, images/so_beos.png,
images/status_busy.png, images/status_online.png, images/user_female.png,
images/user_gray.png, images/user_orange.png, images/user_red.png,
images/webcam.png: Deleted from repository. Unused icons.
* images/agents_group.png: Added to repository. New icon.
* godmode/agentes/configurar_agente.php,
operation/agentes/ver_agente.php: Replaced icon for agent group.
* include/functions_db.php: Replaced icons for data server. Style
correction.
* include/functions_ui.php: Cast block_size value for sanity.
* ChangeLog: Added some lines of a previous commit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1692 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-05-18 16:57:30 +02:00
$pagination = ( int ) $config [ " block_size " ];
2009-02-20 22:48:09 +01:00
}
2009-05-07 16:44:26 +02:00
if ( is_string ( $offset )) {
$offset_name = $offset ;
$offset = ( int ) get_parameter ( $offset_name );
}
2009-02-20 22:48:09 +01:00
if ( empty ( $offset )) {
2009-05-07 16:44:26 +02:00
$offset = ( int ) get_parameter ( $offset_name );
2009-02-20 22:48:09 +01:00
}
2009-05-07 16:44:26 +02:00
if ( empty ( $url )) {
2011-04-13 18:11:02 +02:00
$url = ui_get_url_refresh ( array ( $offset_name => false ));
2009-05-07 16:44:26 +02:00
}
2009-02-20 22:48:09 +01:00
2017-06-01 16:54:51 +02:00
if ( ! empty ( $set_id )){
$set_id = " id = ' $set_id ' " ;
}
2017-06-14 12:06:41 +02:00
// Pagination links for users include delete, create and other params, now not use these params, and not retry the previous action when go to pagination link.
$remove = array ( " user_del " , " disable_user " , " delete_user " );
2017-06-20 10:52:02 +02:00
$url = explode ( " & " , $url );
$finalUrl = array ();
foreach ( $url as $key => $value ) {
if ( strpos ( $value , $remove [ 0 ]) === false && strpos ( $value , $remove [ 1 ]) === false && strpos ( $value , $remove [ 2 ]) === false ){
array_push ( $finalUrl , $value );
2017-06-14 12:06:41 +02:00
}
}
2017-06-20 10:52:02 +02:00
$url = implode ( " & " , $finalUrl );
2017-06-14 12:06:41 +02:00
2014-10-10 14:42:50 +02:00
/*
URL passed render links with some parameter
2009-02-20 22:48:09 +01:00
& offset - Offset records passed to next page
2016-03-30 13:05:08 +02:00
& counter - Number of items to be blocked
Pagination needs $url to build the base URL to render links , its a base url , like
2009-02-20 22:48:09 +01:00
" http://pandora/index.php?sec=godmode&sec2=godmode/admin_access_logs "
*/
2014-10-10 14:42:50 +02:00
$block_limit = PAGINATION_BLOCKS_LIMIT ; // Visualize only $block_limit blocks
2009-02-20 22:48:09 +01:00
if ( $count <= $pagination ) {
2013-09-03 10:59:19 +02:00
if ( $print_total_items ) {
2017-06-01 16:54:51 +02:00
$output = " <div class='pagination $other_class ' $set_id > " ;
2013-09-03 10:59:19 +02:00
//Show the count of items
$output .= sprintf ( __ ( 'Total items: %s' ), $count );
// End div and layout
$output .= " </div> " ;
if ( $return === false )
echo $output ;
return $output ;
}
2009-02-20 22:48:09 +01:00
return false ;
}
2013-11-20 15:52:14 +01:00
2014-10-10 14:42:50 +02:00
$number_of_pages = ceil ( $count / $pagination );
$actual_page = floor ( $offset / $pagination );
$ini_page = floor ( $actual_page / $block_limit ) * $block_limit ;
$end_page = $ini_page + $block_limit - 1 ;
if ( $end_page > $number_of_pages ) {
$end_page = $number_of_pages - 1 ;
}
2009-02-20 22:48:09 +01:00
2017-06-01 16:54:51 +02:00
$output = " <div class='pagination $other_class ' $set_id > " ;
2013-09-03 10:59:19 +02:00
//Show the count of items
if ( $print_total_items ) {
$output .= sprintf ( __ ( 'Total items: %s' ), $count );
$output .= '<br>' ;
}
2014-10-10 14:42:50 +02:00
// Show GOTO FIRST PAGE button
if ( $number_of_pages > $block_limit ) {
2014-12-03 16:30:11 +01:00
if ( ! empty ( $script )) {
$script_modified = $script ;
$script_modified = str_replace (
$parameter_script [ 'count' ], $count , $script_modified );
$script_modified = str_replace (
$parameter_script [ 'offset' ], 0 , $script_modified );
$output .= " <a class='pagination $other_class offset_0'
href = 'javascript: $script_modified;' > " .
html_print_image ( " images/go_first.png " , true , array ( " class " => " bot " )) .
" </a> " ;
}
else {
$output .= " <a class='pagination $other_class offset_0' href=' $url & $offset_name =0'> " .
html_print_image ( " images/go_first.png " , true , array ( " class " => " bot " )) .
" </a> " ;
}
2014-04-23 09:57:40 +02:00
}
2014-10-10 14:42:50 +02:00
// Show PREVIOUS PAGE GROUP OF PAGES
// For example
// You are in the 12 page with a block of 5 pages
// << < 10 - 11 - [12] - 13 - 14 > >>
// Click in <
// Result << < 5 - 6 - 7 - 8 - [9] > >>
if ( $ini_page >= $block_limit ) {
$offset_previous_page = ( $ini_page - 1 ) * $pagination ;
2014-12-03 16:30:11 +01:00
if ( ! empty ( $script )) {
$script_modified = $script ;
$script_modified = str_replace (
$parameter_script [ 'count' ], $count , $script_modified );
$script_modified = str_replace (
$parameter_script [ 'offset' ], $offset_previous_page , $script_modified );
$output .= " <a class='pagination $other_class offset_ $offset_previous_page '
href = 'javacript: $script_modified;' > " .
html_print_image ( " images/go_previous.png " , true , array ( " class " => " bot " )) .
" </a> " ;
}
else {
$output .= " <a class='pagination $other_class offset_ $offset_previous_page ' href=' $url & $offset_name = $offset_previous_page '> " .
2014-10-10 14:42:50 +02:00
html_print_image ( " images/go_previous.png " , true , array ( " class " => " bot " )) .
" </a> " ;
2014-12-03 16:30:11 +01:00
}
2009-02-20 22:48:09 +01:00
}
2013-08-05 16:23:27 +02:00
2014-10-10 14:42:50 +02:00
// Show pages
for ( $iterator = $ini_page ; $iterator <= $end_page ; $iterator ++ ) {
$actual_page = ( int )( $offset / $pagination );
2013-04-10 09:57:54 +02:00
2014-10-10 14:42:50 +02:00
if ( $iterator == $actual_page ) {
2013-04-10 09:57:54 +02:00
$output .= " <span style='font-weight: bold;'> " ;
}
else {
$output .= " <span> " ;
2013-09-03 10:59:19 +02:00
}
2009-02-20 22:48:09 +01:00
2014-10-10 14:42:50 +02:00
$offset_page = $iterator * $pagination ;
2013-09-03 10:59:19 +02:00
2014-12-03 16:30:11 +01:00
if ( ! empty ( $script )) {
$script_modified = $script ;
$script_modified = str_replace (
$parameter_script [ 'count' ], $count , $script_modified );
$script_modified = str_replace (
$parameter_script [ 'offset' ], $offset_page , $script_modified );
$output .= " <a class='pagination $other_class offset_ $offset_page '
href = 'javascript: $script_modified;' > " ;
}
else {
$output .= " <a class='pagination $other_class offset_ $offset_page ' href=' $url & $offset_name = $offset_page '> " ;
}
2014-10-10 14:42:50 +02:00
$output .= " [ $iterator ] " ;
2013-04-10 09:57:54 +02:00
2009-02-20 22:48:09 +01:00
$output .= '</a></span>' ;
2014-10-10 14:42:50 +02:00
2009-02-20 22:48:09 +01:00
}
2014-10-10 14:42:50 +02:00
// Show NEXT PAGE GROUP OF PAGES
// For example
// You are in the 12 page with a block of 5 pages
// << < 10 - 11 - [12] - 13 - 14 > >>
// Click in >
// Result << < [15] - 16 - 17 - 18 - 19 > >>
if ( $number_of_pages - $ini_page > $block_limit ) {
$offset_next_page = ( $end_page + 1 ) * $pagination ;
2014-12-03 16:30:11 +01:00
if ( ! empty ( $script )) {
$script_modified = $script ;
$script_modified = str_replace (
$parameter_script [ 'count' ], $count , $script_modified );
$script_modified = str_replace (
$parameter_script [ 'offset' ], $offset_next_page , $script_modified );
$output .= " <a class='pagination $other_class offset_ $offset_next_page '
href = 'javascript: $script_modified;' > " .
html_print_image ( " images/go_next.png " , true , array ( " class " => " bot " )) .
" </a> " ;
}
else {
$output .= " <a class='pagination $other_class offset_ $offset_next_page ' href=' $url & $offset_name = $offset_next_page '> " .
2014-10-10 14:42:50 +02:00
html_print_image ( " images/go_next.png " , true , array ( " class " => " bot " )) .
" </a> " ;
2014-12-03 16:30:11 +01:00
}
2014-10-10 14:42:50 +02:00
}
//Show GOTO LAST PAGE button
if ( $number_of_pages > $block_limit ) {
$offset_lastpage = ( $number_of_pages - 1 ) * $pagination ;
2014-04-23 09:57:40 +02:00
2014-12-03 16:30:11 +01:00
if ( ! empty ( $script )) {
$script_modified = $script ;
$script_modified = str_replace (
$parameter_script [ 'count' ], $count , $script_modified );
$script_modified = str_replace (
$parameter_script [ 'offset' ], $offset_lastpage , $script_modified );
$output .= " <a class='pagination $other_class offset_ $offset_lastpage '
href = 'javascript: $script_modified;' > " .
html_print_image ( " images/go_last.png " , true , array ( " class " => " bot " )) .
" </a> " ;
}
else {
$output .= " <a class='pagination $other_class offset_ $offset_lastpage ' href=' $url & $offset_name = $offset_lastpage '> " .
html_print_image ( " images/go_last.png " , true , array ( " class " => " bot " )) .
" </a> " ;
}
2009-02-20 22:48:09 +01:00
}
2013-09-03 10:59:19 +02:00
2009-02-20 22:48:09 +01:00
// End div and layout
$output .= " </div> " ;
if ( $return === false )
echo $output ;
return $output ;
}
2016-03-30 13:05:08 +02:00
/**
2013-02-28 12:43:10 +01:00
* Prints only a tip button which shows a text when the user puts the mouse over it .
*
* @ param string Complete text to show in the tip
* @ param bool whether to return an output string or echo now
* @ param img displayed image
*
* @ return string HTML code if return parameter is true .
*/
function ui_print_session_action_icon ( $action , $return = false ) {
$key_icon = array (
2016-03-30 13:05:08 +02:00
'acl' => 'images/delete.png' ,
'agent' => 'images/agent.png' ,
2014-03-13 12:00:12 +01:00
'module' => 'images/module.png' ,
'alert' => 'images/bell.png' ,
'incident' => 'images/default_list.png' ,
'logon' => 'images/house.png' ,
'logoff' => 'images/house.png' ,
'massive' => 'images/config.png' ,
'hack' => 'images/application_edit.png' ,
'event' => 'images/lightning_go.png' ,
'policy' => 'images/policies.png' ,
'report' => 'images/reporting.png' ,
'file collection' => 'images/collection_col.png' ,
'user' => 'images/user_green.png' ,
'password' => 'images/lock.png' ,
'session' => 'images/heart_col.png' ,
'snmp' => 'images/snmp.png' ,
'command' => 'images/bell.png' ,
'category' => 'images/category_col.png' ,
'dashboard' => 'images/dashboard_col.png' ,
'api' => 'images/eye.png' ,
'db' => 'images/database.png' ,
'setup' => 'images/cog.png' );
2013-02-28 12:43:10 +01:00
$output = '' ;
foreach ( $key_icon as $key => $icon ) {
if ( stristr ( $action , $key ) !== false ) {
2016-09-28 16:56:05 +02:00
$output = html_print_image ( $icon , true , array ( 'title' => $action ), false , false , false , true ) . ' ' ;
2013-02-28 12:43:10 +01:00
break ;
}
}
2013-09-03 10:59:19 +02:00
2013-02-28 12:43:10 +01:00
if ( $return )
return $output ;
echo $output ;
}
2016-03-30 13:05:08 +02:00
/**
2009-02-20 22:48:09 +01:00
* Prints only a tip button which shows a text when the user puts the mouse over it .
*
* @ param string Complete text to show in the tip
* @ param bool whether to return an output string or echo now
2011-08-10 18:51:42 +02:00
* @ param img displayed image
2018-02-28 12:08:15 +01:00
* @ param bool Print image in relative way
2009-02-20 22:48:09 +01:00
*
* @ return string HTML code if return parameter is true .
*/
2018-02-28 12:08:15 +01:00
function ui_print_help_tip ( $text , $return = false , $img = 'images/tip.png' , $is_relative = false ) {
$output =
'<a href="javascript:" class="tip" >' .
2018-02-28 12:16:43 +01:00
html_print_image (
$img ,
true ,
array ( 'title' => $text ),
false ,
$is_relative && is_metaconsole ()
) .
2018-02-28 12:08:15 +01:00
'</a>' ;
2009-02-20 22:48:09 +01:00
if ( $return )
return $output ;
echo $output ;
}
2009-02-25 13:24:06 +01:00
/**
* Powerful debug function that also shows a backtrace .
*
* This functions need to have active $config [ 'debug' ] variable to work .
*
* @ param mixed Variable name to debug
2009-03-12 10:20:49 +01:00
* @ param bool Wheter to print the backtrace or not .
2009-03-27 12:33:11 +01:00
*
* @ return bool Tru if the debug was actived . False if not .
2009-02-25 13:24:06 +01:00
*/
2011-04-13 18:11:02 +02:00
function ui_debug ( $var , $backtrace = true ) {
2009-02-25 13:24:06 +01:00
global $config ;
if ( ! isset ( $config [ 'debug' ]))
2009-03-27 12:33:11 +01:00
return false ;
2009-02-25 13:24:06 +01:00
static $id = 0 ;
static $trace_id = 0 ;
$id ++ ;
2009-03-12 10:20:49 +01:00
if ( $backtrace ) {
echo '<div class="debug">' ;
echo '<a href="#" onclick="$(\'#trace-' . $id . '\').toggle ();return false;">Backtrace</a>' ;
echo '<div id="trace-' . $id . '" class="backtrace invisible">' ;
2009-02-25 13:24:06 +01:00
echo '<ol>' ;
2009-03-12 10:20:49 +01:00
$traces = debug_backtrace ();
/* Ignore debug function */
unset ( $traces [ 0 ]);
foreach ( $traces as $trace ) {
$trace_id ++ ;
2012-07-18 15:25:51 +02:00
2016-03-30 13:05:08 +02:00
/* Many classes are used to allow better customization .
2011-03-02 22:56:48 +01:00
Please , do not remove them */
2009-02-25 13:24:06 +01:00
echo '<li>' ;
2009-03-12 10:20:49 +01:00
if ( isset ( $trace [ 'class' ]))
echo '<span class="class">' . $trace [ 'class' ] . '</span>' ;
if ( isset ( $trace [ 'type' ]))
echo '<span class="type">' . $trace [ 'type' ] . '</span>' ;
echo '<span class="function">' ;
echo '<a href="#" onclick="$(\'#args-' . $trace_id . '\').toggle ();return false;">' . $trace [ 'function' ] . '()</a>' ;
echo '</span>' ;
if ( isset ( $trace [ 'file' ])) {
echo ' - <span class="filename">' ;
echo str_replace ( $config [ 'homedir' ] . '/' , '' , $trace [ 'file' ]);
echo ':' . $trace [ 'line' ] . '</span>' ;
2012-07-18 15:25:51 +02:00
}
else {
2009-03-12 10:20:49 +01:00
echo ' - <span class="filename"><em>Unknown file</em></span>' ;
}
echo '<pre id="args-' . $trace_id . '" class="invisible">' ;
echo '<div class="parameters">Parameter values:</div>' ;
echo '<ol>' ;
foreach ( $trace [ 'args' ] as $arg ) {
echo '<li>' ;
print_r ( $arg );
echo '</li>' ;
}
echo '</ol>' ;
echo '</pre>' ;
2009-02-25 16:15:14 +01:00
echo '</li>' ;
2009-02-25 13:24:06 +01:00
}
echo '</ol>' ;
2009-03-12 10:20:49 +01:00
echo '</div></div>' ;
2009-02-25 13:24:06 +01:00
}
2009-02-20 22:48:09 +01:00
2009-02-25 13:24:06 +01:00
/* Actually print the variable given */
echo '<pre class="debug">' ;
print_r ( $var );
echo '</pre>' ;
2012-07-18 15:25:51 +02:00
2009-03-27 12:33:11 +01:00
return true ;
2009-02-25 13:24:06 +01:00
}
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
/**
* Prints icon of a module type
*
* @ param int Module Type ID
* @ param bool Whether to return or print
2011-07-14 17:47:29 +02:00
* @ param bool $relative Whether to use relative path to image or not ( i . e . $relative = true : / pandora /< img_src > ) .
2011-08-08 17:41:52 +02:00
* @ param bool $options Whether to use image options like style , border or title on the icon .
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
*
* @ return string An HTML string with the icon . Printed if return is false
*/
2013-07-03 10:50:50 +02:00
function ui_print_moduletype_icon ( $id_moduletype , $return = false , $relative = false , $options = true , $src = false ) {
2009-03-24 Esteban Sanchez <estebans@artica.es>
* general/pandora_help.php: Added support for enterprise help files.
* include/javascript/pandora.js: Renamed pandora_help() to
open_help().
* include/functions_ui.php: Renamed event function on
print_help_icon(). Removed deprecated pandora_help().
* godmode/agentes/module_manager.php: Added enterprise hooks.
* godmode/agentes/module_manager_editor.php: Added categories
construction here. Added enterprise hooks.
* godmode/agentes/module_manager_editor_common.php: Replaced
deprecated pandora_help() with print_help_icon(). Moved categories
construction to module_manager_editor.
* include/config_process.php: Updated build version.
* include/styles/pandora.css: Fixed textarea height.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/massive_config.php,
godmode/agentes/massive_edit_modules.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/map_builder.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php,
godmode/setup/setup.php, operation/agentes/alerts_status.php,
operation/agentes/tactical.php,
godmode/agentes/agent_manager.php: Replaced deprecated pandora_help()
with print_help_icon().
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-24 16:38:54 +01:00
global $config ;
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
$type = db_get_row ( " ttipo_modulo " , " id_tipo " , ( int ) $id_moduletype , array ( " descripcion " , " icon " ));
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
if ( $type === false ) {
$type = array ();
2016-03-30 13:05:08 +02:00
$type [ " descripcion " ] = __ ( 'Unknown type' );
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
$type [ " icon " ] = 'b_down.png' ;
}
2009-03-24 Esteban Sanchez <estebans@artica.es>
* general/pandora_help.php: Added support for enterprise help files.
* include/javascript/pandora.js: Renamed pandora_help() to
open_help().
* include/functions_ui.php: Renamed event function on
print_help_icon(). Removed deprecated pandora_help().
* godmode/agentes/module_manager.php: Added enterprise hooks.
* godmode/agentes/module_manager_editor.php: Added categories
construction here. Added enterprise hooks.
* godmode/agentes/module_manager_editor_common.php: Replaced
deprecated pandora_help() with print_help_icon(). Moved categories
construction to module_manager_editor.
* include/config_process.php: Updated build version.
* include/styles/pandora.css: Fixed textarea height.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/massive_config.php,
godmode/agentes/massive_edit_modules.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/map_builder.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php,
godmode/setup/setup.php, operation/agentes/alerts_status.php,
operation/agentes/tactical.php,
godmode/agentes/agent_manager.php: Replaced deprecated pandora_help()
with print_help_icon().
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-24 16:38:54 +01:00
$imagepath = 'images/' . $type [ " icon " ];
if ( ! file_exists ( $config [ 'homedir' ] . '/' . $imagepath ))
$imagepath = ENTERPRISE_DIR . '/' . $imagepath ;
2013-07-03 10:50:50 +02:00
if ( $src ) {
return $imagepath ;
}
2012-07-18 15:25:51 +02:00
if ( $options ) {
2011-08-08 17:41:52 +02:00
return html_print_image ( $imagepath , $return ,
array ( " border " => 0 ,
" title " => $type [ " descripcion " ]), false , $relative );
}
2012-07-18 15:25:51 +02:00
else {
return html_print_image ( $imagepath , $return ,
false , false , $relative );
2011-08-08 17:41:52 +02:00
}
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
}
2009-03-04 16:59:00 +01:00
2011-06-27 07:56:55 +02:00
/**
* Print module max / min values for warning / critical state
*
* @ param float Max value for warning state
* @ param float Min value for warning state
* @ param float Max value for critical state
* @ param float Min value for critical state
*
* @ return string HTML string
*/
2011-07-07 Ramon Novoa <rnovoa@artica.es>
* include/functions_network_components.php,
include/functions_api.php,
include/functions_ui.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_monitores.php,
extras/pandoradb_migrate_v3.2_to_v4.0.sql,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added support for
warning/critical status regexp (works with both numeric and string
data types).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-07 13:12:15 +02:00
function ui_print_module_warn_value ( $max_warning , $min_warning , $str_warning , $max_critical , $min_critical , $str_critical ) {
2011-06-27 07:56:55 +02:00
$data = " <span style='font-size: 8px' title=' " . __ ( " Warning " ) . " : " . __ ( " Max " ) . $max_warning . " / " . __ ( " Min " ) . $min_warning . " - " . __ ( " Critical " ) . " : " . __ ( " Max " ) . $max_critical . " / " . __ ( " Min " ) . $min_critical . " '> " ;
2012-07-18 15:25:51 +02:00
2011-06-27 07:56:55 +02:00
if ( $max_warning != $min_warning ) {
$data .= format_for_graph ( $max_warning ) . " / " . format_for_graph ( $min_warning );
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
}
else {
2011-06-27 07:56:55 +02:00
$data .= __ ( " N/A " );
2016-03-30 13:05:08 +02:00
}
2012-07-18 15:25:51 +02:00
2011-06-27 07:56:55 +02:00
$data .= " - " ;
2012-07-18 15:25:51 +02:00
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* godmode/events/custom_events.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_delete_profiles.php,
godmode/massive/massive_delete_alerts.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/graphs.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php, include/functions_ui.php,
include/functions_graph.php: improved the source code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8057 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-04-25 12:16:41 +02:00
if ( $max_critical != $min_critical ) {
$data .= format_for_graph ( $max_critical ) . " / " .
format_for_graph ( $min_critical );
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
}
else {
2011-06-27 07:56:55 +02:00
$data .= __ ( " N/A " );
}
$data .= " </span> " ;
return $data ;
}
2009-03-04 16:59:00 +01:00
/**
* Format a file size from bytes to a human readable meassure .
*
* @ param int File size in bytes
* @ return string Bytes converted to a human readable meassure .
*/
2011-04-13 18:11:02 +02:00
function ui_format_filesize ( $bytes ) {
2009-03-04 16:59:00 +01:00
$bytes = ( int ) $bytes ;
$strs = array ( 'B' , 'kB' , 'MB' , 'GB' , 'TB' );
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
if ( $bytes <= 0 ) {
2009-03-04 16:59:00 +01:00
return " 0 " . $strs [ 0 ];
}
$con = 1024 ;
$log = ( int ) ( log ( $bytes , $con ));
return format_numeric ( $bytes / pow ( $con , $log ), 1 ) . ' ' . $strs [ $log ];
}
2009-04-06 13:02:05 +02:00
/**
* Returns the current path to the selected image set to show the
* status of agents and alerts .
*
* @ return array An array with the image path , image width and image height .
*/
2011-04-13 18:11:02 +02:00
function ui_get_status_images_path () {
2009-04-06 13:02:05 +02:00
global $config ;
2012-07-10 13:37:14 +02:00
2009-04-06 13:02:05 +02:00
$imageset = $config [ " status_images_set " ];
2012-07-10 13:37:14 +02:00
2016-03-30 13:05:08 +02:00
if ( strpos ( $imageset , " , " ) === false )
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$imageset .= " ,40x18 " ;
2010-03-02 Sancho Lerena <slerena@artica.es>
* include/functions_reporting.php: Solved issue with several undefined
vars.
* include/functions_servers.php: Solved issue with several undefined
vars.
* include/functions_config.php: Added metaconsola witch to readconfig.
* include/config_process.php: Update build.. is YYMMDD !
* include/functions_ui.php: Removed deprecated call to split and replaced
by preg_split.
* index.php: Activated developer mode.
* operation/agentes/estado_monitores.php: Solved small problem with modules
without history, filling missing column in table. Added headers
* godmode/alerts/configure_alert_compound.php,
operation/agentes/status_monitor.php
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_commands.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php: Removed deprecated call to include
config.php and in some cases, added new header style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-02 15:13:00 +01:00
list ( $imageset , $sizes ) = preg_split ( " / \ ,/ " , $imageset );
2012-07-10 13:37:14 +02:00
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
if ( strpos ( $sizes , " x " ) === false )
$sizes .= " x18 " ;
2010-03-02 Sancho Lerena <slerena@artica.es>
* include/functions_reporting.php: Solved issue with several undefined
vars.
* include/functions_servers.php: Solved issue with several undefined
vars.
* include/functions_config.php: Added metaconsola witch to readconfig.
* include/config_process.php: Update build.. is YYMMDD !
* include/functions_ui.php: Removed deprecated call to split and replaced
by preg_split.
* index.php: Activated developer mode.
* operation/agentes/estado_monitores.php: Solved small problem with modules
without history, filling missing column in table. Added headers
* godmode/alerts/configure_alert_compound.php,
operation/agentes/status_monitor.php
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_commands.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php: Removed deprecated call to include
config.php and in some cases, added new header style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-02 15:13:00 +01:00
list ( $imagewidth , $imageheight ) = preg_split ( " /x/ " , $sizes );
2012-07-10 13:37:14 +02:00
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$imagespath = 'images/status_sets/' . $imageset ;
2012-07-10 13:37:14 +02:00
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
return array ( $imagespath );
2009-04-06 13:02:05 +02:00
}
2009-04-20 16:00:27 +02:00
/**
* Prints an image representing a status .
*
* @ param string
2016-03-30 13:05:08 +02:00
* @ param string
2009-04-20 16:00:27 +02:00
* @ param bool Whether to return an output string or echo now ( optional , echo by default ) .
2013-04-10 09:57:54 +02:00
* @ param array options to set image attributes : I . E .: style
* @ param Path of the image , if not provided use the status path
2009-04-20 16:00:27 +02:00
*
* @ return string HTML code if return parameter is true .
*/
2013-04-10 09:57:54 +02:00
function ui_print_status_image ( $type , $title = " " , $return = false , $options = false , $path = false ) {
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( $path === false ) {
2013-04-10 09:57:54 +02:00
list ( $imagepath ) = ui_get_status_images_path ();
}
else {
$imagepath = $path ;
}
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
2012-07-18 15:25:51 +02:00
$imagepath .= " / " . $type ;
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( $options === false ) {
2010-08-12 17:26:11 +02:00
$options = array ();
}
$options [ 'title' ] = $title ;
2016-09-28 16:56:05 +02:00
return html_print_image ( $imagepath , $return , $options , false , false , false , true );
2009-04-06 13:02:05 +02:00
}
2010-08-23 18:35:25 +02:00
/**
* Print a code into a DIV and enable a toggle to show and hide it
*
* @ param string html code
* @ param string name of the link
* @ param string title of the link
* @ param bool if the div will be hidden by default ( default : true )
2012-10-09 17:51:33 +02:00
* @ param bool Whether to return an output string or echo now ( default : true )
2010-08-23 18:35:25 +02:00
*
*/
2013-05-23 17:42:32 +02:00
function ui_toggle ( $code , $name , $title = '' , $hidden_default = true , $return = false ) {
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
// Generate unique Id
$uniqid = uniqid ( '' );
// Options
2013-05-23 17:42:32 +02:00
if ( $hidden_default ) {
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
$style = 'display:none' ;
2013-11-20 15:52:14 +01:00
$image_a = html_print_image ( " images/down.png " , true , false , true );
$image_b = html_print_image ( " images/go.png " , true , false , true );
$original = " images/go.png " ;
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
}
else {
$style = '' ;
2013-11-20 15:52:14 +01:00
$image_a = html_print_image ( " images/down.png " , true , false , true );
$image_b = html_print_image ( " images/go.png " , true , false , true );
$original = " images/down.png " ;
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
}
// Link to toggle
2012-10-09 17:51:33 +02:00
$output = '' ;
2013-05-23 17:42:32 +02:00
$output .= '<a href="javascript:" id="tgl_ctrl_' . $uniqid . '">' . html_print_image ( $original , true , array ( " title " => $title , " id " => " image_ " . $uniqid )) . ' <b>' . $name . '</b></a>' ;
2015-02-04 12:42:40 +01:00
$output .= '<br />' ;
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
2015-06-12 15:50:46 +02:00
//if (!defined("METACONSOLE"))
//$output .= '<br />';
2015-04-15 11:28:07 +02:00
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
// Code into a div
2012-10-09 17:51:33 +02:00
$output .= " <div id='tgl_div_ " . $uniqid . " ' style=' " . $style . " '> \n " ;
$output .= $code ;
$output .= " </div> " ;
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
// JQuery Toggle
2013-02-04 18:21:04 +01:00
$output .= '<script type="text/javascript">' . " \n " ;
2013-05-23 17:42:32 +02:00
$output .= " var hide_tgl_ctrl_ " . $uniqid . " = " . ( int ) $hidden_default . " ; \n " ;
2013-02-04 18:21:04 +01:00
$output .= ' /* <![CDATA[ */' . " \n " ;
$output .= " $ (document).ready (function () { \n " ;
$output .= " $ ('#tgl_ctrl_ " . $uniqid . " ').click(function() { \n " ;
$output .= " if (hide_tgl_ctrl_ " . $uniqid . " ) { \n " ;
$output .= " hide_tgl_ctrl_ " . $uniqid . " = 0; \n " ;
2013-05-23 17:42:32 +02:00
$output .= " $ ('#tgl_div_ " . $uniqid . " ').toggle(); \n " ;
2013-02-04 18:21:04 +01:00
$output .= " $ ('#image_ " . $uniqid . " ').attr( { src: ' " . $image_a . " '}); \n " ;
$output .= " } \n " ;
$output .= " else { \n " ;
$output .= " hide_tgl_ctrl_ " . $uniqid . " = 1; \n " ;
2013-05-23 17:42:32 +02:00
$output .= " $ ('#tgl_div_ " . $uniqid . " ').toggle(); \n " ;
2013-02-04 18:21:04 +01:00
$output .= " $ ('#image_ " . $uniqid . " ').attr( { src: ' " . $image_b . " '}); \n " ;
$output .= " } \n " ;
$output .= " }); \n " ;
$output .= " }); \n " ;
2012-10-09 17:51:33 +02:00
$output .= '/* ]]> */' ;
$output .= '</script>' ;
if ( ! $return ) {
echo $output ;
}
else {
return $output ;
}
2010-08-23 18:35:25 +02:00
}
2009-04-21 21:03:16 +02:00
/**
* Construct and return the URL to be used in order to refresh the current page correctly .
*
2009-05-07 16:44:26 +02:00
* @ param array Extra parameters to be added to the URL . It has prevalence over
* GET and POST . False values will be ignored .
* @ param bool Whether to return the relative URL or the absolute URL . Returns
* relative by default
* @ param bool Whether to add POST values to the URL .
2012-09-10 17:51:47 +02:00
*/
2011-04-13 18:11:02 +02:00
function ui_get_url_refresh ( $params = false , $relative = true , $add_post = true ) {
2009-04-21 21:03:16 +02:00
// Agent selection filters and refresh
global $config ;
2016-03-30 13:05:08 +02:00
2015-01-08 19:05:43 +01:00
// slerena, 8/Ene/2015 - Need to put index.php on URL which have it.
if ( strpos ( $_SERVER [ 'REQUEST_URI' ], 'index.php' ) === false )
$url = '' ;
else
$url = 'index.php' ;
2009-05-07 16:44:26 +02:00
if ( sizeof ( $_REQUEST )) {
2009-04-21 21:03:16 +02:00
//Some (old) browsers don't like the ?&key=var
2009-05-07 16:44:26 +02:00
$url .= '?' ;
}
if ( ! is_array ( $params ))
$params = array ();
2009-05-22 11:08:55 +02:00
/* Avoid showing login info */
$params [ 'pass' ] = false ;
$params [ 'nick' ] = false ;
$params [ 'unnamed' ] = false ;
2009-04-21 21:03:16 +02:00
//We don't clean these variables up as they're only being passed along
foreach ( $_GET as $key => $value ) {
2009-05-07 16:44:26 +02:00
if ( isset ( $params [ $key ]))
2009-04-21 21:03:16 +02:00
continue ;
2009-05-27 13:04:11 +02:00
if ( strstr ( $key , 'create' ))
continue ;
if ( strstr ( $key , 'update' ))
continue ;
if ( strstr ( $key , 'new' ))
continue ;
if ( strstr ( $key , 'delete' ))
continue ;
2014-04-14 15:18:20 +02:00
if ( is_array ( $value )) {
foreach ( $value as $k => $v ) {
$url .= $key . " [ " . $k . ']=' . $v . '&' ;
}
}
else {
$url .= $key . '=' . $value . '&' ;
}
2009-04-21 21:03:16 +02:00
}
2009-05-07 16:44:26 +02:00
if ( $add_post ) {
foreach ( $_POST as $key => $value ) {
if ( isset ( $params [ $key ]))
continue ;
2009-05-27 13:04:11 +02:00
if ( strstr ( $key , 'create' ))
continue ;
if ( strstr ( $key , 'update' ))
continue ;
if ( strstr ( $key , 'new' ))
continue ;
if ( strstr ( $key , 'delete' ))
continue ;
2014-04-14 15:18:20 +02:00
if ( is_array ( $value )) {
foreach ( $value as $k => $v ) {
$url .= $key . " [ " . $k . ']=' . $v . '&' ;
}
}
else {
$url .= $key . '=' . $value . '&' ;
}
2009-04-21 21:03:16 +02:00
}
2009-05-07 16:44:26 +02:00
}
foreach ( $params as $key => $value ) {
if ( $value === false )
continue ;
2014-04-14 15:18:20 +02:00
if ( is_array ( $value )) {
foreach ( $value as $k => $v ) {
$url .= $key . " [ " . $k . ']=' . $v . '&' ;
}
}
else {
$url .= $key . '=' . $value . '&' ;
}
2009-05-07 16:44:26 +02:00
}
/* Removes final & */
2009-10-08 16:25:37 +02:00
$pos = strrpos ( $url , '&' , 0 );
2009-05-07 16:44:26 +02:00
if ( $pos ) {
$url = substr_replace ( $url , '' , $pos , 5 );
}
2009-10-08 16:25:37 +02:00
$url = htmlspecialchars ( $url );
2017-11-16 12:46:19 +01:00
2009-05-07 16:44:26 +02:00
if ( ! $relative ) {
2011-04-13 18:11:02 +02:00
return ui_get_full_url ( $url );
2009-04-21 21:03:16 +02:00
}
return $url ;
}
2009-05-07 16:44:26 +02:00
/**
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
* Returns a full URL in Pandora . ( with the port and https in some systems )
2009-05-07 16:44:26 +02:00
*
* An example of full URL is http :/ localhost / pandora_console / index . php ? sec = gsetup & sec2 = godmode / setup / setup
*
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
* @ param mixed $url If provided , it will be added after the index . php , but it is false boolean value , put the homeurl in the url .
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
* @ param boolean $no_proxy To avoid the proxy checks , by default it is false .
2012-10-08 21:19:58 +02:00
* @ param boolean $metaconsole_root Set the root to the metaconsole dir if the metaconsole is enabled , true by default .
2009-05-07 16:44:26 +02:00
*
* @ return string A full URL in Pandora .
*/
2012-10-08 21:19:58 +02:00
function ui_get_full_url ( $url = '' , $no_proxy = false , $add_name_php_file = false , $metaconsole_root = true ) {
2009-05-07 16:44:26 +02:00
global $config ;
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
2012-07-20 08:50:28 +02:00
$port = null ; // null means 'use the starndard port'
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
$proxy = false ; //By default Pandora FMS doesn't run across proxy.
2009-05-07 16:44:26 +02:00
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
if ( isset ( $_SERVER [ 'HTTPS' ])
&& ( $_SERVER [ 'HTTPS' ] === true
|| $_SERVER [ 'HTTPS' ] == 'on' )) {
2009-05-07 16:44:26 +02:00
$protocol = 'https' ;
2012-07-20 08:50:28 +02:00
if ( $_SERVER [ 'SERVER_PORT' ] != 443 ) {
$port = $_SERVER [ 'SERVER_PORT' ];
}
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
}
2012-07-20 08:50:28 +02:00
elseif ( $config [ 'https' ]) {
//When $config["https"] is set, enforce https
2009-05-07 16:44:26 +02:00
$protocol = 'https' ;
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
}
else {
2009-05-07 16:44:26 +02:00
$protocol = 'http' ;
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
2012-07-20 08:50:28 +02:00
if ( $_SERVER [ 'SERVER_PORT' ] != 80 ) {
$port = $_SERVER [ 'SERVER_PORT' ];
}
2009-05-07 16:44:26 +02:00
}
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
if ( ! $no_proxy ) {
//Check if the PandoraFMS runs across the proxy like as
//mod_proxy of Apache
//and check if public_url is setted
if ( ! empty ( $config [ 'public_url' ])
&& ( ! empty ( $_SERVER [ 'HTTP_X_FORWARDED_HOST' ]))) {
$fullurl = $config [ 'public_url' ];
$proxy = true ;
}
else {
$fullurl = $protocol . '://' . $_SERVER [ 'SERVER_NAME' ];
}
}
else {
$fullurl = $protocol . '://' . $_SERVER [ 'SERVER_NAME' ];
}
2009-05-07 16:44:26 +02:00
2012-07-20 08:50:28 +02:00
// using a different port than the standard
2012-09-10 15:38:05 +02:00
if ( ! $proxy ) {
// using a different port than the standard
if ( $port != null ) {
$fullurl .= " : " . $port ;
}
2009-05-07 16:44:26 +02:00
}
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/servers/manage_recontask_form.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components.php,
include/functions_ui.php, include/functions_incidents.php,
include/functions_agents.php, include/functions_alerts.php,
include/functions_messages.php, include/db/mysql.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/auth/ldap.php, operation/events/events.php,
operation/incidents/incident_detail.php, operation/tree.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/users/user_edit.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6798 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 10:54:40 +02:00
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
if ( $url === '' ) {
2012-09-10 18:30:42 +02:00
if ( $proxy ) {
$url = '' ;
}
else {
$url = $_SERVER [ 'REQUEST_URI' ];
}
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
}
elseif ( $url === false ) {
2012-09-11 21:16:11 +02:00
if ( $proxy ) {
$url = '' ;
}
else {
//Only add the home url
2012-09-28 16:06:20 +02:00
$url = $config [ 'homeurl_static' ] . '/' ;
}
2012-10-08 21:19:58 +02:00
if ( defined ( 'METACONSOLE' ) && $metaconsole_root ) {
2012-09-28 16:06:20 +02:00
$url .= 'enterprise/meta/' ;
2012-09-27 17:17:50 +02:00
}
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
}
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
elseif ( ! strstr ( $url , " .php " )) {
if ( $proxy ) {
$fullurl .= '/' ;
}
else {
2012-09-28 16:06:20 +02:00
$fullurl .= $config [ 'homeurl_static' ] . '/' ;
}
2012-10-08 21:19:58 +02:00
if ( defined ( 'METACONSOLE' ) && $metaconsole_root ) {
2012-09-28 16:06:20 +02:00
$fullurl .= 'enterprise/meta/' ;
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
}
}
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
else {
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
if ( $proxy ) {
$fullurl .= '/' ;
}
else {
2012-09-07 13:04:58 +02:00
if ( $add_name_php_file ) {
$fullurl .= $_SERVER [ 'SCRIPT_NAME' ];
}
else {
2012-09-28 16:06:20 +02:00
$fullurl .= $config [ 'homeurl_static' ] . '/' ;
2012-10-08 21:19:58 +02:00
if ( defined ( 'METACONSOLE' ) && $metaconsole_root ) {
2012-09-28 16:06:20 +02:00
$fullurl .= 'enterprise/meta/' ;
}
2012-09-07 13:04:58 +02:00
}
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
}
2009-05-07 16:44:26 +02:00
}
2014-09-26 13:10:21 +02:00
if ( substr ( $fullurl , - 1 , 1 ) === substr ( $url , 0 , 1 )) {
if ( substr ( $fullurl , - 1 , 1 ) === '/' ) {
$url = substr ( $url , 1 );
}
}
2012-09-10 17:51:47 +02:00
return $fullurl . $url ;
2009-05-07 16:44:26 +02:00
}
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
/**
* Return a standard page header ( Pandora FMS 3.1 version )
*
* @ param string Title
* @ param string Icon path
* @ param boolean Return ( false will print using a echo )
* @ param boolean help ( Help ID to print the Help link )
* @ param boolean Godmode ( false = operation mode ) .
2016-03-30 13:05:08 +02:00
* @ param string Options ( HTML code for make tabs or just a brief info string
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
* @ return string Header HTML
*/
2017-02-22 13:48:11 +01:00
function ui_print_page_header ( $title , $icon = " " , $return = false ,
$help = " " , $godmode = false , $options = " " , $modal = false ,
$message = " " , $numChars = GENERIC_SIZE_TEXT , $alias = " " ) {
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$title = io_safe_input_html ( $title );
2012-04-09 17:23:51 +02:00
if (( $icon == " " ) && ( $godmode == true )) {
2013-04-10 09:57:54 +02:00
$icon = " images/gm_setup.png " ;
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
}
2012-04-09 17:23:51 +02:00
if (( $icon == " " ) && ( $godmode == false )) {
2015-04-06 15:30:53 +02:00
$icon = " " ;
2010-03-02 20:25:51 +01:00
}
2012-04-09 17:23:51 +02:00
if ( $godmode == true ) {
2015-04-07 09:50:46 +02:00
$type = " view " ;
$type2 = " menu_tab_frame_view " ;
2010-07-26 13:08:59 +02:00
$separator_class = " separator " ;
2016-03-30 13:05:08 +02:00
}
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
else {
$type = " view " ;
$type2 = " menu_tab_frame_view " ;
2010-07-26 13:08:59 +02:00
$separator_class = " separator_view " ;
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
}
2016-09-28 13:26:58 +02:00
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
$buffer = '<div id="' . $type2 . '" style=""><div id="menu_tab_left">' ;
2016-09-28 13:26:58 +02:00
2017-02-23 09:23:27 +01:00
$buffer .= '<ul class="mn"><li class="' . $type . '">' ;
2012-04-09 17:23:51 +02:00
2017-02-07 13:58:04 +01:00
if ( strpos ( $title , " Monitoring » Services » " ) != - 1 ){
$title = str_replace ( " Monitoring » Services » Service Map » " , '' , $title );
}
2017-02-21 15:23:44 +01:00
2017-02-23 09:23:27 +01:00
$buffer .= '<span>' ;
2017-02-21 15:23:44 +01:00
if ( empty ( $alias )) $buffer .= ui_print_truncate_text ( $title , $numChars );
else $buffer .= ui_print_truncate_text ( $alias , $numChars );
2016-09-29 15:02:12 +02:00
if ( $modal && ! enterprise_installed ()){
2016-09-19 16:20:18 +02:00
$buffer .= "
2017-02-23 09:23:27 +01:00
< div id = '".$message."' class = 'publienterprise' title = 'Community version' style = 'float: right;margin-top: -2px !important;' >< img data - title = 'Enterprise version' class = 'img_help forced_title' data - use_title_for_force_title = '1' src = 'images/alert_enterprise.png' ></ div >
2016-09-19 16:20:18 +02:00
" ;
}
2018-07-13 12:30:18 +02:00
if ( ! is_metaconsole ()){
if ( $help != " " ){
$buffer .= " <div class='head_help' style='float: right; margin-top: -2px !important;'> " .
ui_print_help_icon ( $help , true , '' , 'images/help_w.png' ) . " </div> " ;
}
}
$buffer .= '</span>' ;
if ( is_metaconsole ()){
if ( $help != " " ){
2018-07-20 12:29:34 +02:00
$buffer .= " <div class='head_help'> " . ui_print_help_icon ( $help , true , '' , 'images/help_30.png' ) . " </div> " ;
2018-07-13 12:30:18 +02:00
}
}
$buffer .= '</li></ul></div>' ;
2010-02-23 17:36:24 +01:00
if ( is_array ( $options )) {
$buffer .= '<div id="menu_tab"><ul class="mn">' ;
2010-07-26 13:08:59 +02:00
foreach ( $options as $key => $option ) {
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/javascript/jquery.pandora.controls.js: improved the
functions to pass the php vars to js, now it supports json.
* include/javascript/d3.v3.js: added this library for to make
beautiful things.
* include/functions_ui.php, include/graphs/fgraph.php,
include/javascript/pandora_events.js, include/javascript/pandora.js,
include/functions_treeview.php,
include/include_graph_dependencies.php,
include/functions_categories.php, include/db/postgresql.php,
include/db/oracle.php, include/db/mysql.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8528 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-07-16 16:13:23 +02:00
if ( empty ( $option )) {
2013-04-29 16:10:22 +02:00
continue ;
}
else if ( $key === 'separator' ) {
continue ;
2013-04-24 15:16:28 +02:00
//$buffer .= '<li class='.$separator_class.'>';
//$buffer .= '</li>';
2010-11-23 13:38:08 +01:00
}
else {
2010-07-26 13:08:59 +02:00
if ( is_array ( $option )) {
2010-11-23 13:38:08 +01:00
$class = 'nomn' ;
2012-03-13 17:56:39 +01:00
if ( isset ( $option [ 'active' ])) {
if ( $option [ 'active' ]) {
$class = 'nomn_high' ;
}
2010-11-23 13:38:08 +01:00
}
2013-04-10 09:57:54 +02:00
// Tabs forced to other styles
if ( isset ( $option [ 'godmode' ]) && $option [ 'godmode' ]) {
$class .= ' tab_godmode' ;
}
else if ( isset ( $option [ 'operation' ]) && ( $option [ 'operation' ])) {
$class .= ' tab_operation' ;
}
else {
$class .= $godmode ? ' tab_godmode' : ' tab_operation' ;
}
2010-11-23 13:38:08 +01:00
$buffer .= '<li class="' . $class . '">' ;
$buffer .= $option [ 'text' ];
2015-04-15 10:26:48 +02:00
if ( isset ( $option [ 'sub_menu' ]))
$buffer .= $option [ 'sub_menu' ];
2010-11-23 13:38:08 +01:00
$buffer .= '</li>' ;
2015-04-15 10:26:48 +02:00
2010-11-23 13:38:08 +01:00
}
else {
2010-07-26 13:08:59 +02:00
$buffer .= '<li class="nomn">' ;
$buffer .= $option ;
$buffer .= '</li>' ;
}
2010-03-17 20:07:49 +01:00
}
2010-02-23 17:36:24 +01:00
}
$buffer .= '</ul></div>' ;
}
else {
2012-09-10 17:51:47 +02:00
if ( $options != " " ) {
2013-04-10 09:57:54 +02:00
$buffer .= '<div id="menu_tab"><ul class="mn"><li>' ;
2010-02-23 17:36:24 +01:00
$buffer .= $options ;
$buffer .= '</li></ul></div>' ;
}
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
}
2012-09-10 17:51:47 +02:00
2013-04-10 09:57:54 +02:00
$buffer .= '</div>' ;
2012-09-10 17:51:47 +02:00
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
if ( ! $return )
echo $buffer ;
2012-09-10 17:51:47 +02:00
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
return $buffer ;
}
2012-09-20 15:45:23 +02:00
/**
* Print a input for agent autocomplete , this input search into your
* pandora DB ( or pandoras DBs when you have metaconsole ) for agents
* that have name near to equal that you are writing into the input .
*
* This generate a lot of lines of html and javascript code .
*
* @ parameters array Array with several properties :
* - $parameters [ 'return' ] boolean , by default is false
* true - return as html string the code ( html and js )
* false - print the code .
*
* - $parameters [ 'input_name' ] the input name ( needs to get the value )
* string - The name .
* default - " agent_autocomplete_<aleatory_uniq_raw_letters/numbers> "
*
* - $parameters [ 'input_id' ] the input id ( needs to get the value )
* string - The ID .
* default - " text-<input_name> "
*
* - $parameters [ 'selectbox_group' ] the id of selectbox with the group
* string - The ID of selectbox .
* default - " " empty string
*
* - $parameters [ 'icon_image' ] the small icon to show into the input in
* the right side .
* string - The url for the image .
* default - " images/lightning.png "
*
* - $parameters [ 'value' ] The initial value to set the input .
* string - The value .
* default - " " emtpy string
*
* - $parameters [ 'show_helptip' ] boolean , by default is false
* true - print the icon out the field in side right the tiny star
* for tip .
* false - does not print
*
* - $parameters [ 'helptip_text' ] The text to show in the tooltip .
* string - The text to show into the tooltip .
* default - " Type at least two characters to search. " ( translate )
*
* - $parameters [ 'use_hidden_input_idagent' ] boolean , Use a field for
* store the id of agent from the ajax query . By default is false .
* true - Use the field for id agent and the sourcecode work with
* this .
* false - Doesn 't use the field (maybe this doesn' t exist outer )
*
* - $parameters [ 'print_hidden_input_idagent' ] boolean , Print a field
* for store the id of agent from the ajax query . By default is
* false .
* true - Print the field for id agent and the sourcecode work with
* this .
* false - Doesn 't print the field (maybe this doesn' t exist outer )
*
* - $parameters [ 'hidden_input_idagent_name' ] The name of hidden input
* for to store the id agent .
* string - The name of hidden input .
* default - " agent_autocomplete_idagent_<aleatory_uniq_raw_letters/numbers> "
*
* - $parameters [ 'hidden_input_idagent_id' ] The id of hidden input
* for to store the id agent .
* string - The id of hidden input .
* default - " hidden-<hidden_input_idagent_name> "
*
* - $parameters [ 'hidden_input_idagent_value' ] The initial value to set
* the input id agent for store the id agent .
* string - The value .
* default - 0
*
* - $parameters [ 'size' ] The size in characters for the input of agent .
* string - A number of characters .
* default - 30
*
* - $parameters [ 'maxlength' ] The max characters that can store the
* input of agent .
* string - A number of characters max to store
* default - 100
*
* - $parameters [ 'disabled' ] Set as disabled the input of agent . By
* default is false
* true - Set disabled the input of agent .
* false - Set enabled the input of agent .
*
* - $parameters [ 'selectbox_id' ] The id of select box that stores the
* list of modules of agent select .
* string - The id of select box .
* default - " id_agent_module "
*
* - $parameters [ 'add_none_module' ] Boolean , add the list of modules
* the " none " entry , with value 0. By default is true
* true - add the none entry .
* false - does not add the none entry .
*
* - $parameters [ 'none_module_text' ] Boolean , add the list of modules
* the " none " entry , with value 0.
* string - The text to put for none module for example " select a
* module "
* default - " none " ( translate )
*
* - $parameters [ 'print_input_server' ] Boolean , print the hidden field
* to store the server ( metaconsole ) . By default false .
* true - Print the hidden input for the server .
* false - Does not print .
*
* - $parameters [ 'use_input_server' ] Boolean , use the hidden field
* to store the server ( metaconsole ) . By default false .
* true - Use the hidden input for the server .
* false - Does not print .
*
* - $parameters [ 'input_server_name' ] The name for hidden field to
* store the server .
* string - The name of field for server .
* default - " server_<aleatory_uniq_raw_letters/numbers> "
*
* - $parameters [ 'input_server_id' ] The id for hidden field to store
* the server .
* string - The id of field for server .
* default - " hidden-<input_server_name> "
*
* - $parameters [ 'input_server_value' ] The value to store into the
* field server .
* string - The name of server .
* default - " " empty string
*
* - $parameters [ 'metaconsole_enabled' ] Boolean , set the sourcecode for
* to make some others things that run of without metaconsole . By
* default false .
* true - Set the gears for metaconsole .
* false - Run as without metaconsole .
*
* - $parameters [ 'javascript_ajax_page' ] The page to send the ajax
* queries .
* string - The url to ajax page , remember the url must be into your
* domain ( ajax security ) .
* default - " ajax.php "
*
* - $parameters [ 'javascript_function_action_after_select' ] The name of
* function to call after the user select a agent into the list in
* the autocomplete field .
* string - The name of function .
* default - " "
*
* - $parameters [ 'javascript_function_action_after_select_js_call' ] The
* call of this function to call after user select a agent into the
2016-03-30 13:05:08 +02:00
* list in the autocomplete field . Instead the
2012-09-20 15:45:23 +02:00
* $parameters [ 'javascript_function_action_after_select' ], this is
* overwrite the previous element . And this is necesary when you need
* to set some params in your custom function .
* string - The call line as javascript code .
* default - " "
*
* - $parameters [ 'javascript_function_action_into_source' ] The source
* code as block string to call when the autocomplete starts to get
* the data from ajax .
* string - A huge string with your function as javascript .
* default - " "
*
* - $parameters [ 'javascript' ] Boolean , set the autocomplete agent to
* use javascript or enabled javascript . By default true .
* true - Enabled the javascript .
* false - Disabled the javascript .
*
* - $parameters [ 'javascript_is_function_select' ] Boolean , set to
* enable to call a function when user select a agent in the
* autocomplete list . By default false .
* true - Enabled this feature .
* false - Disabled this feature .
*
* - $parameters [ 'javascript_code_function_select' ] The name of
* function to call when user select a agent in the autocomplete
* list .
* string - The name of function but remembers this function pass
* the parameter agent_name .
* default - " function_select_<input_name> "
*
* - $parameters [ 'javascript_name_function_select' ] The source
* code as block string to call when user select a agent into the
* list in the autocomplete field . Althought use this element , you
* need use the previous parameter to set name of your custom
* function or call line .
* string - A huge string with your function as javascript .
* default - A lot of lines of source code into a string , please this
* lines you can read in the source code of function .
*
* - $parameters [ 'javascript_change_ajax_params' ] The params to pass in
* the ajax query for the list of agents .
* array - The associative array with the key and value to pass in
* the ajax query .
* default - A lot of lines of source code into a string , please this
* lines you can read in the source code of function .
*
* - $parameters [ 'javascript_function_change' ] The source code as block
* string with all javascript code to run autocomplete field .
* string - The source code javascript into a string .
* default - A lot of lines of source code into a string , please this
* lines you can read in the source code of function .
*
* - $parameters [ 'javascript_document_ready' ] Boolean , set the
* javascript sourcecode to run with the document is ready . By
* default is true .
* true - Set to run when document is ready .
* false - Not set to run .
*
* - $parameters [ 'javascript_tags' ] Boolean , print the html tags for
* javascript . By default is true .
* true - Print the javascript tags .
* false - Doesn ' t print the tags .
*
* - $parameters [ 'javascript_tags' ] Boolean , print the html tags for
* javascript . By default is true .
* true - Print the javascript tags .
* false - Doesn ' t print the tags .
*
* @ return string HTML code if return parameter is true .
*/
2012-09-12 17:53:58 +02:00
function ui_print_agent_autocomplete_input ( $parameters ) {
global $config ;
//Normalize and extract the data from $parameters
//------------------------------------------------------------------
$return = false ; //Default value
if ( isset ( $parameters [ 'return' ])) {
$return = $parameters [ 'return' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$input_name = uniqid ( 'agent_autocomplete_' ); //Default value
if ( isset ( $parameters [ 'input_name' ])) {
$input_name = $parameters [ 'input_name' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$input_id = 'text-' . $input_name ; //Default value
if ( isset ( $parameters [ 'input_id' ])) {
$input_id = $parameters [ 'input_id' ];
}
2013-03-04 15:31:30 +01:00
2012-09-13 19:47:21 +02:00
$selectbox_group = '' ; //Default value
if ( isset ( $parameters [ 'selectbox_group' ])) {
$selectbox_group = $parameters [ 'selectbox_group' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
//Default value
2017-02-28 19:17:38 +01:00
$icon_image = html_print_image ( 'images/search_agent.png' , true , false , true );
2012-09-12 17:53:58 +02:00
if ( isset ( $parameters [ 'icon_image' ])) {
$icon_image = $parameters [ 'icon_image' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$value = '' ; //Default value
if ( isset ( $parameters [ 'value' ])) {
$value = $parameters [ 'value' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$show_helptip = true ; //Default value
if ( isset ( $parameters [ 'show_helptip' ])) {
$show_helptip = $parameters [ 'show_helptip' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$helptip_text = __ ( " Type at least two characters to search. " ); //Default value
if ( isset ( $parameters [ 'helptip_text' ])) {
$helptip_text = $parameters [ 'helptip_text' ];
}
2013-03-04 15:31:30 +01:00
2012-09-14 19:54:33 +02:00
$use_hidden_input_idagent = false ; //Default value
if ( isset ( $parameters [ 'use_hidden_input_idagent' ])) {
$use_hidden_input_idagent = $parameters [ 'use_hidden_input_idagent' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$print_hidden_input_idagent = false ; //Default value
if ( isset ( $parameters [ 'print_hidden_input_idagent' ])) {
$print_hidden_input_idagent = $parameters [ 'print_hidden_input_idagent' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$hidden_input_idagent_name = uniqid ( 'agent_autocomplete_idagent_' ); //Default value
if ( isset ( $parameters [ 'hidden_input_idagent_name' ])) {
$hidden_input_idagent_name = $parameters [ 'hidden_input_idagent_name' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$hidden_input_idagent_id = 'hidden-' . $input_name ; //Default value
if ( isset ( $parameters [ 'hidden_input_idagent_id' ])) {
2012-09-14 19:54:33 +02:00
$hidden_input_idagent_id = $parameters [ 'hidden_input_idagent_id' ];
2012-09-12 17:53:58 +02:00
}
2012-11-05 14:03:09 +01:00
$hidden_input_idagent_value = ( int ) get_parameter ( $hidden_input_idagent_name , 0 ); //Default value
2012-09-12 17:53:58 +02:00
if ( isset ( $parameters [ 'hidden_input_idagent_value' ])) {
$hidden_input_idagent_value = $parameters [ 'hidden_input_idagent_value' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$size = 30 ; //Default value
if ( isset ( $parameters [ 'size' ])) {
$size = $parameters [ 'size' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$maxlength = 100 ; //Default value
if ( isset ( $parameters [ 'maxlength' ])) {
$maxlength = $parameters [ 'maxlength' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$disabled = false ; //Default value
if ( isset ( $parameters [ 'disabled' ])) {
$disabled = $parameters [ 'disabled' ];
}
2013-03-04 15:31:30 +01:00
2012-09-13 19:47:21 +02:00
$selectbox_id = 'id_agent_module' ; //Default value
if ( isset ( $parameters [ 'selectbox_id' ])) {
$selectbox_id = $parameters [ 'selectbox_id' ];
}
2013-03-04 15:31:30 +01:00
2012-09-13 19:47:21 +02:00
$add_none_module = true ; //Default value
if ( isset ( $parameters [ 'add_none_module' ])) {
$add_none_module = $parameters [ 'add_none_module' ];
}
2013-03-04 15:31:30 +01:00
2012-09-14 19:54:33 +02:00
$none_module_text = '--' ; //Default value
if ( isset ( $parameters [ 'none_module_text' ])) {
$none_module_text = $parameters [ 'none_module_text' ];
}
2013-03-04 15:31:30 +01:00
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$print_input_server = false ; //Default value
if ( isset ( $parameters [ 'print_input_server' ])) {
$print_input_server = $parameters [ 'print_input_server' ];
}
2013-03-04 15:31:30 +01:00
$print_input_id_server = false ; //Default value
if ( isset ( $parameters [ 'print_input_id_server' ])) {
$print_input_id_server = $parameters [ 'print_input_id_server' ];
}
2012-09-14 19:54:33 +02:00
$use_input_server = false ; //Default value
if ( isset ( $parameters [ 'use_input_server' ])) {
$use_input_server = $parameters [ 'use_input_server' ];
}
2013-03-04 15:31:30 +01:00
$use_input_id_server = false ; //Default value
if ( isset ( $parameters [ 'use_input_id_server' ])) {
$use_input_id_server = $parameters [ 'use_input_id_server' ];
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$input_server_name = uniqid ( 'server_' ); //Default value
2012-09-20 15:45:23 +02:00
if ( isset ( $parameters [ 'input_server_name' ])) {
$input_server_name = $parameters [ 'input_server_name' ];
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
}
2013-03-04 15:31:30 +01:00
$input_id_server_name = uniqid ( 'server_' ); //Default value
2013-07-31 19:18:11 +02:00
if ( isset ( $parameters [ 'input_id_server_name' ])) {
$input_id_server_name = $parameters [ 'input_id_server_name' ];
2013-03-04 15:31:30 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$input_server_id = 'hidden-' . $input_server_name ; //Default value
2012-09-14 19:54:33 +02:00
if ( isset ( $parameters [ 'input_server_id' ])) {
$input_server_id = $parameters [ 'input_server_id' ];
}
2013-03-04 15:31:30 +01:00
$input_id_server_id = 'hidden-' . $input_id_server_name ; //Default value
if ( isset ( $parameters [ 'input_id_server_id' ])) {
$input_id_server_id = $parameters [ 'input_id_server_id' ];
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$input_server_value = '' ; //Default value
if ( isset ( $parameters [ 'input_server_value' ])) {
$input_server_value = $parameters [ 'input_server_value' ];
}
2013-03-04 15:31:30 +01:00
$input_id_server_value = '' ; //Default value
if ( isset ( $parameters [ 'input_id_server_value' ])) {
$input_id_server_value = $parameters [ 'input_id_server_value' ];
}
2017-04-21 14:32:31 +02:00
$from_ux_transaction = '' ; //Default value
if ( isset ( $parameters [ 'from_ux' ])) {
$from_ux_transaction = $parameters [ 'from_ux' ];
}
2017-08-23 17:21:15 +02:00
$from_wux_transaction = '' ; //Default value
if ( isset ( $parameters [ 'from_wux' ])) {
$from_wux_transaction = $parameters [ 'from_wux' ];
}
2017-09-05 12:35:21 +02:00
$cascade_protection = false ; //Default value
if ( isset ( $parameters [ 'cascade_protection' ])) {
$cascade_protection = $parameters [ 'cascade_protection' ];
}
2013-03-04 15:31:30 +01:00
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$metaconsole_enabled = false ; //Default value
if ( isset ( $parameters [ 'metaconsole_enabled' ])) {
$metaconsole_enabled = $parameters [ 'metaconsole_enabled' ];
}
2012-12-31 09:01:28 +01:00
else {
// If metaconsole_enabled param is not setted then pick source configuration
if ( defined ( 'METACONSOLE' ))
$metaconsole_enabled = true ;
else
$metaconsole_enabled = false ;
}
2017-11-10 15:03:52 +01:00
$get_only_string_modules = false ;
if ( isset ( $parameters [ 'get_only_string_modules' ])) {
$get_only_string_modules = true ;
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
2013-03-04 15:31:30 +01:00
$spinner_image = html_print_image ( 'images/spinner.gif' , true , false , true );
if ( isset ( $parameters [ 'spinner_image' ])) {
$spinner_image = $parameters [ 'spinner_image' ];
}
2012-09-12 17:53:58 +02:00
// Javascript configurations
2012-11-02 20:18:20 +01:00
//------------------------------------------------------------------
2012-12-11 18:39:48 +01:00
$javascript_ajax_page = ui_get_full_url ( 'ajax.php' , false , false , false , false ); //Default value
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( isset ( $parameters [ 'javascript_ajax_page' ])) {
$javascript_ajax_page = $parameters [ 'javascript_ajax_page' ];
}
2013-03-04 15:31:30 +01:00
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
$javascript_function_action_after_select = '' ; //Default value
$javascript_function_action_after_select_js_call = '' ; //Default value
if ( isset ( $parameters [ 'javascript_function_action_after_select' ])) {
$javascript_function_action_after_select = $parameters [ 'javascript_function_action_after_select' ];
$javascript_function_action_after_select_js_call =
$javascript_function_action_after_select . '();' ;
}
2013-03-04 15:31:30 +01:00
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
if ( isset ( $parameters [ 'javascript_function_action_after_select_js_call' ])) {
if ( $javascript_function_action_after_select_js_call !=
$parameters [ 'javascript_function_action_after_select_js_call' ]) {
$javascript_function_action_after_select_js_call =
$parameters [ 'javascript_function_action_after_select_js_call' ];
}
}
2013-03-04 15:31:30 +01:00
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
$javascript_function_action_into_source = '' ; //Default value
$javascript_function_action_into_source_js_call = '' ; //Default value
if ( isset ( $parameters [ 'javascript_function_action_into_source' ])) {
$javascript_function_action_into_source = $parameters [ 'javascript_function_action_into_source' ];
$javascript_function_action_into_source_js_call =
$javascript_function_action_into_source . '();' ;
}
2013-03-04 15:31:30 +01:00
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
if ( isset ( $parameters [ 'javascript_function_action_into_source_js_call' ])) {
if ( $javascript_function_action_into_source_js_call !=
$parameters [ 'javascript_function_action_into_source_js_call' ]) {
$javascript_function_action_into_source_js_call =
$parameters [ 'javascript_function_action_into_source_js_call' ];
}
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$javascript = true ; //Default value
if ( isset ( $parameters [ 'javascript' ])) {
$javascript = $parameters [ 'javascript' ];
}
2017-10-31 16:39:58 +01:00
$get_order_json = false ;
if ( isset ( $parameters [ 'get_order_json' ])) {
$get_order_json = true ;
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$javascript_is_function_select = false ; //Default value
if ( isset ( $parameters [ 'javascript_is_function_select' ])) {
$javascript_is_function_select = $parameters [ 'javascript_is_function_select' ];
}
2013-03-04 15:31:30 +01:00
2012-09-12 17:53:58 +02:00
$javascript_name_function_select = 'function_select_' . $input_name ; //Default value
if ( isset ( $parameters [ 'javascript_name_function_select' ])) {
$javascript_name_function_select = $parameters [ 'javascript_name_function_select' ];
}
2017-04-21 14:32:31 +02:00
if ( $from_ux_transaction != " " ) {
$javascript_code_function_select = '
function function_select_ ' . $input_name . ' ( agent_name ) {
$ ( " #' . $selectbox_id . ' " ) . empty ();
var inputs = [];
inputs . push ( " id_agent= " + $ ( " #' . $hidden_input_idagent_id . ' " ) . val ());
inputs . push ( " get_agent_transactions=1 " );
inputs . push ( " page=enterprise/include/ajax/ux_transaction.ajax " );
jQuery . ajax ({
data : inputs . join ( " & " ),
type : " POST " ,
url : action = " ' . $javascript_ajax_page . ' " ,
dataType : " json " ,
success : function ( data ) {
if ( data ) {
2017-08-23 17:21:15 +02:00
$ ( " #' . $selectbox_id . ' " ) . append ( $ ( " <option value=0>None</option> " ));
jQuery . each ( data , function ( id , value ) {
$ ( " #' . $selectbox_id . ' " ) . append ( $ ( " <option value= " + id + " > " + value + " </option> " ));
});
}
}
});
return false ;
}
' ;
}
elseif ( $from_wux_transaction != " " ) {
$javascript_code_function_select = '
function function_select_ ' . $input_name . ' ( agent_name ) {
$ ( " #' . $selectbox_id . ' " ) . empty ();
var inputs = [];
inputs . push ( " id_agent= " + $ ( " #' . $hidden_input_idagent_id . ' " ) . val ());
inputs . push ( " get_agent_transactions=1 " );
inputs . push ( " page=enterprise/include/ajax/wux_transaction.ajax " );
jQuery . ajax ({
data : inputs . join ( " & " ),
type : " POST " ,
url : action = " ' . $javascript_ajax_page . ' " ,
dataType : " json " ,
success : function ( data ) {
if ( data ) {
2017-04-21 14:32:31 +02:00
$ ( " #' . $selectbox_id . ' " ) . append ( $ ( " <option value=0>None</option> " ));
jQuery . each ( data , function ( id , value ) {
$ ( " #' . $selectbox_id . ' " ) . append ( $ ( " <option value= " + id + " > " + value + " </option> " ));
});
}
}
});
return false ;
}
' ;
}
else {
$javascript_code_function_select = '
2012-09-12 17:53:58 +02:00
function function_select_ ' . $input_name . ' ( agent_name ) {
$ ( " #' . $selectbox_id . ' " ) . empty ();
2012-09-13 19:47:21 +02:00
2012-09-12 17:53:58 +02:00
var inputs = [];
inputs . push ( " agent_name= " + agent_name );
2015-08-04 12:49:21 +02:00
inputs . push ( " delete_pending=0 " );
2012-09-12 17:53:58 +02:00
inputs . push ( " get_agent_modules_json=1 " );
inputs . push ( " page=operation/agentes/ver_agente " );
2012-09-13 19:47:21 +02:00
2012-12-11 18:39:48 +01:00
if ( ' . ((int) !$metaconsole_enabled) . ' ) {
inputs . push ( " force_local_modules=1 " );
2013-01-31 Miguel de Dios <miguel.dedios@artica.es>
* include/styles/jquery-ui-1.10.0.custom.css,
include/styles/images/ui-*,
include/javascript/jquery.jquery-ui-1.10.0.custom.js,
include/javascript/jquery-1.9.0.js: added the last version of
jquery and jqueryUI.
* godmode/reporting/visual_console_builder.editor.js,
include/ajax/events.php, include/functions_events.php,
include/functions_reporting.php,
include/javascript/pandora_events.js,
include/javascript/jquery.scrollTo.js,
include/javascript/jquery.tablesorter.pager.js,
include/javascript/jquery.tablesorter.js, include/functions_ui.php,
extensions/update_manager/lib/functions.php,
extensions/update_manager/main.php, extensions/agents_alerts.php,
operation/events/events.php, general/login_page.php,
general/logoff.php, general/header.php,
general/login_help_dialog.php: fixes about the new jquery and
jqueryUI version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-31 17:49:08 +01:00
}
2017-10-31 16:39:58 +01:00
if ( ' . ((int) $get_order_json) . ' ) {
inputs . push ( " get_order_json=1 " );
}
2017-11-10 15:03:52 +01:00
if ( ' . ((int) $get_only_string_modules) . ' ) {
inputs . push ( " get_only_string_modules=1 " );
}
2012-12-11 18:39:48 +01:00
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( ' . ((int)$metaconsole_enabled) . ' ) {
2013-03-04 15:31:30 +01:00
if (( ' . ((int)$use_input_server) . ' )
|| ( ' . ((int)$print_input_server) . ' )) {
inputs . push ( " server_name= " + $ ( " #' . $input_server_id . ' " ) . val ());
}
if (( ' . ((int)$use_input_id_server) . ' )
|| ( ' . ((int)$print_input_id_server) . ' )) {
inputs . push ( " server_id= " + $ ( " #' . $input_id_server_id . ' " ) . val ());
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
}
if (( ' . ((int)$print_hidden_input_idagent) . ' )
2012-11-02 20:18:20 +01:00
|| ( ' . ((int)$use_hidden_input_idagent) . ' )) {
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
inputs . push ( " id_agent= " + $ ( " #' . $hidden_input_idagent_id . ' " ) . val ());
}
2012-09-12 17:53:58 +02:00
jQuery . ajax ({
data : inputs . join ( " & " ),
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
type : " POST " ,
url : action = " ' . $javascript_ajax_page . ' " ,
2012-09-12 17:53:58 +02:00
dataType : " json " ,
success : function ( data ) {
2012-09-13 19:47:21 +02:00
if ( ' . ((int)$add_none_module) . ' ) {
$ ( " #' . $selectbox_id . ' " )
. append ( $ ( " <option></option> " )
2012-09-14 19:54:33 +02:00
. attr ( " value " , 0 ) . text ( " ' . $none_module_text . ' " ));
2012-09-13 19:47:21 +02:00
}
2012-09-12 17:53:58 +02:00
jQuery . each ( data , function ( i , val ) {
s = js_html_entity_decode ( val [ " nombre " ]);
$ ( " #' . $selectbox_id . ' " )
. append ( $ ( " <option></option> " )
. attr ( " value " , val [ " id_agente_modulo " ]) . text ( s ));
});
2017-09-05 12:35:21 +02:00
if ( '. (int)$cascade_protection .' == 0 ){
$ ( " #' . $selectbox_id . ' " ) . enable ();
}
2012-09-12 17:53:58 +02:00
$ ( " #' . $selectbox_id . ' " ) . fadeIn ( " normal " );
}
});
return false ;
}
' ;
2017-04-21 14:32:31 +02:00
}
2012-09-12 17:53:58 +02:00
if ( isset ( $parameters [ 'javascript_code_function_select' ])) {
$javascript_code_function_select = $parameters [ 'javascript_code_function_select' ];
}
2013-03-04 15:31:30 +01:00
//============ INIT javascript_change_ajax_params ==================
2012-09-12 17:53:58 +02:00
//Default value
2012-09-13 19:47:21 +02:00
$javascript_page = 'include/ajax/agent' ;
2012-09-12 17:53:58 +02:00
if ( isset ( $parameters [ 'javascript_page' ])) {
$javascript_page = $parameters [ 'javascript_page' ];
}
2013-03-04 15:31:30 +01:00
$javascript_change_ajax_params_original = array (
'page' => '"' . $javascript_page . '"' ,
2012-12-20 11:09:52 +01:00
'search_agents' => 1 ,
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
'id_group' => ' function () {
var group_id = 0 ;
if ( ' . ((int)!empty($selectbox_group)) . ' ) {
group_id = $ ( " #' . $selectbox_group . ' " ) . val ();
}
return group_id ;
} ' ,
'q' => 'term' );
2013-03-04 15:31:30 +01:00
2012-12-11 18:39:48 +01:00
if ( ! $metaconsole_enabled ) {
$javascript_change_ajax_params_original [ 'force_local' ] = 1 ;
2013-02-06 15:03:32 +01:00
}
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
if ( isset ( $parameters [ 'javascript_change_ajax_params' ])) {
$javascript_change_ajax_params = array ();
$found_page = false ;
foreach ( $parameters [ 'javascript_change_ajax_params' ] as $key => $param_ajax ) {
if ( $key == 'page' ) {
$found_page = true ;
if ( $javascript_page != $param_ajax ) {
$javascript_change_ajax_params [ 'page' ] = $param_ajax ;
}
else {
$javascript_change_ajax_params [ 'page' ] = $javascript_page ;
}
}
else {
$javascript_change_ajax_params [ $key ] = $param_ajax ;
}
}
if ( ! $found_page ) {
$javascript_change_ajax_params [ 'page' ] = $javascript_page ;
}
}
else {
$javascript_change_ajax_params = $javascript_change_ajax_params_original ;
}
$first = true ;
$javascript_change_ajax_params_text = 'var data_params = {' ;
foreach ( $javascript_change_ajax_params as $key => $param_ajax ) {
if ( ! $first ) $javascript_change_ajax_params_text .= " , \n " ;
else $first = false ;
$javascript_change_ajax_params_text .= '"' . $key . '":' . $param_ajax ;
}
$javascript_change_ajax_params_text .= '};' ;
2013-03-04 15:31:30 +01:00
//============ END javascript_change_ajax_params ===================
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
2012-09-20 15:45:23 +02:00
$javascript_function_change = '' ; //Default value
2012-09-12 17:53:58 +02:00
$javascript_function_change .= '
function set_functions_change_autocomplete_ ' . $input_name . ' () {
2012-09-20 15:45:23 +02:00
var cache_ ' . $input_name . ' = {};
2012-09-12 17:53:58 +02:00
$ ( " #' . $input_id . ' " ) . autocomplete ({
minLength : 2 ,
source : function ( request , response ) {
var term = request . term ; //Word to search
2018-08-17 15:03:24 +02:00
' . $javascript_change_ajax_params_text . '
var groupId = data_params . id_group ();
// Index cache by group Id
if ( cache_ ' . $input_name . ' [ groupId ] == null ) {
cache_ ' . $input_name . ' [ groupId ] = {};
}
2012-09-12 17:53:58 +02:00
2012-09-20 15:45:23 +02:00
//Set loading
$ ( " #' . $input_id . ' " )
. css ( " background " , " url( \" ' . $spinner_image . ' \" ) right center no-repeat " );
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
//Function to call when the source
if ( ' . ((int)!empty($javascript_function_action_into_source_js_call)) . ' ) {
' . $javascript_function_action_into_source_js_call . '
}
2013-06-10 13:54:58 +02:00
//==== CACHE CODE ==================================
2012-09-20 15:45:23 +02:00
//Check the cache
var found = false ;
2018-08-17 15:03:24 +02:00
if ( term in cache_ ' . $input_name . ' [ groupId ]) {
response ( cache_ ' . $input_name . ' [ groupId ][ term ]);
2012-09-20 15:45:23 +02:00
//Set icon
$ ( " #' . $input_id . ' " )
. css ( " background " , " url( \" ' . $icon_image . ' \" ) right center no-repeat " );
return ;
}
else {
//Check if other terms cached start with same
//letters.
2013-03-04 15:31:30 +01:00
//TODO: At the moment DISABLED CODE
2012-09-20 15:45:23 +02:00
/*
for ( i = 1 ; i < term . length ; i ++ ) {
var term_match = term . substr ( 0 , term . length - i );
2018-08-17 15:03:24 +02:00
$ . each ( cache_ ' . $input_name . ' [ groupId ], function ( oldterm , olddata ) {
2012-09-20 15:45:23 +02:00
var pattern = new RegExp ( " ^ " + term_match + " .* " , " gi " );
if ( oldterm . match ( pattern )) {
2018-08-17 15:03:24 +02:00
response ( cache_ ' . $input_name . ' [ groupId ][ oldterm ]);
2012-09-20 15:45:23 +02:00
found = true ;
return ;
}
});
2013-06-10 13:54:58 +02:00
if ( found ) {
2012-09-20 15:45:23 +02:00
break ;
2013-06-10 13:54:58 +02:00
}
2012-09-20 15:45:23 +02:00
}
*/
}
2013-06-10 13:54:58 +02:00
//==================================================
2012-09-20 15:45:23 +02:00
if ( found ) {
//Set icon
$ ( " #' . $input_id . ' " )
. css ( " background " , " url( \" ' . $icon_image . ' \" ) right center no-repeat " );
2013-06-10 13:54:58 +02:00
select_item_click = 0 ;
2012-09-20 15:45:23 +02:00
return ;
}
2012-09-12 17:53:58 +02:00
jQuery . ajax ({
data : data_params ,
type : " POST " ,
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
url : action = " ' . $javascript_ajax_page . ' " ,
2012-09-12 17:53:58 +02:00
dataType : " json " ,
success : function ( data ) {
2018-08-17 15:03:24 +02:00
cache_ ' . $input_name . ' [ groupId ][ term ] = data ; //Save the cache
2012-09-20 15:45:23 +02:00
2012-09-12 17:53:58 +02:00
response ( data );
2012-09-20 15:45:23 +02:00
//Set icon
$ ( " #' . $input_id . ' " )
2012-11-02 20:18:20 +01:00
. css ( " background " ,
" url( \" ' . $icon_image . ' \" ) right center no-repeat " );
2012-09-20 15:45:23 +02:00
2013-06-10 13:54:58 +02:00
select_item_click = 0 ;
2012-09-12 17:53:58 +02:00
return ;
}
});
return ;
},
2013-04-17 16:45:17 +02:00
//---END source-----------------------------------------
2013-06-10 13:54:58 +02:00
2012-09-12 17:53:58 +02:00
select : function ( event , ui ) {
2016-10-06 12:10:10 +02:00
var agent_name = ui . item . alias ;
2012-09-13 19:47:21 +02:00
var agent_id = ui . item . id ;
2013-03-04 15:31:30 +01:00
var server_name = " " ;
var server_id = " " ;
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( ' . ((int)$metaconsole_enabled) . ' ) {
server_name = ui . item . server ;
}
else {
server_name = ui . item . ip ;
}
2013-03-04 15:31:30 +01:00
if (( ' . ((int)$use_input_id_server) . ' )
|| ( ' . ((int)$print_input_id_server) . ' )) {
server_id = ui . item . id_server ;
}
2016-03-30 13:05:08 +02:00
2012-09-12 17:53:58 +02:00
//Put the name
$ ( this ) . val ( agent_name );
2012-09-14 19:54:33 +02:00
if (( ' . ((int)$print_hidden_input_idagent) . ' )
|| ( ' . ((int)$use_hidden_input_idagent) . ' )) {
2012-09-13 19:47:21 +02:00
$ ( " #' . $hidden_input_idagent_id . ' " ) . val ( agent_id );
}
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
//Put the server id into the hidden input
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if (( ' . ((int)$use_input_server) . ' )
|| ( ' . ((int)$print_input_server) . ' )) {
2012-09-14 19:54:33 +02:00
$ ( " #' . $input_server_id . ' " ) . val ( server_name );
}
2013-03-04 15:31:30 +01:00
//Put the server id into the hidden input
if (( ' . ((int)$use_input_id_server) . ' )
|| ( ' . ((int)$print_input_id_server) . ' )) {
$ ( " #' . $input_id_server_id . ' " ) . val ( server_id );
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
//Call the function to select (example fill the modules)
if ( ' . ((int)$javascript_is_function_select) . ' ) {
' . $javascript_name_function_select . ' ( agent_name );
}
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
//Function to call after the select
if ( ' . ((int)!empty($javascript_function_action_after_select_js_call)) . ' ) {
' . $javascript_function_action_after_select_js_call . '
}
2013-06-10 13:54:58 +02:00
select_item_click = 1 ;
2012-09-12 17:53:58 +02:00
return false ;
}
})
2013-01-31 Miguel de Dios <miguel.dedios@artica.es>
* include/styles/jquery-ui-1.10.0.custom.css,
include/styles/images/ui-*,
include/javascript/jquery.jquery-ui-1.10.0.custom.js,
include/javascript/jquery-1.9.0.js: added the last version of
jquery and jqueryUI.
* godmode/reporting/visual_console_builder.editor.js,
include/ajax/events.php, include/functions_events.php,
include/functions_reporting.php,
include/javascript/pandora_events.js,
include/javascript/jquery.scrollTo.js,
include/javascript/jquery.tablesorter.pager.js,
include/javascript/jquery.tablesorter.js, include/functions_ui.php,
extensions/update_manager/lib/functions.php,
extensions/update_manager/main.php, extensions/agents_alerts.php,
operation/events/events.php, general/login_page.php,
general/logoff.php, general/header.php,
general/login_help_dialog.php: fixes about the new jquery and
jqueryUI version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-31 17:49:08 +01:00
. data ( " ui-autocomplete " ) . _renderItem = function ( ul , item ) {
2012-09-12 17:53:58 +02:00
if ( item . ip == " " ) {
2016-09-22 10:27:35 +02:00
text = " <a> " + item . alias + " </a> " ;
2012-09-12 17:53:58 +02:00
}
else {
2016-09-22 10:27:35 +02:00
text = " <a> " + item . alias
2012-09-12 17:53:58 +02:00
+ " <br><span style= \" font-size: 70%; font-style: italic; \" >IP: " + item . ip + " </span></a> " ;
}
2013-02-07 16:53:04 +01:00
switch ( item . filter ) {
2013-04-17 16:45:17 +02:00
default :
2013-02-07 16:53:04 +01:00
case \ ' agent\ ' :
return $ ( " <li style= \ 'background: #DFFFC4; \ '></li> " )
. data ( " item.autocomplete " , item )
. append ( text )
. appendTo ( ul );
break ;
case \ ' address\ ' :
return $ ( " <li style= \ 'background: #F7CFFF; \ '></li> " )
. data ( " item.autocomplete " , item )
. append ( text )
. appendTo ( ul );
break ;
case \ ' description\ ' :
return $ ( " <li style= \ 'background: #FEFCC6; \ '></li> " )
. data ( " item.autocomplete " , item )
2016-09-22 10:27:35 +02:00
. append ( text )
. appendTo ( ul );
break ;
case \ ' alias\ ' :
return $ ( " <li style= \ 'background: #a8e7eb; \ '></li> " )
. data ( " item.autocomplete " , item )
2013-02-07 16:53:04 +01:00
. append ( text )
. appendTo ( ul );
break ;
}
2012-09-12 17:53:58 +02:00
};
2012-09-13 19:47:21 +02:00
//Force the size of autocomplete
$ ( " .ui-autocomplete " ) . css ( " max-height " , " 100px " );
$ ( " .ui-autocomplete " ) . css ( " overflow-y " , " auto " );
/* prevent horizontal scrollbar */
$ ( " .ui-autocomplete " ) . css ( " overflow-x " , " hidden " );
/* add padding to account for vertical scrollbar */
$ ( " .ui-autocomplete " ) . css ( " padding-right " , " 20px " );
//Force to style of items
$ ( " .ui-autocomplete " ) . css ( " text-align " , " left " );
} ' ;
2012-09-12 17:53:58 +02:00
if ( isset ( $parameters [ 'javascript_function_change' ])) {
$javascript_function_change = $parameters [ 'javascript_function_change' ];
}
$javascript_document_ready = true ; //Default value
if ( isset ( $parameters [ 'javascript_document_ready' ])) {
$javascript_document_ready = $parameters [ 'javascript_document_ready' ];
}
$javascript_tags = true ; //Default value
if ( isset ( $parameters [ 'javascript_tags' ])) {
$javascript_tags = $parameters [ 'javascript_tags' ];
}
2012-11-13 17:06:21 +01:00
$disabled_javascript_on_blur_function = false ; //Default value
if ( isset ( $parameters [ 'disabled_javascript_on_blur_function' ])) {
$disabled_javascript_on_blur_function = $parameters [ 'disabled_javascript_on_blur_function' ];
}
2012-11-02 20:18:20 +01:00
$javascript_on_blur_function_name = 'function_on_blur_' . $input_name ; //Default value
if ( isset ( $parameters [ 'javascript_on_blur_function_name' ])) {
$javascript_on_blur_function_name = $parameters [ 'javascript_on_blur_function_name' ];
}
2012-11-28 19:29:24 +01:00
$check_only_empty_javascript_on_blur_function = false ; //Default value
if ( isset ( $parameters [ 'check_only_empty_javascript_on_blur_function' ])) {
$check_only_empty_javascript_on_blur_function = $parameters [ 'check_only_empty_javascript_on_blur_function' ];
}
2012-11-02 20:18:20 +01:00
//Default value
$javascript_on_blur = '
/*
This function is a callback when the autocomplete agent
input lost the focus .
*/
function ' . $javascript_on_blur_function_name . ' () {
2012-11-28 19:29:24 +01:00
input_value = $ ( " #' . $input_id . ' " ) . val ();
if ( input_value . length == 0 ) {
if (( ' . ((int)$print_hidden_input_idagent) . ' )
|| ( ' . ((int)$use_hidden_input_idagent) . ' )) {
$ ( " #' . $hidden_input_idagent_id . ' " ) . val ( 0 );
}
//Put the server id into the hidden input
if (( ' . ((int)$use_input_server) . ' )
|| ( ' . ((int)$print_input_server) . ' )) {
$ ( " #' . $input_server_id . ' " ) . val ( " " );
}
2013-03-04 15:31:30 +01:00
//Put the server id into the hidden input
if (( ' . ((int)$use_input_id_server) . ' )
|| ( ' . ((int)$print_input_id_server) . ' )) {
$ ( " #' . $input_id_server_id . ' " ) . val ( " " );
}
2012-11-28 19:29:24 +01:00
return ;
}
if ( ' . ((int)$check_only_empty_javascript_on_blur_function) . ' ) {
return
}
2013-06-10 13:54:58 +02:00
if ( select_item_click ) {
return ;
}
2012-11-02 20:18:20 +01:00
//Set loading
$ ( " #' . $input_id . ' " )
. css ( " background " ,
" url( \" ' . $spinner_image . ' \" ) right center no-repeat " );
2012-11-28 19:29:24 +01:00
2012-11-02 20:18:20 +01:00
var term = input_value ; //Word to search
2013-02-14 11:05:16 +01:00
' . $javascript_change_ajax_params_text . '
2012-12-11 18:39:48 +01:00
if ( ' . ((int) !$metaconsole_enabled) . ' ) {
data_params [ \ ' force_local\ ' ] = 1 ;
2013-02-14 11:05:16 +01:00
}
2012-11-02 20:18:20 +01:00
jQuery . ajax ({
data : data_params ,
type : " POST " ,
url : action = " ' . $javascript_ajax_page . ' " ,
dataType : " json " ,
success : function ( data ) {
if ( data . length == 0 ) {
//Set icon
$ ( " #' . $input_id . ' " )
. css ( " background " ,
" url( \" ' . $icon_image . ' \" ) right center no-repeat " );
return ;
}
var agent_name = data [ 0 ] . name ;
var agent_id = data [ 0 ] . id ;
2013-03-04 15:31:30 +01:00
var server_name = " " ;
var server_id = " " ;
2012-11-02 20:18:20 +01:00
if ( ' . ((int)$metaconsole_enabled) . ' ) {
server_name = data [ 0 ] . server ;
}
else {
server_name = data [ 0 ] . ip ;
}
2013-03-04 15:31:30 +01:00
if (( ' . ((int)$use_input_id_server) . ' )
|| ( ' . ((int)$print_input_id_server) . ' )) {
server_id = data [ 0 ] . id_server ;
}
2012-11-02 20:18:20 +01:00
if (( ' . ((int)$print_hidden_input_idagent) . ' )
|| ( ' . ((int)$use_hidden_input_idagent) . ' )) {
$ ( " #' . $hidden_input_idagent_id . ' " ) . val ( agent_id );
}
//Put the server id into the hidden input
if (( ' . ((int)$use_input_server) . ' )
|| ( ' . ((int)$print_input_server) . ' )) {
$ ( " #' . $input_server_id . ' " ) . val ( server_name );
}
2013-03-04 15:31:30 +01:00
//Put the server id into the hidden input
if (( ' . ((int)$use_input_id_server) . ' )
|| ( ' . ((int)$print_input_id_server) . ' )) {
$ ( " #' . $input_id_server_id . ' " ) . val ( server_id );
}
2012-11-02 20:18:20 +01:00
//Call the function to select (example fill the modules)
if ( ' . ((int)$javascript_is_function_select) . ' ) {
' . $javascript_name_function_select . ' ( agent_name );
}
//Function to call after the select
if ( ' . ((int)!empty($javascript_function_action_after_select_js_call)) . ' ) {
' . $javascript_function_action_after_select_js_call . '
}
//Set icon
$ ( " #' . $input_id . ' " )
. css ( " background " ,
" url( \" ' . $icon_image . ' \" ) right center no-repeat " );
return ;
}
});
}
' ;
if ( isset ( $parameters [ 'javascript_on_blur' ])) {
$javascript_on_blur = $parameters [ 'javascript_on_blur' ];
}
2012-09-12 17:53:58 +02:00
//------------------------------------------------------------------
$html = '' ;
2012-09-13 19:47:21 +02:00
2012-11-13 17:06:21 +01:00
$attrs = array ();
$attrs [ 'style' ] =
'background: url(' . $icon_image . ') no-repeat right;' ;
if ( ! $disabled_javascript_on_blur_function ) {
$attrs [ 'onblur' ] = $javascript_on_blur_function_name . '()' ;
}
2012-09-12 17:53:58 +02:00
$html = html_print_input_text_extended ( $input_name , $value ,
$input_id , $helptip_text , $size , $maxlength , $disabled , '' , $attrs , true );
if ( $show_helptip ) {
$html .= ui_print_help_tip ( $helptip_text , true );
}
if ( $print_hidden_input_idagent ) {
$html .= html_print_input_hidden_extended ( $hidden_input_idagent_name ,
$hidden_input_idagent_value , $hidden_input_idagent_id , true );
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $print_input_server ) {
$html .= html_print_input_hidden_extended ( $input_server_name ,
$input_server_value , $input_server_id , true );
}
2013-03-04 15:31:30 +01:00
if ( $print_input_id_server ) {
$html .= html_print_input_hidden_extended ( $input_id_server_name ,
$input_id_server_value , $input_id_server_id , true );
}
2012-09-12 17:53:58 +02:00
//Write the javascript
if ( $javascript ) {
if ( $javascript_tags ) {
$html .= ' < script type = " text/javascript " >
/* <![CDATA[ */ ' ;
}
2013-06-10 13:54:58 +02:00
$html .= 'var select_item_click = 0;' . " \n " ;
2012-09-12 17:53:58 +02:00
$html .= $javascript_function_change ;
if ( $javascript_is_function_select ) {
$html .= $javascript_code_function_select ;
}
2012-11-02 20:18:20 +01:00
$html .= $javascript_on_blur ;
2012-09-12 17:53:58 +02:00
if ( $javascript_document_ready ) {
$html .= ' $ ( document ) . ready ( function () {
set_functions_change_autocomplete_ ' . $input_name . ' ();
}); ' ;
}
if ( $javascript_tags ) {
$html .= ' /* ]]> */
</ script > ' ;
}
}
if ( $return ) {
return $html ;
}
else {
echo $html ;
}
2011-04-13 19:11:10 +02:00
}
2013-04-22 12:31:20 +02:00
/**
* Return error strings ( title and message ) for each error code
*
* @ param string error code
*/
2018-05-11 12:49:16 +02:00
function ui_get_error ( $error_code = '' ) {
// FIXME: Deprecated. Pandora shouldn't go inside this
return array (
'title' => __ ( 'Unhandled error' ),
'message' => __ ( 'An unhandled error occurs' )
);
2013-04-22 12:31:20 +02:00
}
2015-08-10 17:03:40 +02:00
function ui_include_time_picker ( $echo_tags = false ) {
if ( is_ajax () || $echo_tags ) {
2015-02-19 18:33:42 +01:00
echo '<script type="text/javascript" src="' .
ui_get_full_url ( false , false , false , false ) .
'include/javascript/jquery.ui-timepicker-addon.js' . '"></script>' ;
}
else {
ui_require_jquery_file ( " ui-timepicker-addon " );
}
2014-06-02 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_template.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/agentes/planned_downtime.editor.php, godmode/setup/news.php,
include/ajax/module.php, include/functions.php,
include/functions_ui.php, extensions/insert_data.php,
operation/netflow/nf_live_view.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php, operation/tree.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_monitores.php: fixed the i18n of the
timepicker.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10076 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-02 17:57:36 +02:00
if ( file_exists ( 'include/javascript/i18n/jquery-ui-timepicker-' . substr ( get_user_language (), 0 , 2 ) . '.js' )) {
2015-02-19 18:33:42 +01:00
echo '<script type="text/javascript" src="' .
ui_get_full_url ( 'include/javascript/i18n/jquery-ui-timepicker-' . substr ( get_user_language (), 0 , 2 ) . '.js' , false , false , false ) . '"></script>' ;
2014-06-02 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_template.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/agentes/planned_downtime.editor.php, godmode/setup/news.php,
include/ajax/module.php, include/functions.php,
include/functions_ui.php, extensions/insert_data.php,
operation/netflow/nf_live_view.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php, operation/tree.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_monitores.php: fixed the i18n of the
timepicker.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10076 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-02 17:57:36 +02:00
}
}
2016-01-18 16:58:24 +01:00
function ui_print_module_string_value ( $value , $id_agente_module ,
$current_interval , $module_name = null ) {
global $config ;
if ( is_null ( $module_name ))
$module_name = modules_get_agentmodule_name ( $id_agente_module );
$id_type_web_content_string = db_get_value ( 'id_tipo' ,
'ttipo_modulo' , 'nombre' , 'web_content_string' );
$is_web_content_string = ( bool ) db_get_value_filter ( 'id_agente_modulo' ,
'tagente_modulo' ,
array ( 'id_agente_modulo' => $id_agente_module ,
'id_tipo_modulo' => $id_type_web_content_string ));
//Fixed the goliat sends the strings from web
//without HTML entities
if ( $is_web_content_string ) {
$value = io_safe_input ( $value );
}
2018-05-07 19:40:38 +02:00
2018-08-02 13:02:33 +02:00
$is_snapshot = is_snapshot_data ( $module [ " datos " ]);
$is_large_image = is_text_to_black_string ( $module [ " datos " ]);
2018-05-07 19:40:38 +02:00
if (( $config [ 'command_snapshot' ]) && ( $is_snapshot || $is_large_image )) {
2016-11-22 11:52:16 +01:00
2018-08-02 13:02:33 +02:00
$row [ 7 ] = ui_get_snapshot_image ( $link , $is_snapshot ) . ' ' ;
2016-01-18 16:58:24 +01:00
}
2018-08-02 13:02:33 +02:00
$is_snapshot = is_snapshot_data ( $value );
$is_large_image = is_text_to_black_string ( $value );
if (( $config [ 'command_snapshot' ]) && ( $is_snapshot || $is_large_image )) {
$link = ui_get_snapshot_link ( array (
'id_module' => $id_agente_module ,
'last_data' => $value ,
'interval' => $current_interval ,
'module_name' => $module_name ,
'timestamp' => db_get_value ( 'timestamp' , 'tagente_estado' , 'id_agente_modulo' , $id_agente_module )
));
$salida = ui_get_snapshot_image ( $link , $is_snapshot ) . ' ' ;
} else {
2016-01-18 16:58:24 +01:00
$sub_string = substr ( io_safe_output ( $value ), 0 , 12 );
if ( $value == $sub_string ) {
if ( $value == 0 && ! $sub_string ) {
$salida = 0 ;
}
else {
$salida = $value ;
}
}
else {
//Fixed the goliat sends the strings from web
//without HTML entities
if ( $is_web_content_string ) {
$sub_string = substr ( $value , 0 , 12 );
}
else {
//Fixed the data from Selenium Plugin
if ( $value != strip_tags ( $value )) {
$value = io_safe_input ( $value );
$sub_string = substr ( $value , 0 , 12 );
}
else {
$sub_string = substr ( io_safe_output ( $value ), 0 , 12 );
}
}
if ( $value == $sub_string ) {
$salida = $value ;
}
else {
2018-07-27 14:07:02 +02:00
$value = preg_replace ( '/</' , '<' , $value );
$value = preg_replace ( '/>/' , '>' , $value );
$value = preg_replace ( '/\n/i' , '<br>' , $value );
$value = preg_replace ( '/\s/i' , ' ' , $value );
2016-01-18 16:58:24 +01:00
$title_dialog =
2017-02-22 16:43:28 +01:00
modules_get_agentmodule_agent_alias ( $id_agente_module ) .
2016-01-18 16:58:24 +01:00
" / " . $module_name ;
$salida = " <div " .
" id='hidden_value_module_ " . $id_agente_module . " '
2018-07-27 14:07:02 +02:00
style = 'display: none; width: 100%; height: 100%; overflow: scroll; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left' title = '" . $title_dialog . "' > " .
2016-01-18 16:58:24 +01:00
$value .
" </div> " .
" <span " .
" id='value_module_ " . $id_agente_module . " '
style = 'white-space: nowrap;' > " .
'<span id="value_module_text_' . $id_agente_module . '">' .
$sub_string . '</span> ' .
" <a href='javascript: toggle_full_value( " . $id_agente_module . " )'> " .
html_print_image ( " images/zoom.png " , true ) . " </a> " . " </span> " ;
}
}
}
return $salida ;
}
2017-02-28 15:41:03 +01:00
/**
* Displays a tag list
*/
function ui_print_tags_view ( $title = '' , $tags = array ()) {
2017-04-07 12:08:42 +02:00
if ( ! empty ( $title )){
$tv .= '<div class="tag-wrapper">' ;
$tv .= '<h3>' . $title . '</h3>' ;
} else {
$tv .= '<div class="tag-wrapper" style="padding-top: 10px">' ;
}
foreach ( $tags as $tag ) {
$tv .= '<div class=pandora-tag>' ;
$tv .= '<span class=pandora-tag-title>' ;
$tv .= $tag [ 'title' ];
$tv .= '</span>' ;
2017-02-28 15:41:03 +01:00
2017-04-07 12:08:42 +02:00
$tv .= '<span class=pandora-tag-value>' ;
$tv .= $tag [ 'value' ];
$tv .= '</span>' ;
$tv .= '</div>' ;
}
2017-02-28 15:41:03 +01:00
$tv .= '</div>' ;
echo $tv ;
}
2018-03-12 15:17:59 +01:00
/**
* @ brief Get the link to open a snapshot into a new page
*
* @ param Array Params to build the link ( see $default_params )
* @ param bool Flag to choose de return value :
* true : Get the four params required in the function of pandora . js winopen_var ( js use )
* false : Get an inline winopen_var function call ( php user )
*/
function ui_get_snapshot_link ( $params , $only_params = false ) {
global $config ;
$default_params = array (
'id_module' => 0 , //id_agente_modulo
'module_name' => '' ,
'interval' => 300 ,
2018-08-02 13:02:33 +02:00
'timestamp' => 0 ,
'id_node' => 0
2018-03-12 15:17:59 +01:00
);
// Merge default params with passed params
$params = array_merge ( $default_params , $params );
// First parameter of js winopeng_var
$page = $config [ 'homeurl_static' ] . " /operation/agentes/snapshot_view.php " ;
$url = " $page ? " .
" id= " . $params [ 'id_module' ] .
2018-08-02 13:02:33 +02:00
" &label= " . rawurlencode ( urlencode ( io_safe_output ( $params [ 'module_name' ]))) .
" &id_node= " . $params [ 'id_node' ];
if ( $params [ 'timestamp' ] != 0 ) $url .= " ×tamp= " . $parms [ 'timestamp' ];
if ( $params [ 'timestamp' ] != 0 ) $url .= " &refr= " . $parms [ 'interval' ];
2018-03-12 15:17:59 +01:00
// Second parameter of js winopeng_var
$win_handle = dechex ( crc32 ( 'snapshot_' . $params [ 'id_module' ]));
$link_parts = array ( $url , $win_handle , 700 , 480 );
// Return only the params to js execution
if ( $only_params ) return $link_parts ;
// Return the function call to inline js execution
return " winopeng_var(' " . implode ( " ', ' " , $link_parts ) . " ') " ;
}
2018-06-11 16:40:10 +02:00
2018-08-02 13:02:33 +02:00
/**
* @ brief Get the snapshot image with the link to open a snapshot into a new page
*
* @ param string Built link
* @ param bool Picture image or list image
*
* @ return string HTML anchor link with image
*/
function ui_get_snapshot_image ( $link , $is_image ) {
$image_name = $is_image ? 'photo.png' : 'default_list.png' ;
$link = '<a href="javascript:' . $link . '">' .
html_print_image ( " images/ $image_name " , true ,
array ( 'border' => '0' ,
'alt' => '' ,
'title' => __ ( 'Snapshot view' ))
) .
'</a>' ;
return $link ;
}
2018-06-11 16:40:10 +02:00
function ui_get_using_system_timezone_warning ( $tag = " h3 " , $return = true ) {
global $config ;
$user_offset = ( - get_fixed_offset () / 60 ) / 60 ;
2018-07-30 16:25:38 +02:00
if ( $config [ " timezone " ] != date_default_timezone_get ()) {
$message = sprintf (
__ ( " These controls are using the timezone of the system (%s) instead of yours (%s). The difference with your time zone in hours is %s. " ),
$config [ " timezone " ],
date_default_timezone_get (),
$user_offset > 0 ? " + " . $user_offset : $user_offset
);
return ui_print_info_message ( $message , '' , $return , $tag );
} else
return '' ;
2018-06-11 16:40:10 +02:00
}
2018-05-21 14:29:11 +02:00
/**
* Get the custom docs logo
*
* @ return string with the path to logo . False if it should not be displayed
*
*/
function ui_get_docs_logo () {
global $config ;
// Default logo to open version (enterprise_installed function only works in login status)
if ( ! file_exists ( ENTERPRISE_DIR . " /load_enterprise.php " )) {
return " images/icono_docs.png " ;
}
if ( empty ( $config [ 'custom_docs_logo' ])) return false ;
return 'enterprise/images/custom_general_logos/' . $config [ 'custom_docs_logo' ];
}
/**
* Get the custom support logo
*
* @ return string with the path to logo . False if it should not be displayed
*
*/
function ui_get_support_logo () {
global $config ;
// Default logo to open version (enterprise_installed function only works in login status)
if ( ! file_exists ( ENTERPRISE_DIR . " /load_enterprise.php " )) {
return " images/icono_support.png " ;
}
if ( empty ( $config [ 'custom_support_logo' ])) return false ;
return 'enterprise/images/custom_general_logos/' . $config [ 'custom_support_logo' ];
}
2018-05-22 13:40:23 +02:00
/**
* Get the custom header logo
*
* @ return string with the path to logo . If it is not set , return the default value
*
*/
2018-05-24 16:59:50 +02:00
function ui_get_custom_header_logo ( $white_bg = false ) {
2018-05-22 13:40:23 +02:00
global $config ;
if ( empty ( $config [ 'enterprise_installed' ])) {
return 'images/pandora_tinylogo_open.png' ;
}
2018-05-24 16:59:50 +02:00
$stored_logo = is_metaconsole ()
2018-05-29 12:45:08 +02:00
? ( $white_bg ? $config [ 'meta_custom_logo_white_bg' ] : $config [ 'meta_custom_logo' ])
: ( $white_bg ? $config [ 'custom_logo_white_bg' ] : $config [ 'custom_logo' ]);
2018-05-22 15:26:11 +02:00
if ( empty ( $stored_logo )) return 'images/pandora_tinylogo.png' ;
return 'enterprise/images/custom_logo/' . $stored_logo ;
2018-05-22 13:40:23 +02:00
}
2018-05-23 18:19:24 +02:00
/**
* Get the central networkmap logo
*
* @ return string with the path to logo . If it is not set , return the default .
*
*/
function ui_get_logo_to_center_networkmap () {
global $config ;
if (( ! enterprise_installed ()) || empty ( $config [ 'custom_network_center_logo' ])) {
return DEFAULT_NETWORKMAP_CENTER_LOGO ;
}
return 'enterprise/images/custom_general_logos/' . $config [ 'custom_support_logo' ];
}
2018-05-24 16:59:50 +02:00
/**
* Get the mobile console login logo
*
* @ return string with the path to logo . If it is not set , return the default .
*
*/
function ui_get_mobile_login_icon () {
global $config ;
if (( ! enterprise_installed ()) || empty ( $config [ 'custom_mobile_console_logo' ])) {
return is_metaconsole ()
? " mobile/images/metaconsole_mobile.png "
: " mobile/images/pandora_mobile_console.png " ;
}
return 'enterprise/images/custom_general_logos/' . $config [ 'custom_mobile_console_logo' ];
}
/**
* Get the favicon
*
* @ return string with the path to logo . If it is not set , return the default .
*
*/
function ui_get_favicon () {
global $config ;
if ( empty ( $config [ 'custom_favicon' ])) {
return ! is_metaconsole ()
? " images/pandora.ico "
: " enterprise/meta/images/favicon_meta.ico " ;
}
return 'images/custom_favicon/' . $config [ 'custom_favicon' ];
}
2016-06-08 19:15:43 +02:00
?>