Merge branch 'develop' into ent-9662-second-round
This commit is contained in:
commit
90b4b5d46d
|
@ -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,
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
]
|
||||
);
|
||||
}
|
|
@ -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'),
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 ($@);
|
||||
|
||||
|
|
Loading…
Reference in New Issue