diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index f559b4e3eb..dc27e4b207 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1195,6 +1195,8 @@ if ($update_agent) { ] ); + ui_update_name_fav_element($id_agente, 'Agents', $alias); + ui_print_success_message(__('Successfully updated')); db_pandora_audit( AUDIT_LOG_AGENT_MANAGEMENT, diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index a1c9638a48..fbc60c42b0 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -237,6 +237,8 @@ if ($update) { ['id_filter' => $id] ); + ui_update_name_fav_element($id, 'Events', $id_name); + ui_print_result_message( $result, __('Successfully updated'), diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index c998be494a..cbe9cf51f0 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -534,6 +534,7 @@ if ($is_management_allowed === true && $update_group === true) { } if ($result) { + ui_update_name_fav_element($id_group, 'Groups', $name); ui_print_success_message(__('Group successfully updated')); } else { ui_print_error_message(__('There was a problem modifying group')); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 68ff0baf8e..6fc2056587 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1429,6 +1429,8 @@ switch ($action) { ['id_report' => $idReport] ); + ui_update_name_fav_element($idReport, 'Reporting', $new_values['name']); + $auditMessage = ($resultOperationDB === true) ? 'Update report' : 'Fail try to update report'; db_pandora_audit( AUDIT_LOG_REPORT_MANAGEMENT, diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index 6a7f8cba37..f9072d6b31 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -293,6 +293,7 @@ switch ($activeTab) { } if ($result !== false) { + ui_update_name_fav_element($idVisualConsole, 'Visual_Console', $values['name']); db_pandora_audit( AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT, sprintf('Update visual console #%s', $idVisualConsole) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 450faa0e9a..cb103c7b8d 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -2065,6 +2065,7 @@ if (check_login()) { if ($result === false) { echo 'error'; } else { + ui_update_name_fav_element($id, 'Modules', $values['ag_modulename']); echo 'ok'; } } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 72f945cf6e..bc8b0f867b 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -7895,4 +7895,22 @@ function ui_print_fav_menu($id_element, $url, $label, $section) $output .= html_print_input_text('label_fav_menu', '', '', 25, 255, true, false, true); $output .= '</div>'; return $output; +} + + +function ui_update_name_fav_element($id_element, $section, $label) +{ + $label = io_safe_output($label); + if (strlen($label) > 18) { + $label = io_safe_input(substr($label, 0, 18).'...'); + } + + db_process_sql_update( + 'tfavmenu_user', + ['label' => $label], + [ + 'section' => $section, + 'id_element' => $id_element, + ] + ); } \ No newline at end of file diff --git a/pandora_console/include/lib/Dashboard/Manager.php b/pandora_console/include/lib/Dashboard/Manager.php index 6e2f9a00d8..9d2c0d4356 100644 --- a/pandora_console/include/lib/Dashboard/Manager.php +++ b/pandora_console/include/lib/Dashboard/Manager.php @@ -1002,6 +1002,10 @@ class Manager implements PublicLogin $res = $this->put($values); } + if ($res !== false) { + ui_update_name_fav_element($this->dashboardId, 'Dashboard_', $name); + } + $result = [ 'error' => ($res === false) ? 1 : 0, 'error_mesage' => __('Error create or update dashboard'), diff --git a/pandora_console/operation/agentes/pandora_networkmap.php b/pandora_console/operation/agentes/pandora_networkmap.php index 506f778e6d..c3f7786a2e 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.php +++ b/pandora_console/operation/agentes/pandora_networkmap.php @@ -507,6 +507,7 @@ else if ($update_networkmap || $copy_networkmap || $delete) { $values, ['id' => $id] ); + ui_update_name_fav_element($id, 'Network_map', $name); } $result_txt = ui_print_result_message( diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index ea8bf7629d..2bde4e0ddf 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -517,6 +517,7 @@ if (is_ajax() === true) { $return['error'] = false; error_log('Failed to reset map '.$map_id); } else { + ui_update_name_fav_element($map_id, 'Network_map', $new_values['name']); $return['error'] = true; } } else { diff --git a/pandora_server/util/pandora_ha.pl b/pandora_server/util/pandora_ha.pl index bde720a204..7a50eaad59 100755 --- a/pandora_server/util/pandora_ha.pl +++ b/pandora_server/util/pandora_ha.pl @@ -642,6 +642,9 @@ sub ha_main_pandora($) { # Execute resync actions. enterprise_hook('pandoraha_resync_dbs', [$conf, $dbh, $DB_Host, \@HA_DB_Hosts]); + + # Synchronize nodes. + enterprise_hook('pandoraha_sync_node', [$conf, $dbh]); }; log_message($conf, 'WARNING', $@) if ($@);