diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a27097c1a..16ca586eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Fixed WAZUH_PROTOCOL param suggestion [#4849](https://github.com/wazuh/wazuh-kibana-app/pull/4849) - Raspbian OS, Ubuntu, Amazon Linux and Amazon Linux 2 commands in the wizard deploy agent now change when a different architecture is selected [#4876](https://github.com/wazuh/wazuh-kibana-app/pull/4876) [#4880](https://github.com/wazuh/wazuh-kibana-app/pull/4880) - Fixed a bug that caused the flyouts to close when clicking inside them [#4638](https://github.com/wazuh/wazuh-kibana-app/pull/4638) +- Fixed Inventory checks table filters by stats [#4999](https://github.com/wazuh/wazuh-kibana-app/pull/4999) - Fixed agent graph in opensearch dashboard [#4942] (https://github.com/wazuh/wazuh-kibana-app/pull/4942) - Fixed commands in the deploy new agent section(most of the commands are missing '-1') [#4962](https://github.com/wazuh/wazuh-kibana-app/pull/4962) - Fixed agent installation command for macOS in the deploy new agent section. [#4968](https://github.com/wazuh/wazuh-kibana-app/pull/4968) diff --git a/public/components/agents/sca/inventory.tsx b/public/components/agents/sca/inventory.tsx index d5de1ed4ef..45db9d3725 100644 --- a/public/components/agents/sca/inventory.tsx +++ b/public/components/agents/sca/inventory.tsx @@ -544,7 +544,7 @@ export class Inventory extends Component { { diff --git a/public/components/agents/sca/inventory/checks-table.tsx b/public/components/agents/sca/inventory/checks-table.tsx index d31d614e99..190d638382 100644 --- a/public/components/agents/sca/inventory/checks-table.tsx +++ b/public/components/agents/sca/inventory/checks-table.tsx @@ -8,6 +8,7 @@ import { getFilterValues } from './lib'; type Props = { agent: { [key: string]: any }; lookingPolicy: { [key: string]: any }; + filters: any[]; }; type State = { @@ -24,12 +25,12 @@ export class InventoryPolicyChecksTable extends Component { columnsChecks: any; constructor(props) { super(props); - const { agent, lookingPolicy } = this.props; + const { agent, lookingPolicy, filters } = this.props; this.state = { agent, lookingPolicy, itemIdToExpandedRowMap: {}, - filters: [], + filters: filters || [], pageTableChecks: { pageIndex: 0 }, }; this.suggestions = [ @@ -208,7 +209,12 @@ export class InventoryPolicyChecksTable extends Component { async componentDidMount() {} - async componentDidUpdate(prevProps, prevState) {} + async componentDidUpdate(prevProps) { + const { filters } = this.props + if (filters !== prevProps.filters) { + this.setState({ filters: filters }); + } + } componentWillUnmount() { this._isMount = false;