2009-03-31 16:32:58 +02:00
< ? php
2009-06-08 20:21:21 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
2010-03-04 17:08:09 +01:00
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
2009-06-08 20:21:21 +02:00
// Please see http://pandorafms.org for full contribution list
2009-03-31 16:32:58 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// 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.
// Load global vars
2010-03-03 18:10:37 +01:00
global $config ;
2009-03-31 16:32:58 +02:00
check_login ();
2011-02-27 Miguel de Dios <miguel.dedios@artica.es>
* extensions/users_connected.php: fixed the double negation in the
check_acl.
* include/functions_events.php, include/functions_modules.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/alert_list.ajax.php, include/help/es/modu_group_list.php,
include/fgraph.php, include/functions.php, include/functions_db.php,
include/functions_alerts.php, include/functions_reports.php,
extensions/insert_data.php, extensions/system_info.php,
extensions/pandora_logs.php, extensions/agents_modules.php,
extensions/dbmanager.php, extensions/resource_registration.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/extensions.php,
operation/visual_console/render_view.php,
operation/visual_console/index.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/group_view.php, operation/agentes/networkmap.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
operation/menu.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php, operation/events/event_statistics.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_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php, mobile/index.php,
general/ui/agents_list.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/extensions.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/agentes/fields_manager.php, godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php,
godmode/agentes/configure_field.php, godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.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/menu.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/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.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/users/user_list.php,
godmode/users/configure_user.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_operations.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_edit_modules.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/reporting_builder.list_items.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.wizard.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: replaced obsolete "give_acl" to
"check_acl" and erased the "give_acl".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4025 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-02-28 13:02:08 +01:00
if ( ! check_acl ( $config [ 'id_user' ], 0 , " PM " ) && ! is_user_admin ( $config [ 'id_user' ])) {
* 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
db_pandora_audit ( " ACL Violation " , " Trying to access Visual Setup Management " );
2009-03-31 16:32:58 +02:00
require ( " general/noaccess.php " );
return ;
}
2014-05-07 18:42:12 +02:00
// FIX: this constant is declared to in godmode/reporting/reporting_builder.phps
//Constant with fonts directory
define ( '_MPDF_TTFONTPATH' , $config [ 'homedir' ] . '/include/fonts/' );
2015-02-09 19:34:36 +01:00
require_once ( " include/functions_post_process.php " );
2014-05-07 18:42:12 +02:00
2009-03-31 16:32:58 +02:00
// Load enterprise extensions
enterprise_include ( 'godmode/setup/setup_visuals.php' );
/*
2015-06-08 13:13:09 +02:00
NOTICE FOR DEVELOPERS :
Update operation is done in config_process . php
This is done in that way so the user can see the changes inmediatly .
If you added a new token , please check config_update_config () in functions_config . php
to add it there .
2009-03-31 16:32:58 +02:00
*/
require_once ( 'include/functions_themes.php' );
2012-08-17 13:39:25 +02:00
require_once ( 'include/functions_gis.php' );
2009-03-31 16:32:58 +02:00
2015-02-13 18:59:31 +01:00
$row = 0 ;
2015-06-26 11:20:08 +02:00
echo '<form id="form_setup" method="post">' ;
html_print_input_hidden ( 'update_config' , 1 );
2012-12-11 17:20:10 +01:00
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
// BEHAVIOUR CONFIGURATION
//----------------------------------------------------------------------
2015-06-26 11:20:08 +02:00
$table_behaviour = new stdClass ();
$table_behaviour -> width = '100%' ;
$table_behaviour -> class = " databox filters " ;
2015-06-26 12:21:25 +02:00
$table_behaviour -> style [ 0 ] = 'font-weight: bold;' ;
2015-06-26 11:20:08 +02:00
$table_behaviour -> data = array ();
2009-03-31 16:32:58 +02:00
2015-06-26 11:20:08 +02:00
$table_behaviour -> data [ $row ][ 0 ] = __ ( 'Block size for pagination' );
$table_behaviour -> data [ $row ][ 1 ] = html_print_input_text ( 'block_size' , $config [ " global_block_size " ], '' , 5 , 5 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2015-06-11 19:08:29 +02:00
$values = array ();
$values [ 5 ] = human_time_description_raw ( 5 );
$values [ 30 ] = human_time_description_raw ( 30 );
$values [ SECONDS_1MINUTE ] = human_time_description_raw ( SECONDS_1MINUTE );
$values [ SECONDS_2MINUTES ] = human_time_description_raw ( SECONDS_2MINUTES );
$values [ SECONDS_5MINUTES ] = human_time_description_raw ( SECONDS_5MINUTES );
$values [ SECONDS_10MINUTES ] = human_time_description_raw ( SECONDS_10MINUTES );
$values [ SECONDS_30MINUTES ] = human_time_description_raw ( SECONDS_30MINUTES );
2012-12-11 17:20:10 +01:00
2015-06-26 11:20:08 +02:00
$table_behaviour -> data [ $row ][ 0 ] = __ ( 'Default interval for refresh on Visual Console' ) .
ui_print_help_tip ( __ ( 'This interval will affect to Visual Console pages' ), true );
$table_behaviour -> data [ $row ][ 1 ] = html_print_select ( $values , 'vc_refr' , $config [ " vc_refr " ], '' , 'N/A' , 0 , true , false , false );
2012-12-11 17:20:10 +01:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_behaviour -> data [ $row ][ 0 ] = __ ( 'Paginated module view' );
$table_behaviour -> data [ $row ][ 1 ] = html_print_checkbox ( 'paginate_module' , 1 ,
2015-06-11 19:08:29 +02:00
$config [ 'paginate_module' ], true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2009-03-31 16:32:58 +02:00
2015-07-22 11:49:00 +02:00
$table_behaviour -> data [ $row ][ 0 ] = __ ( 'Display data of proc modules in other format' );
2015-06-26 11:20:08 +02:00
$table_behaviour -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'render_proc' , 1 , '' ,
$config [ " render_proc " ], true ) .
' ' ;
2015-06-26 11:20:08 +02:00
$table_behaviour -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'render_proc' , 0 , '' ,
$config [ " render_proc " ], true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2015-07-22 11:49:00 +02:00
$table_behaviour -> data [ $row ][ 0 ] = __ ( 'Display text proc modules have state is ok' );
$table_behaviour -> data [ $row ][ 1 ] = html_print_input_text ( 'render_proc_ok' , $config [ " render_proc_ok " ], '' , 25 , 25 , true );
$row ++ ;
$table_behaviour -> data [ $row ][ 0 ] = __ ( 'Display text when proc modules have state critical' );
$table_behaviour -> data [ $row ][ 1 ] = html_print_input_text ( 'render_proc_fail' , $config [ " render_proc_fail " ], '' , 25 , 25 , true );
$row ++ ;
2016-06-02 11:59:35 +02:00
//Daniel maya 02/06/2016 Display menu with click --INI
$table_behaviour -> data [ $row ][ 0 ] = __ ( 'Display lateral menus with click' ) .
ui_print_help_tip ( __ ( 'If you check this option, the lateral menus display with left click. Otherwise it will show by placing the mouse over' ), true );
$table_behaviour -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
html_print_radio_button ( 'click_display' , 1 , '' ,
$config [ " click_display " ], true ) .
' ' ;
$table_behaviour -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
html_print_radio_button ( 'click_display' , 0 , '' ,
$config [ " click_display " ], true );
$row ++ ;
//Daniel maya 02/06/2016 Display menu with click --END
2015-06-26 11:20:08 +02:00
echo " <fieldset> " ;
echo " <legend> " . __ ( 'Behaviour configuration' ) . " </legend> " ;
html_print_table ( $table_behaviour );
echo " </fieldset> " ;
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
2012-12-11 17:20:10 +01:00
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
// STYLE CONFIGURATION
//----------------------------------------------------------------------
2015-06-26 11:20:08 +02:00
$table_styles = new stdClass ();
$table_styles -> width = '100%' ;
$table_styles -> class = " databox filters " ;
2015-06-26 12:21:25 +02:00
$table_styles -> style [ 0 ] = 'font-weight: bold;' ;
2015-06-26 11:20:08 +02:00
$table_styles -> data = array ();
2014-03-14 09:33:13 +01:00
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 0 ] = __ ( 'Style template' );
2015-08-19 13:16:33 +02:00
$table_styles -> data [ $row ][ 1 ] = html_print_select ( themes_get_css (),
'style' , $config [ " style " ] . '.css' , '' , '' , '' , true );
2014-03-14 09:33:13 +01:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 0 ] = __ ( 'Status icon set' );
2015-06-11 19:08:29 +02:00
$iconsets [ " default " ] = __ ( 'Colors' );
$iconsets [ " faces " ] = __ ( 'Faces' );
$iconsets [ " color_text " ] = __ ( 'Colors and text' );
2015-08-19 13:16:33 +02:00
$table_styles -> data [ $row ][ 1 ] = html_print_select ( $iconsets ,
'status_images_set' , $config [ " status_images_set " ], '' , '' , '' , true );
$table_styles -> data [ $row ][ 1 ] .= " " .
html_print_button ( __ ( " View " ), 'status_set_preview' , false , '' , '' , true );
2014-03-14 09:33:13 +01:00
$row ++ ;
2015-08-19 13:16:33 +02:00
$table_styles -> data [ $row ][ 0 ] = __ ( 'Login background' ) .
ui_print_help_tip ( __ ( 'You can place your custom images into the folder images/backgrounds/' ), true );
2015-06-11 19:08:29 +02:00
$backgrounds_list_jpg = list_files ( " images/backgrounds " , " jpg " , 1 , 0 );
$backgrounds_list_gif = list_files ( " images/backgrounds " , " gif " , 1 , 0 );
$backgrounds_list_png = list_files ( " images/backgrounds " , " png " , 1 , 0 );
$backgrounds_list = array_merge ( $backgrounds_list_jpg , $backgrounds_list_png );
$backgrounds_list = array_merge ( $backgrounds_list , $backgrounds_list_gif );
asort ( $backgrounds_list );
2016-09-22 11:12:19 +02:00
if ( ! enterprise_installed ()){
$open = true ;
}
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 1 ] = html_print_select ( $backgrounds_list ,
2015-06-11 19:08:29 +02:00
'login_background' , $config [ " login_background " ], '' , __ ( 'Default' ),
2016-09-22 11:12:19 +02:00
'' , true , false , true , '' , false , 'width:240px' );
2015-08-19 13:16:33 +02:00
$table_styles -> data [ $row ][ 1 ] .= " " .
html_print_button ( __ ( " View " ), 'login_background_preview' , false , '' , 'class="sub camera"' , true );
2014-03-14 09:33:13 +01:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 0 ] = __ ( 'Custom logo' ) . ui_print_help_icon ( " custom_logo " , true );
2016-09-29 15:02:12 +02:00
if ( enterprise_installed ()){
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 1 ] = html_print_select (
2016-09-29 15:02:12 +02:00
list_files ( 'enterprise/images/custom_logo' , " png " , 1 , 0 ), 'custom_logo' ,
$config [ " custom_logo " ], '' , '' , '' , true , false , true , '' , $open , 'width:240px' );
}
else {
$table_styles -> data [ $row ][ 1 ] = html_print_select (
2015-06-11 19:08:29 +02:00
list_files ( 'images/custom_logo' , " png " , 1 , 0 ), 'custom_logo' ,
2016-09-22 11:12:19 +02:00
$config [ " custom_logo " ], '' , '' , '' , true , false , true , '' , $open , 'width:240px' );
2016-09-29 15:02:12 +02:00
}
$table_styles -> data [ $row ][ 1 ] .= " " . html_print_button ( __ ( " View " ), 'custom_logo_preview' , $open , '' , 'class="sub camera"' , true , false , $open , 'visualmodal' );
2014-03-14 09:33:13 +01:00
$row ++ ;
2016-09-29 15:02:12 +02:00
$table_styles -> data [ $row ][ 0 ] = __ ( 'Custom logo in login' ) . ui_print_help_icon ( " custom_logo_login " , true );
2016-10-03 12:27:59 +02:00
2016-09-29 15:02:12 +02:00
$table_styles -> data [ $row ][ 1 ] = html_print_select (
list_files ( 'images/custom_logo_login' , " png " , 1 , 0 ), 'custom_logo_login' ,
$config [ " custom_logo_login " ], '' , '' , '' , true , false , true , '' , $open , 'width:240px' );
2016-10-03 12:27:59 +02:00
2016-09-29 15:02:12 +02:00
$table_styles -> data [ $row ][ 1 ] .= " " . html_print_button ( __ ( " View " ), 'custom_logo_login_preview' , $open , '' , 'class="sub camera"' , true , false , $open , 'visualmodal' );
2016-09-22 11:12:19 +02:00
$row ++ ;
$table_styles -> data [ $row ][ 0 ] = __ ( 'Disable Pandora FMS on graphs' );
$table_styles -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
html_print_radio_button_extended ( 'fixed_graph' , 1 , '' , $config [ " fixed_graph " ], $open , '' , '' , true ) .
' ' ;
$table_styles -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
html_print_radio_button_extended ( 'fixed_graph' , 0 , '' , $config [ " fixed_graph " ], $open , '' , '' , true , $open , 'visualmodal' );
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 0 ] = __ ( 'Fixed header' );
$table_styles -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'fixed_header' , 1 , '' , $config [ " fixed_header " ], true ) .
' ' ;
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'fixed_header' , 0 , '' , $config [ " fixed_header " ], true );
2014-03-14 09:33:13 +01:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 0 ] = __ ( 'Fixed menu' );
$table_styles -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'fixed_menu' , 1 , '' , $config [ " fixed_menu " ], true ) .
' ' ;
2015-06-26 11:20:08 +02:00
$table_styles -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'fixed_menu' , 0 , '' , $config [ " fixed_menu " ], true );
2015-02-09 19:34:36 +01:00
2015-06-26 11:20:08 +02:00
// For 5.1 Autohidden menu feature
$table_styles -> data [ 'autohidden' ][ 0 ] = __ ( 'Autohidden menu' );
$table_styles -> data [ 'autohidden' ][ 1 ] = html_print_checkbox ( 'autohidden_menu' ,
1 , $config [ 'autohidden_menu' ], true );
2012-12-11 17:20:10 +01:00
2015-06-26 11:20:08 +02:00
echo " <fieldset> " ;
echo " <legend> " . __ ( 'Style configuration' ) . " </legend> " ;
html_print_table ( $table_styles );
echo " </fieldset> " ;
//----------------------------------------------------------------------
2012-12-11 17:20:10 +01:00
2015-02-09 19:34:36 +01:00
//----------------------------------------------------------------------
2015-06-11 19:08:29 +02:00
// GIS CONFIGURATION
2015-02-09 19:34:36 +01:00
//----------------------------------------------------------------------
2015-06-26 11:20:08 +02:00
$table_gis = new stdClass ();
$table_gis -> width = '100%' ;
$table_gis -> class = " databox filters " ;
2015-06-26 12:21:25 +02:00
$table_gis -> style [ 0 ] = 'font-weight: bold;' ;
2015-06-26 11:20:08 +02:00
$table_gis -> data = array ();
2009-03-31 16:32:58 +02:00
2015-06-26 11:20:08 +02:00
$table_gis -> data [ $row ][ 0 ] = __ ( 'GIS Labels' ) .
2015-06-11 19:08:29 +02:00
ui_print_help_tip ( __ ( 'This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.' ), true );
2015-06-26 11:20:08 +02:00
$table_gis -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'gis_label' , 1 , '' , $config [ " gis_label " ], true ) . ' ' ;
2015-06-26 11:20:08 +02:00
$table_gis -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'gis_label' , 0 , '' , $config [ " gis_label " ], true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2015-06-11 19:08:29 +02:00
$listIcons = gis_get_array_list_icons ();
$arraySelectIcon = array ();
foreach ( $listIcons as $index => $value )
$arraySelectIcon [ $index ] = $index ;
2015-08-19 13:16:33 +02:00
$table_gis -> data [ $row ][ 0 ] = __ ( 'Default icon in GIS' ) .
ui_print_help_tip ( __ ( 'Agent icon for GIS Maps. If set to "none", group icon will be used' ), true );
2015-06-26 11:20:08 +02:00
$table_gis -> data [ $row ][ 1 ] = html_print_select ( $arraySelectIcon ,
2015-06-11 19:08:29 +02:00
" gis_default_icon " , $config [ " gis_default_icon " ], " " , __ ( 'None' ),
'' , true );
2015-08-19 13:16:33 +02:00
$table_gis -> data [ $row ][ 1 ] .= " " .
html_print_button ( __ ( " View " ), 'gis_icon_preview' , false , '' , '' , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2015-06-26 11:20:08 +02:00
echo " <fieldset> " ;
echo " <legend> " . __ ( 'GIS configuration' ) . " </legend> " ;
html_print_table ( $table_gis );
echo " </fieldset> " ;
//----------------------------------------------------------------------
2009-04-06 13:02:05 +02:00
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
// FONT AND TEXT CONFIGURATION
//----------------------------------------------------------------------
2015-06-26 11:20:08 +02:00
$table_font = new stdClass ();
$table_font -> width = '100%' ;
$table_font -> class = " databox filters " ;
2015-06-26 12:21:25 +02:00
$table_font -> style [ 0 ] = 'font-weight: bold;' ;
2015-06-26 11:20:08 +02:00
$table_font -> data = array ();
2009-07-01 19:09:26 +02:00
2015-06-26 11:20:08 +02:00
$table_font -> data [ $row ][ 0 ] = __ ( 'Font path' );
2011-04-19 16:36:33 +02:00
$fonts = load_fonts ();
2015-08-19 13:16:33 +02:00
$table_font -> data [ $row ][ 1 ] = html_print_select ( $fonts , 'fontpath' ,
io_safe_output ( $config [ " fontpath " ]), '' , '' , 0 , true );
2011-04-19 16:36:33 +02:00
2012-12-11 17:20:10 +01:00
$row ++ ;
2009-07-01 19:09:26 +02:00
2015-06-26 11:20:08 +02:00
$table_font -> data [ $row ][ 0 ] = __ ( 'Font size' );
2012-10-02 11:07:20 +02:00
2014-06-24 15:17:14 +02:00
$font_size_array = array (
1 => 1 ,
2 => 2 ,
3 => 3 ,
4 => 4 ,
5 => 5 ,
6 => 6 ,
7 => 7 ,
8 => 8 ,
9 => 9 ,
10 => 10 ,
11 => 11 ,
12 => 12 ,
13 => 13 ,
14 => 14 ,
15 => 15 );
2012-10-02 11:07:20 +02:00
2015-06-26 11:20:08 +02:00
$table_font -> data [ $row ][ 1 ] = html_print_select ( $font_size_array , 'font_size' ,
2015-06-08 13:13:09 +02:00
$config [ " font_size " ], '' , '' , 0 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2009-07-01 19:09:26 +02:00
2015-08-19 13:16:33 +02:00
$table_font -> data [ $row ][ 0 ] = __ ( 'Agent size text' ) .
ui_print_help_tip ( __ ( 'When the agent name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.' ), true );
$table_font -> data [ $row ][ 1 ] = __ ( 'Small:' ) .
html_print_input_text ( 'agent_size_text_small' , $config [ " agent_size_text_small " ], '' , 3 , 3 , true );
$table_font -> data [ $row ][ 1 ] .= ' ' . __ ( 'Normal:' ) .
html_print_input_text ( 'agent_size_text_medium' , $config [ " agent_size_text_medium " ], '' , 3 , 3 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2011-11-29 13:30:27 +01:00
2015-08-19 13:16:33 +02:00
$table_font -> data [ $row ][ 0 ] = __ ( 'Module size text' ) .
ui_print_help_tip ( __ ( 'When the module name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.' ), true );
$table_font -> data [ $row ][ 1 ] = __ ( 'Small:' ) .
html_print_input_text ( 'module_size_text_small' , $config [ " module_size_text_small " ], '' , 3 , 3 , true );
$table_font -> data [ $row ][ 1 ] .= ' ' . __ ( 'Normal:' ) .
html_print_input_text ( 'module_size_text_medium' , $config [ " module_size_text_medium " ], '' , 3 , 3 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2011-11-29 13:30:27 +01:00
2015-06-26 11:20:08 +02:00
$table_font -> data [ $row ][ 0 ] = __ ( 'Description size text' ) . ui_print_help_tip ( __ ( 'When the description name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.' ), true );
$table_font -> data [ $row ][ 1 ] = html_print_input_text ( 'description_size_text' , $config [ " description_size_text " ], '' , 3 , 3 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2012-12-11 17:20:10 +01:00
2015-06-26 11:20:08 +02:00
$table_font -> data [ $row ][ 0 ] = __ ( 'Item title size text' ) .
2015-06-11 19:08:29 +02:00
ui_print_help_tip ( __ ( 'When the item title name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.' ), true );
2015-06-26 11:20:08 +02:00
$table_font -> data [ $row ][ 1 ] = html_print_input_text ( 'item_title_size_text' ,
2015-06-11 19:08:29 +02:00
$config [ " item_title_size_text " ], '' , 3 , 3 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2009-07-01 19:09:26 +02:00
2015-06-26 11:20:08 +02:00
echo " <fieldset> " ;
echo " <legend> " . __ ( 'Font and Text configuration' ) . " </legend> " ;
html_print_table ( $table_font );
echo " </fieldset> " ;
//----------------------------------------------------------------------
2014-03-27 Alejandro Gallardo <alejandro.gallardo@artica.es>
* include/functions_config.php,
godmode/setup/setup_visuals.php,
general/login_page.php: Now is possible to select a
custom login background in the setup visuals section.
* images/backgrounds/default_4.0-stripes.gif,
images/backgrounds/default_4.0.jpg,
images/backgrounds/default_5.0.png,
images/backgrounds/flowers.jpg,
images/backgrounds/grass.jpg,
images/backgrounds/tiles.jpg,
images/backgrounds/wall.jpg,
images/backgrounds/wood.jpg: Added new images to use
it as custom login backgrounds.
* images/backgrounds/background1.jpg,
images/backgrounds/background2.jpg,
images/backgrounds/background3.jpg,
images/backgrounds/background4.jpg,
images/backgrounds/background5.jpg,
images/backgrounds/background6.jpg,
images/backgrounds/background7.jpg,
images/backgrounds/background8.jpg,
images/backgrounds/background9.jpg,
images/backgrounds/background10.jpg,
images/backgrounds/background_red.jpg: Delete some
VERY old images.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9655 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-27 12:49:00 +01:00
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
// CHARS CONFIGURATION
//----------------------------------------------------------------------
2015-06-26 11:20:08 +02:00
$table_chars = new stdClass ();
$table_chars -> width = '100%' ;
$table_chars -> class = " databox filters " ;
2015-06-26 12:21:25 +02:00
$table_chars -> style [ 0 ] = 'font-weight: bold;' ;
2015-06-26 11:20:08 +02:00
$table_chars -> data = array ();
2014-03-27 Alejandro Gallardo <alejandro.gallardo@artica.es>
* include/functions_config.php,
godmode/setup/setup_visuals.php,
general/login_page.php: Now is possible to select a
custom login background in the setup visuals section.
* images/backgrounds/default_4.0-stripes.gif,
images/backgrounds/default_4.0.jpg,
images/backgrounds/default_5.0.png,
images/backgrounds/flowers.jpg,
images/backgrounds/grass.jpg,
images/backgrounds/tiles.jpg,
images/backgrounds/wall.jpg,
images/backgrounds/wood.jpg: Added new images to use
it as custom login backgrounds.
* images/backgrounds/background1.jpg,
images/backgrounds/background2.jpg,
images/backgrounds/background3.jpg,
images/backgrounds/background4.jpg,
images/backgrounds/background5.jpg,
images/backgrounds/background6.jpg,
images/backgrounds/background7.jpg,
images/backgrounds/background8.jpg,
images/backgrounds/background9.jpg,
images/backgrounds/background10.jpg,
images/backgrounds/background_red.jpg: Delete some
VERY old images.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9655 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-27 12:49:00 +01:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color (min)' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color1' , $config [ " graph_color1 " ], '' , 8 , 8 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2011-11-17 17:55:32 +01:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color (avg)' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color2' , $config [ " graph_color2 " ], '' , 8 , 8 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2012-06-13 20:01:43 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color (max)' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color3' , $config [ " graph_color3 " ], '' , 8 , 8 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2012-06-13 20:01:43 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color #4' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color4' , $config [ " graph_color4 " ], '' , 8 , 8 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2014-06-17 17:11:50 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color #5' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color5' , $config [ " graph_color5 " ], '' , 8 , 8 , true );
2014-06-17 17:11:50 +02:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color #6' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color6' , $config [ " graph_color6 " ], '' , 8 , 8 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2012-06-13 20:01:43 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color #7' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color7' , $config [ " graph_color7 " ], '' , 8 , 8 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2012-06-13 20:01:43 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color #8' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color8' , $config [ " graph_color8 " ], '' , 8 , 8 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color #9' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color9' , $config [ " graph_color9 " ], '' , 8 , 8 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2012-06-13 20:01:43 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph color #10' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_color10' , $config [ " graph_color10 " ], '' , 8 , 8 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2012-08-27 16:53:46 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Graph resolution (1-low, 5-high)' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_res' , $config [ " graph_res " ], '' , 5 , 5 , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2012-08-17 13:39:25 +02:00
2015-10-23 12:54:58 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Value to interface graphics' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'interface_unit' , $config [ " interface_unit " ], '' , 20 , 20 , true );
$row ++ ;
2016-10-18 10:32:10 +02:00
$disabled_graph_precision = false ;
if ( ! enterprise_installed ()) {
$disabled_graph_precision = true ;
}
$table_chars -> data [ $row ][ 0 ] = __ ( 'Data precision for reports' );
2016-10-18 11:25:36 +02:00
$table_chars -> data [ $row ][ 0 ] .= ui_print_help_tip ( __ ( 'Precision must be a integer number between 0 and 5' ), true );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'graph_precision' , $config [ " graph_precision " ], '' , 5 , 5 , true , $disabled_graph_precision , false , " onChange= \" change_precision() \" " );
2016-10-18 10:32:10 +02:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Default line thickness for the Custom Graph.' );
$table_chars -> data [ $row ][ 1 ] = html_print_input_text ( 'custom_graph_width' ,
2015-06-11 20:17:54 +02:00
$config [ " custom_graph_width " ], '' , 5 , 5 , true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Use round corners' );
$table_chars -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' . html_print_radio_button ( 'round_corner' , 1 , '' , $config [ " round_corner " ], true ) . ' ' ;
$table_chars -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' . html_print_radio_button ( 'round_corner' , 0 , '' , $config [ " round_corner " ], true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2012-12-11 17:20:10 +01:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Interactive charts' ) .
2015-06-11 19:08:29 +02:00
ui_print_help_tip ( __ ( 'Whether to use Javascript or static PNG graphs' ), true );
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'flash_charts' , 1 , '' , $config [ " global_flash_charts " ], true ) . ' ' ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'flash_charts' , 0 , '' , $config [ " global_flash_charts " ], true );
2012-12-11 17:20:10 +01:00
$row ++ ;
2015-06-11 19:08:29 +02:00
if ( ! isset ( $config [ " short_module_graph_data " ]))
$config [ " short_module_graph_data " ] = true ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Shortened module graph data' );
$table_chars -> data [ $row ][ 0 ] .= ui_print_help_tip ( __ ( 'The data number of the module graphs will be rounded and shortened' ), true );
$table_chars -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'short_module_graph_data' , 1 , '' ,
$config [ " short_module_graph_data " ], true ) .
' ' ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2015-06-11 19:08:29 +02:00
html_print_radio_button ( 'short_module_graph_data' , 0 , '' ,
$config [ " short_module_graph_data " ], true );
$row ++ ;
2015-06-11 21:24:14 +02:00
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 0 ] = __ ( 'Type of module charts' );
$table_chars -> data [ $row ][ 1 ] = __ ( 'Area' ) . ' ' .
2015-06-11 21:24:14 +02:00
html_print_radio_button ( 'type_module_charts' , 'area' , '' ,
$config [ " type_module_charts " ] == 'area' , true ) . ' ' ;
2015-06-26 11:20:08 +02:00
$table_chars -> data [ $row ][ 1 ] .= __ ( 'Line' ) . ' ' .
2015-06-11 21:24:14 +02:00
html_print_radio_button ( 'type_module_charts' , 'line' , '' ,
$config [ " type_module_charts " ] != 'area' , true );
$row ++ ;
2012-12-11 17:20:10 +01:00
2015-06-26 11:20:08 +02:00
echo " <fieldset> " ;
echo " <legend> " . __ ( 'Charts configuration' ) . " </legend> " ;
html_print_table ( $table_chars );
echo " </fieldset> " ;
//----------------------------------------------------------------------
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
// OTHER CONFIGURATION
//----------------------------------------------------------------------
2015-06-26 11:20:08 +02:00
$table_other = new stdClass ();
$table_other -> width = '100%' ;
$table_other -> class = " databox filters " ;
2015-06-26 12:21:25 +02:00
$table_other -> style [ 0 ] = 'font-weight: bold;' ;
2015-06-26 11:20:08 +02:00
$table_other -> data = array ();
2015-06-11 21:24:14 +02:00
if ( empty ( $config [ " vc_line_thickness " ])) $config [ " vc_line_thickness " ] = 2 ;
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Default line thickness for the Visual Console' ) . ui_print_help_tip ( __ ( 'This interval will affect to the lines between elements on the Visual Console' ), true );
$table_other -> data [ $row ][ 1 ] = html_print_input_text ( 'vc_line_thickness' , $config [ " vc_line_thickness " ], '' , 5 , 5 , true );
2015-06-11 21:24:14 +02:00
$row ++ ;
// Juanma (07/05/2014) New feature: Table for custom front page for reports
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Custom report front page' ) .
2015-06-11 21:24:14 +02:00
ui_print_help_tip (
__ ( 'Custom report front page. It will be applied to all reports and templates by default.' ), true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] = html_print_checkbox ( 'custom_report_front' , 1 ,
2015-06-11 21:24:14 +02:00
$config [ 'custom_report_front' ], true );
$row ++ ;
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
2012-08-17 13:39:25 +02:00
2015-06-11 19:08:29 +02:00
2012-08-17 13:39:25 +02:00
2015-06-11 19:08:29 +02:00
2014-05-21 12:44:36 +02:00
2014-05-07 18:42:12 +02:00
$dirItems = scandir ( $config [ 'homedir' ] . '/images/custom_logo' );
foreach ( $dirItems as $entryDir ) {
if ( strstr ( $entryDir , '.jpg' ) !== false ) {
$customLogos [ 'images/custom_logo/' . $entryDir ] = $entryDir ;
}
}
$_fonts = array ();
$dirFonts = scandir ( _MPDF_TTFONTPATH );
foreach ( $dirFonts as $entryDir ) {
if ( strstr ( $entryDir , '.ttf' ) !== false ) {
$_fonts [ $entryDir ] = $entryDir ;
}
}
2015-02-13 18:59:31 +01:00
// Font
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-font' ][ 0 ] = __ ( 'Custom report front' ) . ' - ' . __ ( 'Font family' );
$table_other -> data [ 'custom_report_front-font' ][ 1 ] = html_print_select ( $_fonts ,
2014-11-20 15:06:11 +01:00
'custom_report_front_font' , $config [ 'custom_report_front_font' ],
false , __ ( 'Default' ), '' , true );
2014-05-07 18:42:12 +02:00
2015-02-13 18:59:31 +01:00
// Logo
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-logo' ][ 0 ] = __ ( 'Custom report front' ) . ' - ' .
2014-11-20 15:06:11 +01:00
__ ( 'Custom logo' ) .
2014-05-07 18:42:12 +02:00
ui_print_help_tip (
__ ( " The dir of custom logos is in your www Pandora Console in \" images/custom_logo \" . You can upload more files (ONLY JPEG) in upload tool in console. " ), true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-logo' ][ 1 ] = html_print_select (
2014-11-20 15:06:11 +01:00
$customLogos ,
'custom_report_front_logo' ,
$config [ 'custom_report_front_logo' ],
'showPreview()' ,
__ ( 'Default' ),
'' ,
true );
2015-02-13 18:59:31 +01:00
// Preview
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-preview' ][ 0 ] = __ ( 'Custom report front' ) . ' - ' . 'Preview' ;
2014-05-07 18:42:12 +02:00
if ( empty ( $config [ 'custom_report_front_logo' ])) {
$config [ 'custom_report_front_logo' ] = 'images/pandora_logo_white.jpg' ;
}
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-preview' ][ 1 ] = '<span id="preview_image">' .
2014-11-20 15:06:11 +01:00
html_print_image ( $config [ 'custom_report_front_logo' ], true ) . '</span>' ;
2014-05-07 18:42:12 +02:00
2015-02-13 18:59:31 +01:00
// Header
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-header' ][ 0 ] = __ ( 'Custom report front' ) . ' - ' . __ ( 'Header' );
$table_other -> data [ 'custom_report_front-header' ][ 1 ] = html_print_textarea ( 'custom_report_front_header' , 5 , 15 ,
2014-05-07 18:42:12 +02:00
$config [ 'custom_report_front_header' ], 'style="width: 38em;"' , true );
2015-02-13 18:59:31 +01:00
// First page
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-first_page' ][ 0 ] = __ ( 'Custom report front' ) . ' - ' . __ ( 'First page' );
2015-09-01 12:50:09 +02:00
$custom_report_front_firstpage = str_replace ( '(_URLIMAGE_)' ,
ui_get_full_url ( false , true , false , false ),
$config [ 'custom_report_front_firstpage' ]);
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-first_page' ][ 1 ] = html_print_textarea ( 'custom_report_front_firstpage' , 15 , 15 ,
2015-09-01 12:50:09 +02:00
$custom_report_front_firstpage , 'style="width: 38em; height: 20em;"' , true );
2014-05-07 18:42:12 +02:00
2015-02-13 18:59:31 +01:00
// Footer
2015-06-26 11:20:08 +02:00
$table_other -> data [ 'custom_report_front-footer' ][ 0 ] = __ ( 'Custom report front' ) . ' - ' . __ ( 'Footer' );
$table_other -> data [ 'custom_report_front-footer' ][ 1 ] = html_print_textarea ( 'custom_report_front_footer' , 5 , 15 ,
2014-05-07 18:42:12 +02:00
$config [ 'custom_report_front_footer' ], 'style="width: 38em;"' , true );
2014-05-22 10:34:40 +02:00
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Show QR Code icon in the header' );
$table_other -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2014-11-20 15:06:11 +01:00
html_print_radio_button ( 'show_qr_code_header' , 1 , '' ,
$config [ " show_qr_code_header " ], true ) .
2014-05-30 12:51:33 +02:00
' ' ;
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2014-11-20 15:06:11 +01:00
html_print_radio_button ( 'show_qr_code_header' , 0 , '' ,
$config [ " show_qr_code_header " ], true );
2014-05-30 12:51:33 +02:00
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Custom graphviz directory' ) .
2014-11-20 15:06:11 +01:00
ui_print_help_tip ( __ ( " Custom directory where the graphviz binaries are stored. " ), true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] = html_print_input_text ( 'graphviz_bin_dir' ,
2014-11-20 15:06:11 +01:00
$config [ " graphviz_bin_dir " ], '' , 50 , 255 , true );
2014-05-30 12:51:33 +02:00
2014-06-02 19:36:00 +02:00
$row ++ ;
2014-05-30 12:51:33 +02:00
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Networkmap max width' );
$table_other -> data [ $row ][ 1 ] = html_print_input_text ( 'networkmap_max_width' ,
2014-11-20 15:06:11 +01:00
$config [ " networkmap_max_width " ], '' , 10 , 20 , true );
2014-06-24 15:17:14 +02:00
$row ++ ;
2014-08-04 18:50:36 +02:00
2014-11-20 15:06:11 +01:00
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Show only the group name' );
$table_other -> data [ $row ][ 0 ] .= ui_print_help_tip (
2014-11-20 15:06:11 +01:00
__ ( 'Show the group name instead the group icon.' ), true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] = __ ( 'Yes' ) . ' ' .
2014-11-20 15:06:11 +01:00
html_print_radio_button ( 'show_group_name' , 1 , '' ,
$config [ " show_group_name " ], true ) .
' ' ;
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= __ ( 'No' ) . ' ' .
2014-11-20 15:06:11 +01:00
html_print_radio_button ( 'show_group_name' , 0 , '' ,
$config [ " show_group_name " ], true );
2014-08-04 18:50:36 +02:00
$row ++ ;
2015-03-17 15:36:24 +01:00
2015-06-11 19:08:29 +02:00
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Date format string' ) . ui_print_help_icon ( " date_format " , true );
$table_other -> data [ $row ][ 1 ] = '<em>' . __ ( 'Example' ) . '</em> ' . date ( $config [ " date_format " ]);
$table_other -> data [ $row ][ 1 ] .= html_print_input_text ( 'date_format' , $config [ " date_format " ], '' , 30 , 100 , true );
2015-03-17 15:36:24 +01:00
$row ++ ;
2015-06-11 19:08:29 +02:00
if ( $config [ 'prominent_time' ] == 'comparation' ) {
$timestamp = false ;
$comparation = true ;
}
else if ( $config [ 'prominent_time' ] == 'timestamp' ) {
$timestamp = true ;
$comparation = false ;
}
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Timestamp or time comparation' ) . ui_print_help_icon ( " time_stamp-comparation " , true );
$table_other -> data [ $row ][ 1 ] = __ ( 'Comparation in rollover' ) . ' ' ;
$table_other -> data [ $row ][ 1 ] .= html_print_radio_button ( 'prominent_time' , " comparation " , '' , $comparation , true );
$table_other -> data [ $row ][ 1 ] .= '<br />' . __ ( 'Timestamp in rollover' ) . ' ' ;
$table_other -> data [ $row ][ 1 ] .= html_print_radio_button ( 'prominent_time' , " timestamp " , '' , $timestamp , true );
2015-06-11 19:08:29 +02:00
$row ++ ;
2015-05-04 15:44:37 +02:00
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
// CUSTOM VALUES POST PROCESS
//----------------------------------------------------------------------
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Custom values post process' );
$table_other -> data [ $row ][ 1 ] = " <table> " ;
$table_other -> data [ $row ][ 1 ] .= __ ( 'Value' ) . ': ' .
2015-06-11 19:08:29 +02:00
html_print_input_text ( 'custom_value' , '' , '' , 25 , 50 , true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= ' ' . __ ( 'Text' ) . ': ' .
2015-06-11 19:08:29 +02:00
html_print_input_text ( 'custom_text' , '' , '' , 25 , 50 , true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= " " ;
$table_other -> data [ $row ][ 1 ] .= html_print_input_hidden (
2015-06-11 19:08:29 +02:00
'custom_value_add' , '' , true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= html_print_button ( __ ( 'Add' ),
2015-06-11 19:08:29 +02:00
'custom_value_add_btn' , false , " " , 'class="sub next"' , true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= '<br /><br />' ;
2015-06-11 19:08:29 +02:00
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= __ ( 'Delete custom values' ) . ': ' ;
$table_other -> data [ $row ][ 1 ] .= html_print_select (
2015-06-11 19:08:29 +02:00
post_process_get_custom_values (), 'custom_values' , " " , " " , '' , '' ,
true );
$count_custom_postprocess = post_process_get_custom_values ();
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= html_print_button ( __ ( 'Delete' ),
2015-06-11 19:08:29 +02:00
'custom_values_del_btn' ,
empty ( $count_custom_postprocess ), " " ,
'class="sub cancel"' , true );
// This hidden field will be filled from jQuery before submit
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= html_print_input_hidden (
2015-06-11 19:08:29 +02:00
'custom_value_to_delete' , '' , true );
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= " </table> " ;
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// CUSTOM INTERVAL VALUES
//----------------------------------------------------------------------
$row ++ ;
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 0 ] = __ ( 'Interval values' );
2015-06-11 19:08:29 +02:00
$units = array (
1 => __ ( 'seconds' ),
SECONDS_1MINUTE => __ ( 'minutes' ),
SECONDS_1HOUR => __ ( 'hours' ),
SECONDS_1DAY => __ ( 'days' ),
SECONDS_1MONTH => __ ( 'months' ),
SECONDS_1YEAR => __ ( 'years' ));
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] = __ ( 'Add new custom value to intervals' ) . ': ' ;
$table_other -> data [ $row ][ 1 ] .= html_print_input_text ( 'interval_value' , '' , '' , 5 , 5 , true );
$table_other -> data [ $row ][ 1 ] .= html_print_select ( $units , 'interval_unit' , 1 , " " , '' , '' , true , false , false );
$table_other -> data [ $row ][ 1 ] .= html_print_button ( __ ( 'Add' ), 'interval_add_btn' , false , " " , 'class="sub next"' , true );
$table_other -> data [ $row ][ 1 ] .= '<br><br>' ;
2015-06-11 19:08:29 +02:00
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= __ ( 'Delete interval' ) . ': ' ;
$table_other -> data [ $row ][ 1 ] .= html_print_select ( get_periods ( false , false ), 'intervals' , " " , " " , '' , '' , true );
$table_other -> data [ $row ][ 1 ] .= html_print_button ( __ ( 'Delete' ), 'interval_del_btn' , empty ( $config [ " interval_values " ]), " " , 'class="sub cancel"' , true );
2015-06-11 19:08:29 +02:00
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= html_print_input_hidden ( 'interval_values' , $config [ " interval_values " ], true );
2015-06-11 19:08:29 +02:00
// This hidden field will be filled from jQuery before submit
2015-06-26 11:20:08 +02:00
$table_other -> data [ $row ][ 1 ] .= html_print_input_hidden ( 'interval_to_delete' , '' , true );
2015-06-11 19:08:29 +02:00
//----------------------------------------------------------------------
2015-05-04 15:44:37 +02:00
$row ++ ;
2015-06-26 11:20:08 +02:00
echo " <fieldset> " ;
echo " <legend> " . __ ( 'Other configuration' ) . " </legend> " ;
html_print_table ( $table_other );
echo " </fieldset> " ;
2015-03-17 15:36:24 +01:00
2012-08-17 13:39:25 +02:00
2015-07-14 15:59:39 +02:00
echo '<div class="action-buttons" style="width: ' . $table_other -> width . '">' ;
2011-04-27 15:43:31 +02:00
html_print_submit_button ( __ ( 'Update' ), 'update_button' , false , 'class="sub upd"' );
2009-03-31 16:32:58 +02:00
echo '</div>' ;
echo '</form>' ;
2011-04-13 18:11:02 +02:00
ui_require_css_file ( " color-picker " );
ui_require_jquery_file ( " colorpicker " );
2011-04-19 16:36:33 +02:00
function load_fonts () {
global $config ;
2016-08-23 11:56:09 +02:00
$home = str_replace ( '\\' , '/' , $config [ 'homedir' ] );
$dir = scandir ( $home . '/include/fonts/' );
2011-04-19 16:36:33 +02:00
$fonts = array ();
foreach ( $dir as $file ) {
if ( strstr ( $file , '.ttf' ) !== false ) {
2016-08-23 11:56:09 +02:00
$fonts [ $home . '/include/fonts/' . $file ] = $file ;
2011-04-19 16:36:33 +02:00
}
}
return $fonts ;
}
2014-05-07 18:42:12 +02:00
ui_require_javascript_file ( 'tiny_mce' , 'include/javascript/tiny_mce/' );
2009-03-31 16:32:58 +02:00
?>
< script language = " javascript " type = " text/javascript " >
2014-05-07 18:42:12 +02:00
// Juanma (07/05/2014) New feature: Custom front page for reports
function display_custom_report_front ( show ) {
2014-11-20 15:06:11 +01:00
2014-05-07 18:42:12 +02:00
if ( show == true ) {
2015-02-13 18:59:31 +01:00
$ ( 'tr#table2-custom_report_front-font' ) . show ();
$ ( 'tr#table2-custom_report_front-logo' ) . show ();
$ ( 'tr#table2-custom_report_front-preview' ) . show ();
$ ( 'tr#table2-custom_report_front-header' ) . show ();
$ ( 'tr#table2-custom_report_front-first_page' ) . show ();
$ ( 'tr#table2-custom_report_front-footer' ) . show ();
2014-11-20 15:06:11 +01:00
}
else {
2015-02-13 18:59:31 +01:00
$ ( 'tr#table2-custom_report_front-font' ) . hide ();
$ ( 'tr#table2-custom_report_front-logo' ) . hide ();
$ ( 'tr#table2-custom_report_front-preview' ) . hide ();
$ ( 'tr#table2-custom_report_front-header' ) . hide ();
$ ( 'tr#table2-custom_report_front-first_page' ) . hide ();
$ ( 'tr#table2-custom_report_front-footer' ) . hide ();
2014-05-07 18:42:12 +02:00
}
}
function showPreview () {
var img_value = $ ( '#custom_report_front_logo' ) . val ();
2014-11-20 15:06:11 +01:00
jQuery . post (
< ? php
echo " ' " . ui_get_full_url ( false , false , false , false ) . " ' " ;
?> + "/ajax.php",
{
" page " : " <?php echo ENTERPRISE_DIR ?>/godmode/reporting/reporting_builder.template_advanced " ,
2014-05-07 18:42:12 +02:00
" get_image_path " : " 1 " ,
2014-11-20 15:06:11 +01:00
" img_src " : img_value
},
function ( data , status ) {
$ ( " #preview_image " ) . html ( data );
}
2014-05-07 18:42:12 +02:00
);
2016-10-18 11:25:36 +02:00
}
function change_precision () {
var value = $ ( " #text-graph_precision " ) . val ();
if (( value < 0 ) || ( value > 5 )) {
$ ( " #text-graph_precision " ) . val ( 1 );
}
2014-05-07 18:42:12 +02:00
}
tinyMCE . init ({
mode : " exact " ,
elements : " textarea_custom_report_front_header, textarea_custom_report_front_footer " ,
theme : " advanced " ,
theme_advanced_toolbar_location : " top " ,
theme_advanced_toolbar_align : " left " ,
theme_advanced_buttons1 : " bold,italic, |, cut, copy, paste, |, undo, redo " ,
theme_advanced_buttons2 : " " ,
theme_advanced_buttons3 : " " ,
theme_advanced_statusbar_location : " none "
});
tinyMCE . init ({
mode : " exact " ,
elements : " textarea_custom_report_front_firstpage " ,
theme : " advanced " ,
theme_advanced_toolbar_location : " top " ,
theme_advanced_toolbar_align : " left " ,
theme_advanced_buttons1 : " bold,italic, |, image, |, cut, copy, paste, |, undo, redo, |, forecolor, |, fontsizeselect, |, justifyleft, justifycenter, justifyright " ,
theme_advanced_buttons2 : " " ,
theme_advanced_buttons3 : " " ,
convert_urls : false ,
theme_advanced_statusbar_location : " none "
});
2009-03-31 16:32:58 +02:00
$ ( document ) . ready ( function () {
$ ( " #form_setup #text-graph_color1 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color2 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color3 " ) . attachColorPicker ();
2014-03-14 09:33:13 +01:00
$ ( " #form_setup #text-graph_color4 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color5 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color6 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color7 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color8 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color9 " ) . attachColorPicker ();
$ ( " #form_setup #text-graph_color10 " ) . attachColorPicker ();
2012-12-11 17:20:10 +01:00
2015-02-09 19:34:36 +01:00
//------------------------------------------------------------------
// CUSTOM VALUES POST PROCESS
//------------------------------------------------------------------
$ ( " #button-custom_values_del_btn " ) . click ( function () {
var interval_selected = $ ( '#custom_values' ) . val ();
$ ( '#hidden-custom_value_to_delete' ) . val ( interval_selected );
$ ( " input[name='custom_value'] " ) . val ( " " );
$ ( " input[name='custom_text'] " ) . val ( " " );
$ ( '#submit-update_button' ) . trigger ( 'click' );
});
$ ( " #button-custom_value_add_btn " ) . click ( function () {
$ ( '#hidden-custom_value_add' ) . val ( 1 );
$ ( '#submit-update_button' ) . trigger ( 'click' );
});
//------------------------------------------------------------------
//------------------------------------------------------------------
// CUSTOM INTERVAL VALUES
//------------------------------------------------------------------
2012-12-11 17:20:10 +01:00
$ ( " #button-interval_del_btn " ) . click ( function () {
var interval_selected = $ ( '#intervals option:selected' ) . val ();
$ ( '#hidden-interval_to_delete' ) . val ( interval_selected );
$ ( '#submit-update_button' ) . trigger ( 'click' );
});
$ ( " #button-interval_add_btn " ) . click ( function () {
$ ( '#submit-update_button' ) . trigger ( 'click' );
});
2015-02-09 19:34:36 +01:00
//------------------------------------------------------------------
2014-05-07 18:42:12 +02:00
// Juanma (06/05/2014) New feature: Custom front page for reports
2014-11-20 15:06:11 +01:00
var custom_report = $ ( '#checkbox-custom_report_front' )
. prop ( 'checked' );
2014-05-07 18:42:12 +02:00
display_custom_report_front ( custom_report );
2014-11-20 15:06:11 +01:00
2014-05-07 18:42:12 +02:00
$ ( " #checkbox-custom_report_front " ) . click ( function () {
2014-11-20 15:06:11 +01:00
var custom_report = $ ( '#checkbox-custom_report_front' )
. prop ( 'checked' );
2014-05-07 18:42:12 +02:00
display_custom_report_front ( custom_report );
2014-11-20 15:06:11 +01:00
});
2009-03-31 16:32:58 +02:00
});
2013-01-18 18:41:00 +01:00
2015-02-11 19:41:04 +01:00
// Dialog loaders for the images previews
$ ( " #button-custom_logo_preview " ) . click ( function ( e ) {
var icon_name = $ ( " select#custom_logo option:selected " ) . val ();
var icon_path = " <?php echo $config['homeurl'] ; ?>/images/custom_logo/ " + icon_name ;
if ( icon_name == " " )
return ;
$dialog = $ ( " <div></div> " );
$image = $ ( " <img src= \" " + icon_path + " \" > " );
$image
. css ( 'max-width' , '500px' )
. css ( 'max-height' , '500px' );
try {
$dialog
. hide ()
. html ( $image )
. dialog ({
title : " <?php echo __('Logo preview'); ?> " ,
resizable : true ,
draggable : true ,
modal : true ,
overlay : {
opacity : 0.5 ,
background : " black "
},
2015-02-13 19:41:03 +01:00
minHeight : 1 ,
2015-02-11 19:41:04 +01:00
width : $image . width ,
close : function () {
$dialog
. empty ()
. remove ();
}
}) . show ();
}
catch ( err ) {
// console.log(err);
}
});
2016-10-03 12:27:59 +02:00
$ ( " #button-custom_logo_login_preview " ) . click ( function ( e ) {
var icon_name = $ ( " select#custom_logo_login option:selected " ) . val ();
var icon_path = " <?php echo $config['homeurl'] ; ?>/images/custom_logo_login/ " + icon_name ;
if ( icon_name == " " )
return ;
$dialog = $ ( " <div></div> " );
$image = $ ( " <img src= \" " + icon_path + " \" > " );
$image
. css ( 'max-width' , '500px' )
. css ( 'max-height' , '500px' );
try {
$dialog
. hide ()
. html ( $image )
. dialog ({
title : " <?php echo __('Logo preview'); ?> " ,
resizable : true ,
draggable : true ,
modal : true ,
overlay : {
opacity : 0.5 ,
background : " black "
},
minHeight : 1 ,
width : $image . width ,
close : function () {
$dialog
. empty ()
. remove ();
}
}) . show ();
}
catch ( err ) {
// console.log(err);
}
});
2015-02-11 19:41:04 +01:00
$ ( " #button-login_background_preview " ) . click ( function ( e ) {
var icon_name = $ ( " select#login_background option:selected " ) . val ();
var icon_path = " <?php echo $config['homeurl'] ; ?>/images/backgrounds/ " + icon_name ;
if ( icon_name == " " )
return ;
$dialog = $ ( " <div></div> " );
$image = $ ( " <img src= \" " + icon_path + " \" > " );
$image
. css ( 'max-width' , '500px' )
. css ( 'max-height' , '500px' );
try {
$dialog
. hide ()
. html ( $image )
. dialog ({
title : " <?php echo __('Background preview'); ?> " ,
resizable : true ,
draggable : true ,
modal : true ,
overlay : {
opacity : 0.5 ,
background : " black "
},
2015-02-13 19:41:03 +01:00
minHeight : 1 ,
2015-02-11 19:41:04 +01:00
width : $image . width ,
close : function () {
$dialog
. empty ()
. remove ();
}
}) . show ();
}
catch ( err ) {
// console.log(err);
}
});
2015-02-13 19:18:41 +01:00
$ ( " #button-gis_icon_preview " ) . click ( function ( e ) {
var icon_prefix = $ ( " select#gis_default_icon option:selected " ) . val ();
var icon_path = " <?php echo $config['homeurl'] ; ?>/images/gis_map/icons/ " + icon_prefix ;
if ( icon_prefix == " " )
return ;
$dialog = $ ( " <div></div> " );
$icon_default = $ ( " <img src= \" " + icon_path + " .default.png \" > " );
$icon_ok = $ ( " <img src= \" " + icon_path + " .ok.png \" > " );
$icon_warning = $ ( " <img src= \" " + icon_path + " .warning.png \" > " );
$icon_bad = $ ( " <img src= \" " + icon_path + " .bad.png \" > " );
try {
$dialog
. hide ()
. empty ()
. append ( $icon_default )
. append ( $icon_ok )
. append ( $icon_warning )
. append ( $icon_bad )
. dialog ({
2015-02-13 19:32:34 +01:00
title : " <?php echo __('Gis icons preview'); ?> " ,
resizable : true ,
draggable : true ,
modal : true ,
overlay : {
opacity : 0.5 ,
background : " black "
},
2015-02-13 19:41:03 +01:00
minHeight : 1 ,
2015-02-13 19:32:34 +01:00
close : function () {
$dialog
. empty ()
. remove ();
}
}) . show ();
}
catch ( err ) {
// console.log(err);
}
});
$ ( " #button-status_set_preview " ) . click ( function ( e ) {
var icon_dir = $ ( " select#status_images_set option:selected " ) . val ();
var icon_path = " <?php echo $config['homeurl'] ; ?>/images/status_sets/ " + icon_dir + " / " ;
if ( icon_dir == " " )
return ;
$dialog = $ ( " <div></div> " );
$icon_unknown_ball = $ ( " <img src= \" " + icon_path + " agent_down_ball.png \" > " );
$icon_unknown = $ ( " <img src= \" " + icon_path + " agent_down.png \" > " );
$icon_ok_ball = $ ( " <img src= \" " + icon_path + " agent_ok_ball.png \" > " );
$icon_ok = $ ( " <img src= \" " + icon_path + " agent_ok.png \" > " );
$icon_warning_ball = $ ( " <img src= \" " + icon_path + " agent_warning_ball.png \" > " );
$icon_warning = $ ( " <img src= \" " + icon_path + " agent_warning.png \" > " );
$icon_bad_ball = $ ( " <img src= \" " + icon_path + " agent_critical_ball.png \" > " );
$icon_bad = $ ( " <img src= \" " + icon_path + " agent_critical.png \" > " );
try {
$dialog
. hide ()
. empty ()
. append ( $icon_unknown_ball )
. append ( $icon_unknown )
. append ( ' ' )
. append ( $icon_ok_ball )
. append ( $icon_ok )
. append ( ' ' )
. append ( $icon_warning_ball )
. append ( $icon_warning )
. append ( ' ' )
. append ( $icon_bad_ball )
. append ( $icon_bad )
. css ( 'vertical-align' , 'middle' )
. dialog ({
title : " <?php echo __('Status set preview'); ?> " ,
2015-02-13 19:18:41 +01:00
resizable : true ,
draggable : true ,
modal : true ,
overlay : {
opacity : 0.5 ,
background : " black "
},
2015-02-13 19:41:03 +01:00
minHeight : 1 ,
2015-02-13 19:18:41 +01:00
close : function () {
$dialog
. empty ()
. remove ();
}
}) . show ();
}
catch ( err ) {
// console.log(err);
}
});
2009-03-31 16:32:58 +02:00
</ script >