diff --git a/CHANGELOG.md b/CHANGELOG.md index 66cc02e007..a60228f8b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to the Wazuh app project will be documented in this file. ## Wazuh v4.3.5 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4306 +### Added + +- Added to the interface API messages in the Ruleset test module [#4244](https://github.com/wazuh/wazuh-kibana-app/pull/4244) + ### Fixed - Fixed type error when changing screen size in agents section [#4233](https://github.com/wazuh/wazuh-kibana-app/pull/4233) diff --git a/public/directives/wz-logtest/components/logtest.tsx b/public/directives/wz-logtest/components/logtest.tsx index 6e20a31f11..eb376f1bbb 100644 --- a/public/directives/wz-logtest/components/logtest.tsx +++ b/public/directives/wz-logtest/components/logtest.tsx @@ -71,7 +71,7 @@ export const Logtest = compose( }; // Format the result of the Wazuh API response to an output similar one to the `wazuh-logtest` utility - const formatResult = (result, alert) => { + const formatResult = (result, alert, messages) => { // How to the `wazuh-logtest` utility logs the output: // https://github.com/wazuh/wazuh/blob/master/framework/scripts/wazuh-logtest.py#L359-L397 @@ -100,6 +100,13 @@ export const Logtest = compose( }); } + // Output messages + if (messages) { + logging.push('**Messages:'); + messages.forEach(message => logging.push(`\t${message}`)); + logging.push(''); + } + // Pre-decoding phase logging.push('**Phase 1: Completed pre-decoding.'); // Check in case rule has no_full_log attribute @@ -171,7 +178,7 @@ export const Logtest = compose( } const testResults = responses.map((response) => { return response.data.data.output || '' - ? formatResult(response.data.data.output, response.data.data.alert) + ? formatResult(response.data.data.output, response.data.data.alert, response.data.data.messages) : `No result found for: ${response.data.data.output.full_log}`; }).join('\n\n'); setTestResult(testResults);