Skip to content

Commit

Permalink
Merge branch '4.9.0' into feat/6825-add-view-document-discover
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianogorza authored Jul 24, 2024
2 parents 2f08e0b + f868722 commit 198e9d5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 47 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ All notable changes to the Wazuh app project will be documented in this file.

### Changed

- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6459) [#6434](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6434) [#6504](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6504) [#6649](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6649) [#6506](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6506) [#6537](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6537) [#6528](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6528) [#6675](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6675) [#6674](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6674) [#6558](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6558) [#6685](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6685) [#6691](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6691) [#6712](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6712) [#6734](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6734) [#6746](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6746) [#6752](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6752) [#6753](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6753) [#6756](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6756) [#6771](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6771) [#6792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6792) [#6845](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6845) [#6857](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6857) [#6831](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6831)
- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6459) [#6434](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6434) [#6504](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6504) [#6649](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6649) [#6506](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6506) [#6537](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6537) [#6528](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6528) [#6675](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6675) [#6674](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6674) [#6558](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6558) [#6685](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6685) [#6691](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6691) [#6712](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6712) [#6734](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6734) [#6746](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6746) [#6752](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6752) [#6753](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6753) [#6756](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6756) [#6771](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6771) [#6792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6792) [#6845](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6845) [#6857](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6857) [#6847](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6847) [#6831](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6831)
- Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250)
- Change how the configuration is managed in the backend side [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337) [#6519](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6519) [#6573](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6573)
- Change the view of API is down and check connection to Server APIs application [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
Expand Down
66 changes: 41 additions & 25 deletions plugins/main/public/components/agents/fim/inventory/fileDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,32 +210,15 @@ export class FileDetails extends Component {
];
}

viewInEvents = ev => {
viewInEvents = async ev => {
const { file } = this.props.currentFile;
if (this.props.view === 'extern') {
NavigationService.getInstance().navigateToModule(ev, 'overview', {
agentId: this.props?.agent?.id,
tab: 'fim',
tabView: 'events',
filters: { 'syscheck.path': file },
});
} else {
NavigationService.getInstance().navigateToModule(
ev,
'overview',
{
agentId: this.props?.agent?.id,
tab: 'fim',
tabView: 'events',
filters: { 'syscheck.path': file },
},
() => this.openEventCurrentWindow(),
);
const { agent } = this.props;
const agentId = agent?.id;

if (!this.indexPattern) {
this.indexPattern = await getIndexPattern();
}
};

openEventCurrentWindow() {
const { file } = this.props.currentFile;
const filters = [
{
...buildPhraseFilter(
Expand All @@ -247,9 +230,42 @@ export class FileDetails extends Component {
},
];

if (this.props.view === 'extern') {
this.applyFiltersAndNavigate(ev, filters, 'overview', {
agentId,
tab: 'fim',
tabView: 'events',
filters: { 'syscheck.path': file },
});
} else {
this.applyFiltersAndNavigate(
ev,
filters,
'overview',
{ agentId, tab: 'fim', tabView: 'events' },
this.openEventCurrentWindow,
);
}
};

applyFiltersAndNavigate = async (ev, filters, module, params, callback) => {
try {
const { filterManager } = getDataPlugin().query;
filterManager.addFilters(filters);
await NavigationService.getInstance().navigateToModule(
ev,
module,
params,
callback,
);
} catch (error) {
ErrorHandler.handleError(error);
}
};

openEventCurrentWindow = () => {
this.props.onSelectedTabChanged('events');
this.checkFilterManager(filters);
}
};

async checkFilterManager(filters) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,4 @@ export const wzDiscoverRenderColumns: tDataGridRenderColumn[] = [
<div>{renderMitreTechnique(value)}</div>
),
},
{
id: 'rule.mitre_techniques',
render: value =>
Array.isArray(value) ? (
<div style={{ display: 'flex', gap: 10 }}>
{value?.map((technique, index) => (
<div key={`${technique}-${index}`}>
{renderMitreTechnique(technique)}
</div>
))}
</div>
) : (
<div>{renderMitreTechnique(value)}</div>
),
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ export const threatHuntingTableDefaultColumns: tDataGridColumn[] = [
{
id: 'rule.mitre.tactic',
},
{
id: 'rule.mitre_technique',
},
{
id: 'rule.description',
},
Expand All @@ -49,9 +46,6 @@ export const threatHuntingTableAgentColumns: EuiDataGridColumn[] = [
{
id: 'rule.mitre.tactic',
},
{
id: 'rule.mitre_technique',
},
{
id: 'rule.description',
},
Expand Down

0 comments on commit 198e9d5

Please sign in to comment.