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] 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

Merged

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented May 26, 2022

Description

This PR fixes a problem when removing agent from a group in the agent list of Management/Groups/<Group>/Manage agents that appears a toast message that the action was successfully but when the table is refreshed, the agent appears in it.

Changes

  • Modified as the Wazuh API request is done. Previously, the toast message appears without awaiting a response to remove the agent of the group.

Test

  • Remove an agent of a group in Management/Groups/<Group>/Manage agents. The toast message should appear after the Wazuh API request is done.

Closes #4062

…p and notify the user

Previously the toast appear without awating the response to the Wazuh
API request to remove the agent
@Desvelao Desvelao self-assigned this May 26, 2022
@Desvelao Desvelao added the type/bug Bug issue label May 26, 2022
@Desvelao Desvelao linked an issue May 26, 2022 that may be closed by this pull request
@Desvelao Desvelao changed the title [Fix] Displaying that an agent was removed successfully from a group and the agent appear in the agent group list [Fix] A toast message with a successful process appeared when removing an agent of a group in Management/Groups and the agent appear in the agent list after refreshing the table May 26, 2022
@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 4.04% ( 1478 / 36563 )
Branches 1.62% ( 461 / 28437 )
Functions 2.99% ( 267 / 8935 )
Lines 4.09% ( 1430 / 34957 )

@Mayons95
Copy link
Contributor

TEST OK

Screencast.from.27-05-22.16.20.50.mp4

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test: ✔️
CR: ✔️

…into fix/4062-remove-agent-from-group-display-agents-list
@Desvelao Desvelao force-pushed the fix/4062-remove-agent-from-group-display-agents-list branch from 5dec585 to 729ac90 Compare June 2, 2022 08:18
@Desvelao
Copy link
Member Author

Desvelao commented Jun 2, 2022

Changes

  • updated the changelog

@Desvelao Desvelao force-pushed the fix/4062-remove-agent-from-group-display-agents-list branch from 729ac90 to 126eb2e Compare June 2, 2022 08:20
@Desvelao Desvelao changed the title [Fix] A toast message with a successful process appeared when removing an agent of a group in Management/Groups and the agent appear in the agent list after refreshing the table [Fix] 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 Jun 2, 2022
@Desvelao Desvelao merged commit 6b8fb4b into 4.3-7.10 Jun 2, 2022
@Desvelao Desvelao deleted the fix/4062-remove-agent-from-group-display-agents-list branch June 2, 2022 08:21
github-actions bot pushed a commit that referenced this pull request Jun 2, 2022
…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)
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2022

The backport to 4.3-1.2-wzd failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.3-1.2-wzd 4.3-1.2-wzd
# Navigate to the new working tree
cd .worktrees/backport-4.3-1.2-wzd
# Create a new branch
git switch --create backport-4167-to-4.3-1.2-wzd
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6b8fb4b4633f56940cf52bb01f46ae31a55b9037
# Push it to GitHub
git push --set-upstream origin backport-4167-to-4.3-1.2-wzd
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.3-1.2-wzd

Then, create a pull request where the base branch is 4.3-1.2-wzd and the compare/head branch is backport-4167-to-4.3-1.2-wzd.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2022

The backport to cloud/4.3-7.10 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-cloud/4.3-7.10 cloud/4.3-7.10
# Navigate to the new working tree
cd .worktrees/backport-cloud/4.3-7.10
# Create a new branch
git switch --create backport-4167-to-cloud/4.3-7.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6b8fb4b4633f56940cf52bb01f46ae31a55b9037
# Push it to GitHub
git push --set-upstream origin backport-4167-to-cloud/4.3-7.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-cloud/4.3-7.10

Then, create a pull request where the base branch is cloud/4.3-7.10 and the compare/head branch is backport-4167-to-cloud/4.3-7.10.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2022

The backport to cloud/4.3-7.10-custom-agents-view failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-cloud/4.3-7.10-custom-agents-view cloud/4.3-7.10-custom-agents-view
# Navigate to the new working tree
cd .worktrees/backport-cloud/4.3-7.10-custom-agents-view
# Create a new branch
git switch --create backport-4167-to-cloud/4.3-7.10-custom-agents-view
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6b8fb4b4633f56940cf52bb01f46ae31a55b9037
# Push it to GitHub
git push --set-upstream origin backport-4167-to-cloud/4.3-7.10-custom-agents-view
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-cloud/4.3-7.10-custom-agents-view

Then, create a pull request where the base branch is cloud/4.3-7.10-custom-agents-view and the compare/head branch is backport-4167-to-cloud/4.3-7.10-custom-agents-view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The agent keeps appearing after removal
3 participants