diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ca1fef23f1..62d252e367 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.754-210427 +Version: 7.0NG.754-210428 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 600d86e03b..a79e210407 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.754-210427" +pandora_version="7.0NG.754-210428" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 384f0138ed..4342b46d6f 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.754'; -use constant AGENT_BUILD => '210427'; +use constant AGENT_BUILD => '210428'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 88c347913c..684108c785 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.754 -%define release 210427 +%define release 210428 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1ac08bc869..5919694087 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.754 -%define release 210427 +%define release 210428 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index d03810de3b..f44c904139 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.754" -PI_BUILD="210427" +PI_BUILD="210428" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3d5d5b2983..4c8e6b6edd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210427} +{210428} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 3b14387455..ab01d336e9 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.754(Build 210427)") +#define PANDORA_VERSION ("7.0NG.754(Build 210428)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3be2620a0e..b9b237df2a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.754(Build 210427))" + VALUE "ProductVersion", "(7.0NG.754(Build 210428))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2f3189876c..29031b436f 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.754-210427 +Version: 7.0NG.754-210428 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 59cb1a9092..dcef0f494b 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.754-210427" +pandora_version="7.0NG.754-210428" package_pear=0 package_pandora=1 diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index a56c4d80b4..3b9670a8e0 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -196,6 +196,7 @@ function mainModuleGroups() ON ta.id_agente = tam.id_agente WHERE ta.disabled = 0 AND tam.disabled = 0 + AND tam.id_modulo <> 0 AND tam.delete_pending = 0 AND ta.id_grupo IN (%s) GROUP BY tam.id_agente_modulo diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php index 2f904dbf9f..950f4e2b81 100755 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -1096,8 +1096,13 @@ function resource_registration_extension_main() } $xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA); - - process_upload_xml($xml); + if ($xml === false) { + ui_print_error_message( + __('Error uploading resource. Check if the selected file is a valid resource template in .ptr format') + ); + } else { + process_upload_xml($xml); + } } 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 ""; ?> __('Enable module'), 'title' => __('Enable module'), + 'class' => 'invert_filter_important', ] ).''; } else { 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 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/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index c71ad1a9fe..be1abc90d3 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -63,7 +63,7 @@ if (is_ajax() === true) { $group = [ 'id_grupo' => 0, 'nombre' => 'None', - 'icon' => '', + 'icon' => 'world', 'parent' => 0, 'disabled' => 0, 'custom_id' => null, 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; 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'); + ?> - + '; $in .= $data.''; @@ -1212,6 +1243,11 @@ $in .= $data.''; $adv_inputs[] = $in; if (is_metaconsole()) { + if (empty($id_source_event) === true) { + $id_source_event = ''; + } + + $input_id_source_event = (empty($id_source_event) === true) ? '' : $id_source_event; $data = html_print_input_text( 'id_source_event', $id_source_event, @@ -1225,6 +1261,9 @@ if (is_metaconsole()) { $adv_inputs[] = $in; } +if ($date_from === '0000-00-00') { + $date_from = ''; +} // Date from. $data = html_print_input_text( @@ -1251,32 +1290,14 @@ $in = '
'; $in .= '
'; $in .= $data.'
'; -// Time from. -$data = html_print_input_text( - 'time_from', - $time_from, - '', - false, - 10, - true, - // Disabled. - false, - // Required. - false, - // Function. - '', - // Class. - '', - // OnChange. - '', - // Autocomplete. - 'off' -); -$in .= '
'; +$data = ''; $in .= $data.'
'; -$in .= '
'; $adv_inputs[] = $in; +if ($date_to === '0000-00-00') { + $date_to = ''; +} + // Date to. $data = html_print_input_text( 'date_to', @@ -1302,33 +1323,10 @@ $in = '
'; $in .= '
'; $in .= $data.'
'; -// Time to. -$data = html_print_input_text( - 'time_to', - $time_to, - '', - false, - 10, - true, - // Disabled. - false, - // Required. - false, - // Function. - '', - // Class. - '', - // OnChange. - '', - // Autocomplete. - 'off' -); -$in .= '
'; +$data = ''; $in .= $data.'
'; -$in .= '
'; $adv_inputs[] = $in; - // Tags. if (is_metaconsole()) { $data = '
'.__('Events with following tags').''.html_print_table($tabletags_with, true).'
'; @@ -1472,8 +1470,8 @@ try { $active_filters_div .= '
'; $active_filters_div .= '
'.__('Current filter').'
'; $active_filters_div .= '
'; - if ($user_filter !== false) { - $active_filters_div .= io_safe_output($user_filter['id_name']); + if ($loaded_filter !== false) { + $active_filters_div .= io_safe_output($loaded_filter['id_name']); } else { $active_filters_div .= __('Not set.'); } diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index a0d017f389..8b3455fbf0 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -119,6 +119,16 @@ $has_management_acl = check_acl_restricted_all($config['id_user'], $map['group_i $buttons = []; +$buttons['gis_maps_list'] = [ + 'text' => ''.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('GIS Maps list'), + 'class' => 'invert_filter', + ] + ).'', +]; if ($config['pure'] == 0) { $buttons[]['text'] = ''.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).''; } else { @@ -193,7 +203,7 @@ if ($layers != false) { $layer['id_tmap_layer'] ); - // calling agents_get_group_agents with none to obtain the names in the same case as they are in the DB. + // Calling agents_get_group_agents with none to obtain the names in the same case as they are in the DB. $agentNamesByGroup = []; if ($layer['tgrupo_id_grupo'] >= 0) { $agentNamesByGroup = agents_get_group_agents( @@ -239,7 +249,7 @@ if ($layers != false) { $icon_width = $icon_size[0]; $icon_height = $icon_size[1]; - // Is a group item + // Is a group item. if (!empty($groupsByAgentId[$idAgent])) { $groupId = (int) $groupsByAgentId[$idAgent]['id']; $groupName = $groupsByAgentId[$idAgent]['name']; diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index c6049fbfb5..998c6515b8 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.754 -%define release 210427 +%define release 210428 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index aa1ff974e3..a9729170e5 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.754 -%define release 210427 +%define release 210428 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 0fec977804..4c68feda43 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.754 -%define release 210427 +%define release 210428 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index ab3d546ca9..353e2d5e25 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.754-210427 +Version: 7.0NG.754-210428 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index c8ca54b24b..49b2eafa1e 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.754-210427" +pandora_version="7.0NG.754-210428" package_cpan=0 package_pandora=1 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 9347f1d3aa..fdb63e5862 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.754"; -my $pandora_build = "210427"; +my $pandora_build = "210428"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash @@ -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); } diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 40cd75f4d9..f2ac64d3c0 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -5936,7 +5936,7 @@ sub pandora_update_agent_module_count ($$$) { }; # Module counts by status. # Retrieve and hash module status counts. - my @rows = get_db_rows ($dbh, 'SELECT estado, COUNT(*) AS total FROM tagente_modulo, tagente_estado WHERE tagente_modulo.disabled=0 AND tagente_modulo.id_agente_modulo=tagente_estado.id_agente_modulo AND tagente_modulo.id_agente=?GROUP BY estado', $agent_id); + my @rows = get_db_rows ($dbh, 'SELECT estado, COUNT(*) AS total FROM tagente_modulo, tagente_estado WHERE tagente_modulo.disabled=0 AND tagente_modulo.id_modulo<>0 AND tagente_modulo.id_agente_modulo=tagente_estado.id_agente_modulo AND tagente_modulo.id_agente=?GROUP BY estado', $agent_id); foreach my $row (@rows) { $counts->{$row->{'estado'}} = $row->{'total'}; $total += $row->{'total'}; diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 92fea91ff3..13b709233d 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.754"; -my $pandora_build = "210427"; +my $pandora_build = "210428"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/lib/PandoraFMS/Sendmail.pm b/pandora_server/lib/PandoraFMS/Sendmail.pm index 79be51e44c..03851e3d69 100644 --- a/pandora_server/lib/PandoraFMS/Sendmail.pm +++ b/pandora_server/lib/PandoraFMS/Sendmail.pm @@ -491,11 +491,11 @@ sub sendmail { || return fail("send AUTH LOGIN failed (lost connection?)"); socket_read() || return fail("AUTH LOGIN failed: $server_reply"); - socket_write(encode_base64($auth->{user},$CRLF)) + socket_write(encode_base64($auth->{user}, ""), $CRLF) || return fail("send LOGIN username failed (lost connection?)"); socket_read() || return fail("LOGIN username failed: $server_reply"); - socket_write(encode_base64($auth->{password},$CRLF)) + socket_write(encode_base64($auth->{password}, ""), $CRLF) || return fail("send LOGIN password failed (lost connection?)"); socket_read() || return fail("LOGIN password failed: $server_reply"); @@ -504,7 +504,7 @@ sub sendmail { warn "Trying AUTH PLAIN\n" if ($mailcfg{debug} > 9); socket_write( "AUTH PLAIN " - . encode_base64(join("\0", $auth->{user}, $auth->{user}, $auth->{password}), $CRLF) + . encode_base64(join("\0", $auth->{user}, $auth->{user}, $auth->{password}), ""), $CRLF ) || return fail("send AUTH PLAIN failed (lost connection?)"); socket_read() || return fail("AUTH PLAIN failed: $server_reply"); @@ -518,7 +518,7 @@ sub sendmail { || return fail("AUTH CRAM-MD5 failed: $server_reply"); $challenge =~ s/^\d+\s+//; my $response = _hmac_md5($auth->{password}, decode_base64($challenge)); - socket_write(encode_base64("$auth->{user} $response", $CRLF)) + socket_write(encode_base64("$auth->{user} $response", ""), $CRLF) || return fail("AUTH CRAM-MD5 failed: $server_reply"); socket_read() || return fail("AUTH CRAM-MD5 failed: $server_reply"); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a242f5c929..9e354cca77 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.754 -%define release 210427 +%define release 210428 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1677798995..473be2e7f1 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.754 -%define release 210427 +%define release 210428 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index c1fa614742..f1cb10b52d 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.754" -PI_BUILD="210427" +PI_BUILD="210428" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 1369b9949c..f640cc05fc 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.754 PS210427"; +my $version = "7.0NG.754 PS210428"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 624933b6e6..3f41e93288 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.754 PS210427"; +my $version = "7.0NG.754 PS210428"; # save program name for logging my $progname = basename($0);