From c8fcd511bf54493c179f735ead9cfeba32a6dd0d Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 29 Nov 2021 11:07:11 +0100 Subject: [PATCH 01/38] Fix monitoring alert detail filter for defautl actions --- pandora_console/include/functions_alerts.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 19aff75cce..ab2ea63a79 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -2183,6 +2183,7 @@ function get_group_alerts( // WHEN SELECT ALL TAGS TO FILTER ALERTS if ($action_filter) { $filter .= ' AND (talert_template_modules.id IN (SELECT id_alert_template_module FROM talert_template_module_actions where id_alert_action = '.$action_filter.'))'; + $filter .= ' OR talert_template_modules.id IN (SELECT talert_templates.id FROM talert_templates where talert_templates.id_alert_action = '.$action_filter.')'; } if (is_array($options)) { From f705cc0fbaebf3eb17baea0369c703b8b6aeda06 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 14 Dec 2021 13:21:34 +0100 Subject: [PATCH 02/38] wip chart histogram list modules #8222 --- pandora_console/images/histograma.png | Bin 0 -> 933 bytes pandora_console/include/ajax/module.php | 53 ++- .../include/functions_reporting.php | 52 ++- .../Widgets/graph_module_histogram.php | 2 + pandora_console/include/styles/pandora.css | 10 + .../operation/agentes/stat_win.php | 420 ++++++++++-------- 6 files changed, 326 insertions(+), 211 deletions(-) create mode 100644 pandora_console/images/histograma.png diff --git a/pandora_console/images/histograma.png b/pandora_console/images/histograma.png new file mode 100644 index 0000000000000000000000000000000000000000..1cee771613ed1539662b034288e613bb0cbc9a73 GIT binary patch literal 933 zcmex=nP38T>!MAjrWW${@ovIz$! zvMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9l2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyo zA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s9i3g1CQq3GGAU*RJ2VdF$b$$4{OPfBE|D`;VW$ z7#Wx$-T{&j4Gc)#w^HS&+zN~Bk|+< z5-;zI*px3l{J5UskNt<^ZSPEeYrL;X;Hl4?_3ZLnX_sCjy*Hc&i|6Q7OFid*E53H+ z!M{uFn3`YYFaFQ)WPNg6`EU2^sQUJQdNpo)uj;?ua@+J{+LYeHN~5C^X&;s?S;cM0 ztlGhRWrFsBn);9Whs5uxd+PoPUF0|aL-$YVMOP9NpVg;jac)-J_wBjs@t940O9I$m ztbgQ2)%Rqt+tnA=li#-0A6oF^@P7u^U!VUoaN1h`XXspCu&BXiJJ76ydxIaI x@3e`2q+5N=T+aCV9ygs!kKSc-SFkR69COKY5V{H literal 0 HcmV?d00001 diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index c34b838ba9..ec9737d981 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1189,14 +1189,25 @@ if (check_login()) { $data[8] = ' '; if ($module['history_data'] == 1) { + $tresholds = true; + if (empty((float) $module['min_warning']) === true + && empty((float) $module['max_warning']) === true + && empty($module['warning_inverse']) === true + && empty((float) $module['min_critical']) === true + && empty((float) $module['max_critical']) === true + && empty($module['critical_inverse']) === true + ) { + $tresholds = false; + } + $nombre_tipo_modulo = modules_get_moduletype_name($module['id_tipo_modulo']); $handle = 'stat'.$nombre_tipo_modulo.'_'.$module['id_agente_modulo']; $url = 'include/procesos.php?agente='.$module['id_agente_modulo']; $win_handle = dechex(crc32($module['id_agente_modulo'].$module['nombre'])); - // Try to display the SNMP module realtime graph + // Try to display the SNMP module realtime graph. $rt_button = get_module_realtime_link_graph($module); - if (!empty($rt_button)) { + if (empty($rt_button) === false) { $data[8] = $rt_button.'  '; } @@ -1207,6 +1218,19 @@ if (check_login()) { $draw_events = 0; } + if ($tresholds === true || $graph_type === 'boolean') { + $link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&id='.$module['id_agente_modulo'].'&refresh='.SECONDS_10MINUTES.'&'."histogram=1', 'day_".$win_handle."', 800, 480)"; + $data[8] .= ''.html_print_image( + 'images/histograma.png', + true, + [ + 'border' => '0', + 'alt' => '', + 'class' => 'invert_filter', + ] + ).'   '; + } + $link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&id='.$module['id_agente_modulo'].'&refresh='.SECONDS_10MINUTES.'&'."draw_events=$draw_events', 'day_".$win_handle."', 800, 480)"; if (!is_snapshot_data($module['datos'])) { $data[8] .= ''.html_print_image( @@ -1349,9 +1373,30 @@ if (check_login()) { metaconsole_connect($server); } - $output .= grafico_modulo_sparse($params); - echo $output; + if ($params['histogram'] === true) { + $params['id_agent_module'] = $params['agent_module_id']; + $params['dinamic_proc'] = 1; + $output .= '
'; + if ($params['compare'] === 'separated') { + $graph = \reporting_module_histogram_graph( + ['datetime' => ($params['begin_date'] - $params['period'])], + $params + ); + $output .= $graph['chart']; + } + + $graph = \reporting_module_histogram_graph( + ['datetime' => $params['begin_date']], + $params + ); + $output .= $graph['chart']; + $output .= '
'; + } else { + $output .= grafico_modulo_sparse($params); + } + + echo $output; if (is_metaconsole() === true && empty($server_id) === false) { metaconsole_restore_db(); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 231684c90a..415c74854c 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -14171,6 +14171,9 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) if ($modules_is_string === false) { if ($agentmodule_info['max_critical'] == 0) { $max_value_critical = null; + if ((bool) $content['dinamic_proc'] === true) { + $max_value_critical = 0.01; + } } else { $max_value_critical = $agentmodule_info['max_critical']; } @@ -14378,26 +14381,35 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) $width_graph = 100; $height_graph = 80; - $return['chart'] = flot_slicesbar_graph( - $array_result, - $time_total, - $width_graph, - $height_graph, - $legend, - $colors, - $config['fontpath'], - $config['round_corner'], - $homeurl, - '', - '', - false, - 0, - [], - true, - $ttl, - $content['sizeForTicks'], - true - ); + if (empty($array_result) === false) { + $return['chart'] = flot_slicesbar_graph( + $array_result, + $time_total, + $width_graph, + $height_graph, + $legend, + $colors, + $config['fontpath'], + $config['round_corner'], + $homeurl, + '', + '', + false, + 0, + [], + true, + $ttl, + $content['sizeForTicks'], + true, + $report['datetime'] + ); + } else { + $return['chart'] = graph_nodata_image( + $width_graph, + $height_graph, + 'area' + ); + } if ($metaconsole_on) { // Restore db connection. diff --git a/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php b/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php index 32ca90c3cb..dba9035877 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php +++ b/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php @@ -378,6 +378,8 @@ class GraphModuleHistogramWidget extends Widget $size = parent::getSize(); + $output = ''; + // Desactive scroll bars only this item. $id_agent = $this->values['agentId']; $id_module = $this->values['moduleId']; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 169e3918ce..cf2ff8a7a3 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -8385,3 +8385,13 @@ div.stat-win-spinner img { margin: 5px; font-size: 12px; } + +.stat_win_histogram { + width: 95%; + margin: 0 auto; + margin-top: 18%; +} + +#stat-win-module-graph .stat_win_histogram div.nodata_container { + width: 100%; +} diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index c7cd106421..af8fb783c6 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -194,60 +194,7 @@ ui_print_message_dialog( $time_compare_separated = get_parameter('time_compare_separated', 0); $time_compare_overlapped = get_parameter('time_compare_overlapped', 0); $unknown_graph = get_parameter_checkbox('unknown_graph', 1); - - $fullscale_sent = get_parameter('fullscale_sent', 0); - if (!$fullscale_sent) { - if (isset($config['full_scale_option']) === false - || $config['full_scale_option'] == 0 - ) { - $fullscale = 0; - } else if ($config['full_scale_option'] == 1) { - $fullscale = 1; - } else if ($config['full_scale_option'] == 2) { - if ($graph_type == 'boolean') { - $fullscale = 1; - } else { - $fullscale = 0; - } - } - } else { - $fullscale = get_parameter('fullscale', 0); - } - - $type_mode_graph = get_parameter_checkbox( - 'type_mode_graph', - ($fullscale === 1) ? 0 : $config['type_mode_graph'] - ); - - $time_compare = false; - - if ($time_compare_separated) { - $time_compare = 'separated'; - } else if ($time_compare_overlapped) { - $time_compare = 'overlapped'; - } - - if ($zoom > 1) { - $height = ($height * ($zoom / 2.1)); - $width = ($width * ($zoom / 1.4)); - } - - // Build date. - $date = strtotime($start_date.' '.$start_time); - $now = time(); - - if ($date > $now) { - $date = $now; - } - - $urlImage = ui_get_full_url(false, false, false, false); - - $unit = db_get_value( - 'unit', - 'tagente_modulo', - 'id_agente_modulo', - $id - ); + $histogram = (bool) get_parameter('histogram', 0); // FORM TABLE. $table = html_get_predefined_table('transparent', 2); @@ -258,162 +205,257 @@ ui_print_message_dialog( $table->style[2] = 'text-align:left;font-weight: bold;'; $table->style[3] = 'text-align:left;'; $table->class = 'table_modal_alternate'; - $table->data = []; - $table->data[0][0] = __('Refresh time'); - $table->data[0][1] = html_print_extended_select_for_time( - 'refresh', - $refresh, - '', - '', - 0, - 7, - true - ); - $table->data[0][2] = __('Show events'); - $disabled = false; - if (isset($config['event_replication']) === true) { - if ($config['event_replication'] - && !$config['show_events_in_local'] - ) { - $disabled = true; + $time_compare = false; + + if ($time_compare_separated) { + $time_compare = 'separated'; + } else if ($time_compare_overlapped) { + $time_compare = 'overlapped'; + } + + if ($histogram === false) { + $fullscale_sent = get_parameter('fullscale_sent', 0); + if (!$fullscale_sent) { + if (isset($config['full_scale_option']) === false + || $config['full_scale_option'] == 0 + ) { + $fullscale = 0; + } else if ($config['full_scale_option'] == 1) { + $fullscale = 1; + } else if ($config['full_scale_option'] == 2) { + if ($graph_type == 'boolean') { + $fullscale = 1; + } else { + $fullscale = 0; + } + } + } else { + $fullscale = get_parameter('fullscale', 0); } - } - $table->data[0][3] = html_print_checkbox_switch( - 'draw_events', - 1, - (bool) $draw_events, - true, - $disabled - ); - if ($disabled) { - $table->data[1] .= ui_print_help_tip( - __("'Show events' is disabled because this %s node is set to event replication.", get_product_name()), - true + $type_mode_graph = get_parameter_checkbox( + 'type_mode_graph', + ($fullscale === 1) ? 0 : $config['type_mode_graph'] ); - } - $table->data[1][0] = __('Begin date'); - $table->data[1][1] = html_print_input_text( - 'start_date', - $start_date, - '', - 10, - 20, - true - ); + if ($zoom > 1) { + $height = ($height * ($zoom / 2.1)); + $width = ($width * ($zoom / 1.4)); + } - $table->data[1][2] = __('Show alerts'); - $table->data[1][3] = html_print_checkbox_switch( - 'draw_alerts', - 1, - (bool) $draw_alerts, - true - ); + // Build date. + $date = strtotime($start_date.' '.$start_time); + $now = time(); - $table->data[2][0] = __('Begin time'); - $table->data[2][1] = html_print_input_text( - 'start_time', - $start_time, - '', - 10, - 10, - true - ); + if ($date > $now) { + $date = $now; + } - $table->data[2][2] = __('Show unknown graph'); - $table->data[2][3] = html_print_checkbox_switch( - 'unknown_graph', - 1, - (bool) $unknown_graph, - true - ); + $urlImage = ui_get_full_url(false, false, false, false); - $table->data[3][0] = __('Time range'); - $table->data[3][1] = html_print_extended_select_for_time( - 'period', - $period, - '', - '', - 0, - 7, - true - ); + $unit = db_get_value( + 'unit', + 'tagente_modulo', + 'id_agente_modulo', + $id + ); - $table->data[3][2] = ''; - $table->data[3][3] = ''; - - if (!modules_is_boolean($id)) { - $table->data[4][0] = __('Zoom'); - $options = []; - $options[$zoom] = 'x'.$zoom; - $options[1] = 'x1'; - $options[2] = 'x2'; - $options[3] = 'x3'; - $options[4] = 'x4'; - $options[5] = 'x5'; - $table->data[4][1] = html_print_select( - $options, - 'zoom', - $zoom, + $table->data[0][0] = __('Refresh time'); + $table->data[0][1] = html_print_extended_select_for_time( + 'refresh', + $refresh, '', '', 0, + 7, + true + ); + + $table->data[0][2] = __('Show events'); + $disabled = false; + if (isset($config['event_replication']) === true) { + if ($config['event_replication'] + && !$config['show_events_in_local'] + ) { + $disabled = true; + } + } + + $table->data[0][3] = html_print_checkbox_switch( + 'draw_events', + 1, + (bool) $draw_events, + true, + $disabled + ); + if ($disabled) { + $table->data[1] .= ui_print_help_tip( + __("'Show events' is disabled because this %s node is set to event replication.", get_product_name()), + true + ); + } + + $table->data[1][0] = __('Begin date'); + $table->data[1][1] = html_print_input_text( + 'start_date', + $start_date, + '', + 10, + 20, + true + ); + + $table->data[1][2] = __('Show alerts'); + $table->data[1][3] = html_print_checkbox_switch( + 'draw_alerts', + 1, + (bool) $draw_alerts, + true + ); + + $table->data[2][0] = __('Begin time'); + $table->data[2][1] = html_print_input_text( + 'start_time', + $start_time, + '', + 10, + 10, + true + ); + + $table->data[2][2] = __('Show unknown graph'); + $table->data[2][3] = html_print_checkbox_switch( + 'unknown_graph', + 1, + (bool) $unknown_graph, + true + ); + + $table->data[3][0] = __('Time range'); + $table->data[3][1] = html_print_extended_select_for_time( + 'period', + $period, + '', + '', + 0, + 7, + true + ); + + $table->data[3][2] = ''; + $table->data[3][3] = ''; + + if (!modules_is_boolean($id)) { + $table->data[4][0] = __('Zoom'); + $options = []; + $options[$zoom] = 'x'.$zoom; + $options[1] = 'x1'; + $options[2] = 'x2'; + $options[3] = 'x3'; + $options[4] = 'x4'; + $options[5] = 'x5'; + $table->data[4][1] = html_print_select( + $options, + 'zoom', + $zoom, + '', + '', + 0, + true, + false, + false + ); + + $table->data[4][2] = __('Show percentil'); + $table->data[4][3] = html_print_checkbox_switch( + 'show_percentil', + 1, + (bool) $show_percentil, + true + ); + } + + $table->data[5][0] = __('Time compare (Overlapped)'); + $table->data[5][1] = html_print_checkbox_switch( + 'time_compare_overlapped', + 1, + (bool) $time_compare_overlapped, + true + ); + + $table->data[5][2] = __('Time compare (Separated)'); + $table->data[5][3] = html_print_checkbox_switch( + 'time_compare_separated', + 1, + (bool) $time_compare_separated, + true + ); + + + $table->data[6][0] = __('Show AVG/MAX/MIN data series in graph'); + $table->data[6][1] = html_print_checkbox_switch( + 'type_mode_graph', + 1, + (bool) $type_mode_graph, true, - false, false ); - $table->data[4][2] = __('Show percentil'); - $table->data[4][3] = html_print_checkbox_switch( - 'show_percentil', + $table->data[6][2] = __('Show full scale graph (TIP)'); + $table->data[6][2] .= ui_print_help_tip( + __('TIP mode charts do not support average - maximum - minimum series, you can only enable TIP or average, maximum or minimum series'), + true + ); + $table->data[6][3] = html_print_checkbox_switch( + 'fullscale', 1, - (bool) $show_percentil, + (bool) $fullscale, + true, + false + ); + } else { + $table->data[0][0] = __('Begin date'); + $table->data[0][1] = html_print_input_text( + 'start_date', + $start_date, + '', + 10, + 20, + true + ); + + $table->data[0][2] = __('Begin time'); + $table->data[0][3] = html_print_input_text( + 'start_time', + $start_time, + '', + 10, + 10, + true + ); + + $table->data[1][0] = __('Time range'); + $table->data[1][1] = html_print_extended_select_for_time( + 'period', + $period, + '', + '', + 0, + 7, + true + ); + + $table->data[1][2] = __('Time compare (Separated)'); + $table->data[1][3] = html_print_checkbox_switch( + 'time_compare_separated', + 1, + (bool) $time_compare_separated, true ); } - $table->data[5][0] = __('Time compare (Overlapped)'); - $table->data[5][1] = html_print_checkbox_switch( - 'time_compare_overlapped', - 1, - (bool) $time_compare_overlapped, - true - ); - - $table->data[5][2] = __('Time compare (Separated)'); - $table->data[5][3] = html_print_checkbox_switch( - 'time_compare_separated', - 1, - (bool) $time_compare_separated, - true - ); - - - $table->data[6][0] = __('Show AVG/MAX/MIN data series in graph'); - $table->data[6][1] = html_print_checkbox_switch( - 'type_mode_graph', - 1, - (bool) $type_mode_graph, - true, - false - ); - - $table->data[6][2] = __('Show full scale graph (TIP)'); - $table->data[6][2] .= ui_print_help_tip( - __('TIP mode charts do not support average - maximum - minimum series, you can only enable TIP or average, maximum or minimum series'), - true - ); - $table->data[6][3] = html_print_checkbox_switch( - 'fullscale', - 1, - (bool) $fullscale, - true, - false - ); - $form_table = html_print_table($table, true); $form_table .= '
'; $form_table .= html_print_submit_button( @@ -434,6 +476,8 @@ ui_print_message_dialog( $menu_form .= html_print_input_hidden('server', $server_id, true); } + $menu_form .= html_print_input_hidden('histogram', $histogram, true); + if (isset($_GET['type']) === true) { $type = get_parameter_get('type'); $menu_form .= html_print_input_hidden('type', $type, true); @@ -497,6 +541,8 @@ ui_print_message_dialog( 'zoom' => $zoom, 'height' => 300, 'type_mode_graph' => $type_mode_graph, + 'histogram' => $histogram, + 'begin_date' => strtotime($start_date.' '.$start_time), ]; // Graph. From daf0b4e6e927e7401c7778944d2632a72d94f416 Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 27 Dec 2021 19:01:53 +0100 Subject: [PATCH 03/38] Fix alert view with default actions node and meta --- pandora_console/include/functions_alerts.php | 2 +- pandora_console/include/functions_ui.php | 6 +++--- pandora_console/operation/agentes/alerts_status.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 7d0628861d..03ec9d8049 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -2183,7 +2183,7 @@ function get_group_alerts( // WHEN SELECT ALL TAGS TO FILTER ALERTS if ($action_filter) { $filter .= ' AND (talert_template_modules.id IN (SELECT id_alert_template_module FROM talert_template_module_actions where id_alert_action = '.$action_filter.'))'; - $filter .= ' OR talert_template_modules.id IN (SELECT talert_templates.id FROM talert_templates where talert_templates.id_alert_action = '.$action_filter.')'; + $filter .= ' OR talert_template_modules.id_alert_template IN (SELECT talert_templates.id FROM talert_templates where talert_templates.id_alert_action = '.$action_filter.')'; } if (is_array($options)) { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index ae4321dadd..c5a8ca02e5 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1203,7 +1203,7 @@ function ui_format_alert_row( $actions = alerts_get_alert_agent_module_actions($alert['id'], false, $alert['server_data']['id']); - if (empty($actions) === false) { + if (empty($actions) === false || $actionDefault != '') { $actionText = '
    '; foreach ($actions as $action) { $actionText .= '
  • '.$action['name']; @@ -1215,9 +1215,9 @@ function ui_format_alert_row( } $actionText .= '
'; - } else { + if ($actionDefault != '') { - $actionText = db_get_sql( + $actionText .= db_get_sql( sprintf( 'SELECT name FROM talert_actions WHERE id = %d', $actionDefault diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index c5d597dd39..f5402d6f38 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -420,7 +420,7 @@ if ($filter_standby == 'standby_on') { if (is_metaconsole() === true) { include_once $config['homedir'].'/enterprise/meta/include/functions_alerts_meta.php'; if ($idAgent != 0) { - $alerts['alerts_simple'] = alerts_meta_get_alerts($agents, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user); + $alerts['alerts_simple'] = alerts_meta_get_alerts($agents, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); $countAlertsSimple = alerts_meta_get_alerts($agents, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user); } else { From f19ed2fbc0ed0adc870b2a362ecea671d5fb737d Mon Sep 17 00:00:00 2001 From: Calvo Date: Tue, 4 Jan 2022 17:20:51 +0100 Subject: [PATCH 04/38] Fix api checker form --- pandora_console/extensions/api_checker.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/extensions/api_checker.php b/pandora_console/extensions/api_checker.php index 14aa4c8191..49f742217e 100755 --- a/pandora_console/extensions/api_checker.php +++ b/pandora_console/extensions/api_checker.php @@ -202,9 +202,7 @@ function extension_api_checker() echo ''; echo "
"; echo '
'; - echo ''; - echo "
"; echo '
'; echo ''.__('Custom URL').''; html_print_table($table3); From 8cdf1acd429ce8c1766bb9117066f04d4d3e61f5 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 6 Jan 2022 16:23:13 +0100 Subject: [PATCH 05/38] Fix issue with modules --- pandora_console/include/functions_html.php | 11 ++++----- .../javascript/multiselect_filtered.js | 24 ++++++++++++------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 8b5c83fd50..44536cb843 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1480,7 +1480,7 @@ function html_print_select_multiple_modules_filtered(array $data):string 'return' => true, 'nothing' => __('All'), 'nothing_value' => 0, - 'script' => 'fmModuleChange(\''.$uniqId.'\')', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.is_metaconsole().')', ] ); $output .= '
'; @@ -1533,7 +1533,7 @@ function html_print_select_multiple_modules_filtered(array $data):string 'return' => true, 'multiple' => true, 'style' => 'min-width: 200px;max-width:200px;', - 'script' => 'fmModuleChange(\''.$uniqId.'\')', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.is_metaconsole().')', ] ); @@ -1550,7 +1550,7 @@ function html_print_select_multiple_modules_filtered(array $data):string 'name' => 'filtered-module-show-common-modules-'.$uniqId, 'selected' => $data['mShowCommonModules'], 'return' => true, - 'script' => 'fmModuleChange(\''.$uniqId.'\')', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.is_metaconsole().')', ] ); @@ -1565,11 +1565,10 @@ function html_print_select_multiple_modules_filtered(array $data):string $all_modules = []; } - if ($data['mShowSelectedOtherGroups']) { + if (isset($data['mShowSelectedOtherGroups']) === true) { $selected_modules_ids = explode(',', $data['mModules']); - foreach ($selected_modules_ids as $id) { - if (!array_key_exists($id, $all_modules)) { + if (array_key_exists($id, $all_modules) === false) { $module_data = modules_get_agentmodule($id); $all_modules[$id] = $module_data['nombre']; } diff --git a/pandora_console/include/javascript/multiselect_filtered.js b/pandora_console/include/javascript/multiselect_filtered.js index c813c8e26a..8de92ffcf3 100644 --- a/pandora_console/include/javascript/multiselect_filtered.js +++ b/pandora_console/include/javascript/multiselect_filtered.js @@ -211,7 +211,7 @@ function fmAgentChange(uniqId) { } // eslint-disable-next-line no-unused-vars -function fmModuleChange(uniqId) { +function fmModuleChange(uniqId, isMeta) { var idModuleGroup = $("#filtered-module-module-group-" + uniqId).val(); var idAgents = $("#filtered-module-agents-" + uniqId).val(); var showCommonModules = $( @@ -230,14 +230,20 @@ function fmModuleChange(uniqId) { $("#filtered-module-modules-" + uniqId).html(""); if (data) { jQuery.each(data, function(id, value) { - var option = $("") - .attr( - "value", - value["id_node"] - ? value["id_node"] + "|" + value["id_agente_modulo"] - : value["id_agente_modulo"] - ) - .html(value["nombre"]); + var option = $(""); + if (isMeta === true) { + option + .attr( + "value", + value["id_node"] + ? value["id_node"] + "|" + value["id_agente_modulo"] + : value["id_agente_modulo"] + ) + .html(value["nombre"]); + } else { + option.attr("value", value).html(value); + } + $("#filtered-module-modules-" + uniqId).append(option); }); } From 4f52e1192ca08cf838cd7d3f83876e9cef4b27a9 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Fri, 7 Jan 2022 12:22:15 +0100 Subject: [PATCH 06/38] Fixed missing code --- .../include/lib/Dashboard/Widgets/agent_module.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php index bc8d1b49c7..097ab7f5f7 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php @@ -648,6 +648,10 @@ class AgentModuleWidget extends Widget if (is_array($target_modules) === true || is_numeric($target_modules) === true ) { + if (is_array($target_modules) === true) { + $target_modules = array_keys($target_modules); + } + $all_modules = Module::search( ['id_agente_modulo' => $target_modules] ); @@ -676,6 +680,8 @@ class AgentModuleWidget extends Widget ) { $carry[$item] = null; } + + $carry[] = $item; } return $carry; From 9519e00992bc64ebc93a49575456550cf32fc063 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 11 Jan 2022 16:06:58 +0100 Subject: [PATCH 07/38] Fix issues with select agents modules control --- pandora_console/include/constants.php | 1 + pandora_console/include/functions_html.php | 17 +++------- pandora_console/include/functions_modules.php | 12 +++++-- .../include/javascript/pandora_dashboards.js | 2 +- .../lib/Dashboard/Widgets/agent_module.php | 34 +++++++++---------- 5 files changed, 32 insertions(+), 34 deletions(-) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index b0bedf04aa..f2b73b332d 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -113,6 +113,7 @@ define('SECONDS_3YEARS', 94608000); // Separator constats. define('SEPARATOR_COLUMN', ';'); define('SEPARATOR_ROW', chr(10)); +define('SEPARATOR_META_MODULE', '|-|-|-|'); // Chr(10) is \n. define('SEPARATOR_COLUMN_CSV', '#'); define('SEPARATOR_ROW_CSV', "@\n"); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 44536cb843..0873ba072a 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1555,33 +1555,24 @@ function html_print_select_multiple_modules_filtered(array $data):string ); if ($data['mAgents'] !== null) { - $all_modules = select_modules_for_agent_group( + $all_modules = get_modules_agents( $data['mModuleGroup'], explode(',', $data['mAgents']), $data['mShowCommonModules'], - false + false, + true ); } else { $all_modules = []; } - if (isset($data['mShowSelectedOtherGroups']) === true) { - $selected_modules_ids = explode(',', $data['mModules']); - foreach ($selected_modules_ids as $id) { - if (array_key_exists($id, $all_modules) === false) { - $module_data = modules_get_agentmodule($id); - $all_modules[$id] = $module_data['nombre']; - } - } - } - $output .= html_print_input( [ 'label' => __('Modules'), 'type' => 'select', 'fields' => $all_modules, 'name' => 'filtered-module-modules-'.$uniqId, - 'selected' => explode(',', $data['mModules']), + 'selected' => explode((is_metaconsole() === true) ? SEPARATOR_META_MODULE : ',', $data['mModules']), 'return' => true, 'multiple' => true, 'style' => 'min-width: 200px;max-width:200px;', diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 4f27b17896..6aafccd762 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -3555,7 +3555,7 @@ function modules_get_agentmodule_mininterval_no_async($id_agent) } -function get_modules_agents($id_module_group, $id_agents, $selection, $select_mode=true) +function get_modules_agents($id_module_group, $id_agents, $selection, $select_mode=true, $useName=false) { if ((bool) is_metaconsole() === true) { if ($select_mode === true) { @@ -3675,8 +3675,14 @@ function get_modules_agents($id_module_group, $id_agents, $selection, $select_mo $modules = array_reduce( $modules, - function ($carry, $item) { - $carry[$item['id_node'].'|'.$item['id_agente_modulo']] = $item['nombre']; + function ($carry, $item) use ($useName) { + // Only works in select mode. + if ($useName === true) { + $carry[io_safe_input($item['nombre'])] = io_safe_input($item['nombre']); + } else { + $carry[$item['id_node'].'|'.$item['id_agente_modulo']] = $item['nombre']; + } + return $carry; }, [] diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index 71893c1f62..a3cc3b24fc 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -388,7 +388,7 @@ function initialiceLayout(data) { dashboardId: data.dashboardId, widgetId: widgetId }, - width: widgetId == 14 || widgetId == 2 ? 750 : 450, + width: widgetId == 14 || widgetId == 2 || widgetId == 23 ? 750 : 450, maxHeight: 600, minHeight: 400 }, diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php index 097ab7f5f7..7e43b064b2 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php @@ -35,7 +35,6 @@ use PandoraFMS\Module; */ class AgentModuleWidget extends Widget { - const MODULE_SEPARATOR = '|-|-|-|'; /** * Name widget. @@ -309,16 +308,12 @@ class AgentModuleWidget extends Widget if (is_metaconsole() === true) { $values['mModules'] = implode( - self::MODULE_SEPARATOR, + SEPARATOR_META_MODULE, array_reduce( $values['mModules'], function ($carry, $item) { $d = explode('|', $item); - if (isset($d[1]) === true) { - $carry[] = \io_safe_output($d[1]); - } else { - $carry[] = \io_safe_output($item); - } + $carry[] = (isset($d[1]) === true) ? $d[1] : $item; return $carry; }, @@ -639,7 +634,7 @@ class AgentModuleWidget extends Widget $target_modules = $this->values['mModules']; if (is_metaconsole() === true) { $target_modules = explode( - self::MODULE_SEPARATOR, + SEPARATOR_META_MODULE, $this->values['mModules'] ); @@ -674,14 +669,7 @@ class AgentModuleWidget extends Widget if (is_object($item) === true) { $carry[$item->name()] = null; } else { - if ((is_metaconsole() === true - && $this->values['mShowCommonModules'] !== '1') - || is_metaconsole() === false - ) { - $carry[$item] = null; - } - - $carry[] = $item; + $carry[io_safe_output($item)] = null; } return $carry; @@ -721,8 +709,20 @@ class AgentModuleWidget extends Widget ) { // MC should connect to nodes and retrieve information // from targets. + $reduceAllModules = []; + $tmpModules = array_reduce( + $target_modules, + function ($carry, $item) { + // In this case, the modules come with 'ยป ' chain. + $tmpCarry = explode('» ', $item); + $carry[trim($tmpCarry[1])] = null; + + return $carry; + } + ); + $modules = $agent->searchModules( - ['id_agente_modulo' => $target_modules] + ['nombre' => array_keys($tmpModules)] ); foreach ($modules as $module) { From 70d8c5177a3d0674eb17ef5e5bf7398b789b071d Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 12 Jan 2022 13:50:27 +0100 Subject: [PATCH 08/38] Fix issues in node --- .../include/lib/Dashboard/Widgets/agent_module.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php index 7e43b064b2..9b57ea41d9 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php @@ -643,12 +643,17 @@ class AgentModuleWidget extends Widget if (is_array($target_modules) === true || is_numeric($target_modules) === true ) { - if (is_array($target_modules) === true) { - $target_modules = array_keys($target_modules); - } + $target_modules = array_reduce( + $target_modules, + function ($carry, $item) { + $carry[] = io_safe_output($item); + + return $carry; + } + ); $all_modules = Module::search( - ['id_agente_modulo' => $target_modules] + ['nombre' => $target_modules] ); } else { // From previous definitions. From c93a75811101bc75974a0fbf10da752d3a6cfedf Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Wed, 12 Jan 2022 14:11:10 +0100 Subject: [PATCH 09/38] sanitize sql inputs --- pandora_console/include/functions_api.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index bfdc8c712e..5b5e8ed733 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -16559,7 +16559,11 @@ function api_get_user_info($thrash1, $thrash2, $other, $returnType) $other = json_decode(base64_decode($other['data']), true); - $sql = 'select * from tusuario where id_user = "'.$other[0]['id_user'].'" and password = "'.$other[0]['password'].'"'; + $sql = sprintf( + 'SELECT * FROM tusuario WHERE id_user = "%s" and password = "%s"', + mysql_escape_string_sql($other[0]['id_user']), + mysql_escape_string_sql($other[0]['password']) + ); $user_info = db_get_all_rows_sql($sql); From 3596ee35dfa5665500cd6c2db629882e863e94e6 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 13 Jan 2022 12:30:04 +0100 Subject: [PATCH 10/38] Perform correct visualization of information tiles --- .../lib/Dashboard/Widgets/agent_module.php | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php index 9b57ea41d9..c17b61092f 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php @@ -664,24 +664,28 @@ class AgentModuleWidget extends Widget } if ($all_modules !== null) { - $reduceAllModules = array_reduce( - $all_modules, - function ($carry, $item) { - if ($item === null) { + if (is_metaconsole() === true + && $this->values['mShowCommonModules'] === '1' + ) { + $reduceAllModules = []; + } else { + $reduceAllModules = array_reduce( + $all_modules, + function ($carry, $item) { + if ($item === null) { + return $carry; + } + + if (is_object($item) === true) { + $carry[$item->name()] = null; + } else { + $carry[io_safe_output($item)] = null; + } + return $carry; } - - if (is_object($item) === true) { - $carry[$item->name()] = null; - } else { - $carry[io_safe_output($item)] = null; - } - - return $carry; - } - ); - } else { - $reduceAllModules = []; + ); + } } $visualData = []; @@ -708,13 +712,13 @@ class AgentModuleWidget extends Widget $visualData[$agent_id]['agent_status'] = $agent->lastStatus(); $visualData[$agent_id]['agent_name'] = $agent->name(); $visualData[$agent_id]['agent_alias'] = $agent->alias(); + $visualData[$agent_id]['modules'] = []; if (is_metaconsole() === true && $this->values['mShowCommonModules'] === '1' ) { // MC should connect to nodes and retrieve information // from targets. - $reduceAllModules = []; $tmpModules = array_reduce( $target_modules, function ($carry, $item) { From 0c14b143d31f624a601dcc040d8f778a59e3aec6 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 13 Jan 2022 13:15:25 +0100 Subject: [PATCH 11/38] Fix entities --- pandora_console/include/functions_modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 6aafccd762..d5ee75fe05 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -3678,7 +3678,7 @@ function get_modules_agents($id_module_group, $id_agents, $selection, $select_mo function ($carry, $item) use ($useName) { // Only works in select mode. if ($useName === true) { - $carry[io_safe_input($item['nombre'])] = io_safe_input($item['nombre']); + $carry[io_safe_input($item['nombre'])] = $item['nombre']; } else { $carry[$item['id_node'].'|'.$item['id_agente_modulo']] = $item['nombre']; } From b34b89f5147f0edad0cfed95a57587de88364902 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 13 Jan 2022 17:45:16 +0100 Subject: [PATCH 12/38] Clean magic number and define dynamic width --- pandora_console/include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index dc7294393e..d2c75dc494 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -4186,7 +4186,7 @@ function generator_chart_to_pdf( $width_img = 650; $height_img = ($params['height'] + 50); } else { - $width_img = 550; + $width_img = $params['width']; $height_img = $params['height']; if ((int) $params['landscape'] === 1) { From f9bb085dade0a03fbfd0b48779e9141c829772cf Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Fri, 14 Jan 2022 09:05:50 +0100 Subject: [PATCH 13/38] fixed bug in monitoring event creation --- pandora_server/lib/PandoraFMS/Core.pm | 58 +++++++++++++++------------ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 9058d83e96..3871593db0 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -982,14 +982,17 @@ sub pandora_execute_alert ($$$$$$$$$;$$) { $threshold = $action->{'action_threshold'} if (defined ($action->{'action_threshold'}) && $action->{'action_threshold'} > 0); $threshold = $action->{'module_action_threshold'} if (defined ($action->{'module_action_threshold'}) && $action->{'module_action_threshold'} > 0); if (time () >= ($action->{'last_execution'} + $threshold)) { - + my $monitoring_event_custom_data = ''; + + push(@{$custom_data->{'actions'}}, safe_output($action->{'action_name'})); + # Does the action generate an event? if (safe_output($action->{'name'}) eq "Monitoring Event") { $event_generated = 1; + $monitoring_event_custom_data = $custom_data; } - - pandora_execute_action ($pa_config, $data, $agent, $alert, $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros); - push(@{$custom_data->{'actions'}}, safe_output($action->{'action_name'})); + + pandora_execute_action ($pa_config, $data, $agent, $alert, $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros, $monitoring_event_custom_data); } else { if (defined ($module)) { logger ($pa_config, "Skipping action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "' module '" . safe_output($module->{'nombre'}) . "'.", 10); @@ -1082,9 +1085,9 @@ Execute the given action. =cut ########################################################################## -sub pandora_execute_action ($$$$$$$$$;$) { +sub pandora_execute_action ($$$$$$$$$;$$) { my ($pa_config, $data, $agent, $alert, - $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros) = @_; + $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros, $custom_data) = @_; logger($pa_config, "Executing action '" . safe_output($action->{'name'}) . "' for alert '". safe_output($alert->{'name'}) . "' agent '" . (defined ($agent) ? safe_output($agent->{'nombre'}) : 'N/A') . "'.", 10); @@ -1642,25 +1645,30 @@ sub pandora_execute_action ($$$$$$$$$;$) { if ((! defined($alert->{'disable_event'})) || (defined($alert->{'disable_event'}) && $alert->{'disable_event'} == 0)) { pandora_event( - $pa_config, - $event_text, - (defined ($agent) ? $agent->{'id_grupo'} : 0), - (defined ($fullagent) ? $fullagent->{'id_agente'} : 0), - $priority, - (defined($alert) - ? defined($alert->{'id_template_module'}) - ? $alert->{'id_template_module'} - : $alert->{'id'} - : 0), - (defined($alert) ? $alert->{'id_agent_module'} : 0), - $event_type, - 0, - $dbh, - $source, - '', - $comment, - $id_extra, - $tags); + $pa_config, + $event_text, + (defined ($agent) ? $agent->{'id_grupo'} : 0), + (defined ($fullagent) ? $fullagent->{'id_agente'} : 0), + $priority, + (defined($alert) + ? defined($alert->{'id_template_module'}) + ? $alert->{'id_template_module'} + : $alert->{'id'} + : 0), + (defined($alert) ? $alert->{'id_agent_module'} : 0), + $event_type, + 0, + $dbh, + $source, + '', + $comment, + $id_extra, + $tags, + '', + '', + '', + p_encode_json($pa_config, $custom_data) + ); # Validate event (field1: agent name; field2: module name) } } elsif ($clean_name eq "Validate Event") { From 626431f27c6c4c251538909a275ca3ab48701660 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 14 Jan 2022 09:49:26 +0100 Subject: [PATCH 14/38] Added check on agents without acl --- .../include/class/TreeService.class.php | 1 + .../include/javascript/tree/TreeController.js | 36 ++++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php index 9d9018665c..ebca4562a6 100644 --- a/pandora_console/include/class/TreeService.class.php +++ b/pandora_console/include/class/TreeService.class.php @@ -430,6 +430,7 @@ class TreeService extends Tree $tmp['searchChildren'] = 1; } else { $tmp['searchChildren'] = 0; + $tmp['noAcl'] = 1; } $tmp['showEventsBtn'] = 1; diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index afa55434c0..86cddc0814 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -1183,24 +1183,26 @@ var TreeController = { disabled == false ) { if (element.type == "agent" || element.type == "module") { - $content - .click(function(e) { - _getTreeDetailData( - element.type, - element.id, - element.serverID, - function(error, data) { - if (error) { - // console.error(error); - } else { - controller.detailRecipient - .render(element.name, data) - .open(); + if (typeof element.noAcl === "undefined") { + $content + .click(function(e) { + _getTreeDetailData( + element.type, + element.id, + element.serverID, + function(error, data) { + if (error) { + // console.error(error); + } else { + controller.detailRecipient + .render(element.name, data) + .open(); + } } - } - ); - }) - .css("cursor", "pointer"); + ); + }) + .css("cursor", "pointer"); + } } } From ea67ffddb478601747d70c43ff51b83381620c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= <79-jose.gonzalez@users.noreply.brutus.artica.es> Date: Fri, 14 Jan 2022 09:08:58 +0000 Subject: [PATCH 15/38] Update functions.php --- pandora_console/include/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index d2c75dc494..baaa10a317 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -4185,8 +4185,11 @@ function generator_chart_to_pdf( ) { $width_img = 650; $height_img = ($params['height'] + 50); + } else if ($type_graph_pdf === 'hbar') { + $width_img = ($params['width'] ?? 550); + $height_img = $params['height']; } else { - $width_img = $params['width']; + $width_img = 550; $height_img = $params['height']; if ((int) $params['landscape'] === 1) { From 0f549ce813ff609e7351554308de46ede534da1e Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Fri, 14 Jan 2022 13:56:08 +0100 Subject: [PATCH 16/38] Fix issues with grid and background color --- pandora_console/include/functions.php | 5 ++++- pandora_console/include/graphs/functions_flot.php | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index d2c75dc494..baaa10a317 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -4185,8 +4185,11 @@ function generator_chart_to_pdf( ) { $width_img = 650; $height_img = ($params['height'] + 50); + } else if ($type_graph_pdf === 'hbar') { + $width_img = ($params['width'] ?? 550); + $height_img = $params['height']; } else { - $width_img = $params['width']; + $width_img = 550; $height_img = $params['height']; if ((int) $params['landscape'] === 1) { diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 3dd139bf3a..041f64ff12 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -553,11 +553,6 @@ function flot_hcolumn_chart($graph_data, $width, $height, $water_mark, $font='', { global $config; - if ($pdf === true) { - $background_color = 'white'; - $tick_color = '#000'; - } - // Include_javascript_dependencies_flot_graph(). $return = ''; From 8c86dbbc5088e87bbedea6fbc6e642394f71323c Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 17 Jan 2022 09:17:39 +0100 Subject: [PATCH 17/38] Fix meta alerts list action filter --- pandora_console/operation/agentes/alerts_status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index f5402d6f38..db6b859d42 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -428,7 +428,7 @@ if (is_metaconsole() === true) { users_get_groups($config['id_user'], 'AR', false) ); - $alerts['alerts_simple'] = alerts_meta_get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter); + $alerts['alerts_simple'] = alerts_meta_get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); $countAlertsSimple = alerts_meta_get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter); } From e8d3d93f7f62fe7bcc36582cadac72cd5b96e696 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 17 Jan 2022 10:22:30 +0100 Subject: [PATCH 18/38] Fixed pandora_black in metaconsole --- pandora_console/extensions/module_groups.php | 2 +- .../extensions/realtime_graphs.php | 2 +- .../agentes/module_manager_editor_common.php | 2 +- .../reporting_builder.item_editor.php | 32 +++++++++---------- .../godmode/setup/setup_ehorus.php | 2 +- pandora_console/include/class/HTML.class.php | 2 +- pandora_console/include/functions_agents.php | 2 +- pandora_console/include/functions_graph.php | 2 +- pandora_console/include/functions_html.php | 20 ++++++------ .../include/functions_reporting_html.php | 2 +- pandora_console/include/functions_ui.php | 4 +-- pandora_console/include/graphs/fgraph.php | 16 +++++----- .../include/graphs/functions_d3.php | 2 +- .../include/graphs/functions_flot.php | 2 +- .../include/lib/Dashboard/Widget.php | 2 +- .../lib/Dashboard/Widgets/events_list.php | 2 +- .../lib/Dashboard/Widgets/service_view.php | 2 +- .../lib/Dashboard/Widgets/tree_view.php | 2 +- .../agentes/interface_traffic_graph_win.php | 2 +- .../operation/agentes/realtime_win.php | 4 +-- .../operation/agentes/snapshot_view.php | 2 +- .../operation/agentes/stat_win.php | 2 +- .../operation/agentes/tactical.php | 2 +- .../operation/events/sound_events.php | 2 +- .../configure_integriaims_incident.php | 2 +- pandora_console/operation/users/user_edit.php | 21 ++++++------ .../operation/visual_console/public_view.php | 2 +- .../operation/visual_console/view.php | 4 +-- pandora_console/views/dashboard/cell.php | 3 +- 29 files changed, 72 insertions(+), 74 deletions(-) diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index affcff93de..0062c25a13 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -302,7 +302,7 @@ function mainModuleGroups() $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;'; $table->width = '100%'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $background_color = '#333'; } else { $background_color = '#fff'; diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index cd417e3a43..908807d2d0 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -42,7 +42,7 @@ function pandora_realtime_graphs() global $config; check_login(); - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { ui_require_css_file('pandora_black', 'include/styles/', true); } diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 58d38e48fb..265615f28c 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -98,7 +98,7 @@ function add_component_selection($id_network_component_type) global $table_simple; global $config; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $background_row = 'background-color: #444'; } else { $background_row = 'background-color: #cfcfcf'; diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 62d8aa92a0..fb93b3b30d 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -3914,7 +3914,7 @@ function print_SLA_list($width, $action, $idItem=null) '; echo html_print_select( diff --git a/pandora_console/godmode/setup/setup_ehorus.php b/pandora_console/godmode/setup/setup_ehorus.php index e65371c77c..7d6eaef617 100644 --- a/pandora_console/godmode/setup/setup_ehorus.php +++ b/pandora_console/godmode/setup/setup_ehorus.php @@ -116,7 +116,7 @@ $table_remote->data['ehorus_test'] = $row; // Print. echo '
'; echo ''; -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { html_print_image('include/ehorus/images/ehorus-logo.png'); } else { html_print_image('include/ehorus/images/ehorus-logo-grey.png'); diff --git a/pandora_console/include/class/HTML.class.php b/pandora_console/include/class/HTML.class.php index d5bf6dfc97..4d79456c8f 100644 --- a/pandora_console/include/class/HTML.class.php +++ b/pandora_console/include/class/HTML.class.php @@ -473,7 +473,7 @@ class HTML bool $direct=false ) { global $config; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $text_color = 'style="color: white"'; } diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 6dbac49957..0d1f83ae7b 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -3876,7 +3876,7 @@ function agents_get_status_animation($up=true) $red = 'images/heartbeat_green.gif'; $green = 'images/heartbeat_green.gif'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $red = 'images/heartbeat_green_black.gif'; $green = 'images/heartbeat_green_black.gif'; } diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index f561705896..995a09cffc 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1555,7 +1555,7 @@ function graphic_combined_module( $long_index = ''; - if ($config['style'] === 'pandora_black' && ($params['pdf'] === false || $params['pdf'] === null ) + if (($config['style'] === 'pandora_black' && !is_metaconsole()) && ($params['pdf'] === false || $params['pdf'] === null ) ) { $background_color = '#222'; $params['legend_color'] = '#fff'; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index d6df00d70f..7f38175f9c 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -471,7 +471,7 @@ function html_print_select_groups( global $config; $select2_css = 'select2.min'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $select2_css = 'select2_dark.min'; } @@ -777,11 +777,11 @@ function html_print_select( if ($style === false) { $styleText = ' '; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $styleText = 'style="color: white"'; } } else { - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $style .= ' color: white'; } @@ -922,7 +922,7 @@ function html_print_select( } $select2 = 'select2.min'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $select2 = 'select2_dark.min'; } @@ -2820,7 +2820,7 @@ function html_print_input_number(array $settings):string global $config; $text_color = ''; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $text_color = 'style="color: white"'; } @@ -4297,7 +4297,7 @@ function html_print_autocomplete_modules( $text_color = ''; $module_icon = 'images/search_module.png'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $text_color = 'color: white'; $module_icon = 'images/brick.menu.png'; } @@ -4599,7 +4599,7 @@ function html_print_input($data, $wrapper='div', $input_only=false) enterprise_include_once('include/functions_metaconsole.php'); - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $style = 'style="color: white"'; } @@ -5260,7 +5260,7 @@ function html_print_autocomplete_users_from_integria( global $config; $user_icon = 'images/user_green.png'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $user_icon = 'images/header_user.png'; } @@ -5367,7 +5367,7 @@ function html_print_tabs(array $tabs) $bg_color = ''; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $bg_color = 'style="background-color: #222"'; } @@ -5469,7 +5469,7 @@ function html_print_select_search( $select2_css = 'select2.min'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $select2_css = 'select2_dark.min'; } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 34a45685d2..92e20da72e 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -122,7 +122,7 @@ function html_do_report_info($report) { global $config; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $background_color = '#222'; } else { $background_color = '#f5f5f5'; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index ae4321dadd..a0883a4026 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4964,7 +4964,7 @@ function ui_print_agent_autocomplete_input($parameters) // Default value. $icon_agent = 'images/search_agent.png'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $text_color = 'style="color: white"'; $icon_agent = 'images/agent_mc.menu.png'; } @@ -5820,7 +5820,7 @@ function ui_print_agent_autocomplete_input($parameters) $html = ''; $text_color = ''; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $text_color = 'color: white'; } diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index ec83514c46..b734fd3553 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -220,7 +220,7 @@ function vbar_graph( $options['x']['font']['color'] = '#545454'; if ($options['pdf'] === true) { $options['x']['font']['color'] = '#000'; - } else if ($config['style'] === 'pandora_black') { + } else if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $options['x']['font']['color'] = '#fff'; } } @@ -238,7 +238,7 @@ function vbar_graph( // Grid color axes x. if (isset($options['x']['color']) === false) { $options['x']['color'] = '#ffffff'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $options['x']['color'] = '#222'; } } @@ -305,7 +305,7 @@ function vbar_graph( $options['y']['font']['color'] = '#545454'; if ($options['pdf'] === true) { $options['y']['font']['color'] = '#000'; - } else if ($config['style'] === 'pandora_black') { + } else if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $options['y']['font']['color'] = '#fff'; } } @@ -323,7 +323,7 @@ function vbar_graph( // Grid color axes y. if (isset($options['y']['color']) === false) { $options['y']['color'] = '#ffffff'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $options['y']['color'] = '#222'; } } @@ -361,7 +361,7 @@ function vbar_graph( if (isset($options['grid']['color']) === false) { $options['grid']['color'] = '#ffffff'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $options['grid']['color'] = '#111'; } } @@ -373,7 +373,7 @@ function vbar_graph( '#ffffff', ], ]; - if ($config['style'] === 'pandora_black' && $ttl === 1) { + if ($config['style'] === 'pandora_black' && !is_metaconsole() && $ttl === 1) { $options['grid']['backgroundColor'] = [ 'colors' => [ '#222', @@ -746,11 +746,11 @@ function hbar_graph( return generator_chart_to_pdf('hbar', $params); } - if ($config['style'] === 'pandora_black' && $ttl === 1) { + if ($config['style'] === 'pandora_black' && !is_metaconsole() && $ttl === 1) { $backgroundColor = '#222'; } - if ($config['style'] === 'pandora_black' && $ttl === 1) { + if ($config['style'] === 'pandora_black' && !is_metaconsole() && $ttl === 1) { $tick_color = '#fff'; } diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php index e126fc33b4..57cf3a1f43 100644 --- a/pandora_console/include/graphs/functions_d3.php +++ b/pandora_console/include/graphs/functions_d3.php @@ -202,7 +202,7 @@ function d3_bullet_chart( $font = array_shift(explode('.', array_pop(explode('/', $font)))); $invert_color = ''; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $invert_color = 'filter: invert(100%);'; } diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 3dd139bf3a..10fe80fe2c 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -146,7 +146,7 @@ function flot_area_graph( break; } - if ($config['style'] === 'pandora_black' && ($params['pdf'] === false || $params['pdf'] === null) && (isset($is_mobile) === false || $is_mobile === false) + if (($config['style'] === 'pandora_black' && !is_metaconsole()) && ($params['pdf'] === false || $params['pdf'] === null) && (isset($is_mobile) === false || $is_mobile === false) ) { $background_style = '#222'; $params['grid_color'] = '#fff'; diff --git a/pandora_console/include/lib/Dashboard/Widget.php b/pandora_console/include/lib/Dashboard/Widget.php index 617bd74cb8..320280718b 100644 --- a/pandora_console/include/lib/Dashboard/Widget.php +++ b/pandora_console/include/lib/Dashboard/Widget.php @@ -512,7 +512,7 @@ class Widget if (empty($values['background']) === true) { $values['background'] = '#ffffff'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $values['background'] = '#222222'; } } diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index 3330cc2ae6..602533e73a 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -750,7 +750,7 @@ class EventsListWidget extends Widget $table->data[$i] = $data; $bg_color = 'background: #E8E8E8;'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $bg_color = 'background: #222;'; } diff --git a/pandora_console/include/lib/Dashboard/Widgets/service_view.php b/pandora_console/include/lib/Dashboard/Widgets/service_view.php index ec1749671a..d838861659 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/service_view.php +++ b/pandora_console/include/lib/Dashboard/Widgets/service_view.php @@ -318,7 +318,7 @@ class ServiceViewWidget extends Widget // Css Files. \ui_require_css_file('tree', 'include/styles/', true); - if ($config['style'] == 'pandora_black') { + if ($config['style'] == 'pandora_black' && !is_metaconsole()) { \ui_require_css_file('pandora_black', 'include/styles/', true); } diff --git a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php index bca4c3f366..fe76b94ec0 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php +++ b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php @@ -542,7 +542,7 @@ class TreeViewWidget extends Widget // Css Files. \ui_require_css_file('tree', 'include/styles/', true); - if ($config['style'] == 'pandora_black') { + if ($config['style'] == 'pandora_black' && !is_metaconsole()) { \ui_require_css_file('pandora_black', 'include/styles/', true); } diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index aa674bba67..7e003eb013 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -68,7 +68,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) { } echo ''; -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { ui_require_css_file('pandora_black', 'include/styles/', true); } diff --git a/pandora_console/operation/agentes/realtime_win.php b/pandora_console/operation/agentes/realtime_win.php index db24c5b4b8..93850da156 100644 --- a/pandora_console/operation/agentes/realtime_win.php +++ b/pandora_console/operation/agentes/realtime_win.php @@ -64,7 +64,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) { $l10n->load_tables(); } -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { ui_require_css_file('pandora_black', 'include/styles/', true); } @@ -97,7 +97,7 @@ echo ' diff --git a/pandora_console/operation/agentes/snapshot_view.php b/pandora_console/operation/agentes/snapshot_view.php index fe858e1443..7f0972e813 100644 --- a/pandora_console/operation/agentes/snapshot_view.php +++ b/pandora_console/operation/agentes/snapshot_view.php @@ -79,7 +79,7 @@ if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) { if ($refresh > 0) { $query = ui_get_url_refresh(false); echo ''; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { echo ''; } } diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index c7cd106421..827ad16e32 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -67,7 +67,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) { global $config; echo ''; -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { echo ''; } diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index b4430ef128..c1274fdc47 100755 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -147,7 +147,7 @@ echo ''; // The status horizontal bars (Global health, Monitor sanity... // --------------------------------------------------------------------- $bg_color = 'background-color: #222'; -if ($config['style'] !== 'pandora_black') { +if ($config['style'] !== 'pandora_black' && !is_metaconsole()) { $bg_color = 'background-color: #fff'; } diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 3881f468ae..8959ae2f47 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -72,7 +72,7 @@ echo ''.__('Sound Events').''; '; -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { echo ''; } else { echo ''; diff --git a/pandora_console/operation/incidents/configure_integriaims_incident.php b/pandora_console/operation/incidents/configure_integriaims_incident.php index a6100eaf78..997391a781 100644 --- a/pandora_console/operation/incidents/configure_integriaims_incident.php +++ b/pandora_console/operation/incidents/configure_integriaims_incident.php @@ -225,7 +225,7 @@ $table->data[0][0] .= '
'.html_print_input_text( ).'
'; $integria_logo = 'images/integria_logo_gray.png'; -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $integria_logo = 'images/integria_logo.svg'; } diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 0a682d3046..db3b37a474 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -394,20 +394,17 @@ if (!$meta) { $home_screen .= html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true); $home_screen .= '
'; $home_screen .= html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true, false); - - - - // User only can change skins if has more than one group. - $skin = ''; - if (function_exists('skins_print_select')) { - if (count($usr_groups) > 1) { - $skin = '

'.__('Skin').':

'; - $skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'
'; - } - } } else { $home_screen = ''; - $skin = ''; +} + +// User only can change skins if has more than one group. +$skin = ''; +if (function_exists('skins_print_select')) { + if (count($usr_groups) > 1) { + $skin = '

'.__('Skin').':

'; + $skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'
'; + } } $timezone = '

'.__('Timezone').ui_print_help_tip(__('The timezone must be that of the associated server.'), true).'

'; diff --git a/pandora_console/operation/visual_console/public_view.php b/pandora_console/operation/visual_console/public_view.php index 759888aabb..36ec6bf722 100644 --- a/pandora_console/operation/visual_console/public_view.php +++ b/pandora_console/operation/visual_console/public_view.php @@ -97,7 +97,7 @@ $visualConsoleData = $visualConsole->toArray(); $visualConsoleName = $visualConsoleData['name']; $bg_color = ''; -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $bg_color = 'style="background-color: #222"'; } diff --git a/pandora_console/operation/visual_console/view.php b/pandora_console/operation/visual_console/view.php index 8b51d0a8f6..7e18e8ad30 100644 --- a/pandora_console/operation/visual_console/view.php +++ b/pandora_console/operation/visual_console/view.php @@ -269,7 +269,7 @@ if ($pure === false) { $class_basic_chart = 'basic_chart_min link-create-item'; $class_delete = 'delete_item delete_min'; $class_copy = 'copy_item'; - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $class_camera = 'camera_min_white link-create-item'; $class_percentile = 'percentile_item_min_white link-create-item'; $class_module_graph = 'graph_min_white link-create-item'; @@ -417,7 +417,7 @@ if ($pure === false) { } $bg_color = ''; -if ($config['style'] === 'pandora_black') { +if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $bg_color = 'style="background-color: #222"'; } diff --git a/pandora_console/views/dashboard/cell.php b/pandora_console/views/dashboard/cell.php index 1ec35ae777..b58fae78a6 100644 --- a/pandora_console/views/dashboard/cell.php +++ b/pandora_console/views/dashboard/cell.php @@ -78,11 +78,12 @@ if (empty($options['background']) === true) { $options['background'] = '#ffffff'; } - if ($config['style'] === 'pandora_black') { + if ($config['style'] === 'pandora_black' && !is_metaconsole()) { $options['background'] = '#222222'; } } else if ($options['background'] === '#ffffff' && $config['style'] === 'pandora_black' + && !is_metaconsole() ) { $options['background'] = '#222222'; } else if ($options['background'] === '#222222' From 5ae7afccfc3f14f7e9602a1cfd19b76d78aaf6ff Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 17 Jan 2022 11:32:51 +0100 Subject: [PATCH 19/38] Fixed pandora_black in metaconsole 2 --- pandora_console/operation/users/user_edit.php | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index db3b37a474..9117bd9ad7 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -349,7 +349,7 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) { $usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group)); $id_usr = $config['id_user']; - +$skin = ''; if (!$meta) { $home_screen = '

'.__('Home screen').ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'), true).'

'; $values = [ @@ -394,16 +394,25 @@ if (!$meta) { $home_screen .= html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true); $home_screen .= '
'; $home_screen .= html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true, false); + + // User only can change skins if has more than one group. + if (function_exists('skins_print_select')) { + if (count($usr_groups) > 1) { + $skin = '

'.__('Skin').':

'; + $skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'
'; + } + } } else { $home_screen = ''; -} - -// User only can change skins if has more than one group. -$skin = ''; -if (function_exists('skins_print_select')) { - if (count($usr_groups) > 1) { - $skin = '

'.__('Skin').':

'; - $skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'
'; + // User only can change skins if has more than one group. + if (function_exists('skins_print_select')) { + if (count($usr_groups) > 1) { + $skin = '

'.__('Skin').ui_print_help_tip( + __('This change will only apply to nodes'), + true + ).'

'; + $skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'
'; + } } } From a751fd7077e5f83e9da63b87f126b5883f366cf3 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 18 Jan 2022 09:07:49 +0100 Subject: [PATCH 20/38] fixed event view filter --- pandora_console/include/functions_events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 3d7de884d6..9b097d4a93 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1157,7 +1157,7 @@ function events_get_all( } if ($tags[0] === $id_tag) { - $_tmp .= ' AND ( '; + $_tmp .= ' AND (( '; } else { $_tmp .= ' OR ( '; } @@ -1185,7 +1185,7 @@ function events_get_all( $_tmp .= ') '; } - $sql_filters[] = $_tmp; + $sql_filters[] = $_tmp.')'; } } From b2fe6780ac6885d6c11fb08406d8a347bd5b4bb6 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 18 Jan 2022 11:39:37 +0100 Subject: [PATCH 21/38] Fixed links in networkmaps --- .../functions_pandora_networkmap.js | 32 ++++++++++++++++--- .../agentes/pandora_networkmap.view.php | 18 +++++------ 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 262c31f860..fb88c9f3e5 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -683,10 +683,10 @@ function update_link(row_index, id_link) { temp_link["text_end"] = data["text_end"]; $.each(graph.nodes, function(k, node) { - if (node["id_agent"] == data["id_db_target"]) { + if (node["id_db"] == data["id_db_target"]) { temp_link["target"] = graph.nodes[k]; } - if (node["id_agent"] == data["id_db_source"]) { + if (node["id_db"] == data["id_db_source"]) { temp_link["source"] = graph.nodes[k]; } }); @@ -703,9 +703,21 @@ function update_link(row_index, id_link) { .append("g") .attr("id", "layer_graph_nodes_" + networkmap_id); + var graph_links_aux = graph.links.filter(function(d, i) { + if (typeof d["source"] === "undefined") { + return false; + } + + if (typeof d["target"] === "undefined") { + return false; + } + + return d; + }); + force .nodes(graph.nodes) - .links(graph.links) + .links(graph_links_aux) .start(); window.node = layer_graph_nodes.selectAll(".node"); @@ -2353,9 +2365,21 @@ function refresh_holding_area() { .append("g") .attr("id", "layer_graph_nodes_" + networkmap_id); + var graph_links_aux = graph.links.filter(function(d, i) { + if (typeof d["source"] === "undefined") { + return false; + } + + if (typeof d["target"] === "undefined") { + return false; + } + + return d; + }); + force .nodes(graph.nodes) - .links(graph.links) + .links(graph_links_aux) .start(); window.node = layer_graph_nodes.selectAll(".node"); diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 3b29b6317f..7747c0cbdc 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -1026,12 +1026,12 @@ if (is_ajax() === true) { // Source_value is id_agente. $source_text = ''; $source_agent = $interface_source; - $source_type = NODE_AGENT; + $source_type = ($interface_source == 0) ? NODE_PANDORA : NODE_AGENT; $source_link_value = $source_agent; } // Search node id in map. - $child_id = db_get_value_filter( + $parent_id = db_get_value_filter( 'id', 'titem', [ @@ -1073,7 +1073,7 @@ if (is_ajax() === true) { } // Search node id in map. - $parent_id = db_get_value_filter( + $child_id = db_get_value_filter( 'id', 'titem', [ @@ -1089,10 +1089,10 @@ if (is_ajax() === true) { $link['id_item'] = 0; $link['deleted'] = 0; $link['id_map'] = $networkmap_id; - $link['parent_type'] = $target_type; - $link['id_parent_source_data'] = $target_link_value; - $link['child_type'] = $source_type; - $link['id_child_source_data'] = $source_link_value; + $link['parent_type'] = $source_type; + $link['id_parent_source_data'] = $source_link_value; + $link['child_type'] = $target_type; + $link['id_child_source_data'] = $target_link_value; $insert_result = db_process_sql_insert('trel_item', $link); @@ -1123,8 +1123,8 @@ if (is_ajax() === true) { $return['text_start'] = $source_text; $return['text_end'] = $target_text; $return['id_db_link'] = $insert_result; - $return['id_db_source'] = $source_agent; - $return['id_db_target'] = $target_agent; + $return['id_db_source'] = $parent_id; + $return['id_db_target'] = $child_id; $return['type_source'] = $source_type; $return['type_target'] = $target_type; } else { From a0a74cf7bb5b52c5e39b4bd909a26aa9a69ae6d8 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 18 Jan 2022 13:01:49 +0100 Subject: [PATCH 22/38] add new chart histogram --- pandora_console/include/class/Tree.class.php | 53 +++++++++++++++---- .../include/javascript/tree/TreeController.js | 29 ++++++++++ .../operation/agentes/status_monitor.php | 27 ++++++++++ 3 files changed, 98 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 73e19c0d38..8dd8b97698 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -669,15 +669,20 @@ class Tree // HTML of the server type image $module['serverTypeHTML'] = servers_show_type($module['server_type']); - // Link to the Module graph - // ACL + // Link to the Module graph. + // ACL. $acl_graphs = false; $module['showGraphs'] = 0; - // Avoid the check on the metaconsole. Too slow to show/hide an icon depending on the permissions - if (!empty($group_id) && !is_metaconsole()) { - $acl_graphs = check_acl_one_of_groups($config['id_user'], $all_groups, 'RR'); - } else if (!empty($all_groups)) { + // Avoid the check on the metaconsole. + // Too slow to show/hide an icon depending on the permissions. + if (empty($group_id) === false && is_metaconsole() === false) { + $acl_graphs = check_acl_one_of_groups( + $config['id_user'], + $all_groups, + 'RR' + ); + } else if (empty($all_groups) === false) { $acl_graphs = true; } @@ -686,8 +691,24 @@ class Tree } if ($module['showGraphs']) { + $tresholds = true; + if (empty((float) $module['min_warning']) === true + && empty((float) $module['max_warning']) === true + && empty($module['warning_inverse']) === true + && empty((float) $module['min_critical']) === true + && empty((float) $module['max_critical']) === true + && empty($module['critical_inverse']) === true + ) { + $tresholds = false; + } + $graphType = return_graphtype($module['id_module_type']); - $url = ui_get_full_url('operation/agentes/stat_win.php', false, false, false); + $url = ui_get_full_url( + 'operation/agentes/stat_win.php', + false, + false, + false + ); $winHandle = dechex(crc32($module['id'].$module['name'])); $graph_params = [ @@ -697,20 +718,20 @@ class Tree 'refresh' => SECONDS_10MINUTES, ]; - if (is_metaconsole()) { - // Set the server id + if (is_metaconsole() === true) { + // Set the server id. $graph_params['server'] = $module['serverID']; } $graph_params_str = http_build_query($graph_params); - $moduleGraphURL = "$url?$graph_params_str"; + $moduleGraphURL = $url.'?'.$graph_params_str; $module['moduleGraph'] = [ 'url' => $moduleGraphURL, 'handle' => $winHandle, ]; - // Info to be able to open the snapshot image new page + // Info to be able to open the snapshot image new page. $module['snapshot'] = ui_get_snapshot_link( [ 'id_module' => $module['id'], @@ -720,6 +741,16 @@ class Tree ], true ); + + if ($tresholds === true || $graphType === 'boolean') { + $graph_params['histogram'] = 1; + $graph_params_str_th = http_build_query($graph_params); + $moduleGraphURLTh = $url.'?'.$graph_params_str_th; + $module['histogramGraph'] = [ + 'url' => $moduleGraphURLTh, + 'handle' => $winHandle, + ]; + } } $module_alerts = alerts_get_alerts_agent_module($module['id']); diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index afa55434c0..6d2d14bf7c 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -990,6 +990,35 @@ var TreeController = { typeof element.showGraphs != "undefined" && element.showGraphs != 0 ) { + // Graph hisstogram pop-up + if (typeof element.histogramGraph != "undefined") { + var graphImageHistogram = $( + ' ' + ); + + graphImageHistogram + .addClass("module-graph") + .click(function(e) { + e.stopPropagation(); + try { + winopeng_var( + element.histogramGraph.url, + element.histogramGraph.handle, + 800, + 480 + ); + } catch (error) { + // console.log(error); + } + }); + + $content.append(graphImageHistogram); + } + // Graph pop-up if (typeof element.moduleGraph != "undefined") { if (element.statusImageHTML.indexOf("data:image") != -1) { diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 16961214cf..5e5ab2b43f 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1725,6 +1725,17 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you } if ($row['history_data'] == 1 && $acl_graphs) { + $tresholds = true; + if (empty((float) $module['min_warning']) === true + && empty((float) $module['max_warning']) === true + && empty($module['warning_inverse']) === true + && empty((float) $module['min_critical']) === true + && empty((float) $module['max_critical']) === true + && empty($module['critical_inverse']) === true + ) { + $tresholds = false; + } + $graph_type = return_graphtype($row['module_type']); $url = ui_get_full_url('operation/agentes/stat_win.php', false, false, false); @@ -1738,6 +1749,10 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you 'refresh' => SECONDS_10MINUTES, ]; + if ($tresholds === true || $graph_type === 'boolean') { + $graph_params['histogram'] = 1; + } + if (is_metaconsole() && isset($row['server_id'])) { // Set the server id. $graph_params['server'] = $row['server_id']; @@ -1749,6 +1764,18 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you $data[8] = get_module_realtime_link_graph($row); + if ($tresholds === true || $graph_type === 'boolean') { + $data[8] .= '
'.html_print_image( + 'images/histograma.png', + true, + [ + 'border' => '0', + 'alt' => '', + 'class' => 'invert_filter', + ] + ).''; + } + if (!is_snapshot_data($row['datos'])) { $data[8] .= ''.html_print_image('images/chart.png', true, ['border' => '0', 'alt' => '', 'class' => 'invert_filter']).''; } From c16499720ed9e776ebff3a669f42c0d9661a4b00 Mon Sep 17 00:00:00 2001 From: Calvo Date: Tue, 18 Jan 2022 14:54:10 +0100 Subject: [PATCH 23/38] Added combo with all export formats to report html view --- pandora_console/include/styles/pandora.css | 4 ++ .../operation/reporting/reporting_viewer.php | 52 ++++++++++++++++--- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 5ff90674f4..fe9bdfdba2 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -776,6 +776,10 @@ select:-internal-list-box { .padding-bottom-4 { padding-bottom: 4em; } + +.padding-bottom-5px { + padding-bottom: 5px; +} .padding-right-2 { padding-right: 2em; } diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 6fef0568b2..d932a5f477 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -65,6 +65,42 @@ if ($enable_init_date) { $period = ($datetime - $datetime_init); } +// Shchedule report email. +$schedule_report = get_parameter('schbutton', ''); + +if (empty($schedule_report) === false) { + $id_user_task = 1; + $scheduled = 'no'; + $date = date(DATE_FORMAT); + $time = date(TIME_FORMAT); + $parameters[0] = get_parameter('id_schedule_report'); + $parameters[1] = get_parameter('schedule_email_address'); + $parameters[2] = get_parameter('schedule_subject', ''); + $parameters[3] = get_parameter('schedule_email', ''); + $parameters[4] = get_parameter('report_type', ''); + $parameters['first_execution'] = strtotime($date.' '.$time); + + + $values = [ + 'id_usuario' => $config['id_user'], + 'id_user_task' => $id_user_task, + 'args' => serialize($parameters), + 'scheduled' => $scheduled, + 'flag_delete' => 1, + ]; + + $result = db_process_sql_insert('tuser_task_scheduled', $values); + + $report_type = $parameters[4]; + + ui_print_result_message( + $result, + __('Your report has been planned, and the system will email you a '.$report_type.' file with the report as soon as its finished'), + __('An error has ocurred') + ); + echo '
'; +} + // ------------------- INIT HEADER -------------------------------------- $url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time&pure=$pure"; @@ -249,16 +285,18 @@ if (reporting_get_description($id_report)) { $table->data[0][1] = '
'.reporting_get_name($id_report).'
'; } -$table->data[0][1] .= '
'.__('Set initial date').html_print_checkbox('enable_init_date', 1, $enable_init_date, true); -$html_enterprise = enterprise_hook( - 'reporting_print_button_PDF', - [$id_report] -); -if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { - $table->data[0][1] .= $html_enterprise; +$table->data[0][1] .= '
'.__('Set initial date').html_print_checkbox('enable_init_date', 1, $enable_init_date, true).'
'; + +$html_menu_export = enterprise_hook('reporting_print_button_export'); +if ($html_menu_export === ENTERPRISE_NOT_HOOK) { + $html_menu_export = ''; } + $table->data[0][1] .= '
'; +$table->data[0][1] .= $html_menu_export; + + $table->data[1][1] = '
'.__('From').':
'; $table->data[1][1] .= html_print_input_text('date_init', $date_init, '', 12, 10, true).' '; From 5d59e1da3f026ca45669b0f1bb6bd4e0a333b7de Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 18 Jan 2022 15:03:44 +0100 Subject: [PATCH 24/38] fixed bulk copy of modules with percent character --- pandora_console/include/functions_agents.php | 17 +++++++++++------ pandora_console/include/functions_modules.php | 12 ++++++++++-- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 6dbac49957..5c81b5b0fd 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -910,7 +910,11 @@ function agents_process_manage_config($source_id_agent, $destiny_id_agents, $cop [ 'nombre' => $module['nombre'], 'disabled' => false, - ] + ], + true, + true, + false, + false ); // Keep all modules repeated @@ -1443,7 +1447,8 @@ function agents_get_modules( $filter=false, $indexed=true, $get_not_init_modules=true, - $force_tags=false + $force_tags=false, + $filter_include_sql=true ) { global $config; @@ -1542,18 +1547,18 @@ function agents_get_modules( } } - if ($value[0] == '%') { + if ($value[0] == '%' && $filter_include_sql === true) { array_push( $fields, $field.' LIKE "'.$value.'"' ); - } else if ($operatorDistin) { + } else if ($operatorDistin && $filter_include_sql === true) { array_push($fields, $field.' <> '.substr($value, 2)); - } else if (substr($value, -1) == '%') { + } else if (substr($value, -1) == '%' && $filter_include_sql === true) { array_push($fields, $field.' LIKE "'.$value.'"'); } else if (strncmp($value, '666=666', 7) == 0) { array_push($fields, ' '.$value); - } else if (preg_match('/\bin\b/i', $field)) { + } else if (preg_match('/\bin\b/i', $field) && $filter_include_sql === true) { array_push($fields, $field.' '.$value); } else { array_push($fields, 'tagente_modulo.'.$field.' = "'.$value.'"'); diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 4f27b17896..584270d17f 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -189,7 +189,11 @@ function modules_copy_agent_module_to_agent($id_agent_module, $id_destiny_agent, [ 'nombre' => $module['nombre'], 'disabled' => false, - ] + ], + true, + true, + false, + false ); // The module already exist in the target @@ -203,7 +207,11 @@ function modules_copy_agent_module_to_agent($id_agent_module, $id_destiny_agent, [ 'nombre' => $module['nombre'], 'disabled' => true, - ] + ], + true, + true, + false, + false ); // If the module exist but disabled, we enable it From 891c88f45888376342ee0c5f501d3aa9997e4535 Mon Sep 17 00:00:00 2001 From: Calvo Date: Tue, 18 Jan 2022 15:34:56 +0100 Subject: [PATCH 25/38] Fix meta alert action filter counter --- pandora_console/operation/agentes/alerts_status.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index db6b859d42..0f89992d3f 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -422,7 +422,7 @@ if (is_metaconsole() === true) { if ($idAgent != 0) { $alerts['alerts_simple'] = alerts_meta_get_alerts($agents, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); - $countAlertsSimple = alerts_meta_get_alerts($agents, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user); + $countAlertsSimple = alerts_meta_get_alerts($agents, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); } else { $id_groups = array_keys( users_get_groups($config['id_user'], 'AR', false) @@ -430,7 +430,7 @@ if (is_metaconsole() === true) { $alerts['alerts_simple'] = alerts_meta_get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); - $countAlertsSimple = alerts_meta_get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter); + $countAlertsSimple = alerts_meta_get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); } } else { if ($idAgent != 0) { From 38ddcc474696d64a77db3d5cb1c00e5470a54b5b Mon Sep 17 00:00:00 2001 From: Calvo Date: Wed, 19 Jan 2022 11:36:54 +0100 Subject: [PATCH 26/38] Fix search result header alignment --- pandora_console/operation/search_agents.php | 15 +++++++++- pandora_console/operation/search_alerts.php | 7 +++++ pandora_console/operation/search_graphs.php | 4 +++ pandora_console/operation/search_main.php | 30 ++++++++++---------- pandora_console/operation/search_maps.php | 7 +++++ pandora_console/operation/search_modules.php | 11 +++++++ pandora_console/operation/search_reports.php | 2 ++ pandora_console/operation/search_users.php | 10 +++++++ 8 files changed, 70 insertions(+), 16 deletions(-) diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php index 9fe7d7f9ce..de6461ccec 100755 --- a/pandora_console/operation/search_agents.php +++ b/pandora_console/operation/search_agents.php @@ -36,7 +36,8 @@ if (!$agents || !$searchAgents) { $table->width = '98%'; $table->class = 'databox'; - $table->head = []; + $table->head = []; + if ($only_count) { $table->head[0] = __('Agent'); $table->head[1] = __('Description'); @@ -57,6 +58,18 @@ if (!$agents || !$searchAgents) { $table->head[8] = __('Last contact').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectLastContactUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectLastContactDown]).''; $table->head[9] = ''; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: left'; + $table->headstyle[5] = 'text-align: left'; + $table->headstyle[6] = 'text-align: left'; + $table->headstyle[7] = 'text-align: left'; + $table->headstyle[8] = 'text-align: left'; + $table->headstyle[9] = 'text-align: center'; + $table->align = []; $table->align[0] = 'left'; $table->align[1] = 'left'; diff --git a/pandora_console/operation/search_alerts.php b/pandora_console/operation/search_alerts.php index 76beda6166..90e55a963e 100755 --- a/pandora_console/operation/search_alerts.php +++ b/pandora_console/operation/search_alerts.php @@ -42,6 +42,13 @@ if ($alerts === false || $totalAlerts == 0 || !$searchAlerts) { $table->align[3] = 'left'; $table->align[4] = 'left'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: center'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: left'; + $table->valign = []; $table->valign[0] = 'top'; $table->valign[1] = 'top'; diff --git a/pandora_console/operation/search_graphs.php b/pandora_console/operation/search_graphs.php index 8f76f0dea8..0150d2f56c 100755 --- a/pandora_console/operation/search_graphs.php +++ b/pandora_console/operation/search_graphs.php @@ -29,6 +29,10 @@ if ($graphs === false || !$searchGraphs) { $table->head[0] = __('Graph name'); $table->head[1] = __('Description'); + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->data = []; foreach ($graphs as $graph) { array_push( diff --git a/pandora_console/operation/search_main.php b/pandora_console/operation/search_main.php index 813ef1b004..58f75e0ca5 100644 --- a/pandora_console/operation/search_main.php +++ b/pandora_console/operation/search_main.php @@ -32,21 +32,21 @@ $table->id = 'summary'; $table->width = '98%'; $table->style = []; -$table->style[0] = 'font-weight: bold; text-align: center;'; -$table->style[1] = 'font-weight: bold; text-align: center;'; -$table->style[2] = 'font-weight: bold; text-align: center;'; -$table->style[3] = 'font-weight: bold; text-align: center;'; -$table->style[4] = 'font-weight: bold; text-align: center;'; -$table->style[5] = 'font-weight: bold; text-align: center;'; -$table->style[6] = 'font-weight: bold; text-align: center;'; -$table->style[7] = 'font-weight: bold; text-align: center;'; -$table->style[8] = 'font-weight: bold; text-align: center;'; -$table->style[9] = 'font-weight: bold; text-align: center;'; -$table->style[10] = 'font-weight: bold; text-align: center;'; -$table->style[11] = 'font-weight: bold; text-align: center;'; -$table->style[13] = 'font-weight: bold; text-align: center;'; -$table->style[14] = 'font-weight: bold; text-align: center;'; -$table->style[15] = 'font-weight: bold; text-align: center;'; +$table->style[0] = 'font-weight: bold; text-align: left;'; +$table->style[1] = 'font-weight: bold; text-align: left;'; +$table->style[2] = 'font-weight: bold; text-align: left;'; +$table->style[3] = 'font-weight: bold; text-align: left;'; +$table->style[4] = 'font-weight: bold; text-align: left;'; +$table->style[5] = 'font-weight: bold; text-align: left;'; +$table->style[6] = 'font-weight: bold; text-align: left;'; +$table->style[7] = 'font-weight: bold; text-align: left;'; +$table->style[8] = 'font-weight: bold; text-align: left;'; +$table->style[9] = 'font-weight: bold; text-align: left;'; +$table->style[10] = 'font-weight: bold; text-align: left;'; +$table->style[11] = 'font-weight: bold; text-align: left;'; +$table->style[13] = 'font-weight: bold; text-align: left;'; +$table->style[14] = 'font-weight: bold; text-align: left;'; +$table->style[15] = 'font-weight: bold; text-align: left;'; diff --git a/pandora_console/operation/search_maps.php b/pandora_console/operation/search_maps.php index 0ab656d9b5..6b6aeeb423 100755 --- a/pandora_console/operation/search_maps.php +++ b/pandora_console/operation/search_maps.php @@ -32,6 +32,13 @@ if ($maps === false || !$searchMaps) { $table->align[1] = 'center'; $table->align[2] = 'center'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: center'; + $table->headstyle[1] = 'text-align: center'; + + + $table->data = []; foreach ($maps as $map) { array_push( diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php index 81ec17cf39..d055d29946 100644 --- a/pandora_console/operation/search_modules.php +++ b/pandora_console/operation/search_modules.php @@ -51,6 +51,17 @@ if (!$modules || !$searchModules) { $table->align[7] = 'left'; $table->align[8] = 'left'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: left'; + $table->headstyle[5] = 'text-align: left'; + $table->headstyle[6] = 'text-align: left'; + $table->headstyle[7] = 'text-align: left'; + $table->headstyle[8] = 'text-align: left'; + $table->data = []; $id_type_web_content_string = db_get_value( diff --git a/pandora_console/operation/search_reports.php b/pandora_console/operation/search_reports.php index d86b0c5446..e16507a624 100755 --- a/pandora_console/operation/search_reports.php +++ b/pandora_console/operation/search_reports.php @@ -44,6 +44,8 @@ if ($reports === false || !$searchReports) { $table->head[3] = __('XML'); $table->size[0] = '50%'; $table->size[1] = '20%'; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; $table->size[2] = '2%'; $table->headstyle[2] = 'min-width: 35px;text-align: left;'; $table->size[3] = '2%'; diff --git a/pandora_console/operation/search_users.php b/pandora_console/operation/search_users.php index 3f397129db..ead204915d 100755 --- a/pandora_console/operation/search_users.php +++ b/pandora_console/operation/search_users.php @@ -30,6 +30,14 @@ if (!$users || !$searchUsers) { $table->align = []; $table->align[4] = 'center'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: center'; + $table->headstyle[5] = 'text-align: left'; + $table->head = []; $table->head[0] = __('User ID').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectUserIDUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectUserIDDown]).''; $table->head[1] = __('Name').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).''; @@ -38,6 +46,8 @@ if (!$users || !$searchUsers) { $table->head[4] = __('Profile').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectProfileUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectProfileDown]).''; $table->head[5] = __('Description'); + + $table->data = []; foreach ($users as $user) { From b01061fea105a88c468401356876496ad28fd89d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 19 Jan 2022 11:48:20 +0100 Subject: [PATCH 27/38] Fixed module type --- pandora_console/include/functions_modules.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 4f27b17896..7220b0aab4 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -3231,9 +3231,10 @@ function modules_get_first_date($id_agent_module, $datelimit=0) { global $config; - // check datatype string or normal + // Check datatype string or normal. $table = 'tagente_datos'; - $module_type_str = modules_get_agentmodule_type($id_agent_module); + $module_type = modules_get_agentmodule_type($id_agent_module); + $module_type_str = modules_get_type_name($module_type); if (strstr($module_type_str, 'string') !== false) { $table = 'tagente_datos_string'; } From 6be6b1a95d7fdc340ce917014f335d86bbe05543 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 19 Jan 2022 12:18:23 +0100 Subject: [PATCH 28/38] add new macros #3763 --- pandora_console/include/ajax/module.php | 2 +- pandora_console/include/functions_reporting.php | 4 ++-- pandora_console/include/javascript/tree/TreeController.js | 2 +- pandora_console/operation/agentes/stat_win.php | 8 +++++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index ec9737d981..c43da3e146 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1396,11 +1396,11 @@ if (check_login()) { $output .= grafico_modulo_sparse($params); } - echo $output; if (is_metaconsole() === true && empty($server_id) === false) { metaconsole_restore_db(); } + echo $output; return; } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index ac9b380abf..d4d26d8777 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -14165,7 +14165,7 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) if (modules_is_disable_agent($content['id_agent_module']) || modules_is_not_init($content['id_agent_module']) ) { - if ($metaconsole_on) { + if ($metaconsole_on && $server_name != '') { // Restore db connection. metaconsole_restore_db(); } @@ -14429,7 +14429,7 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) ); } - if ($metaconsole_on) { + if ($metaconsole_on && $server_name != '') { // Restore db connection. metaconsole_restore_db(); } diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index 6d2d14bf7c..14f4f2c4dc 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -990,7 +990,7 @@ var TreeController = { typeof element.showGraphs != "undefined" && element.showGraphs != 0 ) { - // Graph hisstogram pop-up + // Graph histogram pop-up if (typeof element.histogramGraph != "undefined") { var graphImageHistogram = $( ''; + + $class = 'module_graph_menu_content'; + if ($histogram === false) { + $class .= ' module_graph_menu_content_closed invisible'; + } + + $menu_form .= '
'; $menu_form .= $form_table; $menu_form .= '
'; $menu_form .= '
'; From a0391e3ef26108c1330487fd98f21dd6d4e96f82 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Wed, 19 Jan 2022 13:33:49 +0100 Subject: [PATCH 29/38] fixed visualization of vertical bars graph when switching values on graph viewer --- .../operation/reporting/graph_viewer.php | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index d7a5551f8a..be2f6be0b8 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -454,20 +454,28 @@ if ($view_graph) { data['threshold'] = 1; } - $.ajax({ - type: "POST", - url: "ajax.php", - dataType: "html", - data: data, - success: function (data) { - document.getElementById("div-container").innerHTML = ""; - $("#spinner_loading").hide(); - $("#div-container").append(data); - }, - error: function (data) { - console.error("Fatal error") - } - }); + (function (stacked) { + $.ajax({ + type: "POST", + url: "ajax.php", + dataType: "html", + data: data, + success: function (data) { + console.log("////////////"); + console.log(typeof stacked); + if (stacked === "") { + document.getElementById("div-container").classList.add('w100p', 'height_600px'); + } + + document.getElementById("div-container").innerHTML = ""; + $("#spinner_loading").hide(); + $("#div-container").append(data); + }, + error: function (data) { + console.error("Fatal error") + } + }); + })(data['stacked']); }); From 5a19e071e9ac2bf770eeba5f2cbdce33ed145cd1 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Wed, 19 Jan 2022 13:34:58 +0100 Subject: [PATCH 30/38] fixed visualization of vertical bars graph when switching values on graph viewer --- pandora_console/operation/reporting/graph_viewer.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index be2f6be0b8..4c42ed2ad7 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -461,8 +461,6 @@ if ($view_graph) { dataType: "html", data: data, success: function (data) { - console.log("////////////"); - console.log(typeof stacked); if (stacked === "") { document.getElementById("div-container").classList.add('w100p', 'height_600px'); } From 42d1ccbc13dcde1ae539262c70a45ff8519699b7 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 20 Jan 2022 01:00:18 +0100 Subject: [PATCH 31/38] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index cd72ddf0a1..9cc537e0e8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.759-220119 +Version: 7.0NG.759-220120 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 ccefe7947f..067f99b96c 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.759-220119" +pandora_version="7.0NG.759-220120" 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 649df5a751..986e6410d9 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.759'; -use constant AGENT_BUILD => '220119'; +use constant AGENT_BUILD => '220120'; # 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 184256f2b3..3646575ffe 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.759 -%define release 220119 +%define release 220120 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 001d30d549..4b2d8a2c8a 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.759 -%define release 220119 +%define release 220120 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 95f0676418..4072693740 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220119" +PI_BUILD="220120" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1e7f39c45b..b0f990af4f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220119} +{220120} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 78edcf73ef..e9f3e7f84e 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.759 Build 220119") +#define PANDORA_VERSION ("7.0NG.759 Build 220120") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 53c2240a41..5873fdcda7 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.759(Build 220119))" + VALUE "ProductVersion", "(7.0NG.759(Build 220120))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 66c3d5e746..e19e4c7643 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.759-220119 +Version: 7.0NG.759-220120 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 a93a17e52b..86ec8a5d66 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.759-220119" +pandora_version="7.0NG.759-220120" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 38e92a5fba..4a46b90914 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220119'; +$build_version = 'PC220120'; $pandora_version = 'v7.0NG.759'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f9ad905015..ffd9508a7e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index f16159214a..ad68d78b0c 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.759 -%define release 220119 +%define release 220120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 6fa951d29b..397efe7a6c 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.759 -%define release 220119 +%define release 220120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6e5ef9e322..b74a490d5f 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220119" +PI_BUILD="220120" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9a81b82679..570eb31a21 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.759 Build 220119"; +my $version = "7.0NG.759 Build 220120"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f87a03311f..0fd2b18dba 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.759 Build 220119"; +my $version = "7.0NG.759 Build 220120"; # save program name for logging my $progname = basename($0); From e1e866a441914fb4699cdcee5b85a70c92fb6055 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Thu, 20 Jan 2022 12:53:40 +0100 Subject: [PATCH 32/38] fixed footer timezone --- pandora_console/operation/users/user_edit.php | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 0a682d3046..2e0ba37616 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -33,7 +33,6 @@ $headerTitle = __('User detail editor'); require $config['homedir'].'/operation/users/user_edit_header.php'; if (is_metaconsole() === false) { - date_default_timezone_set('UTC'); include 'include/javascript/timezonepicker/includes/parser.inc'; // Read in options for map builder. From 480d475a7553179a3b4388174303009dca4983a8 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 21 Jan 2022 01:00:20 +0100 Subject: [PATCH 33/38] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9cc537e0e8..ea1187daf5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.759-220120 +Version: 7.0NG.759-220121 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 067f99b96c..6e12a07964 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.759-220120" +pandora_version="7.0NG.759-220121" 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 986e6410d9..d696f899f8 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.759'; -use constant AGENT_BUILD => '220120'; +use constant AGENT_BUILD => '220121'; # 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 3646575ffe..04348f16ea 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.759 -%define release 220120 +%define release 220121 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 4b2d8a2c8a..3b68bea38a 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.759 -%define release 220120 +%define release 220121 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 4072693740..d94792fea1 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220120" +PI_BUILD="220121" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b0f990af4f..dfaad5275f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220120} +{220121} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e9f3e7f84e..2803f0d165 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.759 Build 220120") +#define PANDORA_VERSION ("7.0NG.759 Build 220121") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5873fdcda7..c2cd2a8b8c 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.759(Build 220120))" + VALUE "ProductVersion", "(7.0NG.759(Build 220121))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e19e4c7643..eb240949c2 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.759-220120 +Version: 7.0NG.759-220121 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 86ec8a5d66..b76b0104c4 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.759-220120" +pandora_version="7.0NG.759-220121" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4a46b90914..4def7f3b3a 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220120'; +$build_version = 'PC220121'; $pandora_version = 'v7.0NG.759'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ffd9508a7e..01f0e3069c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ad68d78b0c..7b50a673f0 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.759 -%define release 220120 +%define release 220121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 397efe7a6c..433fa52e84 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.759 -%define release 220120 +%define release 220121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b74a490d5f..d9d3d6f35d 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220120" +PI_BUILD="220121" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 570eb31a21..2ec85d052c 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.759 Build 220120"; +my $version = "7.0NG.759 Build 220121"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0fd2b18dba..02d673cae9 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.759 Build 220120"; +my $version = "7.0NG.759 Build 220121"; # save program name for logging my $progname = basename($0); From 3f9b5f0a8a25f821450720e9bb59f35a5751ae5f Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Fri, 21 Jan 2022 11:56:38 +0100 Subject: [PATCH 34/38] fix mr and current package --- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 4 ++-- pandora_console/pandoradb_data.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 53cfa31ecb..d6db1ad76e 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 @@ -1451,13 +1451,13 @@ ALTER TABLE `ttag` MODIFY COLUMN `name` text NOT NULL default ''; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 50); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 51); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; -INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 758); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 759); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 644e0a533f..bcad5b2b80 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 50), +('MR', 51), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package', 758), +('current_package', 759), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), From 4781c7f6804c13a785f508151815a29270576a5e Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 22 Jan 2022 01:00:22 +0100 Subject: [PATCH 35/38] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ea1187daf5..b91db31b04 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.759-220121 +Version: 7.0NG.759-220122 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 6e12a07964..085eb594f2 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.759-220121" +pandora_version="7.0NG.759-220122" 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 d696f899f8..ee46cc3115 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.759'; -use constant AGENT_BUILD => '220121'; +use constant AGENT_BUILD => '220122'; # 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 04348f16ea..21e33d6cec 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.759 -%define release 220121 +%define release 220122 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 3b68bea38a..492f160cf9 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.759 -%define release 220121 +%define release 220122 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 d94792fea1..e6d71bfb0b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220121" +PI_BUILD="220122" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index dfaad5275f..bf162adc33 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220121} +{220122} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2803f0d165..050b7afaa6 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.759 Build 220121") +#define PANDORA_VERSION ("7.0NG.759 Build 220122") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c2cd2a8b8c..2ded12c80e 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.759(Build 220121))" + VALUE "ProductVersion", "(7.0NG.759(Build 220122))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index eb240949c2..af09a67aef 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.759-220121 +Version: 7.0NG.759-220122 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 b76b0104c4..6089f43716 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.759-220121" +pandora_version="7.0NG.759-220122" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4def7f3b3a..6829341a6b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220121'; +$build_version = 'PC220122'; $pandora_version = 'v7.0NG.759'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 01f0e3069c..f06d4a5d62 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 7b50a673f0..5788f544cc 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.759 -%define release 220121 +%define release 220122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 433fa52e84..2371f96f7b 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.759 -%define release 220121 +%define release 220122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d9d3d6f35d..d789687d70 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220121" +PI_BUILD="220122" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2ec85d052c..aa8f9fe1f9 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.759 Build 220121"; +my $version = "7.0NG.759 Build 220122"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 02d673cae9..a76e213a3b 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.759 Build 220121"; +my $version = "7.0NG.759 Build 220122"; # save program name for logging my $progname = basename($0); From 0ca0123a274bf58a9017e2437fa5bcf983862a24 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 23 Jan 2022 01:00:17 +0100 Subject: [PATCH 36/38] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b91db31b04..43872b313f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.759-220122 +Version: 7.0NG.759-220123 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 085eb594f2..87ba873b40 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.759-220122" +pandora_version="7.0NG.759-220123" 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 ee46cc3115..cf2bf6d45b 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.759'; -use constant AGENT_BUILD => '220122'; +use constant AGENT_BUILD => '220123'; # 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 21e33d6cec..78f257bc5c 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.759 -%define release 220122 +%define release 220123 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 492f160cf9..2cdfa1adbc 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.759 -%define release 220122 +%define release 220123 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 e6d71bfb0b..3ff4043467 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220122" +PI_BUILD="220123" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index bf162adc33..209870a491 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220122} +{220123} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 050b7afaa6..518b8b533b 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.759 Build 220122") +#define PANDORA_VERSION ("7.0NG.759 Build 220123") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2ded12c80e..4a37cf0153 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.759(Build 220122))" + VALUE "ProductVersion", "(7.0NG.759(Build 220123))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index af09a67aef..24b1873726 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.759-220122 +Version: 7.0NG.759-220123 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 6089f43716..23519fc0b0 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.759-220122" +pandora_version="7.0NG.759-220123" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6829341a6b..c7015ece59 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220122'; +$build_version = 'PC220123'; $pandora_version = 'v7.0NG.759'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f06d4a5d62..0b8aa291ab 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 5788f544cc..a95b74a115 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.759 -%define release 220122 +%define release 220123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 2371f96f7b..1c5b94b049 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.759 -%define release 220122 +%define release 220123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d789687d70..b6afdb7acc 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220122" +PI_BUILD="220123" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index aa8f9fe1f9..ee6b02c3a9 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.759 Build 220122"; +my $version = "7.0NG.759 Build 220123"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a76e213a3b..37f7b15e15 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.759 Build 220122"; +my $version = "7.0NG.759 Build 220123"; # save program name for logging my $progname = basename($0); From cc7b87344b0bb8ed2e5ef0b81db521d4e35eb8c8 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 24 Jan 2022 01:00:16 +0100 Subject: [PATCH 37/38] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 43872b313f..c58b167aa4 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.759-220123 +Version: 7.0NG.759-220124 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 87ba873b40..e815a336d7 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.759-220123" +pandora_version="7.0NG.759-220124" 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 cf2bf6d45b..e2a4067894 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.759'; -use constant AGENT_BUILD => '220123'; +use constant AGENT_BUILD => '220124'; # 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 78f257bc5c..058000ac8e 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.759 -%define release 220123 +%define release 220124 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 2cdfa1adbc..d93524f5e6 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.759 -%define release 220123 +%define release 220124 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 3ff4043467..49899734be 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220123" +PI_BUILD="220124" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 209870a491..43f4159ae4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220123} +{220124} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 518b8b533b..77135fde48 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.759 Build 220123") +#define PANDORA_VERSION ("7.0NG.759 Build 220124") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4a37cf0153..27b73f85e3 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.759(Build 220123))" + VALUE "ProductVersion", "(7.0NG.759(Build 220124))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 24b1873726..b294020177 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.759-220123 +Version: 7.0NG.759-220124 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 23519fc0b0..061c45b8ee 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.759-220123" +pandora_version="7.0NG.759-220124" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c7015ece59..46db9144e0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220123'; +$build_version = 'PC220124'; $pandora_version = 'v7.0NG.759'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 0b8aa291ab..9b83d265bd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a95b74a115..e7df93a141 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.759 -%define release 220123 +%define release 220124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1c5b94b049..9845010d02 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.759 -%define release 220123 +%define release 220124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b6afdb7acc..6c95bed3f1 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220123" +PI_BUILD="220124" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ee6b02c3a9..269d4c08ea 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.759 Build 220123"; +my $version = "7.0NG.759 Build 220124"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 37f7b15e15..8500769d96 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.759 Build 220123"; +my $version = "7.0NG.759 Build 220124"; # save program name for logging my $progname = basename($0); From bdae2239447cf386bc552f573a3c9652a2c427ee Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 25 Jan 2022 01:00:20 +0100 Subject: [PATCH 38/38] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c58b167aa4..92cc7efb2b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.759-220124 +Version: 7.0NG.759-220125 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 e815a336d7..7fac24aa11 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.759-220124" +pandora_version="7.0NG.759-220125" 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 e2a4067894..361eb971de 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.759'; -use constant AGENT_BUILD => '220124'; +use constant AGENT_BUILD => '220125'; # 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 058000ac8e..37532911d4 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.759 -%define release 220124 +%define release 220125 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 d93524f5e6..670384af51 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.759 -%define release 220124 +%define release 220125 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 49899734be..057d1fb651 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220124" +PI_BUILD="220125" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 43f4159ae4..f9f5aa8c01 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220124} +{220125} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 77135fde48..2b4e91a163 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.759 Build 220124") +#define PANDORA_VERSION ("7.0NG.759 Build 220125") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 27b73f85e3..f8ac4f45be 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.759(Build 220124))" + VALUE "ProductVersion", "(7.0NG.759(Build 220125))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b294020177..b7d8475b9c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.759-220124 +Version: 7.0NG.759-220125 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 061c45b8ee..8ae81efb99 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.759-220124" +pandora_version="7.0NG.759-220125" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 46db9144e0..fc26450ece 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220124'; +$build_version = 'PC220125'; $pandora_version = 'v7.0NG.759'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 9b83d265bd..0c3518acac 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e7df93a141..ad19682385 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.759 -%define release 220124 +%define release 220125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 9845010d02..a93bf4f664 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.759 -%define release 220124 +%define release 220125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6c95bed3f1..63ed6aef08 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.759" -PI_BUILD="220124" +PI_BUILD="220125" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 269d4c08ea..b6704ddb5d 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.759 Build 220124"; +my $version = "7.0NG.759 Build 220125"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8500769d96..511ef09bf4 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.759 Build 220124"; +my $version = "7.0NG.759 Build 220125"; # save program name for logging my $progname = basename($0);