diff --git a/CHANGELOG.md b/CHANGELOG.md index ddc27b2b02..ad9203fb6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Removed the unexpected `delay` parameter on the server API requests [#6778](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6778) - Fixed home KPI links with custom or index pattern whose title is different to the id [#6777](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6777) - Fixed colors related to vulnerability severity levels on Vulnerability Detection dashboard [#6793](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6793) +- Fixed pinned agent error in vulnerabilities events tab [#6827](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6827) ## Wazuh v4.8.0 - OpenSearch Dashboards 2.10.0 - Revision 12 diff --git a/plugins/main/public/components/overview/vulnerabilities/common/vulnerability_detector_adapters.tsx b/plugins/main/public/components/overview/vulnerabilities/common/vulnerability_detector_adapters.tsx index 58687502c5..aeffad1bd0 100644 --- a/plugins/main/public/components/overview/vulnerabilities/common/vulnerability_detector_adapters.tsx +++ b/plugins/main/public/components/overview/vulnerabilities/common/vulnerability_detector_adapters.tsx @@ -1,7 +1,6 @@ import { AUTHORIZED_AGENTS, VULNERABILITY_IMPLICIT_CLUSTER_MODE_FILTER, - WAZUH_ALERTS_PATTERN, } from '../../../../../common/constants'; import { AppState } from '../../../../react-services'; import { FilterHandler } from '../../../../utils/filter-handler'; @@ -113,7 +112,7 @@ export const restorePrevIndexFiltersAdapter = ( cleanedFilters.unshift(managerFilter); const implicitPinnedAgent = getImplicitPinnedAgent( previousFilters, - toIndexPattern ?? WAZUH_ALERTS_PATTERN, + toIndexPattern ?? AppState.getCurrentPattern(), ); if (implicitPinnedAgent) { const cleanedFiltersWithoutNormalAgents = cleanedFilters.filter(x => { @@ -143,7 +142,7 @@ export const onUpdateAdapter = ( */ const cleanedFilters = cleanFilters( filters, - prevStoragePattern ?? WAZUH_ALERTS_PATTERN, + prevStoragePattern ?? AppState.getCurrentPattern(), ); if (storagePreviousFilters) { const previousFilters = JSON.parse(storagePreviousFilters); @@ -152,7 +151,7 @@ export const onUpdateAdapter = ( ); const cleanedPreviousImplicitFilters = cleanFilters( previousImplicitFilters, - prevStoragePattern ?? WAZUH_ALERTS_PATTERN, + prevStoragePattern ?? AppState.getCurrentPattern(), ); /* Normal filters added to storagePreviousFilters are added to keep them between dashboard and inventory tab */ const newFilters = filters.filter(