From fc357b8c14a8337e1bfde7aee2028c222decaea4 Mon Sep 17 00:00:00 2001 From: Shigekazu Aoyagi Date: Tue, 11 Apr 2017 03:32:58 +0000 Subject: [PATCH 01/67] add initialize $conf->{'verbosity'} when not defined config file. --- pandora_server/util/pandora_db.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index fcec542ed8..48c9471141 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -669,6 +669,7 @@ sub pandora_load_config ($) { $conf->{'dbengine'} = 'mysql' unless defined ($conf->{'dbengine'}); $conf->{'dbport'} = '3306' unless defined ($conf->{'dbport'}); $conf->{'claim_back_snmp_modules'} = '1' unless defined ($conf->{'claim_back_snmp_modules'}); + $conf->{'verbosity'} = '3' unless defined ($conf->{'verbosity'}); # Dynamic interval configuration. $conf->{"dynamic_constant"} = 0.10 unless defined($conf->{"dynamic_constant"}); From 311ac744c6227f477d693a4bcf04186f400f00de Mon Sep 17 00:00:00 2001 From: Shigekazu Aoyagi Date: Tue, 11 Apr 2017 03:35:12 +0000 Subject: [PATCH 02/67] move logging $conf->{'_days_delete_unknown'} after defined checking --- pandora_server/util/pandora_db.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 48c9471141..3eea7ec0a4 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -840,10 +840,10 @@ sub pandora_checkdb_consistency { log_message ('CHECKDB', "Ignoring not-init data."); } - log_message ('CHECKDB', - "Deleting unknown data (More than " . $conf{'_days_delete_unknown'} . " days)."); - if (defined($conf{'_days_delete_unknown'}) && $conf{'_days_delete_unknown'} > 0) { + log_message ('CHECKDB', + "Deleting unknown data (More than " . $conf{'_days_delete_unknown'} . " days)."); + my @modules = get_db_rows($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.id_agente FROM tagente_modulo, tagente_estado From 200b821a203d648bf8c87372b0ad138a5bb09b5c Mon Sep 17 00:00:00 2001 From: Shigekazu Aoyagi Date: Tue, 11 Apr 2017 03:37:23 +0000 Subject: [PATCH 03/67] add defined check for $conf->{'_inventory_purge'} --- pandora_server/util/pandora_db.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 3eea7ec0a4..28c5adca1d 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -93,7 +93,7 @@ sub pandora_purgedb ($$) { } # Delete old inventory data - if ($conf->{'_inventory_purge'} > 0) { + if (defined ($conf->{'_inventory_purge'}) && $conf->{'_inventory_purge'} > 0) { if (enterprise_load (\%conf) != 0) { my $ulimit_timestamp_inventory = time() - (86400 * $conf->{'_inventory_purge'}); From b6d4416921defec844d014d2410d019a157b3a72 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 28 Jun 2017 12:37:40 +0200 Subject: [PATCH 04/67] Let use png logo images for reports - #1057 --- pandora_console/godmode/setup/setup_visuals.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 85a3260494..97d1b5deac 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -576,7 +576,7 @@ $row++; $dirItems = scandir($config['homedir'] . '/images/custom_logo'); foreach ($dirItems as $entryDir) { - if (strstr($entryDir, '.jpg') !== false) { + if (strstr($entryDir, '.jpg') !== false || strstr($entryDir, '.png') !== false) { $customLogos['images/custom_logo/' . $entryDir] = $entryDir; } } @@ -599,7 +599,7 @@ $table_other->data['custom_report_front-font'][1] = html_print_select ($_fonts, $table_other->data['custom_report_front-logo'][0] = __('Custom report front') . ' - ' . __('Custom logo') . 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); + __("The dir of custom logos is in your www Pandora Console in \"images/custom_logo\". You can upload more files (ONLY JPEG AND PNG) in upload tool in console."), true); $table_other->data['custom_report_front-logo'][1] = html_print_select( $customLogos, 'custom_report_front_logo', From 95184cab2124d77b0b55c70f8f3dc5f84db224e2 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 29 Jun 2017 18:19:58 +0200 Subject: [PATCH 05/67] Change pandorin dialog font color with black theme - #1060 --- pandora_console/include/help/clippy/homepage.php | 4 ++-- pandora_console/include/styles/pandora_black.css | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/help/clippy/homepage.php b/pandora_console/include/help/clippy/homepage.php index 8ba7ac2f57..be52096875 100644 --- a/pandora_console/include/help/clippy/homepage.php +++ b/pandora_console/include/help/clippy/homepage.php @@ -55,12 +55,12 @@ function clippy_start_page_homepage() { $return_tours['tours']['homepage']['steps'][] = array( 'element'=> '#clippy', 'intro' => - '
'. + '
'. __('Hi, can I help you?') . '

' . __('Let me introduce my self: I am Pandorin, the annoying assistant of Pandora FMS. You can follow my steps to do basic tasks in Pandora FMS or you can close me and never see me again.') . '
' . '
' . - '
' . + '
' . html_print_checkbox_extended ('clippy_is_annoying', 1, $clippy_is_annoying, false, 'set_clippy_annoying()', '', true) . diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 981b6223fa..3dca8bdbf9 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -2951,6 +2951,10 @@ table#policy_modules td * { border-top-right-radius: 2px; } +.clippy_body { + color: black; +} + #dialog-double_auth-container { width: 100%; text-align: center; From d75511ba92491fa1218ce0abe307fdf9b08b5b2f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 3 Jul 2017 12:58:36 +0200 Subject: [PATCH 06/67] Fixed module counter --- pandora_console/include/functions_tactical.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_tactical.php b/pandora_console/include/functions_tactical.php index a2bc1b9105..eb736d6b5c 100644 --- a/pandora_console/include/functions_tactical.php +++ b/pandora_console/include/functions_tactical.php @@ -250,7 +250,7 @@ function tactical_get_data ($id_user = false, $user_strict = false, $acltags, $r SUM(ta.warning_count) as warning,SUM(ta.unknown_count) as unknown, SUM(ta.notinit_count) as not_init, SUM(fired_count) as alerts_fired FROM tagente ta - WHERE id_grupo IN ($user_groups_ids)"); + WHERE disabled = 0 AND id_grupo IN ($user_groups_ids)"); $list['_agents_unknown_'] = $group_stat[0]["unknown"]; $list['_monitors_alerts_fired_'] = $group_stat[0]["alerts_fired"]; From ba829e78ce0c1ea2759f9af216b50b891fb3e465 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 5 Jul 2017 09:07:55 +0200 Subject: [PATCH 07/67] Removed interface link function in fictional nodes --- .../include/functions_pandora_networkmap.php | 5 ++++- .../functions_pandora_networkmap.js | 22 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_pandora_networkmap.php b/pandora_console/include/functions_pandora_networkmap.php index 97a4fd079e..660e53f95d 100644 --- a/pandora_console/include/functions_pandora_networkmap.php +++ b/pandora_console/include/functions_pandora_networkmap.php @@ -309,7 +309,7 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area $item = array(); $item['id'] = $count; - + if (enterprise_installed()) { enterprise_include_once('include/functions_pandora_networkmap.php'); $item['id_db'] = $node['id_in_db']; @@ -328,6 +328,9 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area $item['id_agent'] = (int)$node['style']['id_agent']; $item['id_module'] = (int)$node['source_data']; } + else { + $item['type'] = 3; + } $item['fixed'] = true; $item['x'] = (int)$node['x']; diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 86ab6bd914..0aec15c35d 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -1589,8 +1589,14 @@ function show_menu(item, data) { name: interface_link_add, icon: "interface_link_children", disabled : function() { + console.log(data); if (enterprise_installed) { - return false; + if (data.type == 3) { + return true; + } + else { + return false; + } } else { return true; @@ -1657,7 +1663,12 @@ function show_menu(item, data) { icon: "interface_link_parent", disabled : function() { if (enterprise_installed) { - return false; + if (data.type == 3) { + return true; + } + else { + return false; + } } else { return true; @@ -1681,7 +1692,12 @@ function show_menu(item, data) { icon: "interface_link_cancel", disabled : function() { if (enterprise_installed) { - return false; + if (data.type == 3) { + return true; + } + else { + return false; + } } else { return true; From ce35af3e61ed65ad0b6f122dfc84b947ac066aff Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 5 Jul 2017 19:08:40 +0200 Subject: [PATCH 08/67] Multiple erasure and displacement of elements in visual console - #624 --- .../visual_console_builder.editor.js | 156 +++++++++++++++++- 1 file changed, 147 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 4926a215ca..1185074424 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -15,6 +15,7 @@ var creationItem = null; var is_opened_palette = false; var idItem = 0; var selectedItem = null; +var selectedItems = null; var lines = Array(); var user_lines = Array(); var toolbuttonActive = null; @@ -1518,7 +1519,6 @@ function set_static_graph_status(idElement, image, status) { data: parameter, success: function (data) { set_static_graph_status(idElement, image, data); - if($('#'+idElement+' table').css('float') == 'right' || $('#'+idElement+ ' table').css('float') == 'left'){ $('#'+idElement+ ' img').css('margin-top', parseInt($('#'+idElement).css('height'))/2 - parseInt($('#'+idElement+ ' img').css('height'))/2); } @@ -1554,7 +1554,6 @@ function set_static_graph_status(idElement, image, status) { suffix = ".png"; break; } - set_image("image", idElement, image + suffix); } @@ -2025,6 +2024,10 @@ function createItem(type, values, id_data) { if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ $image.attr('width', '70') .attr('height', '70'); + } + else{ + $image.attr('width', $('#preview > img')[0].naturalWidth) + .attr('height', $('#preview > img')[0].naturalHeight); } } else { @@ -2761,10 +2764,19 @@ function activeToolboxButton(id, active) { } function click_delete_item_callback() { - activeToolboxButton('edit_item', false); - deleteDB(idItem); - idItem = 0; - selectedItem = null; + if(selectedItems == null){ + activeToolboxButton('edit_item', false); + deleteDB(idItem); + idItem = 0; + selectedItem = null; + } + else{ + idItem = 0; + selectedItem = null; + selectedItems.forEach( function(valor, indice, array) { + deleteDB(valor); + }); + } } /** @@ -2783,6 +2795,7 @@ function eventsItems(drag) { //$(".item").resizable(); //Disable but run in ff and in the waste (aka micro$oft IE) show ungly borders $('.item').bind('click', function(event, ui) { + event.stopPropagation(); if (!is_opened_palette) { var divParent = $(event.target); @@ -2891,6 +2904,62 @@ function eventsItems(drag) { enterprise_click_item_callback(divParent); } } + + + + if(!event.ctrlKey){ + firstItem = event.currentTarget.id; + selectedItems = null; + selectedItems = Array(); + selectedItems.push(event.currentTarget.id); + + } + else{ + + selectedItem = null; + + unselectAll(); + + if(selectedItems.indexOf(event.currentTarget.id) > -1){ + + $('#'+event.currentTarget.id).css('left', '+=1'); + $('#'+event.currentTarget.id).css('top', '+=1'); + $('#'+event.currentTarget.id).css('border', ''); + $('#'+event.currentTarget.id).attr('withborder') == 'false'; + + + selectedItems.splice(selectedItems.indexOf(event.currentTarget.id),1); + } + else{ + $('#'+event.currentTarget.id).css('left', '-=1'); + $('#'+event.currentTarget.id).css('top', '-=1'); + $('#'+event.currentTarget.id).css('border', '1px dotted rgb(0, 0, 255)'); + $('#'+event.currentTarget.id).attr('withborder') == 'true'; + + + selectedItems.push(event.currentTarget.id); + } + + + selectedItems.forEach( function(valor, indice, array) { + if(selectedItems.indexOf(valor) > -1 && $('#'+valor).css('border') != '1px dotted rgb(0, 0, 255)'){ + // $('#'+valor).css('left', '-=1'); + // $('#'+valor).css('top', '-=1'); + $('#'+valor).css('border', '1px dotted rgb(0, 0, 255)'); + $('#'+valor).attr('withborder') == 'true'; + } + }); + + $('#'+firstItem).css('left', '-=1'); + $('#'+firstItem).css('top', '-=1'); + + firstItem = null; + + } + + + + }); //Double click in the item @@ -2907,8 +2976,9 @@ function eventsItems(drag) { $(".item").draggable({containment: "#background", grid: drag}); $('.item').bind('dragstart', function(event, ui) { - - event.stopPropagation(); + + if(selectedItems == null || selectedItems.length < 2){ + event.stopPropagation(); if (!is_opened_palette) { unselectAll(); $(event.target).css('border', '1px blue dotted'); @@ -2974,6 +3044,7 @@ function eventsItems(drag) { break; default: idItem = $(event.target).attr('id'); + break; } activeToolboxButton('copy_item', true); @@ -2981,10 +3052,17 @@ function eventsItems(drag) { activeToolboxButton('delete_item', true); } } + } + else{ + console.log('Dragstart'); + + multiDragStart(event); + + } }); $('.item').bind('dragstop', function(event, ui) { - + if(selectedItems == null || selectedItems.length < 2){ event.stopPropagation(); var values = {}; @@ -2992,9 +3070,16 @@ function eventsItems(drag) { values['mov_top'] = ui.position.top; updateDB(selectedItem, idItem, values, 'dragstop'); + } + else{ + + console.log('Dragstop'); + multidragStop(event); + } }); $('.item').bind('drag', function(event, ui) { + if(selectedItems == null || selectedItems.length < 2){ if ($(event.target).hasClass('handler_start')) { selectedItem = 'handler_start'; } @@ -3075,6 +3160,11 @@ function eventsItems(drag) { draw_user_lines("", 0, 0, 0 , 0, 0, true); break; } + } + else{ + console.log('Drag'); + + } }); } @@ -3140,6 +3230,8 @@ function eventsBackground() { // Event click for background $("#background").click(function(event) { + selectedItems = null; + selectedItems = Array(); event.stopPropagation(); if (!is_opened_palette) { unselectAll(); @@ -3510,3 +3602,49 @@ function showGrid() { eventsItems(); } } + +function multiDragStart(event){ + multiDragMouse(event); + +} + +function multidragStop(event){ + $('#background').off("mousemove"); + values = []; + selectedItems.forEach( function(valor, indice, array) { + $('#'+valor).css('left','+=1'); + $('#'+valor).css('top','+=1'); + classItem = $('#'+valor).attr('class').replace(/item|ui-draggable|ui-draggable-dragging|-dragging/g, '').trim(); + values['mov_left'] = parseInt($('#'+valor).css('left')); + values['mov_top'] = parseInt($('#'+valor).css('top')); + updateDB(classItem, valor, values,'dragstop'); + }); + +} + + + +function multiDragMouse(eventDrag){ + var preX = []; + var preY = []; + + selectedItems.forEach( function(valor, indice, array) { + preX[indice] = $('#'+valor).css('left'); + preY[indice] = $('#'+valor).css('top'); + }); + + $('#background').on('mousemove',function(event){ + var moveDiffX = event.clientX - eventDrag.clientX; + var moveDiffY = event.clientY - eventDrag.clientY; + selectedItems.forEach( function(valor, indice, array) { + if(!(parseInt($('#'+valor).css('left')) < 0 && parseInt(moveDiffX)+parseInt(preX[indice]) < 0) && + !(parseInt($('#'+valor).css('left')) + parseInt($('#'+valor).css('width')) > parseInt($('#background').css('width')) && parseInt(moveDiffX+preX[indice]) > 0)){ + $('#'+valor).css('left',parseInt(moveDiffX)+parseInt(preX[indice])+'px'); + } + if(!(parseInt($('#'+valor).css('top')) < 0 && parseInt(moveDiffY)+parseInt(preY[indice]) < 0) && + !(parseInt($('#'+valor).css('top')) + parseInt($('#'+valor).css('height')) > parseInt($('#background').css('height')) && parseInt(moveDiffY+preY[indice]) > 0)){ + $('#'+valor).css('top',parseInt(moveDiffY)+parseInt(preY[indice])+'px'); + } + }); + }); +} \ No newline at end of file From dac5b6f2378bb1a069f6f5e5efc0497ae93bd38c Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 10 Jul 2017 10:04:04 +0200 Subject: [PATCH 09/67] Added correct filter name --- pandora_console/operation/agentes/status_monitor.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 2cc03db08d..58f221bb76 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -561,9 +561,8 @@ $selectDataDown = ''; $selectTimestampUp = ''; $selectTimestampDown = ''; $order = null; - switch ($sortField) { - case 'agent_name': + case 'agent_alias': switch ($sort) { case 'up': $selectAgentNameUp = $selected; From 70a226540e1910d0401609e7a8f405e03dffee73 Mon Sep 17 00:00:00 2001 From: Hirofumi Kosaka Date: Mon, 14 Aug 2017 12:03:35 +0900 Subject: [PATCH 10/67] "Massive Operations" had remained at Pandora Console. #161 --- pandora_console/godmode/massive/massive_operations.php | 2 +- pandora_console/godmode/setup/setup_general.php | 2 +- pandora_console/include/functions_config.php | 2 +- pandora_console/include/help/en/help_profile.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index 494e95e3f5..276ab4c478 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -212,7 +212,7 @@ You can of course remove the warnings, that's why we include the source and do n */ ui_print_page_header( - __('Massive operations') . ' » '. $options[$option], + __('Bulk operations') . ' » '. $options[$option], "images/gm_massive_operations.png", false, "", true, $onheader,true, "massivemodal"); // Checks if the PHP configuration is correctly diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 23a8805570..dc83d2d7f6 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -209,7 +209,7 @@ $table->data[34][0] = __('Allow create planned downtimes in the past') . $table->data[34][1] = __('Yes').'   '.html_print_radio_button ('past_planned_downtimes', 1, '', $config["past_planned_downtimes"], true).'  '; $table->data[34][1] .= __('No').'   '.html_print_radio_button ('past_planned_downtimes', 0, '', $config["past_planned_downtimes"], true); -$table->data[35][0] = __('Limit parameters massive') . +$table->data[35][0] = __('Limit parameters bulk') . ui_print_help_tip(__('Your PHP environment is setted with %d max_input_vars. Maybe you must not set this value with upper values.', ini_get("max_input_vars")), true); $table->data[35][1] = html_print_input_text('limit_parameters_massive', $config['limit_parameters_massive'], '', 10, 10, true); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 0317a34141..632dad5455 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -201,7 +201,7 @@ function config_update_config () { if (!config_update_value ('past_planned_downtimes', get_parameter('past_planned_downtimes'))) $error_update[] = __('Allow create planned downtimes in the past'); if (!config_update_value ('limit_parameters_massive', get_parameter('limit_parameters_massive'))) - $error_update[] = __('Limit parameters massive'); + $error_update[] = __('Limit parameters bulk'); if (!config_update_value ('identification_reminder', get_parameter('identification_reminder'))) $error_update[] = __('Identification_reminder'); if (!config_update_value ('include_agents', (bool)get_parameter('include_agents'))) diff --git a/pandora_console/include/help/en/help_profile.php b/pandora_console/include/help/en/help_profile.php index 58327eb36a..1222af8668 100644 --- a/pandora_console/include/help/en/help_profile.php +++ b/pandora_console/include/help/en/help_profile.php @@ -51,7 +51,7 @@ Group ManagementPM Creating inventory modulesPM Module Management (includes all suboptions)PM -Massive Management Operations AW +Bulk Management Operations AW Creating agentsAW Duplicating remote configurationsAW Downtime ManagementAW From f70763d7390ff0954a06dedd087c78ce95e20031 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 21 Aug 2017 10:48:03 +0200 Subject: [PATCH 11/67] Apply padding to event 24h event history bar for agent view - #1203 --- pandora_console/operation/agentes/estado_generalagente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 23b5dabed8..111abffeee 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -601,7 +601,7 @@ $data[0][0] .= ' . __('Events (24h)') . '' . - '
' . + '
' . graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true, true) . '
' . ''; From a399652873220c090c8cd7fceb1d665ad6fcc5c2 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 21 Aug 2017 11:29:58 +0200 Subject: [PATCH 12/67] Fix dbmanager when insert db activity in activity login info panel - #1194 --- pandora_console/extensions/dbmanager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index c74332b1eb..ccc4c77c65 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -167,7 +167,7 @@ function dbmgr_extension_main () { echo 'An error has occured when querying the database.
'; echo $error; - db_pandora_audit("Extension DB inface", "Error in SQL", false, false, $sql); + db_pandora_audit("DB Interface Extension", "Error in SQL", false, false, $sql); return; } @@ -175,7 +175,7 @@ function dbmgr_extension_main () { if (! is_array ($result)) { echo "Output: ".$result; - db_pandora_audit("Extension DB inface", "SQL", false, false, $sql); + db_pandora_audit("DB Interface Extension", "SQL", false, false, $sql); return; } From 2f5127d517d50a48618db57968d23ed5336bdd9c Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 21 Aug 2017 15:58:19 +0200 Subject: [PATCH 13/67] Change pandora help window style - #1122 --- pandora_console/include/styles/pandora.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 9d7deb64db..454ed07ecb 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -4139,6 +4139,8 @@ div#main_help_new_content { padding-top: 10px; background: white; height: 100%; + font-size: 12pt; + font-family: 'lato-bolder'; } div#main_help_new_content h1 { @@ -4150,6 +4152,15 @@ div#main_help_new_content p { font-family: 'lato-bolder'; font-size: 12pt; } +div#main_help_new_content b { + font-family: 'lato-bolder'; + font-size: 12pt; +} + +div#main_help_new_content li { + font-family: 'lato-bolder'; + font-size: 12pt; +} div#footer_help{ background: #333; From 44cf079b2061ffb3bdb8626362f921a0cb2c9035 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 22 Aug 2017 11:33:15 +0200 Subject: [PATCH 14/67] Change 24h event histogram function in pandora mobile to same that desktop pandora - #1170 --- pandora_console/mobile/operation/agent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php index de7833f1b1..c104857683 100644 --- a/pandora_console/mobile/operation/agent.php +++ b/pandora_console/mobile/operation/agent.php @@ -85,7 +85,7 @@ class Agent { $agent_id = $system->getRequest('agent_id', '0'); $width = $system->getRequest('width', '400'); graph_graphic_agentevents( - $this->id, $width, 30, SECONDS_1DAY, ui_get_full_url(false)); + $agent_id, $width, 30, SECONDS_1DAY, ui_get_full_url(false)); exit; } } From 418906add50a84c04f07a5f7b65cf4a611ddc4e7 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 22 Aug 2017 17:24:26 +0200 Subject: [PATCH 15/67] Fix bad ordination in mobile pandora events list - #1169 --- pandora_console/include/functions_events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index fe34c2ebdb..c4c85cd85b 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -126,7 +126,7 @@ function events_get_events_no_grouped($sql_post, $offset = 0, function events_get_events_grouped($sql_post, $offset = 0, $pagination = 1, $meta = false, $history = false, $total = false, - $history_db = false, $order = "ASC") { + $history_db = false, $order = "DESC") { global $config; From bc557573ec453c790f378d7789571b5f056f0d4c Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 23 Aug 2017 10:19:56 +0200 Subject: [PATCH 16/67] Fixed combo in editor --- .../include/functions_networkmap.php | 2 +- .../include/functions_pandora_networkmap.php | 8 +++-- .../operation/agentes/pandora_networkmap.php | 30 ++++++++++++++++++- .../agentes/pandora_networkmap.view.php | 1 + 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index c775ef0329..7393c083e9 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -1447,7 +1447,7 @@ function networkmap_open_graph ($layout, $nooverlap, $pure, $zoom, $head .= "size=\"$size\";"; $head .= "\n"; - + return $head; } diff --git a/pandora_console/include/functions_pandora_networkmap.php b/pandora_console/include/functions_pandora_networkmap.php index 641f9e850b..4048ee5072 100644 --- a/pandora_console/include/functions_pandora_networkmap.php +++ b/pandora_console/include/functions_pandora_networkmap.php @@ -69,6 +69,7 @@ function networkmap_process_networkmap($id = 0) { $layout = "spring2"; break; } + $simple = 0; $font_size = 12; $nooverlap = false; @@ -85,7 +86,7 @@ function networkmap_process_networkmap($id = 0) { case 1: $recon_task = db_get_row_filter('trecon_task', array('id_rt' => $networkmap['source_data'])); - + $ip_mask = $recon_task['subnet']; break; case 2: @@ -140,7 +141,7 @@ function networkmap_process_networkmap($id = 0) { $filename_dot .= "_nooverlap"; } $filename_dot .= "_" . $id . ".dot"; - + file_put_contents($filename_dot, $graph); switch (PHP_OS) { @@ -154,11 +155,12 @@ function networkmap_process_networkmap($id = 0) { break; default: $filename_plain = sys_get_temp_dir() . "/plain.txt"; + $cmd = "$filter -Tplain -o " . $filename_plain . " " . $filename_dot; break; } - + system ($cmd); unlink($filename_dot); diff --git a/pandora_console/operation/agentes/pandora_networkmap.php b/pandora_console/operation/agentes/pandora_networkmap.php index 85acec24d5..2c1bd6f29c 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.php +++ b/pandora_console/operation/agentes/pandora_networkmap.php @@ -207,12 +207,14 @@ else if ($update_networkmap || $copy_networkmap || $delete) { $recon_task_id = (int) get_parameter( 'recon_task_id', 0); - + $source = (string)get_parameter('source', 'group'); $values = array(); $values['name'] = $name; $values['id_group'] = $id_group; + + /* if ($source == 'group') { $values['source'] = 0; $values['source_data'] = $id_group; @@ -225,6 +227,32 @@ else if ($update_networkmap || $copy_networkmap || $delete) { $values['source'] = 2; $values['source_data'] = $ip_mask; } + */ + + switch ($method) { + case 'twopi': + $values['generation_method'] = 2; + break; + case 'dot': + $values['generation_method'] = 1; + break; + case 'circo': + $values['generation_method'] = 0; + break; + case 'neato': + $values['generation_method'] = 3; + break; + case 'fdp': + $values['generation_method'] = 4; + break; + case 'radial_dinamic': + $values['generation_method'] = 6; + break; + default: + $values['generation_method'] = 2; + break; + } + $description = get_parameter('description', ''); $values['description'] = $description; diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 5b34ee442c..5c5d2969c4 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -756,6 +756,7 @@ else { } $nodes_and_relations = networkmap_process_networkmap($id); + show_networkmap($id, $user_readonly, $nodes_and_relations, $dash_mode, $map_dash_details); } ?> From 7b949cb5bff2ef0379ff0a95a3d34239a5028f0b Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 31 Aug 2017 10:09:49 +0200 Subject: [PATCH 17/67] Added function to get all interfaces --- .../include/functions_networkmap.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index c775ef0329..ec1db59247 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -1808,6 +1808,26 @@ function networkmap_get_new_nodes_from_ip_mask($ip_mask, return $agents; } +function modules_get_all_interfaces($id_agent) { + $return = array(); + + $modules = db_get_all_rows_filter('tagente_modulo', + array('id_agente' => $id_agent)); + + if (empty($modules)) + $modules = array(); + + foreach ($modules as $module) { + if (preg_match ("/(.+)_ifOperStatus$/" , (string)$module['nombre'], $matches)) { + if ($matches[1]) { + $return[] = $module; + } + } + } + + return $return; +} + ?> "; From ad2cf22fa4154e72f3a236cc4f5439e3bbdc0d92 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 5 Sep 2017 17:33:38 +0200 Subject: [PATCH 23/67] Added new format to string data --- pandora_console/include/ajax/module.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index d97d51264f..c78c4d8adf 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -275,12 +275,16 @@ if ($get_module_detail) { // Detect string data with \n and convert to
's $datos = $row[$attr[0]]; - // Because this *SHIT* of print_table monster, I cannot format properly this cells - // so, eat this, motherfucker :)) - $datos = preg_replace("/\n/", "

", $datos); + $datos = preg_replace ('//', '>', $datos); + $datos = preg_replace ('/\n/i','
',$datos); + $datos = preg_replace ('/\s/i',' ',$datos); + $datos_format = "
"; + $datos_format .= $datos; + $datos_format .= "
"; // I dont why, but using index (value) method, data is automatically converted to html entities ¿? - $data[] = $datos; + $data[] = $datos_format; } elseif ($is_web_content_string) { //Fixed the goliat sends the strings from web From 8ce6920e44cf08905630062d59498d2309afd415 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 7 Sep 2017 12:11:13 +0200 Subject: [PATCH 24/67] DB changes for visual console group elements - #1245 --- pandora_console/extras/mr/7.sql | 4 ++++ pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + pandora_console/pandoradb.sql | 1 + 3 files changed, 6 insertions(+) create mode 100644 pandora_console/extras/mr/7.sql diff --git a/pandora_console/extras/mr/7.sql b/pandora_console/extras/mr/7.sql new file mode 100644 index 0000000000..8bbe1a7df2 --- /dev/null +++ b/pandora_console/extras/mr/7.sql @@ -0,0 +1,4 @@ + +START TRANSACTION; +ALTER TABLE tlayout_data ADD COLUMN `show_statistics` tinyint(2) NOT NULL default '0'; +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index c5012eac00..4e31057a89 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1230,6 +1230,7 @@ ALTER TABLE tlayout ADD `background_color` varchar(50) NOT NULL default '#FFF'; -- --------------------------------------------------------------------- ALTER TABLE tlayout_data ADD `type_graph` varchar(50) NOT NULL default 'area'; ALTER TABLE tlayout_data ADD `label_position` varchar(50) NOT NULL default 'down'; +ALTER TABLE tlayout_data ADD COLUMN `show_statistics` tinyint(2) NOT NULL default '0'; -- --------------------------------------------------------------------- -- Table `tagent_custom_fields` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 41bb6aae81..3640357a8f 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1355,6 +1355,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_data` ( `label_position` varchar(50) NOT NULL default 'down', `border_color` varchar(200) DEFAULT "", `fill_color` varchar(200) DEFAULT "", + `show_statistics` tinyint(2) NOT NULL default '0', PRIMARY KEY(`id`) ) ENGINE = InnoDB DEFAULT CHARSET=utf8; From a66a210db19b3305d12291ac7902a93875b96403 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 7 Sep 2017 16:15:17 +0200 Subject: [PATCH 25/67] Update log report --- .../reporting_builder.item_editor.php | 50 +++++++++++++++++-- .../godmode/reporting/reporting_builder.php | 12 ++++- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 0662ff8b0d..00df36a2c7 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -69,6 +69,8 @@ $exception_condition = REPORT_EXCEPTION_CONDITION_EVERYTHING; $exception_condition_value = 10; $modulegroup = 0; $period = SECONDS_1DAY; +$search = ""; +$log_number = 1000; // Added support for projection graphs $period_pg = SECONDS_5DAY; $projection_period = SECONDS_5DAY; @@ -201,9 +203,12 @@ switch ($action) { case 'event_report_log': $period = $item['period']; $description = $item['description']; + $es = json_decode($item['external_source'], true); $id_agents = $es['id_agents']; $source = $es['source']; + $search = $es['search']; + $log_number = empty($es['log_number']) ? $log_number : $es['log_number']; break; case 'simple_graph': $only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true; @@ -705,6 +710,29 @@ You can of course remove the warnings, that's why we include the source and do n + + + + + + + + + + + + + + + "; + ?> + + + $value) { + $agents2[$value['id_agente']] = $value['alias']; + } + + // $agents = agents_get_group_agents($group); + if ((empty($agents2)) || $agents2 == -1) $agents = array(); $agents_select = array(); if (is_array($id_agents) || is_object($id_agents)){ foreach ($id_agents as $id) { - foreach ($agents as $key => $a) { + foreach ($agents2 as $key => $a) { if ($key == (int)$id) { $agents_select[$key] = $key; } } } } - html_print_select($agents, 'id_agents2[]', $agents_select, $script = '', "", 0, false, true, true, '', false, "min-width: 180px"); + // html_debug($agents); + html_print_select($agents2, 'id_agents2[]', $agents_select, $script = '', "", 0, false, true, true, '', false, "min-width: 180px"); ?> @@ -2578,6 +2616,8 @@ function chooseType() { $("#row_agent").hide(); $("#row_module").hide(); $("#row_period").hide(); + $("#row_search").hide(); + $("#row_log_number").hide(); $("#row_period1").hide(); $("#row_estimate").hide(); $("#row_interval").hide(); @@ -2675,6 +2715,8 @@ function chooseType() { $("#log_help_tip").css("visibility", "visible"); $("#row_description").show(); $("#row_period").show(); + $("#row_search").show(); + $("#row_log_number").show(); $("#agents_row").show(); $("#row_source").show(); $("#row_historical_db_check").hide(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index ac6d35d4b4..705f49c2d0 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -925,9 +925,13 @@ switch ($action) { case 'event_report_log': $agents_to_report = get_parameter('id_agents2'); $source = get_parameter('source', ""); - + $search = get_parameter('search', ""); + $log_number = get_parameter('log_number', ""); + $es['source'] = $source; $es['id_agents'] = $agents_to_report; + $es['search']=$search; + $es['log_number']=$log_number; $values['external_source'] = json_encode($es); $values['period'] = get_parameter('period'); @@ -1281,9 +1285,13 @@ switch ($action) { case 'event_report_log': $agents_to_report = get_parameter('id_agents2'); $source = get_parameter('source', ""); - + $search = get_parameter('search', ""); + $log_number = get_parameter('log_number', ""); + $es['source'] = $source; $es['id_agents'] = $agents_to_report; + $es['search']=$search; + $es['log_number']=$log_number; $values['external_source'] = json_encode($es); $values['period'] = get_parameter('period'); From 598b04c2dbaec812b18977af99ba566e935987cd Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 7 Sep 2017 16:17:41 +0200 Subject: [PATCH 26/67] Added a change to boolean charts --- pandora_console/include/functions_graph.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 10433ef91a..e59bb737fc 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3952,8 +3952,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events, $k++; } } - html_debug($data2); - html_debug($data); + $data = array_merge($data2, $data); $resolution += $previus_datas_cont; } @@ -3963,7 +3962,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events, for ($i = 0; $i <= $resolution; $i++) { $timestamp = $datelimit + ($interval * $i); - if ($fullscale && ($resolution > ($config['graph_res'] * 50))) { + if ($fullscale) { $timestamp = $data[$i]['utimestamp']; } @@ -4046,7 +4045,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events, } elseif ($period < SECONDS_1MONTH) { $time_format = 'M d H\h'; - } + } else { $time_format = 'M d H\h'; } From f2f9cc666e989036d6d7cd6eb504e3e9f2b98b1e Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 7 Sep 2017 18:11:42 +0200 Subject: [PATCH 27/67] boolean graphs --- pandora_console/include/functions_graph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index e59bb737fc..d6ced0e99c 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3962,7 +3962,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events, for ($i = 0; $i <= $resolution; $i++) { $timestamp = $datelimit + ($interval * $i); - if ($fullscale) { + if ($fullscale && ($resolution > ($config['graph_res'] * 50))) { $timestamp = $data[$i]['utimestamp']; } From 7f3539ecf089c62e52f662d048af89973a38d427 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 8 Sep 2017 00:01:19 +0200 Subject: [PATCH 28/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ac9f29f903..2469475802 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.712-170907 +Version: 7.0NG.712-170908 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 b0512382ef..fa27849ada 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.712-170907" +pandora_version="7.0NG.712-170908" 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 45d9dc393c..18bc995e59 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.712'; -use constant AGENT_BUILD => '170907'; +use constant AGENT_BUILD => '170908'; # 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 496d2f1c33..71c275798f 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.712 -%define release 170907 +%define release 170908 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 58310150d3..6ab308fc5c 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.712 -%define release 170907 +%define release 170908 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 a371299d3e..d65123bfdd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.712" -PI_BUILD="170907" +PI_BUILD="170908" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 155b4bffd2..f2eb7a424c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170907} +{170908} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 669a02f1f2..8adf0ead32 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.712(Build 170907)") +#define PANDORA_VERSION ("7.0NG.712(Build 170908)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3fe8e32536..fc578b0d73 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.712(Build 170907))" + VALUE "ProductVersion", "(7.0NG.712(Build 170908))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 99b2acd74f..b183226957 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.712-170907 +Version: 7.0NG.712-170908 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 7bf21fd9d7..d89326f528 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.712-170907" +pandora_version="7.0NG.712-170908" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c58d86b343..8fb6b5254c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170907'; +$build_version = 'PC170908'; $pandora_version = 'v7.0NG.712'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b803306db9..2a6d995054 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Fri, 8 Sep 2017 12:32:21 +0200 Subject: [PATCH 29/67] Added modules selection mode --- .../agentes/planned_downtime.editor.php | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index 2d0bfe3be1..71bed3d10d 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -88,6 +88,8 @@ $id_agent = (int) get_parameter ('id_agent'); $insert_downtime_agent = (int) get_parameter ('insert_downtime_agent'); $delete_downtime_agent = (int) get_parameter ('delete_downtime_agent'); +$modules_selection_mode = (string) get_parameter('modules_selection_mode'); + // User groups with AD or AW permission for ACL checks $user_groups_ad = array_keys(users_get_groups($config['id_user'], $access)); @@ -116,7 +118,20 @@ if ($insert_downtime_agent === 1) { } else { foreach ($agents as $agent_id) { - + //check module belongs to the agent + if($modules_selection_mode == 'all'){ + $check = false; + foreach ($module_names as $module_name) { + $check_module = modules_get_agentmodule_id($module_name, $agent_id); + if (!empty($check_module)){ + $check = true; + } + } + + if (!$check){ + continue; + } + } // Check AD permission on agent $agent_group = db_get_value('id_grupo', 'tagente', 'id_agente', $agent_id); @@ -710,13 +725,25 @@ if ($id_downtime > 0) { echo "
"; echo html_print_select ($agents, "id_agents[]", -1, '', _("Any"), -2, false, true, true, '', false, 'width: 180px;'); + + if ($type_downtime != 'quiet'){ + echo '