Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add id when agent is not pinned #3689

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed wazuh token deleted twice [#3652](https://github.com/wazuh/wazuh-kibana-app/pull/3652)
- Fixed handler of error on dev-tools [#3687](https://github.com/wazuh/wazuh-kibana-app/pull/3687)
- Fixed compatibility wazuh 4.3 - kibana 7.13.4 [#3685](https://github.com/wazuh/wazuh-kibana-app/pull/3685)
- Fixed registry values ​​without agent pinned in FIM>Events [#3689](https://github.com/wazuh/wazuh-kibana-app/pull/3689)

## Wazuh v4.2.4 - Kibana 7.10.2 , 7.12.1, 7.13.4, 7.14.2 - Revision 4206

Expand Down
8 changes: 6 additions & 2 deletions public/components/agents/fim/inventory/fileDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export class FileDetails extends Component {
}

render() {
const { fileName, type, implicitFilters, view, currentFile, agent } = this.props;
const { fileName, type, implicitFilters, view, currentFile, agent, agentId } = this.props;
const inspectButtonText = view === 'extern' ? 'Inspect in FIM' : 'Inspect in Events';
return (
<Fragment>
Expand Down Expand Up @@ -425,7 +425,11 @@ export class FileDetails extends Component {
>
<EuiFlexGroup className="flyout-row">
<EuiFlexItem>
<RegistryValues currentFile={currentFile} agent={agent} />
<RegistryValues
currentFile={currentFile}
agent={agent}
agentId={agentId}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiAccordion>{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ export const RegistryValues = (props) => {
}, []);

const getValues = async () => {
const { agent, currentFile } = props;
const { agent, currentFile, agentId } = props;
try {
const values = await WzRequest.apiReq('GET', `/syscheck/${agent.id}`, {
params: {
q: `type=registry_value;file=${currentFile.file}`,
sort: '-date',
},
});
const values = await WzRequest.apiReq(
'GET',
`/syscheck/${agent.id ? agent.id : agentId}`,
{
params: {
q: `type=registry_value;file=${currentFile.file}`,
sort: '-date',
},
}
);

setValues((((values || {}).data || {}).data || {}).affected_items || []);
} catch (error) {
Expand Down