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

[FIX] Avoid to remove the implicit filters in the modules #4146

Merged
merged 3 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to the Wazuh app project will be documented in this file.

## Wazuh v4.3.2 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4303

### Fixed

- Fixed the implicit filters in modules can be removed [#4146](https://github.com/wazuh/wazuh-kibana-app/pull/4146)

## Wazuh v4.3.1 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4302

### Added
Expand Down
10 changes: 5 additions & 5 deletions public/components/common/modules/modules-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ export class ModulesHelper {
// Checks if the filter is already in use
// Check which of the filters are from the module view and which are not pinned filters
if (!moduleFilter.used) {
const objKey = moduleFilter.query?.match
? Object.keys(moduleFilter.query.match)[0]
const objKey = moduleFilter.query?.match_phrase
? Object.keys(moduleFilter.query.match_phrase)[0]
: moduleFilter.meta.key;
const objValue = moduleFilter.query?.match
? moduleFilter.query.match[objKey].query
: moduleFilter.meta.value;
const objValue = moduleFilter.query?.match_phrase
? moduleFilter.query.match_phrase[objKey].query
: moduleFilter.meta.value();
const key = `filter-key-${objKey}`;
const value = `filter-value-${objValue}`;

Expand Down