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

Changing API in Configuration Assessment redirects to Home overview #6763

Closed
jbiset opened this issue Jun 12, 2024 · 1 comment · Fixed by #6770
Closed

Changing API in Configuration Assessment redirects to Home overview #6763

jbiset opened this issue Jun 12, 2024 · 1 comment · Fixed by #6770
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@jbiset
Copy link
Member

jbiset commented Jun 12, 2024

Description

Having an agent pinned in Configuration Assessment, when changing APIs, instead of staying in the Configuration Assessment app with the screen to select an agent, the general Overview screen loads.

Steps to reproduce

  1. Navigate to Configuration Assessment.
  2. Pin an agent.
  3. Go to Home -> Overview
  4. Go to Configuration Assessment.
  5. Change the API.

Expected Result

  1. The agent selection screen should be displayed in Configuration Assessment.

image

Actual Result

  1. The general Overview screen loads.

image

Screenshots

evidence.webm
@jbiset jbiset added type/bug Bug issue level/task Task issue labels Jun 12, 2024
@jbiset jbiset self-assigned this Jun 12, 2024
@jbiset
Copy link
Member Author

jbiset commented Jun 12, 2024

Update 12/06/2024

Research

wz-agent-selector-service in its constructor is storing the query params. Calling the unPinAgent method internally calls an internal renewURL method using those parameters stored in the wz-agent-selector-service instantiation. This causes that when calling the renewURL method, the query params used are not correct, causing the query param tab to be missing, which is essential for correct rendering.

Proposed solution

Do not store the query params during the instantiation of wz-agent-selector-service and consult the query params when they are needed. In this case, in the unPinAgent method.
Likewise, it is also necessary to add the dependency parameter agentId in the useEffect in public/components/overview/overview.tsx so that it correctly synchronizes the state of the pinned agent with respect to the URL.

@jbiset jbiset linked a pull request Jun 13, 2024 that will close this issue
6 tasks
@wazuhci wazuhci moved this to Pending review in Release 4.9.0 Jun 13, 2024
@wazuhci wazuhci moved this from Pending review to In review in Release 4.9.0 Jun 13, 2024
@wazuhci wazuhci moved this from In review to Done in Release 4.9.0 Jun 13, 2024
@asteriscos asteriscos changed the title Fix behavior in Configuration Assessment when changing API Changing API in Configuration Assessment redirects to Home overview Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants