Skip to content

Commit

Permalink
Add WindowsUpdate table to report (#2028)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablotr9 authored and juankaromo committed Jan 27, 2020
1 parent 25a34bd commit 57bb44c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions server/controllers/wazuh-reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -2552,6 +2552,31 @@ export class WazuhReportingCtrl {
} catch (error) {
log('reporting:report', error.message || error, 'debug');
}

try {
log(
'reporting:report',
`Fetching hotfixes for agent ${agentId}`,
'debug'
);
const hotfixes = await this.apiRequest.makeGenericRequest(
'GET',
`/syscollector/${agentId}/hotfixes`,
{},
apiId
);
if (hotfixes && hotfixes.data && hotfixes.data.items) {
tables.push({
title: 'Windows updates',
columns: ['Update code'],
rows: hotfixes.data.items.map(x => {
return [x['hotfix']];
})
});
}
} catch (error) {
log('reporting:report', error.message || error, 'debug');
}
}

if (!isAgentConfig && !isGroupConfig) {
Expand Down

0 comments on commit 57bb44c

Please sign in to comment.