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

Redesign the agent's dashboard #4238

Closed
gdiazlo opened this issue Jun 9, 2022 · 10 comments · Fixed by #4512
Closed

Redesign the agent's dashboard #4238

gdiazlo opened this issue Jun 9, 2022 · 10 comments · Fixed by #4512
Assignees
Labels
type/enhancement Enhancement issue

Comments

@gdiazlo
Copy link
Member

gdiazlo commented Jun 9, 2022

Describe the solution you'd like

In the agent's dashboard, there is an SCA card with a severity indicator of the last SCA scan made for that agent. It is not clear how we're selecting the policy or if we're agregating them in those indicators.

image

A user needs to go through three pages to reach a list of the failing policies. We want to take the user to the information without going through all these pages.

image

We need to design the widget in a way the user can reach the information weŕe displaying with a single click.

We will discuss possible designs as well as their implementation in this issue.

@gdiazlo gdiazlo added the type/enhancement Enhancement issue label Jun 9, 2022
@gdiazlo gdiazlo moved this to Todo in Release 4.4.0 Jun 9, 2022
@chantal-kelm
Copy link
Member

I think this could be a solution, more intuitive for the user: https://user-images.githubusercontent.com/99441266/179787358-49c6d8a7-048c-48ec-9301-759f374707bc.mp4

@chantal-kelm
Copy link
Member

chantal-kelm commented Jul 20, 2022

A solution could be to remove the table seen in the video, remove the page where that table is displayed, and display that table on the SCA card within an agent's screen.

Video:

vi.mp4

Image of how the SCA card would look like in an agent:

Screenshot from 2022-07-20 13-58-47

By clicking on any row of the table the user would be redirected to this page:

Screenshot from 2022-07-20 13-19-12

@vikman90 vikman90 added this to the Release 4.4.0 milestone Aug 31, 2022
@matiasmoreno876 matiasmoreno876 moved this from Todo to In Progress in Release 4.4.0 Sep 14, 2022
@chantal-kelm chantal-kelm linked a pull request Sep 14, 2022 that will close this issue
@chantal-kelm
Copy link
Member

Today I took the issue and have been working on understanding how the filters are being passed through the url and based on that displaying certain tables.
Once I understood this, I rendered the table where we want, I still need to keep working on this issue.

@chantal-kelm
Copy link
Member

chantal-kelm commented Sep 14, 2022

This issue was due tomorrow, but due to many changes from the ci cd team on this issue, I was able to start it today and will change the due date to 23/09

@chantal-kelm
Copy link
Member

chantal-kelm commented Sep 16, 2022

Desired behavior:

When we click on a row of the table we want to show in the SCA card: 'Latest scans' we want it to redirect us to a new page where we will show the second table.

Research:

Currently, the routes of the project are made with Angular, and the same route shows different screens depending on the states that are changing, so there is no specific route as there should be. This also happens in the section we want to redesign.
So when we want to redirect as in this case when clicking on a row we don't have a URL to redirect to.
In the future, it would be good to finish moving the project to React, and include the React router DOM that would solve these problems.

Proposed solution:

According to what I discussed with my colleague Antonio and seeing how the current development is, the best option will be to click on a row, pass some parameters by URL and if those parameters are present in the URL show the table we want, handling the states to behave as we expect, taking into account that this section handles states and filters for the tables, all this should coexist with the new development.

@chantal-kelm
Copy link
Member

Today I have been working on setting the corresponding states.

@chantal-kelm
Copy link
Member

chantal-kelm commented Sep 23, 2022

While this issue was being developed, it was noticed that there was an error with the policy_id when making a request to the Wazuh API. It was not clarified if it could be a problem of the Wazuh API or if the problem is of the library used to make the requests when using a value containing invalid characters.
An issue will be opened, and it will be investigated whether the problem is API or library related.

An investigation was done to see if the policy_id could contain invalid characters that cause the same problem that was detected in a development.

We consulted with Core and received the following response:

Currently, no validation is done for this field beyond it being a string, at least at the core level, until it is stored in the DB. Then it is the API that queries it until it ends up in the UI, but I doubt that there are currently any restrictions in the API as well.

Surely then this field can contain characters that cause the problem you mention in the app, in that case it would be good to put a validation and know which characters should be invalid.

We will open an issue about this and continue with the topic.

On the other hand when you click on the table of the SCA card and make the redirection it is checked that the relevant states are set and that the URL is or not present a parameter, based on these states and parameter it is decided whether to display a table or another.
As the redirection showed for a second a table and then finished making the check and showed another, to improve the user experience it was decided to put a loading that the user sees while behind the checks are made of parameters and states and decide which table to show, I'm currently working on the latter.

@gdiazlo gdiazlo moved this from In Progress to In Review in Release 4.4.0 Sep 28, 2022
@Machi3mfl Machi3mfl moved this from In Review to In Progress in Release 4.4.0 Oct 17, 2022
@Machi3mfl Machi3mfl self-assigned this Oct 17, 2022
@Machi3mfl
Copy link
Member

For testing

Check the new SCA Lastest scans table in the Agent Dashboard

  1. Select Agent and go to Agent Dashboard
  2. Check table style in the SCA: Lastest scans card.
  3. Click on the table row and check if redirect to the SCA > Inventory to the selected policy.

Check the SCA > Inventory behavior

  1. Select Agent and go to Agent Dashboard
  2. Click on the SCA title in the Header navigation ( SCA > Inventory)
  3. Check the Policies table is rendered on the Inventory Tab.
  4. Click in the Policy Table Row and check if is redirected to the Policy Checks view

@Machi3mfl Machi3mfl moved this from In Progress to In Review in Release 4.4.0 Oct 18, 2022
@Machi3mfl
Copy link
Member

Machi3mfl commented Oct 19, 2022

I added a new issue to treat and improve the current implementation: Refactor Agent SCA Inventory.
This issue will be fixed with the linked Pull Request but we need the refactor to improve the code readability, reusability, and performance. (It's not a UI refactor)

@Machi3mfl Machi3mfl moved this from In Review to In Progress in Release 4.4.0 Oct 20, 2022
@Machi3mfl Machi3mfl moved this from In Progress to In Review in Release 4.4.0 Oct 20, 2022
@Machi3mfl
Copy link
Member

Machi3mfl commented Oct 20, 2022

Video showing the new design and navigation

Screencast.2022-10-20.12.05.45.mp4

Video showing the SCA: Lastest scan with pagination

Screencast.2022-10-20.11.44.37.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants