Skip to content

Commit

Permalink
Merge branch '4.9.0' into 6879-the-inventory-table-remains-in-registr…
Browse files Browse the repository at this point in the history
…y-when-the-agent-is-changed
  • Loading branch information
yenienserrano authored Jul 29, 2024
2 parents 93871c0 + b4df0b3 commit 20326fa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Refactored the search bar to correctly handle fixed and user-added filters [#6716](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6716) [#6755](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6755) [#6833](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6833)
- Generate URL with predefined filters [#6745](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6745)
- Migrated AngularJS routing to ReactJS [#6689](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6689) [#6775](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6775) [#6790](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6790)
- Improvement of the filter management system by implementing new standard modules [#6534](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6534) [#6772](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6772)
- Improvement of the filter management system by implementing new standard modules [#6534](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6534) [#6772](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6772) [#6873](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6873)
- Changed permalink field in the Events tab table in Virustotal to show an external link [#6839](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6839)

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ export class PatternDataSourceFilterManager
value: Array.isArray(value) ? value.join(', ') : value,
params: value,
negate,
type: 'phrases',
type: Array.isArray(value) ? 'phrases' : 'phrase',
index: indexPatternId,
controlledBy,
},
Expand Down
16 changes: 15 additions & 1 deletion plugins/main/public/components/common/modules/main-agent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
AlertsDataSource,
AlertsDataSourceRepository,
PatternDataSource,
tFilter,
tParsedIndexPattern,
useDataSource,
} from '../data-source';
Expand Down Expand Up @@ -224,14 +225,27 @@ export default compose(
}),
)(MainModuleAgent);

export class AgentInventoryDataSource extends AlertsDataSource {
constructor(id: string, title: string) {
super(id, title);
}

getFixedFilters(): tFilter[] {
return [
...super.getFixedFiltersClusterManager(),
...super.getFixedFilters(),
];
}
}

const GenerateSyscollectorReportButton = ({ agent }) => {
const {
dataSource,
fetchFilters,
isLoading: isDataSourceLoading,
} = useDataSource<tParsedIndexPattern, PatternDataSource>({
repository: new AlertsDataSourceRepository(), // this makes only works with alerts index pattern
DataSource: AlertsDataSource,
DataSource: AgentInventoryDataSource,
});

const action = useAsyncAction(async () => {
Expand Down

0 comments on commit 20326fa

Please sign in to comment.