From b33104c6419c536bf218ce3671ee981ca1456f82 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 20 Apr 2021 13:19:19 +0200 Subject: [PATCH 01/17] Fixed notifications when not fully configured --- pandora_console/include/functions_notifications.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index ef30d852f0..ba18483af0 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -239,7 +239,7 @@ function get_notification_source_targets(int $id_source, ?string $subtype=null) } $filter = sprintf( - ' AND ns.`subtype_blacklist` NOT LIKE "%%%s%%"', + ' AND (ns.`subtype_blacklist` IS NULL OR ns.`subtype_blacklist` NOT LIKE "%%%s%%") ', $subtype ); } From 8f58b74976c980452a0d4b8a751cea9d2f78b218 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Wed, 21 Apr 2021 13:05:18 +0200 Subject: [PATCH 02/17] fixed filter load in events view --- pandora_console/include/ajax/events.php | 9 +- pandora_console/operation/events/events.php | 122 ++++++++++---------- 2 files changed, 67 insertions(+), 64 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 28ec01d036..9b28ab7074 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -402,6 +402,8 @@ if ($load_filter_modal) { ); echo '
'; + echo '
'; + $table = new StdClass; $table->id = 'load_filter_form'; $table->width = '100%'; @@ -441,13 +443,15 @@ if ($load_filter_modal) { __('Load filter'), 'load_filter', false, - 'class="sub upd" onclick="load_form_filter();"', + 'class="sub upd"', true ); + $data[1] .= html_print_input_hidden('load_filter', 1, true); $table->data[] = $data; $table->rowclass[] = ''; html_print_table($table); + echo '
'; echo '
'; ?> - + Date: Fri, 23 Apr 2021 12:38:58 +0200 Subject: [PATCH 09/17] fixed error time interval editor --- pandora_console/include/functions_html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 1e9c406919..5cd840682b 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1939,7 +1939,7 @@ function html_print_extended_select_for_time( html_print_select( $units, $uniq_name.'_units', - 1, + '60', ''.$script, $nothing, $nothing_value, From 68e1e72b4673039bdbc6c36a4296ddd7856481cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 23 Apr 2021 13:43:16 +0200 Subject: [PATCH 10/17] Controlled if Integria IMS is selected for show Create workunit switch --- .../godmode/alerts/configure_alert_action.php | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index bf0dbff521..459b12d1ac 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -91,6 +91,7 @@ if ($al_action !== false) { true ); } + $is_in_group = true; } @@ -177,7 +178,7 @@ $table->data[0][1] = html_print_input_text( '', '', '', - $is_central_policies_on_node | $disabled + ($is_central_policies_on_node | $disabled) ); if (io_safe_output($name) == 'Monitoring Event') { @@ -213,7 +214,7 @@ $table->data[1][1] = '
'.html_print_select_groups( false, true, '', - $is_central_policies_on_node | $disabled + ($is_central_policies_on_node | $disabled) ).'
'; $table->colspan[1][1] = 2; @@ -247,7 +248,7 @@ $table->data[2][1] = html_print_select_from_sql( true, false, false, - $is_central_policies_on_node | $disabled + ($is_central_policies_on_node | $disabled) ); $table->data[2][1] .= ' '; if ($is_central_policies_on_node === false @@ -274,7 +275,7 @@ $table->data[3][1] = html_print_extended_select_for_time( false, true, '', - $is_central_policies_on_node | $disabled, + ($is_central_policies_on_node | $disabled), false, '', false, @@ -306,11 +307,21 @@ $table->data[5][2] = html_print_textarea( true ); -$table->data[6][0] = __('Create workunit on recovery').ui_print_help_tip( +// Selector will work only with Integria activated. +$integriaIdName = 'integria_wu'; +$table->data[$integriaIdName][0] = __('Create workunit on recovery').ui_print_help_tip( __('If closed status is set on recovery, a workunit will be added to the ticket in Integria IMS rather that closing the ticket.'), true ); -$table->data[6][1] = html_print_checkbox_switch_extended('create_wu_integria', 1, $create_wu_integria, false, '', $disabled_attr, true); +$table->data[$integriaIdName][1] = html_print_checkbox_switch_extended( + 'create_wu_integria', + 1, + $create_wu_integria, + false, + '', + $disabled_attr, + true +); for ($i = 1; $i <= $config['max_macro_fields']; $i++) { $table->data['field'.$i][0] = html_print_image( @@ -344,7 +355,7 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) { } -echo '
'; +echo ''; $table_html = html_print_table($table, true); echo $table_html; @@ -392,6 +403,7 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/'); $(document).ready (function () { var original_command; var origicommand_descriptionnal_command; + var integriaWorkUnitName = ""; if () { original_command = "', addslashes(io_safe_output(alerts_get_alert_command_command($id_command)))); ?>"; @@ -593,6 +605,13 @@ $(document).ready (function () { } + // Allow create workunit if Integria IMS Ticket is selected. + if (data['id'] == '14') { + $("#table_macros-"+integriaWorkUnitName).css('display', 'table-row'); + } else { + $("#table_macros-"+integriaWorkUnitName).css('display', 'none'); + } + var max_fields = parseInt(''); // Change the selected group From a47f99a4555df2d7d4ef05b5dca51a85d9b334e7 Mon Sep 17 00:00:00 2001 From: marcos Date: Mon, 26 Apr 2021 08:36:02 +0200 Subject: [PATCH 11/17] fixed visual error HA --- pandora_console/general/first_task/HA_cluster_builder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/general/first_task/HA_cluster_builder.php b/pandora_console/general/first_task/HA_cluster_builder.php index 530ed75893..e39892b254 100644 --- a/pandora_console/general/first_task/HA_cluster_builder.php +++ b/pandora_console/general/first_task/HA_cluster_builder.php @@ -53,8 +53,8 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no HA clus "; - echo ""; + echo ""; + echo ""; ?> Date: Mon, 26 Apr 2021 10:30:51 +0200 Subject: [PATCH 12/17] fixed error with rr and rw in report list - acls --- pandora_console/godmode/reporting/reporting_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index d4967be810..c52639d99f 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -742,7 +742,7 @@ switch ($action) { } $own_info = get_user_info($config['id_user']); - if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'RM')) { + if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'RM') || check_acl($config['id_user'], 0, 'RR')) { $return_all_group = true; } else { $return_all_group = false; From 5bfd86d9447b048cd4c3fb63936ee1d4275c09f1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 26 Apr 2021 21:21:01 +0200 Subject: [PATCH 13/17] Removed token trasnsactional_threads as manager only runs 1 thread --- pandora_server/FreeBSD/pandora_server.conf.new | 4 ---- pandora_server/conf/pandora_server.conf.new | 4 ---- pandora_server/conf/pandora_server.conf.windows | 4 ---- pandora_server/lib/PandoraFMS/Config.pm | 4 ---- 4 files changed, 16 deletions(-) diff --git a/pandora_server/FreeBSD/pandora_server.conf.new b/pandora_server/FreeBSD/pandora_server.conf.new index 2e14e0b0c1..74f70a8f54 100644 --- a/pandora_server/FreeBSD/pandora_server.conf.new +++ b/pandora_server/FreeBSD/pandora_server.conf.new @@ -433,10 +433,6 @@ snmp_threads 4 transactionalserver 0 -# Number of threads for the Transactional Server (PANDORA FMS ENTERPRISE ONLY). - -transactional_threads 1 - # Threshold for the Transactional Server (PANDORA FMS ENTERPRISE ONLY). transactional_threshold 2 diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 53ae7a4604..cab5e4ce37 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -499,10 +499,6 @@ snmp_threads 4 transactionalserver 0 -# Number of threads for the Transactional Server (PANDORA FMS ENTERPRISE ONLY). - -transactional_threads 1 - # Threshold for the Transactional Server (PANDORA FMS ENTERPRISE ONLY). transactional_threshold 2 diff --git a/pandora_server/conf/pandora_server.conf.windows b/pandora_server/conf/pandora_server.conf.windows index 195fc9ed7b..234cb4893a 100644 --- a/pandora_server/conf/pandora_server.conf.windows +++ b/pandora_server/conf/pandora_server.conf.windows @@ -427,10 +427,6 @@ snmp_threads 4 transactionalserver 0 -# Number of threads for the Transactional Server (PANDORA FMS ENTERPRISE ONLY). - -transactional_threads 1 - # Threshold for the Transactional Server (PANDORA FMS ENTERPRISE ONLY). transactional_threshold 2 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index e0057f9da5..ba9ae222a3 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -260,7 +260,6 @@ sub pandora_load_config { $pa_config->{"webserver"} = 1; # 3.0 $pa_config->{"web_timeout"} = 60; # 6.0SP5 $pa_config->{"transactionalserver"} = 0; # Default 0, introduced on 6.1 - $pa_config->{"transactional_threads"} = 1; # Default 1, introduced on 6.1 $pa_config->{"transactional_threshold"} = 2; # Default 2, introduced on 6.1 $pa_config->{"transactional_pool"} = $pa_config->{"incomingdir"} . "/" . "trans"; # Default, introduced on 6.1 $pa_config->{'snmp_logfile'} = "/var/log/pandora_snmptrap.log"; @@ -747,9 +746,6 @@ sub pandora_load_config { elsif ($parametro =~ m/^transactionalserver\s+([0-9]*)/i) { $pa_config->{'transactionalserver'}= clean_blank($1); } - elsif ($parametro =~ m/^transactional_threads\s+([0-9]*)/i) { - $pa_config->{'transactional_threads'}= clean_blank($1); - } elsif ($parametro =~ m/^transactional_threshold\s+([0-9]*\.{0,1}[0-9]*)/i) { $pa_config->{'transactional_threshold'}= clean_blank($1); } From bec8085ca54653aa88adbd8849ab6bad8bf49d1b Mon Sep 17 00:00:00 2001 From: Luis Date: Tue, 27 Apr 2021 10:34:08 +0000 Subject: [PATCH 14/17] Added path check to config attachment store --- pandora_console/include/functions_config.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index b4c946f666..e794643148 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -200,8 +200,20 @@ function config_update_config() $error_update[] = __('Use cert.'); } - if (!config_update_value('attachment_store', (string) get_parameter('attachment_store'))) { + $attachment_store = (string) get_parameter('attachment_store'); + if (file_exists($attachment_store) === false + || is_writable($attachment_store) === false + ) { $error_update[] = __('Attachment store'); + $error_update[] .= __( + "Path doesn't exists or is not writable" + ); + } else { + if (config_update_value('attachment_store', $attachment_store) === false) { + $error_update[] = __( + 'Attachment store.' + ); + } } if (!config_update_value('list_ACL_IPs_for_API', (string) get_parameter('list_ACL_IPs_for_API'))) { From c57ca2a2b8c19f5db4db19d9690186241b829e29 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Tue, 27 Apr 2021 11:44:55 +0000 Subject: [PATCH 15/17] fixed error with creation and updating gis maps --- .../godmode/gis_maps/configure_gis_map.php | 60 ++-- pandora_console/godmode/setup/gis_step_2.php | 311 ++++++++++-------- pandora_console/include/functions_gis.php | 22 +- .../operation/gis_maps/render_view.php | 14 +- 4 files changed, 238 insertions(+), 169 deletions(-) diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index c716cca43f..5b68afaf37 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -44,7 +44,7 @@ $sec2 = safe_url_extraclean($sec2); $sec = get_parameter_get('sec'); $sec = safe_url_extraclean($sec); -// Layers +// Layers. $layer_ids = get_parameter('layer_ids', []); $layers = get_parameter('layers', []); $layer_list = []; @@ -84,9 +84,10 @@ switch ($action) { $map_default_latitude = get_parameter('map_default_latitude'); $map_default_altitude = get_parameter('map_default_altitude'); $map_group_id = get_parameter('map_group_id'); - $map_levels_zoom = get_parameter('map_levels_zoom'); + $map_levels_zoom = get_parameter('map_levels_zoom', 16); $map_connection_list_temp = explode(',', get_parameter('map_connection_list')); + $listConnectionTemp = db_get_all_rows_sql('SELECT id_tmap_connection, conection_name, group_id FROM tgis_map_connection'); foreach ($map_connection_list_temp as $index => $value) { @@ -99,14 +100,14 @@ switch ($action) { $map_connection_default = get_parameter('map_connection_default'); $map_connection_list = []; - foreach ($map_connection_list_temp as $idMapConnection) { + foreach ($listConnectionTemp as $idMapConnection) { $default = 0; - if ($map_connection_default == $idMapConnection) { + if ($map_connection_default == $idMapConnection['id_tmap_connection']) { $default = 1; } $map_connection_list[] = [ - 'id_conection' => $idMapConnection, + 'id_conection' => $idMapConnection['id_tmap_connection'], 'default' => $default, ]; } @@ -124,7 +125,7 @@ switch ($action) { $map_levels_zoom ); - if (empty($invalidFields) && get_parameter('map_connection_list') != '') { + if (empty($invalidFields)) { $idMap = gis_save_map( $map_name, $map_initial_longitude, @@ -139,8 +140,13 @@ switch ($action) { $map_connection_list, $layer_list ); - $mapCreatedOk = true; - $next_action = 'update_saved'; + if ($idMap) { + $mapCreatedOk = true; + $next_action = 'update_saved'; + } else { + $next_action = 'save_new'; + $mapCreatedOk = false; + } } else { $next_action = 'save_new'; $mapCreatedOk = false; @@ -168,7 +174,7 @@ switch ($action) { $map_group_id = ''; $map_connection_list = []; $layer_list = []; - $map_levels_zoom = 0; + $map_levels_zoom = 16; break; case 'edit_map': @@ -188,9 +194,12 @@ switch ($action) { $map_default_latitude = get_parameter('map_default_latitude'); $map_default_altitude = get_parameter('map_default_altitude'); $map_group_id = get_parameter('map_group_id'); - $map_levels_zoom = get_parameter('map_levels_zoom'); + $map_levels_zoom = get_parameter('map_levels_zoom', 16); $map_connection_list_temp = explode(',', get_parameter('map_connection_list')); + + $listConnectionTemp = db_get_all_rows_sql('SELECT id_tmap_connection, conection_name, group_id FROM tgis_map_connection'); + foreach ($map_connection_list_temp as $index => $value) { $cleanValue = trim($value); if ($cleanValue == '') { @@ -201,14 +210,14 @@ switch ($action) { $map_connection_default = get_parameter('map_connection_default'); $map_connection_list = []; - foreach ($map_connection_list_temp as $idMapConnection) { + foreach ($listConnectionTemp as $idMapConnection) { $default = 0; - if ($map_connection_default == $idMapConnection) { + if ($map_connection_default == $idMapConnection['id_tmap_connection']) { $default = 1; } $map_connection_list[] = [ - 'id_conection' => $idMapConnection, + 'id_conection' => $idMapConnection['id_tmap_connection'], 'default' => $default, ]; } @@ -226,7 +235,7 @@ switch ($action) { $map_levels_zoom ); - if (empty($invalidFields) && get_parameter('map_connection_list') != '') { + if (empty($invalidFields)) { // TODO gis_update_map( $idMap, @@ -263,7 +272,7 @@ switch ($action) { $url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&map_id='.$idMap.'&action='.$next_action; $buttons['gis_maps_list'] = [ - 'active' => true, + 'active' => false, 'text' => ''.html_print_image( 'images/list.png', true, @@ -275,7 +284,7 @@ $buttons['gis_maps_list'] = [ ]; if ($idMap) { $buttons['view_gis'] = [ - 'active' => true, + 'active' => false, 'text' => ''.html_print_image( 'images/op_gis.png', true, @@ -457,7 +466,7 @@ $table->data[1][0] = __('Add Map connection').$iconError; $table->data[1][1] = "'; -// Group items +// Group items. $group_select = html_print_select_groups($config['id_user'], 'AR', false, 'layer_group_id', '', '', '', 0, true); $params = []; $params['return'] = true; @@ -597,8 +613,10 @@ $params['input_name'] = 'agent_alias_for_data'; $params['value'] = ''; $params['javascript_function_action_after_select'] = 'toggleAddGroupBtn'; $params['selectbox_group'] = 'layer_group_id'; -// Filter by group -$params['disabled_javascript_on_blur_function'] = true; +$params['javascript_is_function_select'] = true; + +// Filter by group. +$params['disabled_javascript_on_blur_function'] = false; $agent_for_group_input = ui_print_agent_autocomplete_input($params); $add_group_btn = html_print_button(__('Add'), 'add_group', true, '', 'class="sub add"', true); diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index ff1b110b1c..2ec5deb0d9 100644 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -278,26 +278,26 @@ if ($mapConnectionData != null) { } } -// Open Street Map Connection. -$optionsConnectionOSMTable = '
- ".html_print_select($listConnection, 'map_connection', '', '', '', '0', true)." + ".html_print_select($listConnection, 'map_connection_list', '', '', '', '0', true)." ".html_print_image( @@ -504,7 +513,11 @@ $table->data[2][1] = html_print_select_groups( ); $table->data[3][0] = __('Default zoom'); -$table->data[3][1] = html_print_input_text('map_zoom_level', $map_zoom_level, '', 2, 4, true).html_print_input_hidden('map_levels_zoom', $map_levels_zoom, true); +$table->data[3][1] = html_print_input_text('map_zoom_level', $map_zoom_level, '', 2, 4, true).html_print_input_hidden( + 'map_levels_zoom', + $map_levels_zoom, + true +); $table->data[4][0] = __('Center Latitude').':'; $table->data[4][1] = html_print_input_text('map_initial_latitude', $map_initial_latitude, '', 8, 8, true); @@ -571,6 +584,9 @@ $params['hidden_input_idagent_name'] = 'agent_id'; $params['input_name'] = 'agent_alias'; $params['value'] = ''; $params['javascript_function_action_after_select'] = 'active_button_add_agent'; +$params['javascript_is_function_select'] = true; +$params['disabled_javascript_on_blur_function'] = false; + $table->data[1][1] .= ui_print_agent_autocomplete_input($params); @@ -585,7 +601,7 @@ $table->data[1][1] .= '
'.''.''.''.''.'
'.htmlentities( - __('Tile Server URL'), - ENT_QUOTES, - 'UTF-8' -).':'.html_print_input_text( - 'url', - $mapConnectionDataUrl, - '', - 45, - 90, - true -).'
'; + // Open Street Map Connection. + $optionsConnectionOSMTable = '
'.htmlentities( + __('Tile Server URL'), + ENT_QUOTES, + 'UTF-8' + ).':'.html_print_input_text( + 'url', + $mapConnectionDataUrl, + '', + 45, + 90, + true + ).'
'; // Google Maps Connection. $gmaps_types['G_PHYSICAL_MAP'] = __('Google Physical'); $gmaps_types['G_HYBRID_MAP'] = __('Google Hybrid'); $gmaps_types['G_SATELITE_MAP'] = __('Google Satelite'); // TODO: Use label tags for the forms. - $optionsConnectionGmapTable = ''.''.''.'
'.__('Google Map Type').':'.trim( + $optionsConnectionGmapTable = '
'.__('Google Map Type').':'.trim( html_print_select( $gmaps_types, 'gmap_type', @@ -305,181 +305,223 @@ $optionsConnectionOSMTable = ''.''.''.''.''.''.''.''.'
'.__('Google Maps Key').':
'.html_print_input_text( + ).'
'.__('Google Maps Key').':
'.html_print_input_text( 'gmap_key', $gmap_key, '', 90, 128, true - ).'
'; + ).'
'; // Image Map Connection. - $optionsConnectionImageTable = ''.''.''.'
'.__('Image URL').':'.html_print_input_text( + $optionsConnectionImageTable = ''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.'
'.__('Image URL').':'.html_print_input_text( 'url', $mapConnectionDataUrl, '', 45, 90, true - ).'
'.__('Corners of the area of the image').':
'.__('Left').':'.html_print_input_text( + ).'
'.__('Corners of the area of the image').':
'.__('Left').':'.html_print_input_text( 'bb_left', $bb_left, '', 25, 25, true - ).''.__('Bottom').':'.html_print_input_text( + ).''.__('Bottom').':'.html_print_input_text( 'bb_bottom', $bb_bottom, '', 25, 25, true - ).'
'.__('Right').':'.html_print_input_text( + ).'
'.__('Right').':'.html_print_input_text( 'bb_right', $bb_right, '', 25, 25, true - ).''.__('Top').':'.html_print_input_text( + ).''.__('Top').':'.html_print_input_text( 'bb_top', $bb_top, '', 25, 25, true - ).'
'.__('Image Size').':
'.__('Width').':'.html_print_input_text('image_width', $image_width, '', 25, 25, true).''.__('Height').':'.html_print_input_text('image_height', $image_height, '', 25, 25, true).'
'; + ).'
'.__('Image Size').':
'.__('Width').':'.html_print_input_text( + 'image_width', + $image_width, + '', + 25, + 25, + true + ).''.__('Height').':'.html_print_input_text( + 'image_height', + $image_height, + '', + 25, + 25, + true + ).'
'; - // WMS Server Connection. - $optionsConnectionWMSTable = ''.''.''.''.''.''.''.''.''.'
'.__('WMS Server URL').''.''.html_print_input_text('url', $mapConnectionDataUrl, '', 90, 255, true).'
'.__('Layers').''.html_print_input_text('layers', $layers, '', 90, 255, true).'
'; + // WMS Server Connection. + $optionsConnectionWMSTable = '
'.__('WMS Server URL').''.html_print_input_text( + 'url', + $mapConnectionDataUrl, + '', + 90, + 255, + true + ).'
'.__('Layers').''.html_print_input_text( + 'layers', + $layers, + '', + 90, + 255, + true + ).'
'; - if ($mapConnectionData != null) { - switch ($mapConnection_type) { - case 'OSM': - $optionsConnectionTypeTable = $optionsConnectionOSMTable; - break; + if ($mapConnectionData != null) { + switch ($mapConnection_type) { + case 'OSM': + $optionsConnectionTypeTable = $optionsConnectionOSMTable; + break; - case 'Gmap': - $optionsConnectionTypeTable = $optionsConnectionGmapTable; - break; + case 'Gmap': + $optionsConnectionTypeTable = $optionsConnectionGmapTable; + break; - case 'Static_Image': - $optionsConnectionTypeTable = $optionsConnectionImageTable; - break; + case 'Static_Image': + $optionsConnectionTypeTable = $optionsConnectionImageTable; + break; - case 'WMS': - $optionsConnectionTypeTable = $optionsConnectionWMSTable; - break; + case 'WMS': + $optionsConnectionTypeTable = $optionsConnectionWMSTable; + break; - default: - // Default. - break; + default: + // Default. + break; + } } - } - echo "
".$optionsConnectionTypeTable.'
'; + echo "
".$optionsConnectionTypeTable.'
'; - echo '

'.__('Preview to select the center of the map and the default position of an agent without gis data').'


'; - html_print_button(__('Load preview map'), 'button_refresh', false, 'refreshMapView();', 'class="sub"'); - echo '

'; - echo "
"; + echo '

'.__('Preview to select the center of the map and the default position of an agent without gis data').'


'; + html_print_button(__('Load preview map'), 'button_refresh', false, 'refreshMapView();', 'class="sub next"'); + echo '

'; + echo "
"; - $table->width = '60%'; - $table->data = []; + $table->width = '60%'; + $table->data = []; - // $table->colspan[0][3] = 3; - $table->data[0][0] = ''; - $table->data[0][1] = __('Map Center'); - $table->data[0][2] = __('Default position for agents without GIS data'); + // $table->colspan[0][3] = 3; + $table->data[0][0] = ''; + $table->data[0][1] = __('Map Center'); + $table->data[0][2] = __('Default position for agents without GIS data'); - $table->data[1][0] = __('Change in the map'); - $table->data[1][1] = html_print_radio_button_extended( - 'radio_button', - 1, - '', - 1, - false, - 'changeSetManualPosition(true, false)', - '', - true - ); - $table->data[1][2] = html_print_radio_button_extended( - 'radio_button', - 2, - '', - 0, - false, - 'changeSetManualPosition(false, true)', - '', - true - ); + $table->data[1][0] = __('Change in the map'); + $table->data[1][1] = html_print_radio_button_extended( + 'radio_button', + 1, + '', + 1, + false, + 'changeSetManualPosition(true, false)', + '', + true + ); + $table->data[1][2] = html_print_radio_button_extended( + 'radio_button', + 2, + '', + 0, + false, + 'changeSetManualPosition(false, true)', + '', + true + ); - $table->data[2][0] = __('Latitude'); - $table->data[2][1] = html_print_input_text( - 'center_latitude', - $mapConnection_centerLatitude, - '', - 10, - 10, - true - ); - $table->data[2][2] = html_print_input_text( - 'default_latitude', - $mapConnection_defaultLatitude, - '', - 10, - 10, - true - ); + $table->data[2][0] = __('Latitude'); + $table->data[2][1] = html_print_input_text( + 'center_latitude', + $mapConnection_centerLatitude, + '', + 10, + 10, + true + ); + $table->data[2][2] = html_print_input_text( + 'default_latitude', + $mapConnection_defaultLatitude, + '', + 10, + 10, + true + ); - $table->data[3][0] = __('Longitude'); - $table->data[3][1] = html_print_input_text( - 'center_longitude', - $mapConnection_centerLongitude, - '', - 10, - 10, - true - ); - $table->data[3][2] = html_print_input_text( - 'default_longitude', - $mapConnection_defaultLongitude, - '', - 10, - 10, - true - ); + $table->data[3][0] = __('Longitude'); + $table->data[3][1] = html_print_input_text( + 'center_longitude', + $mapConnection_centerLongitude, + '', + 10, + 10, + true + ); + $table->data[3][2] = html_print_input_text( + 'default_longitude', + $mapConnection_defaultLongitude, + '', + 10, + 10, + true + ); - $table->data[4][0] = __('Altitude'); - $table->data[4][1] = html_print_input_text( - 'center_altitude', - $mapConnection_centerAltitude, - '', - 10, - 10, - true - ); - $table->data[4][2] = html_print_input_text( - 'default_altitude', - $mapConnection_defaultAltitude, - '', - 10, - 10, - true - ); - html_print_table($table); + $table->data[4][0] = __('Altitude'); + $table->data[4][1] = html_print_input_text( + 'center_altitude', + $mapConnection_centerAltitude, + '', + 10, + 10, + true + ); + $table->data[4][2] = html_print_input_text( + 'default_altitude', + $mapConnection_defaultAltitude, + '', + 10, + 10, + true + ); + html_print_table($table); - echo '
'; - html_print_submit_button(__('Save'), '', false, 'class="sub save wand"'); - echo '
'; - echo ''; + echo '
'; + html_print_submit_button(__('Save'), '', false, 'class="sub save wand"'); + echo '
'; + echo ''; - ui_require_javascript_file('OpenLayers/OpenLayers'); - ui_require_javascript_file('openlayers.pandora'); - ?> + ui_require_javascript_file('OpenLayers/OpenLayers'); + ui_require_javascript_file('openlayers.pandora'); + ?>