Skip to content

Commit

Permalink
Fixed that alerts table is empty when switching pinned agents (#2956)
Browse files Browse the repository at this point in the history
* Fixed that alerts table is empty when switching pinned agents

* Made changes in the position of the if

* Changelog updated

Co-authored-by: Pablo Martínez <[email protected]>
Co-authored-by: Toni <[email protected]>
  • Loading branch information
3 people authored and frankeros committed Feb 22, 2021
1 parent 2b89847 commit f95f791
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to the Wazuh app project will be documented in this file.

### Fixed

- Fix Security events table is empty when switching the pinned agents [#2956](https://github.com/wazuh/wazuh-kibana-app/pull/2956)
- Fix disabled switch visual edit button when json content is empty [#2957](https://github.com/wazuh/wazuh-kibana-app/issues/2957)
- Fix the statusCode error message [#2971](https://github.com/wazuh/wazuh-kibana-app/pull/2971)
- Fix the SCA policy stats didn't refresh [#2973](https://github.com/wazuh/wazuh-kibana-app/pull/2973)
Expand Down
4 changes: 3 additions & 1 deletion public/components/common/modules/discover/discover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ export const Discover = compose(
|| (this.props.refreshAngularDiscover !== prevProps.refreshAngularDiscover)
){
this.setState({ pageIndex: 0 , tsUpdated: Date.now()});
if(!_.isEqual(this.props.shareFilterManager, this.state.searchBarFilters)){
this.setState({columns: this.getColumns(), searchBarFilters: this.props.shareFilterManager || []}); //initial columns
}
return;
};

if(['pageIndex', 'pageSize', 'sortField', 'sortDirection'].some(field => this.state[field] !== prevState[field]) || (this.state.tsUpdated !== prevState.tsUpdated)){
try {
await this.getAlerts();
Expand Down

0 comments on commit f95f791

Please sign in to comment.