diff --git a/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html b/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html index 8122d2d23d..2b333eafc8 100644 --- a/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html +++ b/pandora_agents/unix/Darwin/dmg/resources/text/conclusion.html @@ -6,4 +6,4 @@ You can manage the service with: sudo launchctl start com.pandorafms.pandorafms to start it, and sudo launchctl stop com.pandorafms.pandorafms -to stop it. \ No newline at end of file +to stop it. diff --git a/pandora_agents/unix/Darwin/dmg/resources/text/license.html b/pandora_agents/unix/Darwin/dmg/resources/text/license.html index e8ffe8166d..6fd06ecf29 100644 --- a/pandora_agents/unix/Darwin/dmg/resources/text/license.html +++ b/pandora_agents/unix/Darwin/dmg/resources/text/license.html @@ -90,4 +90,4 @@ NO WARRANTY 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -END OF TERMS AND CONDITIONS \ No newline at end of file +END OF TERMS AND CONDITIONS diff --git a/pandora_console/extras/mr/48.sql b/pandora_console/extras/mr/48.sql new file mode 100644 index 0000000000..7319c0ca19 --- /dev/null +++ b/pandora_console/extras/mr/48.sql @@ -0,0 +1,12 @@ +START TRANSACTION; + +UPDATE pandora.tuser_task +SET parameters='a:7:{i:0;a:7:{s:11:"description";s:30:"Template pending to be created";s:5:"table";s:16:"treport_template";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:8:"required";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:7:{s:11:"description";s:6:"Agents";s:5:"table";s:7:"tagente";s:8:"field_id";s:9:"id_agente";s:10:"field_name";s:6:"nombre";s:8:"multiple";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_grupo";}i:2;a:2:{s:11:"description";s:16:"Report per agent";s:10:"select_two";b:1;}i:3;a:2:{s:11:"description";s:11:"Report name";s:4:"type";s:6:"string";}i:4;a:2:{s:11:"description";s:47:"Send to e-mail addresses (separated by a comma)";s:4:"type";s:4:"text";}i:5;a:2:{s:11:"description";s:7:"Subject";s:8:"optional";i:1;}i:6;a:3:{s:11:"description";s:7:"Message";s:4:"type";s:4:"text";s:8:"optional";i:1;}}i:7;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' +WHERE id=2; + +UPDATE `tuser_task_scheduled` SET + `args` = REPLACE (`args`, 'a:8', 'a:9'), + `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"') + WHERE `id_user_task` = 2; + +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 21657b5ebb..64d13d5370 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -2562,6 +2562,8 @@ ALTER TABLE `tnetflow_filter` MODIFY COLUMN `router_ip` text NOT NULL; UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report"; INSERT IGNORE INTO tuser_task VALUES (8, 'cron_task_generate_csv_log', 'a:1:{i:0;a:2:{s:11:"description";s:14:"Send to e-mail";s:4:"type";s:4:"text";}}', 'Send csv log'); UPDATE `tuser_task` SET `parameters`='a:4:{i:0;a:6:{s:11:"description";s:28:"Report pending to be created";s:5:"table";s:7:"treport";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:2:{s:11:"description";s:426:"Save to disk in pathThe Apache user should have read-write access on this folder. E.g. /var/www/html/pandora_console/attachment";s:4:"type";s:6:"string";}i:2;a:2:{s:11:"description";s:16:"File nane prefix";s:4:"type";s:6:"string";}i:3;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE `id`=3; +UPDATE pandora.tuser_task +SET parameters='a:7:{i:0;a:7:{s:11:"description";s:30:"Template pending to be created";s:5:"table";s:16:"treport_template";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:8:"required";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:7:{s:11:"description";s:6:"Agents";s:5:"table";s:7:"tagente";s:8:"field_id";s:9:"id_agente";s:10:"field_name";s:6:"nombre";s:8:"multiple";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_grupo";}i:2;a:2:{s:11:"description";s:16:"Report per agent";s:10:"select_two";b:1;}i:3;a:2:{s:11:"description";s:11:"Report name";s:4:"type";s:6:"string";}i:4;a:2:{s:11:"description";s:47:"Send to e-mail addresses (separated by a comma)";s:4:"type";s:4:"text";}i:5;a:2:{s:11:"description";s:7:"Subject";s:8:"optional";i:1;}i:6;a:3:{s:11:"description";s:7:"Message";s:4:"type";s:4:"text";s:8:"optional";i:1;}}i:7;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE id=2; DELETE FROM `tuser_task` WHERE id = 6; -- Migrate old tasks @@ -2576,6 +2578,12 @@ UPDATE `tuser_task_scheduled` SET `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"XML";s:15:"first_execution"') WHERE `id_user_task` = 6; + UPDATE `tuser_task_scheduled` SET + `args` = REPLACE (`args`, 'a:8', 'a:9'), + `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"') + WHERE `id_user_task` = 2; + + -- ---------------------------------------------------------------------- -- ADD message in table 'tnews' -- ---------------------------------------------------------------------- diff --git a/pandora_console/include/ajax/planned_downtime.ajax.php b/pandora_console/include/ajax/planned_downtime.ajax.php index f1496dd64a..277ba77411 100644 --- a/pandora_console/include/ajax/planned_downtime.ajax.php +++ b/pandora_console/include/ajax/planned_downtime.ajax.php @@ -65,7 +65,10 @@ if ($get_modules_downtime) { $downtime_module_ids = extract_column($downtime_modules, 'id_agent_module'); $downtime_modules = array_fill_keys($downtime_module_ids, true); - $filter = ['id_agente' => $id_agent, 'delete_pending' => 0]; + $filter = [ + 'id_agente' => $id_agent, + 'delete_pending' => 0, + ]; $modules = db_get_all_rows_filter('tagente_modulo', $filter); if (empty($modules)) { $modules = []; diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index 4469bb50f8..ae434e286c 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -552,8 +552,6 @@ function cron_list_table() continue; } - hd($args, true); - hd('cron', true); if (empty($args[1]) === false && (string) $args[1] !== '0') { $agents_id = $args[1]; } else { @@ -568,6 +566,7 @@ function cron_list_table() } } + $report_type = $args[7]; $report_per_agent = $args[3]; $report_name = $args[4]; $email = $args[5]; @@ -578,6 +577,8 @@ function cron_list_table() $data[2] .= '
- '.__('Report per agent').': '.$report_per_agent.''; $data[2] .= '
- '.__('Report name').': '.$report_name.''; $data[2] .= '
- '.__('Email').": ".$email.''; + $data[2] .= '
- '.__('Report type').': '.$report_type; + break; case 'cron_task_execute_custom_script':