Skip to content

Commit

Permalink
[Fix] A toast message with a successful process appeared when removin…
Browse files Browse the repository at this point in the history
…g an agent of a group in `Management/Groups` and the agent appears in the agent list after refreshing the table (#4167)

* fix: Fixed as the managing the process to remove an agent from a group and notify the user

Previously the toast appear without awating the response to the Wazuh
API request to remove the agent

* changelog: Add PR entry

* changelog: Move PR entry

(cherry picked from commit 6b8fb4b)
  • Loading branch information
Desvelao authored and github-actions[bot] committed Jun 2, 2022
1 parent e4e842a commit b0fe716
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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.4 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4305

### Fixed

- Fixed a toast message with a successful process appeared when removing an agent of a group in `Management/Groups` and the agent appears in the agent list after refreshing the table [#4167](https://github.com/wazuh/wazuh-kibana-app/pull/4167)

## Wazuh v4.3.3 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4304

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,7 @@ class WzGroupAgentsTable extends Component {
const { itemDetail } = this.props.state;
this.props.updateLoadingStatus(true);
try {
items.map(async (item) => {
await this.groupsHandler.deleteAgent(item.id, itemDetail.name);
});

await Promise.all(items.map(item => this.groupsHandler.deleteAgent(item.id, itemDetail.name)));
this.props.updateIsProcessing(true);
this.props.updateLoadingStatus(false);
this.props.updateReload();
Expand Down

0 comments on commit b0fe716

Please sign in to comment.