From 75964a0406e0dde220c4e28b33e9479da5b71428 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 12 Jan 2024 12:50:15 +0100 Subject: [PATCH 001/100] #12721 free licence change --- pandora_console/godmode/setup/license.php | 16 +++++++++++++++- pandora_console/include/constants.php | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/license.php b/pandora_console/godmode/setup/license.php index e3e25935f9..257b6cf9ec 100644 --- a/pandora_console/godmode/setup/license.php +++ b/pandora_console/godmode/setup/license.php @@ -68,7 +68,7 @@ if ($renew_license_result !== null) { } if ($update_settings) { - if (!is_metaconsole()) { + if (is_metaconsole() === false) { // Node. foreach ($_POST['keys'] as $key => $value) { db_process_sql_update( @@ -76,6 +76,20 @@ if ($update_settings) { [db_escape_key_identifier('value') => $value], [db_escape_key_identifier('key') => $key] ); + + if ($value === LICENSE_FREE) { + $exist = db_get_value('token', 'tconfig', 'token', 'expiry_date'); + if ($exist === false) { + $expiry_date = date('Ymd', strtotime(date('Ymd').'+ 1 month')); + db_process_sql_insert( + 'tconfig', + [ + db_escape_key_identifier('value') => base64_encode($expiry_date), + db_escape_key_identifier('token') => 'expiry_date', + ] + ); + } + } } $customer_key = $_POST['keys']['customer_key']; diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index b2ce8d88b4..055049bc37 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -877,6 +877,12 @@ define( // Pandora FMS Enterprise license. define('LICENSE_FILE', 'customer_key'); +// Pandora FMS license free. +define('LICENSE_FREE', 'PANDORA-FREE'); +// Total number of agents for free licence. +define('TOTAL_AGENTS_FREE', 50); +// Total number of modules for free licence. +define('TOTAL_MODULES_FREE', 600); // Pandora HA database list. define('PANDORA_HA_FILE', 'pandora_ha_hosts.conf'); From 5dad6bfb4bc683834cb00a5ebcc3ba92faae4ed0 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 15 Feb 2024 16:22:11 +0100 Subject: [PATCH 002/100] #12721 free licence change 2 --- pandora_console/godmode/setup/license.php | 4 ++-- pandora_console/include/constants.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/setup/license.php b/pandora_console/godmode/setup/license.php index 257b6cf9ec..3611b972ac 100644 --- a/pandora_console/godmode/setup/license.php +++ b/pandora_console/godmode/setup/license.php @@ -77,10 +77,10 @@ if ($update_settings) { [db_escape_key_identifier('key') => $key] ); - if ($value === LICENSE_FREE) { + if ($value === OTHER_LICENSE) { $exist = db_get_value('token', 'tconfig', 'token', 'expiry_date'); if ($exist === false) { - $expiry_date = date('Ymd', strtotime(date('Ymd').'+ 1 month')); + $expiry_date = date('Ymd', strtotime('+30 days')); db_process_sql_insert( 'tconfig', [ diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index de95ea8ff4..a699e72339 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -879,11 +879,11 @@ define( // Pandora FMS Enterprise license. define('LICENSE_FILE', 'customer_key'); // Pandora FMS license free. -define('LICENSE_FREE', 'PANDORA-FREE'); +define('OTHER_LICENSE', 'PANDORA-FREE'); // Total number of agents for free licence. -define('TOTAL_AGENTS_FREE', 50); +define('TOTAL_AGENTS_LICENSE', 50); // Total number of modules for free licence. -define('TOTAL_MODULES_FREE', 600); +define('TOTAL_MODULES_LICENSE', 600); // Pandora HA database list. define('PANDORA_HA_FILE', 'pandora_ha_hosts.conf'); From 5f0ed9f48c0bbed6bdb9272d3bb8a767ea01be29 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 22 Feb 2024 09:16:43 +0100 Subject: [PATCH 003/100] #12721 free licence change 3 --- pandora_console/godmode/setup/license.php | 14 ------------ pandora_console/godmode/um_client/index.php | 25 ++++++++++----------- pandora_console/include/constants.php | 6 ----- 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/pandora_console/godmode/setup/license.php b/pandora_console/godmode/setup/license.php index 3611b972ac..803291a1c8 100644 --- a/pandora_console/godmode/setup/license.php +++ b/pandora_console/godmode/setup/license.php @@ -76,20 +76,6 @@ if ($update_settings) { [db_escape_key_identifier('value') => $value], [db_escape_key_identifier('key') => $key] ); - - if ($value === OTHER_LICENSE) { - $exist = db_get_value('token', 'tconfig', 'token', 'expiry_date'); - if ($exist === false) { - $expiry_date = date('Ymd', strtotime('+30 days')); - db_process_sql_insert( - 'tconfig', - [ - db_escape_key_identifier('value') => base64_encode($expiry_date), - db_escape_key_identifier('token') => 'expiry_date', - ] - ); - } - } } $customer_key = $_POST['keys']['customer_key']; diff --git a/pandora_console/godmode/um_client/index.php b/pandora_console/godmode/um_client/index.php index 1a78e39b5f..07727cb5cf 100644 --- a/pandora_console/godmode/um_client/index.php +++ b/pandora_console/godmode/um_client/index.php @@ -113,19 +113,18 @@ if ($license_data !== ENTERPRISE_NOT_HOOK) { return; } - if (rtrim($license_data['licensed_to']) === Manager::PANDORA_TRIAL_ISSUER) { - $product_name = get_product_name(); - - ui_print_info_message( - __( - 'You cannot use update manager %s. This license is a trial license to test all %s features. Please update your license to unlock all %s features.', - $mode_str, - $product_name, - $product_name - ) - ); - return; - } + // if (rtrim($license_data['licensed_to']) === Manager::PANDORA_TRIAL_ISSUER) { + // $product_name = get_product_name(); + // ui_print_info_message( + // __( + // 'You cannot use update manager %s. This license is a trial license to test all %s features. Please update your license to unlock all %s features.', + // $mode_str, + // $product_name, + // $product_name + // ) + // ); + // return; + // } } else { $license_data = []; $license_data['count_enabled'] = db_get_value( diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index a699e72339..d68bba9c22 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -878,12 +878,6 @@ define( // Pandora FMS Enterprise license. define('LICENSE_FILE', 'customer_key'); -// Pandora FMS license free. -define('OTHER_LICENSE', 'PANDORA-FREE'); -// Total number of agents for free licence. -define('TOTAL_AGENTS_LICENSE', 50); -// Total number of modules for free licence. -define('TOTAL_MODULES_LICENSE', 600); // Pandora HA database list. define('PANDORA_HA_FILE', 'pandora_ha_hosts.conf'); From 210ef60b69572a99c4db738bb5a32923157fa426 Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Tue, 27 Feb 2024 14:18:00 +0100 Subject: [PATCH 004/100] Added MR changes --- pandora_console/extras/mr/69.sql | 19 +++++++++++++++++++ pandora_console/pandoradb.sql | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 pandora_console/extras/mr/69.sql diff --git a/pandora_console/extras/mr/69.sql b/pandora_console/extras/mr/69.sql new file mode 100644 index 0000000000..17fa864e13 --- /dev/null +++ b/pandora_console/extras/mr/69.sql @@ -0,0 +1,19 @@ +START TRANSACTION; + +ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_method` ENUM('SSH', 'HTTP', 'HTTPS') DEFAULT 'SSH'; +ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_port` INT UNSIGNED NOT NULL DEFAULT 22; +ALTER TABLE `tdeployment_hosts` ADD COLUMN `server_port` INT UNSIGNED NOT NULL DEFAULT 41121; +ALTER TABLE `tdeployment_hosts` ADD COLUMN `temp_folder` VARCHAR(500) DEFAULT '/tmp'; + +UPDATE + `tdeployment_hosts`, `tconfig_os` +SET + `tdeployment_hosts`.`deploy_method` = 'HTTP', + `tdeployment_hosts`.`deploy_port` = 5985, + `tdeployment_hosts`.`temp_folder` = '$env:TEMP' +WHERE + `tdeployment_hosts`.`id_os` = `tconfig_os`.`id_os` AND `tconfig_os`.`name` = 'Windows' AND `tdeployment_hosts`.`deployed` = 0; + +UPDATE `trecon_task` SET `field4` = 41121 WHERE `type` = 9; + +COMMIT; \ No newline at end of file diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index e340dfbf27..a7a17f48eb 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3948,6 +3948,10 @@ CREATE TABLE IF NOT EXISTS `tdeployment_hosts` ( `deployed` BIGINT NOT NULL DEFAULT 0 COMMENT 'When it was deployed', `server_ip` VARCHAR(100) DEFAULT NULL COMMENT 'Where to point target agent', `last_err` TEXT, + `deploy_method` ENUM('SSH', 'HTTP', 'HTTPS') DEFAULT 'SSH', + `deploy_port` INT UNSIGNED NOT NULL DEFAULT 22, + `server_port` INT UNSIGNED NOT NULL DEFAULT 41121, + `temp_folder` VARCHAR(500) DEFAULT '/tmp', PRIMARY KEY (`id`), FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL, From 1363072405212cc9a5bd9beac752f8add519d7a5 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 27 Feb 2024 18:38:37 +0100 Subject: [PATCH 005/100] implemented agent module custom selectors --- .../godmode/agentes/agent_manager.php | 2 +- .../godmode/agentes/configurar_agente.php | 7 +- .../agentes/module_manager_editor_common.php | 14 +- .../godmode/massive/massive_edit_agents.php | 4 +- .../godmode/massive/massive_edit_modules.php | 2 +- .../modules/manage_network_components.php | 5 + .../manage_network_components_form_common.php | 2 +- pandora_console/include/functions_clippy.php | 7 +- pandora_console/include/functions_html.php | 179 +++++++++++++++++- .../help/clippy/agent_module_interval.php | 49 +++++ .../help/clippy/data_configuration_module.php | 2 +- pandora_console/include/styles/pandora.css | 4 + 12 files changed, 266 insertions(+), 11 deletions(-) create mode 100644 pandora_console/include/help/clippy/agent_module_interval.php diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 36d2458be7..4decf2e75d 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -558,7 +558,7 @@ if ($broker === false) { $tableAgent->data['caption_interval'][0] = __('Interval'); // $tableAgent->rowstyle['interval'] = 'width: 260px'; $tableAgent->rowclass['interval'] = 'w540px'; - $tableAgent->data['interval'][0] = html_print_extended_select_for_time( + $tableAgent->data['interval'][0] = html_print_select_agentmodule_interval( 'intervalo', $intervalo, '', diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 6a1084e605..68e0a068f5 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -878,7 +878,7 @@ if ($id_agente) { ], ], [], - $dots + $dots ?? '' ); } @@ -1472,6 +1472,11 @@ if ($update_module === true || $create_module === true) { $min = (int) get_parameter('min'); $max = (int) get_parameter('max'); $interval = (int) get_parameter('module_interval', $intervalo); + // Limit module interval to at least 60 secs. + if ($interval > 0) { + $interval = max($interval, 60); + } + $ff_interval = (int) get_parameter('module_ff_interval'); $quiet_module = (int) get_parameter('quiet_module'); $cps_module = (int) get_parameter('cps_module'); diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index a9d809d29f..be4391f54f 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -701,7 +701,19 @@ if ((int) $moduletype === MODULE_DATA) { // be taken the agent interval (this code is at configurar_agente.php). } else { $interval = ($interval === '') ? '300' : $interval; - $outputExecutionInterval = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy); + $outputExecutionInterval = html_print_select_agentmodule_interval( + 'module_interval', + $interval, + '', + '', + '0', + false, + true, + false, + false, + $classdisabledBecauseInPolicy, + $disabledBecauseInPolicy + ); } $module_id_policy_module = 0; diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 26ab73603c..740bb5b93b 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -744,7 +744,7 @@ $table->data[1][1] .= ''; $table->data[2][0] = __('Interval'); -$table->data[2][1] = html_print_extended_select_for_time( +$table->data[2][1] = html_print_select_agentmodule_interval( 'interval', -2, '', @@ -1155,7 +1155,7 @@ $table->data[6][1] = html_print_select( true ); -$table->data[7][0] = __('Safe operation mode').': '.ui_print_help_tip( +$table->data[7][0] = __('Safe operation mode').ui_print_help_tip( __( 'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status', get_product_name() diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 672c59276c..960437b039 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -865,7 +865,7 @@ $table->data[15][0] = html_print_label_input_block( $table->data[16][0] = html_print_label_input_block( __('Interval'), - html_print_extended_select_for_time( + html_print_select_agentmodule_interval( 'module_interval', 0, '', diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index c04a66b549..7e72262bdf 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -82,6 +82,11 @@ $snmp_oid = (string) get_parameter('snmp_oid'); $snmp_community = (string) get_parameter('snmp_community'); $id_module_group = (int) get_parameter('id_module_group'); $module_interval = (int) get_parameter('module_interval'); +// Limit module interval to at least 60 secs. +if ($module_interval > 0) { + $module_interval = max($module_interval, 60); +} + $id_group = (int) get_parameter('id_group'); $plugin_user = (string) get_parameter('plugin_user'); $plugin_pass = io_input_password((string) get_parameter('plugin_pass')); diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php index 3f573ec2c8..7a016d7a91 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_common.php +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -154,7 +154,7 @@ $table->data[2][0] = html_print_label_input_block( $table->data[2][1] = html_print_label_input_block( __('Interval'), - html_print_extended_select_for_time('module_interval', $module_interval, '', '', '0', false, true) + html_print_select_agentmodule_interval('module_interval', $module_interval, '', '', '0', false, true) ); $dynamic_interval_img = ''.html_print_image( diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index 8505e0bf09..1da6d46285 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -317,6 +317,11 @@ function clippy_context_help($help=null) $title = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['title']; $intro = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['intro']; $img = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['img']; + } else if ($help === 'agent_module_interval') { + $clippy_agent_module_interval = clippy_agent_module_interval(); + $title = $clippy_agent_module_interval['tours']['agent_module_interval']['steps'][0]['title']; + $intro = $clippy_agent_module_interval['tours']['agent_module_interval']['steps'][0]['intro']; + $img = $clippy_agent_module_interval['tours']['agent_module_interval']['steps'][0]['img']; } else { $img = html_print_image( 'images/info-warning.svg', @@ -351,6 +356,6 @@ function clippy_context_help($help=null) }); '; - +hd($return, true); return $return; } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 7f4033ab53..4d27a3388e 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2286,7 +2286,7 @@ function html_print_extended_select_for_time( echo ''; - echo '
'; + echo '
'; html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class, $script_input); html_print_input_hidden($name, $selected, false, $uniq_name); @@ -2313,7 +2313,7 @@ function html_print_extended_select_for_time( false, false ); - echo ' '.html_print_image( + echo '  '.html_print_image( 'images/logs@svg.svg', true, [ @@ -2354,6 +2354,181 @@ function html_print_extended_select_for_time( } +/** + * Render agent/module interval-specific time selection set of inputs + * from html_print_extended_select_for_time with additional structure and + * behavior associated (establishes a limit of at least 60 seconds to be + * selected and displays notice when this limit is actively selected). + * + * @param string $name Select form name. + * @param mixed $selected Current selected value. Can be a single value or an array of selected values (in combination with multiple). + * @param string $script Javascript onChange (select) code. + * @param string $nothing Label when nothing is selected. + * @param mixed $nothing_value Value when nothing is selected. + * @param integer $size Size of the input. + * @param boolean $return Whether to return an output string or echo now (optional, echo by default). + * @param boolean $select_style Wherter to assign to combo a unique name (to have more than one on same page, like dashboard). + * @param boolean $unique_name Uunique name value. + * @param string $class Class value. + * @param boolean $readonly Readonly value. + * @param string $custom_fields Custom fields value. + * @param string $style_icon Style icon value. + * @param boolean $no_change No change value. + * @param boolean $allow_zero Allow the use of the value zero. + + * @return string HTML code if return parameter is true. + */ +function html_print_select_agentmodule_interval( + $name, + $selected='', + $script='', + $nothing='', + $nothing_value='0', + $size=false, + $return=false, + $select_style=false, + $unique_name=true, + $class='', + $readonly=false, + $custom_fields=false, + $style_icon='', + $no_change=false, + $allow_zero=0, + $units=null, + $script_input='' +) { + global $config; + + include_once $config['homedir'].'/include/functions_clippy.php'; + + $output = '
'; + $output .= html_print_extended_select_for_time( + $name, + $selected, + $script, + $nothing, + $nothing_value, + $size, + $return, + $select_style, + $unique_name, + $class, + $readonly + ); + + $unique_id = ''; + + if ($unique_name === true) { + $pattern = '/'.$name.'([a-fA-F0-9]+)_default/'; + + if (preg_match($pattern, $output, $matches)) { + // Obtain the unique ID of the generated input. + $unique_id = $matches[1]; + $name .= $unique_id; + } + } + + $output .= html_print_div( + [ + 'id' => 'agent_module_interval_clippy'.$unique_id, + 'class' => 'invisible flex align-self-center', + 'content' => clippy_context_help('agent_module_interval'), + ], + true + ); + + $output .= ""; + $output .= '
'; + return $output; +} + + /** * Print selects to configure the cron of a module. * diff --git a/pandora_console/include/help/clippy/agent_module_interval.php b/pandora_console/include/help/clippy/agent_module_interval.php new file mode 100644 index 0000000000..c7914ca4ca --- /dev/null +++ b/pandora_console/include/help/clippy/agent_module_interval.php @@ -0,0 +1,49 @@ + true, + 'intro' => __('Pandora FMS is designed to monitor thousands of elements. It is possible to use very low sampling intervals using specific elements for it (Satellite Server) but doing it in a centralized way can have a severe impact in the performance, that\'s why we limit it to intervals of at least 60 seconds. Even then, you should only do 60 second sampling on very specific modules. The impact on your infrastructure can be severe, leading to event storms and delays in other monitoring. If you are going to use 60-second intervals, we recommend that you disable unknown detection to avoid unwanted events and use FlipFlop\'s protection settings.'), + 'title' => __('Data Configuration Module.'), + 'img' => html_print_image( + 'images/info-warning.svg', + true, + [ + 'class' => 'main_menu_icon invert_filter', + 'style' => 'margin-left: 5px;', + ] + ), + ]; + $return_tours['tours']['agent_module_interval']['conf'] = []; + $return_tours['tours']['agent_module_interval']['conf']['autostart'] = false; + $return_tours['tours']['agent_module_interval']['conf']['show_bullets'] = 0; + $return_tours['tours']['agent_module_interval']['conf']['show_step_numbers'] = 0; + + return $return_tours; +} diff --git a/pandora_console/include/help/clippy/data_configuration_module.php b/pandora_console/include/help/clippy/data_configuration_module.php index 4e5d33efaa..fd28262da4 100644 --- a/pandora_console/include/help/clippy/data_configuration_module.php +++ b/pandora_console/include/help/clippy/data_configuration_module.php @@ -32,7 +32,7 @@ function clippy_data_configuration_module() $return_tours['tours']['data_configuration_module']['steps'] = []; $return_tours['tours']['data_configuration_module']['steps'][] = [ 'init_step_context' => true, - 'intro' => __('Please note that information provided here affects how the agent collect information and generate the data XML. Any data/configuration reported by the agent, different from data or description is discarded, and the configuration shown in the console prevails over any configuration coming from the agent, this applies for example for crit/warn thresholds, interval, module group, min/max value, tags, etc.').__('Information imported FIRST time from the XML will fill the information you can see in the console, but after the first import, system will ignore any update coming from the XML/Agent.'), + 'intro' => __('Please note that information provided here affects how the agent collects information and generate the data XML. Any data/configuration reported by the agent, different from data or description is discarded, and the configuration shown in the console prevails over any configuration coming from the agent, this applies for example to crit/warn thresholds, interval, module group, min/max value, tags, etc.').' '.__('Information imported FIRST time from the XML will fill the information you can see in the console, but after the first import, system will ignore any update coming from the XML/Agent.'), 'title' => __('Data Configuration Module.'), 'img' => html_print_image( 'images/info-warning.svg', diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 61c91f9370..64b215c2a5 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -995,6 +995,10 @@ select:-internal-list-box { display: flex; } +.align-self-center { + align-self: center; +} + .flex_important { display: flex !important; } From 8ff51b3679935d40c65c56907de72e9344a11ede Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 27 Feb 2024 18:46:34 +0100 Subject: [PATCH 006/100] implemented agent module custom selectors --- pandora_console/godmode/agentes/configurar_agente.php | 2 +- pandora_console/include/functions_clippy.php | 2 +- pandora_console/include/functions_html.php | 9 +-------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 68e0a068f5..d7c308f008 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -878,7 +878,7 @@ if ($id_agente) { ], ], [], - $dots ?? '' + ($dots ?? '') ); } diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index 1da6d46285..1ccb9724a0 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -356,6 +356,6 @@ function clippy_context_help($help=null) }); '; -hd($return, true); + return $return; } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 4d27a3388e..46ba526e80 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2439,13 +2439,10 @@ function html_print_select_agentmodule_interval( $output .= " diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 1762326077..77f3d62380 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -6938,3 +6938,45 @@ function get_defined_translation($string) } } } + + +/** + * General utility to check if at least one element in an array meets a certain criteria defined by passed function. + * + * @param array $array Array to be checked. + * @param callable $fn Checking function (must accept one argument => array item to be evaluated and returns + * true/false depending on whether or not the condition was fulfilled). + * + * @return boolean + */ +function array_some(array $array, callable $fn) +{ + foreach ($array as $value) { + if ($fn($value) === true) { + return true; + } + } + + return false; +} + + +/** + * General utility to check if every element in an array meets a certain criteria defined by passed function. + * + * @param array $array Array to be checked. + * @param callable $fn Checking function (must accept one argument => array item to be evaluated and returns + * true/false depending on whether or not the condition was fulfilled). + * + * @return boolean + */ +function array_every(array $array, callable $fn) +{ + foreach ($array as $value) { + if ($fn($value) === false) { + return false; + } + } + + return true; +} diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 84ea9e34ee..a09baf5d9f 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -267,32 +267,6 @@ function groups_check_used($idGroup) $return['tables'][] = __('SNMP alerts'); } - switch ($config['dbtype']) { - case 'mysql': - case 'postgresql': - $numRows = db_get_num_rows( - 'SELECT * - FROM tusuario_perfil WHERE id_grupo = '.$idGroup.';' - ); - break; - - case 'oracle': - $numRows = db_get_num_rows( - 'SELECT * - FROM tusuario_perfil WHERE id_grupo = '.$idGroup - ); - break; - - default: - // Ignore. - break; - } - - if ($numRows > 0) { - $return['return'] = true; - $return['tables'][] = __('User profile'); - } - $hookEnterprise = enterprise_include_once('include/functions_groups.php'); if ($hookEnterprise !== ENTERPRISE_NOT_HOOK) { $returnEnterprise = enterprise_hook('groups_check_used_group_enterprise', [$idGroup]); diff --git a/pandora_console/include/lib/Group.php b/pandora_console/include/lib/Group.php index 66317471f6..66afa624ad 100644 --- a/pandora_console/include/lib/Group.php +++ b/pandora_console/include/lib/Group.php @@ -50,6 +50,7 @@ class Group extends Entity 'loadInfoAgent', 'getAgentsByGroup', 'getGroupsName', + 'checkGroupIsLinkedToElement', ]; @@ -777,5 +778,35 @@ class Group extends Entity exit; } + /** + * Check whether group is linked to a database element (needed for ajax check). + * + * @return void + */ + public static function checkGroupIsLinkedToElement() + { + $group_id = get_parameter('group_id', null); + $table_name = get_parameter('table_name', null); + $field_name = get_parameter('field_name', null); + + if (count(array_filter([$group_id, $table_name, $field_name])) < 3) { + $result['result'] = 0; + } else { + $sql = sprintf( + 'SELECT * FROM %s WHERE %s = %s', + $table_name, + $field_name, + $group_id + ); + + $count = db_get_num_rows($sql); + + $result['result'] = (int) ($count > 0); + } + + echo json_encode($result); + exit; + } + } From ef4d7b90aca7c4fc4b81d61ef0c71142064ccf8f Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 29 Feb 2024 12:22:32 +0100 Subject: [PATCH 017/100] #12934 changed filters --- pandora_console/include/styles/deployment_list.css | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/include/styles/deployment_list.css b/pandora_console/include/styles/deployment_list.css index e487207b05..746fe82716 100644 --- a/pandora_console/include/styles/deployment_list.css +++ b/pandora_console/include/styles/deployment_list.css @@ -29,6 +29,5 @@ ul.wizard li.flex-indep { } .datatable_filter.content li input[type="text"] { - width: 150px; margin: 0 1em 0 0; } From bf1874ca09f14a224c5eabc7c7810eb629d3efaf Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Fri, 1 Mar 2024 10:26:10 +0100 Subject: [PATCH 018/100] #12934 added modals for edit task of DISCOVERY_DEPLOY_AGENTS --- .../wizards/DiscoveryTaskList.class.php | 72 ++++++++++++++----- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 1023a00704..ea4f615646 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -100,6 +100,26 @@ class DiscoveryTaskList extends HTML // Load styles. parent::run(); + $deploymentCenter = new DeploymentCenter(); + echo $deploymentCenter->loadJS(); + ui_require_css_file('deployment_list'); + + html_print_div( + [ + 'content' => '', + 'id' => 'modal_add_target', + 'class' => 'invisible', + ] + ); + + html_print_div( + [ + 'content' => '', + 'id' => 'modal_deploy_targets', + 'class' => 'invisible', + ] + ); + $this->prepareBreadcrum( [ [ @@ -176,7 +196,7 @@ class DiscoveryTaskList extends HTML } if (is_reporting_console_node() === false) { - $ret2 = $this->showList(__('Host & devices tasks'), [0, 1]); + $ret2 = $this->showList(__('Host & devices tasks'), [0, 1, 9]); $ret2 .= $this->showList(__('Applications tasks'), [3, 4, 5, 10, 11, 12], 'app'); $ret2 .= $this->showList(__('Cloud tasks'), [6, 7, 8, 13, 14], 'cloud'); $ret2 .= $this->showList(__('Custom tasks'), [-1], 'custom'); @@ -870,14 +890,12 @@ class DiscoveryTaskList extends HTML break; case DISCOVERY_DEPLOY_AGENTS: - // Internal deployment task. - $no_operations = true; $data[6] = html_print_image( 'images/osx-terminal@groups.svg', true, ['title' => __('Agent deployment')] ).'  '; - $data[6] .= __('Discovery.Agent.Deployment (legacy)'); + $data[6] .= __('Discovery.Agent.Deployment'); break; case DISCOVERY_APP_MICROSOFT_SQL_SERVER: @@ -1003,6 +1021,7 @@ class DiscoveryTaskList extends HTML && $task['type'] != DISCOVERY_APP_SAP && $task['type'] != DISCOVERY_CLOUD_AWS_RDS && $task['type'] != DISCOVERY_CLOUD_AWS_S3 + && $task['type'] != DISCOVERY_DEPLOY_AGENTS ) { if (check_acl($config['id_user'], 0, 'MR') && (int) $task['type'] !== DISCOVERY_EXTENSION) { $data[9] .= '
'; @@ -1062,25 +1081,40 @@ class DiscoveryTaskList extends HTML ).''; } } else { - $url_edit = sprintf( - 'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d', - $this->getTargetWiz($task, $recon_script_data), - $task['id_rt'] - ); + // Create the url edit. + switch ((int) $task['type']) { + case DISCOVERY_EXTENSION: + $url_edit = ui_get_full_url( + sprintf( + 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=%s&mode=%s&id_task=%s', + $task['section'], + $task['short_name'], + $task['id_rt'], + ) + ); + break; - if ((int) $task['type'] === DISCOVERY_EXTENSION) { - $url_edit = sprintf( - 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=%s&mode=%s&id_task=%s', - $task['section'], - $task['short_name'], - $task['id_rt'], - ); + case DISCOVERY_DEPLOY_AGENTS: + if (empty($task['field1']) === false) { + $url_edit = 'javascript:show_deploy_targets('.$task['id_rt'].')'; + } else { + $url_edit = 'javascript:show_scan_targets('.$task['id_rt'].')'; + } + break; + + default: + $url_edit = ui_get_full_url( + sprintf( + 'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d', + $this->getTargetWiz($task, $recon_script_data), + $task['id_rt'] + ) + ); + break; } // Check if is a H&D, Cloud or Application or IPAM. - $data[9] .= ''.html_print_image( + $data[9] .= ''.html_print_image( 'images/edit.svg', true, [ From 30769852be2f47098cc753e26707ad37ba9a08e4 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 1 Mar 2024 13:04:28 +0100 Subject: [PATCH 019/100] #12721 free licence change 4 --- pandora_console/godmode/um_client/index.php | 13 ---------- .../include/javascript/jquery.pandora.js | 25 +++++++++++++++++++ pandora_console/index.php | 1 + 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/pandora_console/godmode/um_client/index.php b/pandora_console/godmode/um_client/index.php index 07727cb5cf..c33814291b 100644 --- a/pandora_console/godmode/um_client/index.php +++ b/pandora_console/godmode/um_client/index.php @@ -112,19 +112,6 @@ if ($license_data !== ENTERPRISE_NOT_HOOK) { ); return; } - - // if (rtrim($license_data['licensed_to']) === Manager::PANDORA_TRIAL_ISSUER) { - // $product_name = get_product_name(); - // ui_print_info_message( - // __( - // 'You cannot use update manager %s. This license is a trial license to test all %s features. Please update your license to unlock all %s features.', - // $mode_str, - // $product_name, - // $product_name - // ) - // ); - // return; - // } } else { $license_data = []; $license_data['count_enabled'] = db_get_value( diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index 5b39a98631..f0376c6d85 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -221,6 +221,31 @@ $(document).ready(function() { } } + if ($("#license_dialog").length) { + let height = 300; + + $("#license_dialog").dialog({ + dialogClass: "no-close", + closeOnEscape: false, + resizable: false, + draggable: true, + modal: true, + height: height, + width: 850, + overlay: { + opacity: 0.5, + background: "black" + }, + open: function() { + $("#ok_buttom").show(); + } + }); + + $("#ok_buttom").click(function() { + $("#license_dialog").dialog("close"); + }); + } + if ($("#msg_change_password").length) { $("#msg_change_password").dialog({ resizable: false, diff --git a/pandora_console/index.php b/pandora_console/index.php index 96d4ed6bb6..b328c55dda 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -662,6 +662,7 @@ if (isset($config['id_user']) === false) { db_logon($nick_in_db, $_SERVER['REMOTE_ADDR']); $_SESSION['id_usuario'] = $nick_in_db; $config['id_user'] = $nick_in_db; + $_SESSION['logged'] = true; config_prepare_expire_time_session(true); // Check if connection goes through F5 balancer. If it does, then From a5ddef0b77dda82e568c300cf0f8161217752652 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 18 Mar 2024 11:49:38 +0100 Subject: [PATCH 020/100] #12973 Added vc_text_margin --- pandora_console/godmode/setup/setup_visuals.php | 9 +++++++-- pandora_console/include/functions_config.php | 8 ++++++++ pandora_console/operation/visual_console/view.php | 8 ++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 586f361de0..d21f2aeb12 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1439,7 +1439,7 @@ $table_vc->data[$row][] = html_print_label_input_block( $table_vc->data[$row][] = html_print_label_input_block( __('Number of favorite visual consoles to show in the menu'), - "" + '' ); $row++; @@ -1455,6 +1455,12 @@ $table_vc->data[$row][] = html_print_label_input_block( ) ); +$table_vc->data[$row][] = html_print_label_input_block( + __('Visual console default text margin (em)'), + '' +); +$row++; + $table_vc->data[$row][] = html_print_label_input_block( __('Lock screen orientation when viewing on mobile devices'), html_print_checkbox_switch( @@ -1464,7 +1470,6 @@ $table_vc->data[$row][] = html_print_label_input_block( true ) ); -$row++; $table_vc->data[$row][] = html_print_label_input_block( __('Display item frame on alert triggered').ui_print_help_tip(__('It displays an orange box around items that have triggered an alert.'), true), diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 32ca1a613c..33dafe2c35 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1263,6 +1263,10 @@ function config_update_config() $error_update[] = __('Default line menu items for the Visual Console'); } + if (config_update_value('vc_text_margin', (int) get_parameter('vc_text_margin', 1), true) === false) { + $error_update[] = __('Default text margin for the Visual Console'); + } + if (config_update_value('vc_line_thickness', (int) get_parameter('vc_line_thickness'), true) === false) { $error_update[] = __('Default line thickness for the Visual Console'); } @@ -2913,6 +2917,10 @@ function config_process_config() config_update_value('vc_menu_items', 10); } + if (!isset($config['vc_text_margin'])) { + config_update_value('vc_text_margin', 1); + } + if (!isset($config['ser_menu_items'])) { config_update_value('ser_menu_items', 10); } diff --git a/pandora_console/operation/visual_console/view.php b/pandora_console/operation/visual_console/view.php index 7d44c7b69b..ef63456f6a 100644 --- a/pandora_console/operation/visual_console/view.php +++ b/pandora_console/operation/visual_console/view.php @@ -627,6 +627,14 @@ if ($pure === true) { + + Date: Mon, 1 Apr 2024 11:52:59 +0200 Subject: [PATCH 021/100] 12721 Added messages --- pandora_console/godmode/um_client/index.php | 14 ++++++++++++++ .../include/javascript/jquery.pandora.js | 8 ++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/um_client/index.php b/pandora_console/godmode/um_client/index.php index c33814291b..1a78e39b5f 100644 --- a/pandora_console/godmode/um_client/index.php +++ b/pandora_console/godmode/um_client/index.php @@ -112,6 +112,20 @@ if ($license_data !== ENTERPRISE_NOT_HOOK) { ); return; } + + if (rtrim($license_data['licensed_to']) === Manager::PANDORA_TRIAL_ISSUER) { + $product_name = get_product_name(); + + ui_print_info_message( + __( + 'You cannot use update manager %s. This license is a trial license to test all %s features. Please update your license to unlock all %s features.', + $mode_str, + $product_name, + $product_name + ) + ); + return; + } } else { $license_data = []; $license_data['count_enabled'] = db_get_value( diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index f0376c6d85..7ac66aa1dc 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -221,10 +221,10 @@ $(document).ready(function() { } } - if ($("#license_dialog").length) { - let height = 300; + if ($("#license_dialog_message").length) { + let height = 350; - $("#license_dialog").dialog({ + $("#license_dialog_message").dialog({ dialogClass: "no-close", closeOnEscape: false, resizable: false, @@ -242,7 +242,7 @@ $(document).ready(function() { }); $("#ok_buttom").click(function() { - $("#license_dialog").dialog("close"); + $("#license_dialog_message").dialog("close"); }); } From bda3c18c9736ddd479f26fbaadc5c7b7111671ff Mon Sep 17 00:00:00 2001 From: rafael Date: Tue, 2 Apr 2024 10:50:36 +0200 Subject: [PATCH 022/100] 13129 remove websocket engine from online installer --- .../pandora_deploy_community.sh | 27 ------------------- .../pandora_deploy_community_el8.sh | 27 ------------------- .../pandora_deploy_community_ubuntu_2204.sh | 21 --------------- 3 files changed, 75 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index a49cc294bf..6433324056 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -528,23 +528,6 @@ ServerTokens Prod EO_CONFIG_F -# Add ws proxy options to apache. -cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD' -LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so - -EO_HTTPD_MOD - -cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL' -ProxyRequests Off - - Require all granted - - -ProxyPass /ws ws://127.0.0.1:8080 -ProxyPassReverse /ws ws://127.0.0.1:8080 - -EO_HTTPD_WSTUNNEL - # Temporal quitar htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess @@ -691,16 +674,6 @@ EO_LRA chmod 0644 /etc/logrotate.d/pandora_server chmod 0644 /etc/logrotate.d/pandora_agent -# Add websocket engine start script. -mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ -chmod +x /etc/init.d/pandora_websocket_engine - -# Start Websocket engine -/etc/init.d/pandora_websocket_engine start &>> $LOGFILE - -# Configure websocket to be started at start. -systemctl enable pandora_websocket_engine &>> $LOGFILE - # Enable pandora ha service systemctl enable pandora_server --now &>> $LOGFILE execute_cmd "systemctl start pandora_server" "Starting Pandora FMS Server" diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index 72ee496fa0..8e9b094d63 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -639,23 +639,6 @@ ServerTokens Prod EO_CONFIG_F -# Add ws proxy options to apache. -cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD' -LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so - -EO_HTTPD_MOD - -cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL' -ProxyRequests Off - - Require all granted - - -ProxyPass /ws ws://127.0.0.1:8080 -ProxyPassReverse /ws ws://127.0.0.1:8080 - -EO_HTTPD_WSTUNNEL - # Temporal quitar htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess @@ -813,16 +796,6 @@ EO_LRA chmod 0644 /etc/logrotate.d/pandora_server chmod 0644 /etc/logrotate.d/pandora_agent -# Add websocket engine start script. -mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE" -chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE" - -# Start Websocket engine -/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE" - -# Configure websocket to be started at start. -systemctl enable pandora_websocket_engine &>> "$LOGFILE" - # Enable pandora ha service systemctl enable pandora_server --now &>> "$LOGFILE" execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server" diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index 6d0bb69d06..e553a35c18 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -648,17 +648,6 @@ ServerTokens Prod EO_CONFIG_F -#Enable quickshell proxy -cat >> /etc/apache2/mods-enabled/00-proxy.conf << 'EO_HTTPD_WSTUNNEL' -ProxyRequests Off - - Require all granted - - -ProxyPass /ws ws://127.0.0.1:8080 -ProxyPassReverse /ws ws://127.0.0.1:8080 -EO_HTTPD_WSTUNNEL - # Fixing console permissions chmod 600 $PANDORA_CONSOLE/include/config.php &>> "$LOGFILE" chown -R www-data:www-data $PANDORA_CONSOLE &>> "$LOGFILE" @@ -813,16 +802,6 @@ EO_LRA chmod 0644 /etc/logrotate.d/pandora_server chmod 0644 /etc/logrotate.d/pandora_agent -# Add websocket engine start script. -mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE" -chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE" - -# Start Websocket engine -/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE" - -# Configure websocket to be started at start. -systemctl enable pandora_websocket_engine &>> "$LOGFILE" - # Enable pandora ha service execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server" systemctl enable pandora_server &>> "$LOGFILE" From 7cdca7e622b36fc5b77620cb98c87704bb6f4d7f Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 2 Apr 2024 12:41:53 +0200 Subject: [PATCH 023/100] #13059 new view widget agent module dashboard --- pandora_console/include/functions_html.php | 270 ++++++++++++++++++ .../include/javascript/pandora_dashboards.js | 1 + .../lib/Dashboard/Widgets/agent_module.php | 6 +- .../include/styles/agent_module_view.css | 108 +++++++ pandora_console/include/styles/pandora.css | 10 + .../views/dashboard/configurationWidgets.php | 5 + 6 files changed, 397 insertions(+), 3 deletions(-) create mode 100644 pandora_console/include/styles/agent_module_view.css diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 52ed76bd6b..61793193af 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1854,6 +1854,272 @@ function html_print_select_multiple_modules_filtered(array $data):string } +/** + * Form multiple inputs for slect groups. + * + * @param array $data Data inputs. + * + * @return string Html output. + */ +function html_print_select_multiple_modules_filtered_formated(array $data):string +{ + if (is_ajax() === true) { + ui_require_javascript_file( + 'multiselect_filtered', + 'include/javascript/', + true + ); + ui_require_css_file( + 'multiselect_filtered', + 'include/styles/', + true + ); + } else { + ui_require_javascript_file('multiselect_filtered'); + ui_require_css_file('multiselect_filtered'); + } + + $uniqId = $data['uniqId']; + + $return_all_group = isset($data['mReturnAllGroup']) ? $data['mReturnAllGroup'] : true; + + // Group. + $output = '
'; + $output .= html_print_input( + [ + 'label' => __('Group'), + 'label_class' => 'font-title-font', + 'name' => 'filtered-module-group-'.$uniqId, + 'returnAllGroup' => $return_all_group, + 'privilege' => 'AR', + 'type' => 'select_groups', + 'return' => true, + 'script' => 'fmAgentChange(\''.$uniqId.'\')', + 'selected' => $data['mGroup'], + ] + ); + + // Groups module. + $module_groups = db_get_all_rows_sql( + 'SELECT * FROM tmodule_group ORDER BY name' + ); + $module_groups = array_reduce( + $module_groups, + function ($carry, $item) { + $carry[$item['id_mg']] = $item['name']; + return $carry; + } + ); + + $output .= html_print_input( + [ + 'label' => __('Module group'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $module_groups, + 'name' => 'filtered-module-module-group-'.$uniqId, + 'selected' => $data['mModuleGroup'], + 'return' => true, + 'nothing' => __('All'), + 'nothing_value' => 0, + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + ] + ); + $output .= '
'; + $output .= '
'; + + // Recursion. + $output .= html_print_input( + [ + 'label' => __('Recursion'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'name' => 'filtered-module-recursion-'.$uniqId, + 'value' => (empty($data['mRecursion']) === true) ? false : true, + 'checked' => (empty($data['mRecursion']) === true) ? false : true, + 'return' => true, + 'id' => 'filtered-module-recursion-'.$uniqId, + 'onchange' => 'fmAgentChange(\''.$uniqId.'\')', + ] + ); + + $commonModules = 0; + if (empty($data['mShowCommonModules']) === false) { + $commonModules = 1; + } + + $output .= html_print_input( + [ + 'label' => __('Only common modules'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'checked' => $commonModules, + 'value' => $commonModules, + 'name' => 'filtered-module-show-common-modules-'.$uniqId, + 'id' => 'filtered-module-show-common-modules-'.$uniqId, + 'return' => true, + 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + ] + ); + + $output .= '
'; + + if (empty($data['searchBar']) === false && $data['searchBar'] === true) { + $output .= '
'; + + $output .= '
'; + $output .= html_print_input( + [ + 'type' => 'text', + 'name' => 'agent-searchBar-'.$uniqId, + 'onKeyUp' => 'searchAgent(\''.$uniqId.'\')', + 'placeholder' => __('Type to search agents'), + 'return' => true, + ] + ); + + $output .= '
'; + + $output .= '
'; + $output .= html_print_input( + [ + 'type' => 'text', + 'name' => 'module-searchBar-'.$uniqId, + 'onKeyUp' => 'searchModule(\''.$uniqId.'\')', + 'return' => true, + 'placeholder' => __('Type to search modules'), + ] + ); + + $output .= '
'; + + $output .= '
'; + } + + $output .= '
'; + // Agent. + $agents = agents_get_group_agents( + // Id_group. + $data['mGroup'], + // Search. + false, + // Case. + 'lower', + // NoACL. + false, + // ChildGroups. + false, + // Serialized. + false, + // Separator. + '|', + // Add_alert_bulk_op. + false, + // Force_serialized. + false, + // Meta_fields. + ($data['mMetaFields'] ?? is_metaconsole()) + ); + + if ((empty($agents)) === true || $agents == -1) { + $agents = []; + } + + if ($data['mShowSelectedOtherGroups']) { + $selected_agents = explode(',', $data['mAgents']); + foreach ($selected_agents as $agent_id) { + if (!array_key_exists($agent_id, $agents)) { + $agents[$agent_id] = agents_get_alias($agent_id); + } + } + } + + if (is_metaconsole() === true) { + $output .= html_print_input( + [ + 'label' => __('Agents'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $agents, + 'name' => 'filtered-module-agents-'.$uniqId, + 'selected' => explode(',', $data['mAgents']), + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', + ] + ); + } else { + $output .= html_print_input( + [ + 'label' => __('Agents'), + 'label_class' => 'font-title-font', + 'type' => 'select_from_sql', + 'sql' => 'SELECT `id_agente`,`alias` FROM tagente', + 'name' => 'filtered-module-agents-'.$uniqId, + 'selected' => explode(',', $data['mAgents']), + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', + ] + ); + } + + if (empty($data['mAgents']) === false + && empty($data['mModuleGroup'] === false) + ) { + $all_modules = get_modules_agents( + $data['mModuleGroup'], + explode(',', $data['mAgents']), + !$commonModules, + false, + true + ); + } else { + $all_modules = []; + } + + $mModules = $data['mModules']; + if (is_array($data['mModules']) === false) { + $mModules = explode( + ',', + $data['mModules'] + ); + } + + $result = []; + // Clean double safe input. + foreach ($mModules as $name) { + $result[] = io_safe_output($name); + } + + $output .= html_print_input( + [ + 'label' => __('Modules'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $all_modules, + 'name' => 'filtered-module-modules-'.$uniqId, + 'selected' => $result, + 'return' => true, + 'multiple' => true, + 'style' => 'max-width:98%;', + 'input_class' => 'flex-colum-center-important', + ] + ); + + $output .= '
'; + if ($data['return'] === false) { + echo $output; + } + + return $output; +} + + /** * Prints an array of fields in a popup menu of a form based on a SQL query. * The first and second columns of the query will be used. @@ -6108,6 +6374,10 @@ function html_print_input($data, $wrapper='div', $input_only=false) $output .= html_print_select_multiple_modules_filtered($data); break; + case 'select_multiple_modules_filtered_formated': + $output .= html_print_select_multiple_modules_filtered_formated($data); + break; + case 'datalist': $output .= html_print_datalist( $data['name'], diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index 5a0c06b40c..2bb7faa773 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -1,6 +1,7 @@ /* globals $, GridStack, load_modal, TreeController, forced_title_callback, createVisualConsole, UndefineTinyMCE*/ // eslint-disable-next-line no-unused-vars function show_option_dialog(settings) { + $("#modal-config-widget").html(""); load_modal({ target: $("#modal-update-dashboard"), form: "form-update-dashboard", diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php index f5c4ff5a96..7fa4a04fa1 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php @@ -297,10 +297,10 @@ class AgentModuleWidget extends Widget } $inputs[] = [ - 'class' => 'flex flex-row', - 'id' => 'select_multiple_modules_filtered', + 'class' => 'flex flex-column', + 'id' => 'select_multiple_modules_filtered_formated', 'arguments' => [ - 'type' => 'select_multiple_modules_filtered', + 'type' => 'select_multiple_modules_filtered_formated', 'uniqId' => $this->cellId, 'mGroup' => (isset($this->values['mGroup']) === true) ? $this->values['mGroup'] : $mgroup, 'mRecursion' => (isset($this->values['mRecursion']) === true) ? $this->values['mRecursion'] : '', diff --git a/pandora_console/include/styles/agent_module_view.css b/pandora_console/include/styles/agent_module_view.css new file mode 100644 index 0000000000..8fc8733b2b --- /dev/null +++ b/pandora_console/include/styles/agent_module_view.css @@ -0,0 +1,108 @@ +#select_multiple_modules_filtered_formated { + border: 1px solid #c1c1c1; + border-radius: 10px; + width: auto; +} + +#select_multiple_modules_filtered_formated > div { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + margin: 5px; +} + +#select_multiple_modules_filtered_formated > div > div { + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + flex-wrap: wrap; + width: 48%; +} + +#select_multiple_modules_filtered_formated .recursive-modules { + flex: auto; + width: 100%; +} + +#select_multiple_modules_filtered_formated .recursive-modules > div { + flex-direction: row-reverse; + justify-content: flex-end; +} + +#select_multiple_modules_filtered_formated .recursive-modules > div > label { + max-width: unset; + font-weight: unset; +} + +#select_multiple_modules_filtered_formated > div > div > select { + min-width: 250px !important; +} + +#select_multiple_modules_filtered_formated > div > div > .select2 { + min-width: 250px !important; +} + +form.modal-dashboard ul.wizard li { + align-items: flex-start; +} + +form.modal-dashboard ul.wizard li label { + max-width: 100% !important; + width: 100%; +} + +.flex-colum-center-important > select { + width: 95%; + height: 119px; + min-height: auto; +} + +.wizard > li:nth-of-type(1) { + display: flex !important; + flex-direction: column !important; + grid-area: titulo; +} + +.wizard > li:nth-of-type(1) > input { + width: 100%; +} + +.wizard > li:nth-of-type(2) { + grid-area: color; + display: flex !important; + flex-direction: column !important; +} + +.wizard > li:nth-of-type(3) { + grid-area: show; + display: flex !important; + flex-direction: column !important; +} + +ul.wizard > li.flex-row > label { + width: 100%; + max-width: 100% !important; + min-height: 30px; +} + +.wizard > li:nth-of-type(4) { + grid-area: todo; + width: 100% !important; +} + +ul.wizard { + display: grid; + grid-template: + "titulo show color" + "todo todo todo"; + grid-template-columns: 40% 40% 20%; +} + +#wr_background > input { + background-color: #f6f7fb; + padding: 5px; + border-radius: 10px; + border: 1px solid #8a96a6; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 30fcd35dd3..824a6c363a 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -12034,10 +12034,20 @@ div[role="dialog"] { align-items: center; } +.flex-colum-center-important { + display: flex !important; + flex-direction: column !important; + align-items: center !important; +} + .flex-colum-center > img { margin: 5px; } +.flex-none { + flex: none !important; +} + .space-between { justify-content: space-between; } diff --git a/pandora_console/views/dashboard/configurationWidgets.php b/pandora_console/views/dashboard/configurationWidgets.php index 24f2019f86..373094bfe7 100644 --- a/pandora_console/views/dashboard/configurationWidgets.php +++ b/pandora_console/views/dashboard/configurationWidgets.php @@ -32,6 +32,7 @@ ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/', true); ui_require_javascript_file('pandora', 'include/javascript/', true); $output = ''; +$widgetId = json_decode(io_safe_output(get_parameter('extradata')), true)['widgetId']; $form = [ 'action' => '#', @@ -64,4 +65,8 @@ HTML::printForm( ] ); +if ($widgetId == '10') { + $output .= ui_require_css_file('agent_module_view', 'include/styles/', true, true); +} + echo $output; From 8b3308c09eedf3b95a9ee28c280a1b732b5478f4 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 2 Apr 2024 15:15:06 +0200 Subject: [PATCH 024/100] #13276 message wrap open no more longer --- .../just_enterprise_warning.php | 109 ++++++++++++++++++ .../godmode/update_manager/update_manager.php | 4 + 2 files changed, 113 insertions(+) create mode 100644 pandora_console/godmode/update_manager/just_enterprise_warning.php diff --git a/pandora_console/godmode/update_manager/just_enterprise_warning.php b/pandora_console/godmode/update_manager/just_enterprise_warning.php new file mode 100644 index 0000000000..c6d97a8864 --- /dev/null +++ b/pandora_console/godmode/update_manager/just_enterprise_warning.php @@ -0,0 +1,109 @@ + + + + + \ No newline at end of file diff --git a/pandora_console/godmode/update_manager/update_manager.php b/pandora_console/godmode/update_manager/update_manager.php index 3cb774c4d5..fdfc3611fd 100644 --- a/pandora_console/godmode/update_manager/update_manager.php +++ b/pandora_console/godmode/update_manager/update_manager.php @@ -166,5 +166,9 @@ switch ($tab) { $mode = \UpdateManager\UI\Manager::MODE_ONLINE; include $config['homedir'].'/godmode/um_client/index.php'; include $config['homedir'].'/godmode/update_manager/modal_lts_update.php'; + + if (enterprise_installed() === false) { + include $config['homedir'].'/godmode/update_manager/just_enterprise_warning.php'; + } break; } From 42737a38a1c42c306d37059dfdf601560d591447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Tue, 2 Apr 2024 08:51:53 -0600 Subject: [PATCH 025/100] Changes on CLI -pandora_update_agent_custom_field --- pandora_server/util/pandora_manage.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 55ff28c0c5..f1bf7398fa 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -3404,9 +3404,14 @@ sub cli_agent_update_custom_fields() { } } + if(!defined($new_value)) { + print_log "[ERROR] Error updating field '$field' no new value has been provided\n\n"; + exit; + } + print_log "\n[INFO] Updating field '$field' in agent with ID '$id_agent'\n\n"; - my $result = pandora_agent_update_custom_field ($dbh, $new_value, $custom_field, $id_agent); + my $result = pandora_update_agent_custom_field ($dbh, $new_value, $custom_field, $id_agent); if($result == "0E0"){ print_log "[ERROR] Error updating field '$field'\n\n"; From 439dc6d273a6ca0ce8e0283affaa1678d7a3ebbd Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 2 Apr 2024 16:55:17 +0200 Subject: [PATCH 026/100] #12893 redirection confirm delete group --- pandora_console/godmode/groups/group_list.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index b8d969a90c..81b258dab8 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -1344,7 +1344,11 @@ $tab = 'group_edition'; } }); } else { - if (!confirm(confirm_text)) return false; + if (!confirm(confirm_text)) { + return false; + } else { + window.location.assign(delete_URL); + } } }, dataType: "json" From f855b5c399d649d0e9b0c3e0d50d78668c245ffd Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 2 Apr 2024 18:14:39 +0200 Subject: [PATCH 027/100] #13276 fix conflict css --- .../update_manager/just_enterprise_warning.php | 11 ++++++----- .../update_manager_client/resources/styles/um.css | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/update_manager/just_enterprise_warning.php b/pandora_console/godmode/update_manager/just_enterprise_warning.php index c6d97a8864..79de165bd1 100644 --- a/pandora_console/godmode/update_manager/just_enterprise_warning.php +++ b/pandora_console/godmode/update_manager/just_enterprise_warning.php @@ -59,22 +59,23 @@ if ($php_version_array[0] < 7) { 'w100p mrgn_top_50px'] ); ?>
-

+

-

+

Github '.__('and this will be the access way for future upgrades.'); ?>

-

+

diff --git a/pandora_console/update_manager_client/resources/styles/um.css b/pandora_console/update_manager_client/resources/styles/um.css index a351614184..056a2bc926 100644 --- a/pandora_console/update_manager_client/resources/styles/um.css +++ b/pandora_console/update_manager_client/resources/styles/um.css @@ -451,11 +451,11 @@ span.warning { align-items: center; justify-content: space-between; } -.ui-dialog-content.ui-widget-content p { +/*.ui-dialog-content.ui-widget-content p { font-size: 10pt; word-break: keep-all; text-align: justify; -} +}*/ .license_text { text-align: left; From 9eb5f31be8b016d338471bac42497c6d144c18c4 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Tue, 2 Apr 2024 18:46:41 +0200 Subject: [PATCH 028/100] 13286-Change controls in Events full screen --- pandora_console/include/styles/events.css | 17 +++++++++++ .../include/styles/pandora_black.css | 4 +++ pandora_console/operation/events/events.php | 28 +++++++------------ 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 88ee563947..ddce2bf4b5 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -584,3 +584,20 @@ div.container-filter-buttons { #button-start-search { width: 115px; } + +.events-refresh-pure { + position: fixed; + z-index: 1; + top: 10px; + right: 10px; + width: 450px; + height: 70px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: center; + background-color: #f2f6f7; + border-radius: 15px; + padding: 0px 10px; +} diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 80032efbb7..a4de6e6b33 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1892,3 +1892,7 @@ a.link-bold { text-decoration: none; font-weight: bold; } + +div.events-refresh-pure { + background-color: #333; +} diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 420c3eb375..7c5f1b1210 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1673,13 +1673,10 @@ $url .= ''; if ($pure) { // Fullscreen. // Floating menu - Start. - echo '

'; - - echo ''; + echo '
'; echo '
'; // Floating menu - End. @@ -3867,4 +3854,9 @@ function show_events_graph(){ } }); } + +$(document).ready(function () { + var controls = document.querySelector('.events-refresh-pure'); + autoHideElement(controls, 1000); +}); From 0ceee98de76f57dbe0b16fe0d00e1924fb90a3f1 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 3 Apr 2024 11:05:43 +0200 Subject: [PATCH 029/100] #12721 free licence change 5 --- pandora_console/include/javascript/jquery.pandora.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index 7ac66aa1dc..f1cffbb125 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -222,7 +222,7 @@ $(document).ready(function() { } if ($("#license_dialog_message").length) { - let height = 350; + let height = 570; $("#license_dialog_message").dialog({ dialogClass: "no-close", @@ -230,8 +230,8 @@ $(document).ready(function() { resizable: false, draggable: true, modal: true, - height: height, - width: 850, + height: "auto", + width: 800, overlay: { opacity: 0.5, background: "black" From a68905343ba9188126a6460fef284d54d57aa4c9 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 3 Apr 2024 11:11:54 +0200 Subject: [PATCH 030/100] #12721 added svg --- pandora_console/images/free_license.svg | 85 +++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 pandora_console/images/free_license.svg diff --git a/pandora_console/images/free_license.svg b/pandora_console/images/free_license.svg new file mode 100644 index 0000000000..a6a7ab5bb3 --- /dev/null +++ b/pandora_console/images/free_license.svg @@ -0,0 +1,85 @@ + + + 771F63E3-1B6F-4CAC-94BD-C4F0EC2141AA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From ce9f34215018e6199d4c7beb6a4931834599903a Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Wed, 3 Apr 2024 12:14:07 +0200 Subject: [PATCH 031/100] 13212-Fix calc of modules/agentes --- .../include/class/ConsoleSupervisor.php | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 24af0a860c..d79619383b 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -3325,27 +3325,35 @@ class ConsoleSupervisor public function checkTotalModulesByAgent() { $modules_by_agent = db_process_sql( - 'SELECT count(*) AS modules_by_agent + 'SELECT count(*) AS count FROM tagente a LEFT JOIN tagente_modulo m ON a.id_agente = m.id_agente + WHERE m.disabled = 0 AND m.disabled_by_safe_mode = 0 GROUP BY m.id_agente' ); $show_warning = false; - foreach ($modules_by_agent as $key => $total_modules) { - if ($total_modules['modules_by_agent'] > 200) { - $this->notify( - [ - 'type' => 'NOTIF.MODULES_AGENT.ALERT', - 'title' => __('Your system has an average of %s modules per agent', $total_modules['modules_by_agent']), - 'message' => __('This is higher than the recommended maximum (200). This may result in poor performance of your system.'), - 'icon_notification' => self::ICON_HEADSUP, - 'url' => '__url__index.php?sec=gagente&sec2=godmode/agentes/modificar_agente', - ] - ); - $show_warning = true; - break; - } + + if ($modules_by_agent !== false) { + $agents = count($modules_by_agent); + $modules = array_sum(array_column($modules_by_agent, 'count')); + + $ratio = ($modules / $agents); + // $ratio = round($ratio); + // $ratio = round($ratio, 2); + } + + if ($ratio > 200) { + $this->notify( + [ + 'type' => 'NOTIF.MODULES_AGENT.ALERT', + 'title' => __('Your system has an average of %s modules per agent', $ratio), + 'message' => __('This is higher than the recommended maximum (200). This may result in poor performance of your system.'), + 'icon_notification' => self::ICON_HEADSUP, + 'url' => '__url__index.php?sec=gagente&sec2=godmode/agentes/modificar_agente', + ] + ); + $show_warning = true; } if ($show_warning === false) { From 4c626f9f97b57633ef0902d432e0eecb2e3e673c Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Wed, 3 Apr 2024 12:14:40 +0200 Subject: [PATCH 032/100] 13212-Fix calc of modules/agentes --- pandora_console/include/class/ConsoleSupervisor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index d79619383b..815087a4dc 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -3340,7 +3340,7 @@ class ConsoleSupervisor $ratio = ($modules / $agents); // $ratio = round($ratio); - // $ratio = round($ratio, 2); + $ratio = round($ratio, 2); } if ($ratio > 200) { From 12c7901b8241fc37de8406c5edecc7c655922901 Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Wed, 3 Apr 2024 12:25:52 +0200 Subject: [PATCH 033/100] Support languages for pandora_security_win auditpol --- .../src/pandora_security_win.py | 39 ++++++++++++++----- .../win32/bin/util/pandora_security_win.conf | 8 ++++ 2 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 pandora_agents/win32/bin/util/pandora_security_win.conf diff --git a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py index d9ac15f978..c6be40985f 100644 --- a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py +++ b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py @@ -1,6 +1,7 @@ import wmi, sys, winreg, os, subprocess, json, re from datetime import datetime, timedelta - +import argparse +import configparser ## Define modules modules=[] @@ -333,22 +334,18 @@ def check_password_enforcement(): print("Failed to check password enforcement for users.", file=sys.stderr) -def check_login_audit_policy(): +def check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_conf, auditpol_logon_noaudit_conf): try: # Run the auditpol command to check the audit policy for Logon/Logoff - cmd_command = "auditpol /get /subcategory:Logon" + cmd_command = f'auditpol /get /subcategory:"{auditpol_logon_category}"' result = subprocess.run(cmd_command, shell=True, capture_output=True, text=True, check=True) last_line = result.stdout.strip().split('\n')[-1] cleaned_line = re.sub(' +', ' ', last_line) # Interpret the result - if "Success and Failure" in result.stdout: + if auditpol_logon_success_conf in result.stdout: result = 1 - elif "Aciertos y errores" in result.stdout: - result = 1 - elif "No Auditing" in result.stdout: - result = 0 - elif "Sin auditoría" in result.stdout: + elif auditpol_logon_noaudit_conf in result.stdout: result = 0 else: print("Unable to determine audit policy for Logon/Logoff events.", file=sys.stderr) @@ -366,14 +363,36 @@ def check_login_audit_policy(): print("Failed to check audit policy using auditpol command.", file=sys.stderr) return +def parse_parameter(config=None, key="", default=""): + try: + return config.get("CONF", key) + except Exception as e: + return default if __name__ == "__main__": + + # Parse arguments + parser = argparse.ArgumentParser(description= "", formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument('--conf', help='Path to configuration file', metavar='', required=False) + args = parser.parse_args() + config = configparser.ConfigParser() + + if(args.conf): + try: + config.read_string('[CONF]\n' + open(args.conf).read()) + except Exception as e: + print("Error while reading configuration file, using default values: "+str(e), file=sys.stderr) + + auditpol_logon_category = parse_parameter(config, "auditpol_logon_category", "Logon") + auditpol_logon_success_conf = parse_parameter(config, "auditpol_logon_success_conf", "Success and Failure") + auditpol_logon_noaudit_conf = parse_parameter(config, "auditpol_logon_noaudit_conf", "No Auditing") + check_antivirus_status() check_locksreen_enables() get_windows_update_info() is_firewall_enabled() check_password_enforcement() - check_login_audit_policy() + check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_conf, auditpol_logon_noaudit_conf) for module in modules: print_module(module, True) diff --git a/pandora_agents/win32/bin/util/pandora_security_win.conf b/pandora_agents/win32/bin/util/pandora_security_win.conf new file mode 100644 index 0000000000..7986220bb4 --- /dev/null +++ b/pandora_agents/win32/bin/util/pandora_security_win.conf @@ -0,0 +1,8 @@ +auditpol_logon_category = Logon +#auditpol_logon_category = Inicio de sesión + +auditpol_logon_success_conf = Success and Failure +#auditpol_logon_success_conf = Aciertos y errores + +auditpol_logon_noaudit_conf = No Auditing +#auditpol_logon_noaudit_conf = Sin auditoría \ No newline at end of file From 7ed324fdb61eb2d44b4b8e1764b8dd37595f173c Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Wed, 3 Apr 2024 12:44:29 +0200 Subject: [PATCH 034/100] Debugging --- .../windows/pandora_security_win/src/pandora_security_win.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py index c6be40985f..bde46d4acc 100644 --- a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py +++ b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py @@ -387,6 +387,10 @@ if __name__ == "__main__": auditpol_logon_success_conf = parse_parameter(config, "auditpol_logon_success_conf", "Success and Failure") auditpol_logon_noaudit_conf = parse_parameter(config, "auditpol_logon_noaudit_conf", "No Auditing") + print(auditpol_logon_category) + print(auditpol_logon_success_conf) + print(auditpol_logon_noaudit_conf) + check_antivirus_status() check_locksreen_enables() get_windows_update_info() From bcfc94b9e5f6771e0c29e06538b219eed7822a75 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Wed, 3 Apr 2024 12:46:22 +0200 Subject: [PATCH 035/100] 13212-Fix calc of modules/agentes --- pandora_console/include/class/ConsoleSupervisor.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 815087a4dc..76986d41bb 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -3328,7 +3328,7 @@ class ConsoleSupervisor 'SELECT count(*) AS count FROM tagente a LEFT JOIN tagente_modulo m ON a.id_agente = m.id_agente - WHERE m.disabled = 0 AND m.disabled_by_safe_mode = 0 + WHERE m.disabled = 0 GROUP BY m.id_agente' ); @@ -3339,7 +3339,6 @@ class ConsoleSupervisor $modules = array_sum(array_column($modules_by_agent, 'count')); $ratio = ($modules / $agents); - // $ratio = round($ratio); $ratio = round($ratio, 2); } From def9f54044488347c8bc5644c9609cf6d03de7ae Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Wed, 3 Apr 2024 12:52:51 +0200 Subject: [PATCH 036/100] Debugging --- .../pandora_security_win/src/pandora_security_win.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py index bde46d4acc..17b1c86bf1 100644 --- a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py +++ b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import wmi, sys, winreg, os, subprocess, json, re from datetime import datetime, timedelta import argparse @@ -379,7 +381,9 @@ if __name__ == "__main__": if(args.conf): try: - config.read_string('[CONF]\n' + open(args.conf).read()) + with open(args.conf, 'r', encoding='utf-8') as f: + content = f.read() + config.read_string('[CONF]\n' + content) except Exception as e: print("Error while reading configuration file, using default values: "+str(e), file=sys.stderr) From 1a1d0272f440d92c7027c2779327c1154824a3ff Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Wed, 3 Apr 2024 13:01:39 +0200 Subject: [PATCH 037/100] Support UTF-8 for conf file --- .../windows/pandora_security_win/src/pandora_security_win.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py index 17b1c86bf1..2144b23629 100644 --- a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py +++ b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py @@ -391,10 +391,6 @@ if __name__ == "__main__": auditpol_logon_success_conf = parse_parameter(config, "auditpol_logon_success_conf", "Success and Failure") auditpol_logon_noaudit_conf = parse_parameter(config, "auditpol_logon_noaudit_conf", "No Auditing") - print(auditpol_logon_category) - print(auditpol_logon_success_conf) - print(auditpol_logon_noaudit_conf) - check_antivirus_status() check_locksreen_enables() get_windows_update_info() From b71adc42ac014c4d9bcb16dffe5940cf7706f4ab Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Wed, 3 Apr 2024 13:09:59 +0200 Subject: [PATCH 038/100] Added compiled plugin --- pandora_agents/win32/bin/util/pandora_security_win.exe | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/win32/bin/util/pandora_security_win.exe b/pandora_agents/win32/bin/util/pandora_security_win.exe index a21f40faf6..d0869b6981 100755 --- a/pandora_agents/win32/bin/util/pandora_security_win.exe +++ b/pandora_agents/win32/bin/util/pandora_security_win.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c58891fbd16bf80f288e0ff4751801aa02dbf4e6c914625b4d49a364c7e0b511 -size 7829249 +oid sha256:00ff23120d9c4b7f16586555550ada5460938d9fc8b2dca81c4acd49750122e2 +size 7735622 From 941b97fc00c1556dee96ac5643ed5668372943b9 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Wed, 3 Apr 2024 13:22:30 +0200 Subject: [PATCH 039/100] 13314-Change border colors in tactical view dark theme --- pandora_console/include/styles/pandora_black.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 80032efbb7..05ff8a7aa6 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1892,3 +1892,7 @@ a.link-bold { text-decoration: none; font-weight: bold; } + +#general-tactical-view * { + border-color: #333 !important; +} From fb14490457a96aaf656f6a328a56f45acb956f1f Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Wed, 3 Apr 2024 14:44:49 +0200 Subject: [PATCH 040/100] 13314-Change colors Tree view with dark theme --- .../images/tree/corner@tree-dark.svg | 12 ++++++++ .../images/tree/corner_straight@tree-dark.svg | 18 ++++++++++++ .../tree/corner_straight_minus@tree-dark.svg | 26 +++++++++++++++++ .../tree/corner_straight_plus@tree-dark.svg | 27 ++++++++++++++++++ .../images/tree/straight@tree-dark.svg | 13 +++++++++ .../include/styles/pandora_black.css | 28 +++++++++++++++++++ 6 files changed, 124 insertions(+) create mode 100644 pandora_console/images/tree/corner@tree-dark.svg create mode 100644 pandora_console/images/tree/corner_straight@tree-dark.svg create mode 100644 pandora_console/images/tree/corner_straight_minus@tree-dark.svg create mode 100644 pandora_console/images/tree/corner_straight_plus@tree-dark.svg create mode 100644 pandora_console/images/tree/straight@tree-dark.svg diff --git a/pandora_console/images/tree/corner@tree-dark.svg b/pandora_console/images/tree/corner@tree-dark.svg new file mode 100644 index 0000000000..66aa81f0e6 --- /dev/null +++ b/pandora_console/images/tree/corner@tree-dark.svg @@ -0,0 +1,12 @@ + + + + Dark / 20 / dotted corner@svg + Created with Sketch. + + + + \ No newline at end of file diff --git a/pandora_console/images/tree/corner_straight@tree-dark.svg b/pandora_console/images/tree/corner_straight@tree-dark.svg new file mode 100644 index 0000000000..5a958e59a5 --- /dev/null +++ b/pandora_console/images/tree/corner_straight@tree-dark.svg @@ -0,0 +1,18 @@ + + + + Dark / 20 / dotted corner@svg + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/tree/corner_straight_minus@tree-dark.svg b/pandora_console/images/tree/corner_straight_minus@tree-dark.svg new file mode 100644 index 0000000000..092cf40252 --- /dev/null +++ b/pandora_console/images/tree/corner_straight_minus@tree-dark.svg @@ -0,0 +1,26 @@ + + + + Dark / 20 / dotted corner@svg + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/tree/corner_straight_plus@tree-dark.svg b/pandora_console/images/tree/corner_straight_plus@tree-dark.svg new file mode 100644 index 0000000000..e9840c7b08 --- /dev/null +++ b/pandora_console/images/tree/corner_straight_plus@tree-dark.svg @@ -0,0 +1,27 @@ + + + + Dark / 20 / dotted corner@svg + Created with Sketch. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/tree/straight@tree-dark.svg b/pandora_console/images/tree/straight@tree-dark.svg new file mode 100644 index 0000000000..c5a47a2f9a --- /dev/null +++ b/pandora_console/images/tree/straight@tree-dark.svg @@ -0,0 +1,13 @@ + + + + Dark / 20 / dotted straight@svg + Created with Sketch. + + + + \ No newline at end of file diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 05ff8a7aa6..3170d5d844 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1896,3 +1896,31 @@ a.link-bold { #general-tactical-view * { border-color: #333 !important; } + +#tree-controller-recipient .node-icon { + border-right-color: #333; +} + +/* #tree-controller-recipient .leaf-icon { + filter: contrast(0.5) brightness(0.6); +} */ + +.tree-node { + background-image: url(../../images/tree/straight@tree-dark.svg); +} + +#tree-controller-recipient .tree-node.leaf-closed > .leaf-icon { + background-image: url(../../images/tree/corner_straight_plus@tree-dark.svg); +} + +#tree-controller-recipient .tree-node.leaf-open > .leaf-icon { + background-image: url(../../images/tree/corner_straight_minus@tree-dark.svg); +} + +#tree-controller-recipient .tree-node > .leaf-icon { + background-image: url(../../images/tree/corner_straight@tree-dark.svg); +} + +#tree-controller-recipient .tree-node:last-of-type > .leaf-icon { + background-image: url(../../images/tree/corner@tree-dark.svg); +} From db4c80eb37a5847f03255b01bed16ae1569f49ed Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Wed, 3 Apr 2024 16:30:21 +0200 Subject: [PATCH 041/100] Fixed pandora_security_check plugin --- pandora_agents/pc/Linux/pandora_agent.conf | 4 ---- pandora_agents/unix/Linux/pandora_agent.conf | 3 +++ .../unix/plugins/pandora_security_check | 19 ++++++++-------- .../unix/plugins/pandora_security_check.conf | 22 +++++++++++++++++++ 4 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 pandora_agents/unix/plugins/pandora_security_check.conf diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 4f49fb8cf5..8cb980cff1 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -310,10 +310,6 @@ module_plugin pandora_df #module_description Postcondition test module #module_end -# This plugin runs several security checks in a Linux system - -#module_plugin pandora_security_check - # Extraction module example #module_begin #module_name Collector diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 882be1bda8..20714a13b7 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -270,6 +270,9 @@ module_plugin pandora_netusage # Service autodiscovery plugin module_plugin autodiscover --default +# This plugin runs several security checks in a Linux system +# module_plugin perl /usr/share/pandora_agent/plugins/pandora_security_check --conf /usr/share/pandora_agent/plugins/pandora_security_check.conf + # Plugin for inventory on the agent. # module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users route diff --git a/pandora_agents/unix/plugins/pandora_security_check b/pandora_agents/unix/plugins/pandora_security_check index 0ad845639b..53022feba7 100644 --- a/pandora_agents/unix/plugins/pandora_security_check +++ b/pandora_agents/unix/plugins/pandora_security_check @@ -297,6 +297,10 @@ sub parse_configuration { $line =~ s/^\s+//; $line =~ s/\s+$//; + if($line =~ /^$/) { + next; + } + if ($line =~ /^\[($b_ports|$b_files|$b_passwords)\]$/) { $configuration_block = $1; } @@ -537,7 +541,6 @@ if ($check_files) { if ($can_check_files) { # Check each file integrity - my @errored_files; my @no_integrity_files; # Create unique check files list @@ -556,8 +559,6 @@ if ($check_files) { push @no_integrity_files, $file; } $integrity{$file_key} = $file_md5; - } else { - push @errored_files, $file; } } @@ -571,11 +572,6 @@ if ($check_files) { $value = 0; $desc = "Changed files found:\n" . join("\n", @no_integrity_files); } - - if (@errored_files) { - $value = 0; - $desc .= "\nUnable to check integrity of some files:\n" . join("\n", @errored_files); - } } print_xml_module('Files check status', 'generic_proc', $desc, $value); @@ -596,10 +592,15 @@ if ($check_passwords) { open my $shadow_fh, '<', $shadow_file; while (my $line = <$shadow_fh>) { chomp $line; + + if($line =~ /^$/) { + next; + } + my ($username, $password_hash, @rest) = split /:/, $line; # Skip users with no password hash - if ($password_hash ne "*" && $password_hash ne "!!" && $password_hash ne "!locked") { + if ($password_hash ne "*" && $password_hash ne "!!" && $password_hash ne "!locked" && $password_hash ne "!*") { my $salt = substr($password_hash, 0, rindex($password_hash, '$') + 1); my $user_hash = crypt($username, $salt); if ($user_hash eq $password_hash) { diff --git a/pandora_agents/unix/plugins/pandora_security_check.conf b/pandora_agents/unix/plugins/pandora_security_check.conf new file mode 100644 index 0000000000..c48d94af4d --- /dev/null +++ b/pandora_agents/unix/plugins/pandora_security_check.conf @@ -0,0 +1,22 @@ +[PORTS] +22 +80 +443 +41121 +8080 + +[FILES] +/etc/httpd/httpd.conf +/etc/my.cnf +/etc/sudoers +/etc/passwd +/etc/hosts + +[PASSWORDS] +pandora +PANDORA +P4nd0r4 +password +root +linux +admin From 9bd86b6cb88169c4db61bf1db3c0f2aecef0d72a Mon Sep 17 00:00:00 2001 From: rafael Date: Wed, 3 Apr 2024 16:51:14 +0200 Subject: [PATCH 042/100] 13247 add a2enmod rewrite to ubuntu install --- extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index 6d0bb69d06..ae644c6013 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -601,6 +601,7 @@ EOF_PARAM a2enmod ssl &>> "$LOGFILE" a2enmod headers &>> "$LOGFILE" +a2enmod rewrite &>> "$LOGFILE" a2enconf ssl-params &>> "$LOGFILE" a2ensite default-ssl &>> "$LOGFILE" a2enconf ssl-params &>> "$LOGFILE" From e157d5f20248c9af9ce712166b66dfc12fa77040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Wed, 3 Apr 2024 09:38:04 -0600 Subject: [PATCH 043/100] Handle to show instructions on unknown --- pandora_console/include/functions_events.php | 6 +++++- pandora_server/util/pandora_manage.pl | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index be880a3655..5dd28075da 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2713,6 +2713,7 @@ function events_print_type_img( $icon = 'images/module_warning.png'; break; + case 'unknown': case 'going_unknown': $icon = 'images/module_unknown.png'; break; @@ -2741,7 +2742,6 @@ function events_print_type_img( $icon = 'images/configuration@svg.svg'; break; - case 'unknown': default: $style .= ' invert_filter'; $icon = 'images/event.svg'; @@ -2993,6 +2993,9 @@ function events_print_type_description($type, $return=false) break; case 'unknown': + $output .= __('Unknown'); + break; + default: $output .= __('Unknown type:').': '.$type; break; @@ -5861,6 +5864,7 @@ function events_get_instructions($event, $max_text_length=300) } switch ($event['event_type']) { + case 'unknown': case 'going_unknown': if ($event['unknown_instructions'] != '') { $value = str_replace( diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 6ac06feae0..8bdc5377fc 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -7914,7 +7914,7 @@ sub pandora_manage_main ($$$) { 'values' => [ 'unknown','alert_fired','alert_recovered','alert_ceased', 'alert_manual_validation','recon_host_detected','system', - 'error','new_agent','going_up_warning','going_up_critical','going_down_warning', + 'error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_unknown', 'going_down_normal','going_down_critical','going_up_normal','configuration_change' ] }, From 58b0cf39dd2df83c649d9af0db4443c6b9248135 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 4 Apr 2024 11:27:16 +0200 Subject: [PATCH 044/100] #13332 fixed csv export in datatable preload --- pandora_console/include/functions_ui.php | 6 ++++++ .../include/javascript/datatablesFunction.js | 10 ++++++---- pandora_console/include/styles/vulnerabilities.css | 2 +- pandora_console/operation/inventory/inventory.php | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 34bd3a0fdd..aa8177403c 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4283,6 +4283,12 @@ function ui_print_datatable(array $parameters) $js = ''; $js .= ' From bd10db675c143b4fc93e8f1aa5cada149e518fbb Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 8 Apr 2024 16:03:28 +0200 Subject: [PATCH 086/100] #13292 fixed bug in sound console --- .../include/javascript/pandora_events.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index bb10dd3eb8..0320238673 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -1250,6 +1250,7 @@ function test_sound_button(test_sound, urlSound) { } function action_events_sound(mode, settings) { + test_sound_button(false, ""); if (mode === true) { // Enable tabs. $("#tabs-sound-modal").tabs("option", "disabled", [0]); @@ -1397,9 +1398,7 @@ function check_event_sound(settings) { $(".container-button-alert").addClass("fired"); // Remove audio. - remove_audio(); - - // Apend audio. + //remove_audio(); add_audio(settings.urlSound); // Add elements. @@ -1432,10 +1431,10 @@ function check_event_sound(settings) { }); // -100 delay sound. - setTimeout( - remove_audio, - parseInt($("#tabs-sound-modal #time_sound").val()) * 1000 - 100 - ); + //setTimeout( + // remove_audio, + // parseInt($("#tabs-sound-modal #time_sound").val()) * 1000 - 100 + //); } }, "json" From 49f5a5277c486c270f5b7a9cb3d44b60e6056c99 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Mon, 8 Apr 2024 16:29:03 +0200 Subject: [PATCH 087/100] 13148-Empty views - Some fix --- pandora_console/general/first_task/cluster_builder.php | 2 +- pandora_console/general/first_task/map_builder.php | 4 ++-- pandora_console/general/first_task/service_list.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/general/first_task/cluster_builder.php b/pandora_console/general/first_task/cluster_builder.php index d008d7702a..1d81c59c91 100644 --- a/pandora_console/general/first_task/cluster_builder.php +++ b/pandora_console/general/first_task/cluster_builder.php @@ -48,7 +48,7 @@ $msg .= __('Depending on how they provide that service, we can find two types:') $msg .= __('Clusters to balance the service load: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'

'; -$msg .= __('Clusters to guarantee service: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another won\'t (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.'); +$msg .= __('Clusters to guarantee service: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another will not (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.'); diff --git a/pandora_console/general/first_task/map_builder.php b/pandora_console/general/first_task/map_builder.php index 9e27630226..854c1c8da7 100755 --- a/pandora_console/general/first_task/map_builder.php +++ b/pandora_console/general/first_task/map_builder.php @@ -35,12 +35,12 @@ ui_require_css_file('first_task'); if ($vconsoles_write || $vconsoles_manage) { $msg = __( - "%s allows users to create visual maps on which each user is able to create his or her own monitoring map. The new visual console editor is much more practical, although the prior 'visual console editor had its advantages.", + '%s allows users to create visual maps on which each user is able to create his or her own monitoring map. The new visual console editor is much more practical, although the prior visual console editor had its advantages.', get_product_name() ); $msg .= '

'.__( - "On the new visual console, we've been successful in imitating the sensation and touch of a drawing application like GIMP. We've also simplified the editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of Elements' and 'Editor'." + "On the new visual console, we have been successful in imitating the sensation and touch of a drawing application like GIMP. We have also simplified the editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of Elements' and 'Editor'." ); $msg .= '

'.__( diff --git a/pandora_console/general/first_task/service_list.php b/pandora_console/general/first_task/service_list.php index dae7b9e57a..6d0d798a70 100755 --- a/pandora_console/general/first_task/service_list.php +++ b/pandora_console/general/first_task/service_list.php @@ -33,12 +33,12 @@ check_login(); ui_require_css_file('first_task'); if ((bool) $agent_w === true) { $msg = __( - "A service is a way to group your IT resources based on their functionalities. + 'A service is a way to group your IT resources based on their functionalities. A service could be e.g. your official website, your CRM system, your support application, or even your printers. Services are logical groups which can include hosts, routers, switches, firewalls, CRMs, ERPs, websites and numerous other services. - By the following example, you're able to see more clearly what a service is: + By the following example, you are able to see more clearly what a service is: A chip manufacturer sells computers by its website all around the world. - His company consists of three big departments: A management, an on-line shop and support." + His company consists of three big departments: A management, an on-line shop and support.' ); $url_new = 'index.php?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service'; From 6ff86fcfc33be0019afc3fe274d94c6c081316e6 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Mon, 8 Apr 2024 16:44:35 +0200 Subject: [PATCH 088/100] 13334-Change policies view icons and size in meta --- pandora_console/images/external_alert.svg | 7 +++++++ pandora_console/images/linking.svg | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pandora_console/images/external_alert.svg create mode 100644 pandora_console/images/linking.svg diff --git a/pandora_console/images/external_alert.svg b/pandora_console/images/external_alert.svg new file mode 100644 index 0000000000..3a4b512a3b --- /dev/null +++ b/pandora_console/images/external_alert.svg @@ -0,0 +1,7 @@ + + + alerta externa + + + + \ No newline at end of file diff --git a/pandora_console/images/linking.svg b/pandora_console/images/linking.svg new file mode 100644 index 0000000000..87470b4493 --- /dev/null +++ b/pandora_console/images/linking.svg @@ -0,0 +1,10 @@ + + + linking + + + + + + + \ No newline at end of file From 1ef2c5a1e9ed084ff0876cf6e97c31439070c1fe Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 8 Apr 2024 18:02:03 +0200 Subject: [PATCH 089/100] #13376 fixed report --- pandora_console/include/functions_reporting.php | 5 +++-- pandora_console/include/functions_reporting_html.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index af05902517..27ea241de8 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3352,8 +3352,8 @@ function reporting_inventory($report, $content, $type) $date, '', false, - 'csv', false, + 'csv', '', [], $inventory_regular_expression @@ -3367,12 +3367,13 @@ function reporting_inventory($report, $content, $type) $date, '', false, - 'hash', false, + 'hash', '', [], $inventory_regular_expression ); + break; } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 321cb77f69..acbfc45c32 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2644,7 +2644,7 @@ function reporting_html_inventory($table, $item, $pdf=0) } else { // Grouped type inventory. $type_modules = array_reduce( - $item['data'], + ($item['data'] ?? []), function ($carry, $it) { $carry[$it['name']][] = $it; return $carry; From 3c3b1d55d7d542f2c288c9700052b64b9c16f31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Mon, 8 Apr 2024 16:23:19 -0600 Subject: [PATCH 090/100] Change value color --- pandora_console/include/functions_reporting_html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 321cb77f69..1ee292da27 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -5169,7 +5169,7 @@ function reporting_html_value( $table->colspan['data']['cell'] = 3; $table->cellstyle['data']['cell'] = 'text-align: left;'; - $table->data['data']['cell'] = '

'; + $table->data['data']['cell'] = '

'; if ($check_empty && empty($item['data']['value'])) { $table->data['data']['cell'] .= __('Unknown'); From 03e71ea4a59b30d3637a15583249738940f1f7f1 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 9 Apr 2024 01:00:05 +0200 Subject: [PATCH 091/100] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f2fc81555f..b5106d0bfb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.776-240408 +Version: 7.0NG.776-240409 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 500d41858f..b67706bf94 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.776-240408" +pandora_version="7.0NG.776-240409" 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 6a1e830b5f..6cdd0adc41 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.776'; -use constant AGENT_BUILD => '240408'; +use constant AGENT_BUILD => '240409'; # 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 3446c15200..755f52e1d8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240408 +%define release 240409 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 498f1430ed..91fc8a5987 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240408 +%define release 240409 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 64da22869f..c5b22fa37a 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240408 +%define release 240409 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 9152dfa7c7..8912e0816d 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240408 +%define release 240409 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1478e1c157..bd20295b27 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240408 +%define release 240409 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 adbea36a25..030aa76508 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240408" +PI_BUILD="240409" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 03adfba75e..08071e1cad 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240408} +{240409} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 4524724159..277c73a29c 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.776 Build 240408") +#define PANDORA_VERSION ("7.0NG.776 Build 240409") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b11833f024..283dac4608 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.776(Build 240408))" + VALUE "ProductVersion", "(7.0NG.776(Build 240409))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7969f1621d..c57d493bab 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.776-240408 +Version: 7.0NG.776-240409 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 88ff098d15..88811cfdd5 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.776-240408" +pandora_version="7.0NG.776-240409" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8498eb6ba4..014d56e185 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ use DI\ContainerBuilder; /* * Pandora build version and version */ -$build_version = 'PC240408'; +$build_version = 'PC240409'; $pandora_version = 'v7.0NG.776'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 6127f4a9c1..0fad35918c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@

[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 1d8dffa2ec..87d670794f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.776 -%define release 240408 +%define release 240409 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 44741bb791..cdbb855c92 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.776 -%define release 240408 +%define release 240409 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index acf5670d08..e5adc93f06 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240408" +PI_BUILD="240409" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index fb5fee841f..73d9e152b4 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.776 Build 240408"; +my $version = "7.0NG.776 Build 240409"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 3b43602010..be2d7f1c28 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.776 Build 240408"; +my $version = "7.0NG.776 Build 240409"; # save program name for logging my $progname = basename($0); From 3952cfefdec389d16098cc4ceb43969757a88474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Mon, 8 Apr 2024 23:47:19 -0600 Subject: [PATCH 092/100] Changes to center report --- pandora_console/include/functions_html.php | 4 ++++ pandora_console/include/functions_reporting_html.php | 1 + 2 files changed, 5 insertions(+) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 52ed76bd6b..2f32c9683d 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -4132,6 +4132,10 @@ function html_print_table(&$table, $return=false) } else { $headStyle = ''; } + + if (isset($table->headStyle[$heading])) { + $headStyle = ' style = "'.$table->headStyle[$heading].'" '; + } $output .= ''.$heading.''; } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 321cb77f69..846d009f35 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -6380,6 +6380,7 @@ function reporting_html_sql($table, $item, $pdf=0) // Print the header. foreach ($row as $key => $value) { $table2->head[] = $key; + $table2->headStyle[$key] = 'text-align: center;'; } } From 42ba3dc441c911902919a6eee2f58482a66e3b6e Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 9 Apr 2024 10:09:51 +0200 Subject: [PATCH 093/100] #13391 fixed utimestamp filter in basic info inventary --- pandora_console/operation/inventory/inventory.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/inventory/inventory.php b/pandora_console/operation/inventory/inventory.php index 950326a9fc..d0c756f0b9 100755 --- a/pandora_console/operation/inventory/inventory.php +++ b/pandora_console/operation/inventory/inventory.php @@ -85,7 +85,7 @@ if ($custom_date === '1') { } } else { $date_end = date('Y/m/d H:i:s'); - $date_init = date('Y/m/d H:i:s', (strtotime($date_end) - $range)); + $date_init = date('Y/m/d H:i:s', (strtotime($date_end) - (int) $range)); $period = (strtotime($date_end) - strtotime($date_init)); } @@ -181,6 +181,8 @@ if (is_ajax() === true) { $order = get_datatable_order(); $id_agent = (int) get_parameter('id_agent', 0); $id_group = (int) get_parameter('id_group', 0); + $utimestamp = (int) get_parameter('utimestamp', 0); + $period = (int) get_parameter('period', 0); if (isset($filter['value']) === false) { $filter['value'] = ''; @@ -1386,6 +1388,8 @@ if ($inventory_module !== 'basic') { 'id_group' => $inventory_id_group, 'search' => $search, 'status' => $status_agent, + 'utimestamp' => (($range !== 'none') ? $utimestamp : 0), + 'period' => $period, ], 'zeroRecords' => __('Agent info not found'), 'emptyTable' => __('Agent info not found'), From 70b1abc02b4cc2a26f762846166b2a1243ea3b6f Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Tue, 9 Apr 2024 11:02:49 +0200 Subject: [PATCH 094/100] 13329-Fix redirect to not initialised agents tactical view --- pandora_console/include/javascript/general_tactical_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/javascript/general_tactical_view.js b/pandora_console/include/javascript/general_tactical_view.js index d1de902c25..fabc510d97 100644 --- a/pandora_console/include/javascript/general_tactical_view.js +++ b/pandora_console/include/javascript/general_tactical_view.js @@ -199,7 +199,7 @@ function redirectAgentStatus(e, element) { switch (e.chart.legend.legendItems[element[0].index].text) { case "No monitors": window.location.assign( - `index.php?sec=view&sec2=operation/agentes/estado_agente` + `index.php?sec=view&sec2=operation/agentes/estado_agente&status=5` ); break; From 2f1a2c4dd4182213d6548042f02219af879e8f79 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 9 Apr 2024 11:14:13 +0200 Subject: [PATCH 095/100] #13292 fixed acoustic console --- .../include/javascript/pandora_events.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 0320238673..fc8f4dd3dc 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -1338,6 +1338,7 @@ function listen_event_sound(settings) { ); } +let sound_listener; function check_event_sound(settings) { // Update elements time. $(".elements-discovered-alerts ul li").each(function() { @@ -1381,6 +1382,7 @@ function check_event_sound(settings) { }, function(data) { if (data != false) { + clearTimeout(sound_listener); // Hide empty. $("#tabs-sound-modal .empty-discovered-alerts").addClass( "invisible_important" @@ -1398,7 +1400,8 @@ function check_event_sound(settings) { $(".container-button-alert").addClass("fired"); // Remove audio. - //remove_audio(); + remove_audio(); + add_audio(settings.urlSound); // Add elements. @@ -1431,10 +1434,10 @@ function check_event_sound(settings) { }); // -100 delay sound. - //setTimeout( - // remove_audio, - // parseInt($("#tabs-sound-modal #time_sound").val()) * 1000 - 100 - //); + sound_listener = setTimeout( + remove_audio, + parseInt($("#tabs-sound-modal #time_sound").val()) * 1000 - 100 + ); } }, "json" From e2bde2373b88d2b72601b30fcfaa3eeeb7103500 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Tue, 9 Apr 2024 12:46:33 +0200 Subject: [PATCH 096/100] 13385-Fix hint in module regex --- .../godmode/reporting/reporting_builder.item_editor.php | 2 +- pandora_console/include/lib/Dashboard/Widgets/top_n.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 806e9e980d..5087bd5349 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -1454,7 +1454,7 @@ $class = 'databox filters'; diff --git a/pandora_console/include/lib/Dashboard/Widgets/top_n.php b/pandora_console/include/lib/Dashboard/Widgets/top_n.php index 5e885927db..e48a7885fd 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/top_n.php +++ b/pandora_console/include/lib/Dashboard/Widgets/top_n.php @@ -238,7 +238,7 @@ class TopNWidget extends Widget // Module. $inputs[] = [ 'label' => __('Module').ui_print_help_tip( - __('Case insensitive regular expression or string for module name. For example: .*usage.* will match: cpu_usage, vram usage.'), + __('Case insensitive regular expression or string for module name. For example: %s will match: cpu_usage, vram usage.', '.*usage.*'), true ), 'arguments' => [ From 5374ca97e4ae2ca73a34ad4a4215bc5124b3386b Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 9 Apr 2024 13:21:07 +0200 Subject: [PATCH 097/100] #13059 switchs style like mockup --- pandora_console/include/styles/agent_module_view.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pandora_console/include/styles/agent_module_view.css b/pandora_console/include/styles/agent_module_view.css index 8fc8733b2b..6c17b048a7 100644 --- a/pandora_console/include/styles/agent_module_view.css +++ b/pandora_console/include/styles/agent_module_view.css @@ -27,6 +27,8 @@ } #select_multiple_modules_filtered_formated .recursive-modules > div { + display: flex; + flex-wrap: nowrap; flex-direction: row-reverse; justify-content: flex-end; } @@ -40,6 +42,14 @@ min-width: 250px !important; } +#select_multiple_modules_filtered_formated > div > div > label.p-switch { + width: 10%; +} + +#select_multiple_modules_filtered_formated > div > div > label.font-title-font { + margin-top: 5px; +} + #select_multiple_modules_filtered_formated > div > div > .select2 { min-width: 250px !important; } From db0ca68b81a0ef705f1af19714f69d0c9aed59a3 Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Tue, 9 Apr 2024 14:12:18 +0200 Subject: [PATCH 098/100] Debugging --- .../src/pandora_security_win.py | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py index 3995b3db00..0fc119bb03 100644 --- a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py +++ b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py @@ -4,7 +4,6 @@ import wmi, sys, winreg, os, subprocess, json, re from datetime import datetime, timedelta import argparse import configparser -import locale ## Define modules modules=[] @@ -340,26 +339,16 @@ def check_password_enforcement(): def check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_conf, auditpol_logon_noaudit_conf): try: # Run the auditpol command to check the audit policy for Logon/Logoff - cmd_command = f'auditpol /get /subcategory:"{auditpol_logon_category.encode("utf-8").decode("utf-8")}"' + cmd_command = f'auditpol /get /subcategory:"{auditpol_logon_category}"' result = subprocess.run(cmd_command, shell=True, capture_output=True, text=False, check=True) - - print(result.stdout) - print(auditpol_logon_success_conf) - - last_line = result.stdout.strip().split('\n')[-1].strip() - last_line_parts = re.split(r'\s\s+', last_line) + stdout = result.stdout.decode('cp850', errors='replace') + last_line = stdout.strip().split('\n')[-1] cleaned_line = re.sub(' +', ' ', last_line) - print(locale.getpreferredencoding()) - print(last_line_parts[1]) - print(last_line_parts[1].encode(locale.getpreferredencoding())) - print(auditpol_logon_success_conf) - print(auditpol_logon_success_conf.encode(locale.getpreferredencoding())) - # Interpret the result - if auditpol_logon_success_conf.encode(locale.getpreferredencoding()) == last_line_parts[1].encode(locale.getpreferredencoding()): + if auditpol_logon_success_conf in stdout: result = 1 - elif auditpol_logon_noaudit_conf.encode(locale.getpreferredencoding()) == last_line_parts[1].encode(locale.getpreferredencoding()): + elif auditpol_logon_noaudit_conf in stdout: result = 0 else: print("Unable to determine audit policy for Logon/Logoff events.", file=sys.stderr) @@ -369,7 +358,7 @@ def check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_con "type" : "generic_proc", "value": result, "module_group": "security", - "desc" : f"Check if the logon events audit log is enables, status: {cleaned_line}", + "desc" : f"Check if the logon events audit log is enables, status:{cleaned_line}", }) except subprocess.CalledProcessError as e: @@ -393,7 +382,7 @@ if __name__ == "__main__": if(args.conf): try: - with open(args.conf, 'r', encoding=locale.getpreferredencoding()) as f: + with open(args.conf, 'r', encoding='utf-8') as f: content = f.read() config.read_string('[CONF]\n' + content) except Exception as e: From 34d9f66493d91fc08923443dc6d7fe4fc288dce9 Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Tue, 9 Apr 2024 14:25:52 +0200 Subject: [PATCH 099/100] Set Windows CMD encoding to cp850 (DOS latin 1) --- pandora_agents/win32/bin/util/pandora_security_win.exe | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/win32/bin/util/pandora_security_win.exe b/pandora_agents/win32/bin/util/pandora_security_win.exe index d0869b6981..6be32bc37c 100755 --- a/pandora_agents/win32/bin/util/pandora_security_win.exe +++ b/pandora_agents/win32/bin/util/pandora_security_win.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00ff23120d9c4b7f16586555550ada5460938d9fc8b2dca81c4acd49750122e2 -size 7735622 +oid sha256:293dc77d39c303793a73bf83a2698c5886331f24b8abed4a40566474a64e3f60 +size 7735667 From a583a140c65263345bf5b137767893c91cc16b08 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 10 Apr 2024 01:00:06 +0200 Subject: [PATCH 100/100] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b5106d0bfb..85fd264914 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.776-240409 +Version: 7.0NG.776-240410 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 b67706bf94..a1390d619c 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.776-240409" +pandora_version="7.0NG.776-240410" 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 6cdd0adc41..be678985b8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.776'; -use constant AGENT_BUILD => '240409'; +use constant AGENT_BUILD => '240410'; # 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 755f52e1d8..62bc889628 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240409 +%define release 240410 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 91fc8a5987..35bb00dcd9 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240409 +%define release 240410 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index c5b22fa37a..63702a385b 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240409 +%define release 240410 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 8912e0816d..027bf514f6 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240409 +%define release 240410 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index bd20295b27..1ea84212af 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240409 +%define release 240410 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 030aa76508..9ee0aed4d7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240409" +PI_BUILD="240410" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 08071e1cad..cd3d838ffd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240409} +{240410} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 277c73a29c..717d7a0f37 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.776 Build 240409") +#define PANDORA_VERSION ("7.0NG.776 Build 240410") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 283dac4608..170e2b1bc1 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.776(Build 240409))" + VALUE "ProductVersion", "(7.0NG.776(Build 240410))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index c57d493bab..52e9d061aa 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.776-240409 +Version: 7.0NG.776-240410 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 88811cfdd5..4cac08383a 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.776-240409" +pandora_version="7.0NG.776-240410" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 014d56e185..72c75f7c39 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ use DI\ContainerBuilder; /* * Pandora build version and version */ -$build_version = 'PC240409'; +$build_version = 'PC240410'; $pandora_version = 'v7.0NG.776'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 0fad35918c..dc871e7bde 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 87d670794f..1b6dc1efcd 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.776 -%define release 240409 +%define release 240410 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index cdbb855c92..ac39093af0 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.776 -%define release 240409 +%define release 240410 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e5adc93f06..a359767ded 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240409" +PI_BUILD="240410" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 73d9e152b4..129231cd49 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.776 Build 240409"; +my $version = "7.0NG.776 Build 240410"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index be2d7f1c28..f4403289b9 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.776 Build 240409"; +my $version = "7.0NG.776 Build 240410"; # save program name for logging my $progname = basename($0);