diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index acaaadd12c..38bb7c2d8b 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -280,18 +280,17 @@ function dbmgr_extension_main() if (is_array($result) === false) { echo 'Output: '.$result; - - db_pandora_audit( - AUDIT_LOG_SYSTEM, - 'DB Interface Extension. SQL', - false, - false, - $sql - ); - return; } + db_pandora_audit( + AUDIT_LOG_SYSTEM, + 'DB Interface Extension. SQL', + false, + false, + $sql + ); + echo "
"; $table = new stdClass(); $table->width = '100%'; diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 7a8d2df32c..6dbb6a1dbf 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -250,6 +250,12 @@ if ($delete_layout || $copy_layout) { $result = db_process_sql_insert('tlayout', $values); + $auditMessage = ((bool) $result !== false) ? 'Copy visual console' : 'Fail try to copy visual console'; + db_pandora_audit( + AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT, + sprintf('%s %s #%s', $auditMessage, $visualConsoleName, $id_layout) + ); + $idNewVisualConsole = $result; if ($result) { diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 842e05147d..777011e4c7 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -626,7 +626,7 @@ switch ($action) { db_pandora_audit( AUDIT_LOG_REPORT_MANAGEMENT, - sprintf('%s #%s', $auditMessage, $idReport) + sprintf('%s %s #%s', $auditMessage, $report['name'], $idReport) ); ui_print_result_message( @@ -1461,7 +1461,7 @@ switch ($action) { $auditMessage = ($resultOperationDB === true) ? 'Update report' : 'Fail try to update report'; db_pandora_audit( AUDIT_LOG_REPORT_MANAGEMENT, - sprintf('%s #%s', $auditMessage, $idReport) + sprintf('%s %s #%s', $auditMessage, $new_values['name'], $idReport), ); } else { $resultOperationDB = false; @@ -1513,7 +1513,7 @@ switch ($action) { ] ); - $auditMessage = ((bool) $idOrResult === true) ? sprintf('Create report #%s', $idOrResult) : 'Fail try to create report'; + $auditMessage = ((bool) $idOrResult === true) ? sprintf('Create report %s #%s', $reportName, $idOrResult) : 'Fail try to create report'; db_pandora_audit( AUDIT_LOG_REPORT_MANAGEMENT, $auditMessage diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index 7c04892524..c49acaf80d 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -300,7 +300,7 @@ switch ($activeTab) { ui_update_name_fav_element($idVisualConsole, 'Visual_Console', $values['name']); db_pandora_audit( AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT, - sprintf('Update visual console #%s', $idVisualConsole) + sprintf('Update visual console %s #%s', io_safe_output($values['name']), $idVisualConsole) ); $action = 'edit'; $statusProcessInDB = [ @@ -320,7 +320,7 @@ switch ($activeTab) { } else { db_pandora_audit( AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT, - sprintf('Fail update visual console #%s', $idVisualConsole) + sprintf('Fail update visual console %s #%s', $values['name'], $idVisualConsole) ); $statusProcessInDB = [ 'flag' => false, @@ -339,7 +339,7 @@ switch ($activeTab) { if ($idVisualConsole !== false) { db_pandora_audit( AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT, - sprintf('Create visual console #%s', $idVisualConsole) + sprintf('Create visual console %s #%s', io_safe_output($values['name']), $idVisualConsole) ); $action = 'edit'; $statusProcessInDB = [ @@ -359,7 +359,7 @@ switch ($activeTab) { } else { db_pandora_audit( AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT, - 'Fail try to create visual console' + sprintf('Fail try to create visual console %s #%s', io_safe_output($values['name']), $idVisualConsole) ); $statusProcessInDB = [ 'flag' => false, diff --git a/pandora_console/include/lib/Dashboard/Manager.php b/pandora_console/include/lib/Dashboard/Manager.php index 720045dccc..7e5562ebef 100644 --- a/pandora_console/include/lib/Dashboard/Manager.php +++ b/pandora_console/include/lib/Dashboard/Manager.php @@ -564,6 +564,13 @@ class Manager implements PublicLogin ]; } + $auditMessage = ($res === false) ? sprintf('Fail try update dashboard %s #%s', $values['name'], $this->dashboardId) : sprintf('Dashboard update %s #%s', $values['name'], $this->dashboardId); + db_pandora_audit( + AUDIT_LOG_DASHBOARD_MANAGEMENT, + $auditMessage, + false, + ); + return $result; } @@ -744,6 +751,13 @@ class Manager implements PublicLogin } } + $auditMessage = ($result === false) ? sprintf('Fail try copy dashboard %s #%s', $values['name'], $this->dashboardId) : sprintf('Copy dashboard %s #%s', $values['name'], $this->dashboardId); + db_pandora_audit( + AUDIT_LOG_DASHBOARD_MANAGEMENT, + $auditMessage, + false, + ); + return $result; } diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 4bc5a05b61..fdd950575c 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -428,6 +428,13 @@ echo '
'; ui_include_time_picker(); ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/'); +db_pandora_audit( + AUDIT_LOG_REPORT_MANAGEMENT, + sprintf('Report visualized %s #%s.', $report['name'], $report['id_report']), + false, + false +); + ?>