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

Added pinned agent mechanic to inventory data, stats, and configuration for consistent functionality #7135

Conversation

guidomodarelli
Copy link
Contributor

@guidomodarelli guidomodarelli commented Oct 29, 2024

Description

Inventory data, stats, and configuration must include the pinned agent mechanic.

image

Issues Resolved

Closes #7130

Evidence

Verify the presence of the "Pinned Agent" button

image

image

image

image

image

Changing the pinned agent in "Configuration" should alter the data.

Peek.2024-10-30.12-56.mp4

Changing the pinned agent in "Stats" should alter the data.

Peek.2024-10-30.15-49.mp4

Changing the pinned agent in "Inventory Data" should alter the data.

Software tab

Peek.2024-10-30.15-21.mp4

Network tab

Peek.2024-10-30.15-24.mp4

Processes tab

Peek.2024-10-30.15-26.mp4

Changing the pinned agent in "Inventory Data" should initiate a new request regarding the ribbon.

Peek.2024-10-30.14-50.mp4

[Update 2024/11/01] Upon unpinning the agent, you should be redirected to the PromptNoSelectedAgent page, and the breadcrumb to be updated accordingly.

Peek.2024-11-01.12-28.mp4

Tests

Verify the presence of the "Pinned Agent" button

  1. Go to Agents Management » Summary.
  2. Select any agent.
  3. Select "Inventory Data".
  4. Verify the presence of the "Pinned Agent" button.
  5. Select "Network".
  6. Verify the presence of the "Pinned Agent" button.
  7. Select to "Processes".
  8. Verify the presence of the "Pinned Agent" button.
  9. Return to the welcome page for agents.
  10. Select "Stats".
  11. Verify the presence of the "Pinned Agent" button.
  12. Return to the welcome page for agents.
  13. Select "Configuration".
  14. Verify the presence of the "Pinned Agent" button.

🟢 Unit tests

image


Clicking on unPinAgent should redirect you to the PromptNoSelectedAgent page, and the breadcrumb will be updated accordingly.

  1. Go to Agents Management » Summary.
  2. Select any agent.
  3. Click on unPinAgent.
  4. You should redirect to the PromptNoSelectedAgent page.
  5. The breadcrumb will be updated accordingly (Endpoints).
  6. Select any agent.
  7. The breadcrumb will be updated accordingly (Endpoints » {agent}).
  8. Select "Inventory Data".
  9. Select the "Software" tab.
  10. Click on unPinAgent.
  11. You should redirect to the PromptNoSelectedAgent page.
  12. The breadcrumb will be updated accordingly (Endpoints » {agent} » Inventory Data).
  13. Select any agent.
  14. Select "Inventory Data".
  15. Select the "Network" tab.
  16. Click on unPinAgent.
  17. You should redirect to the PromptNoSelectedAgent page.
  18. The breadcrumb will be updated accordingly (Endpoints » {agent} » Inventory Data).
  19. Select any agent.
  20. Select "Inventory Data".
  21. Select the "Processes" tab.
  22. Click on unPinAgent.
  23. You should redirect to the PromptNoSelectedAgent page.
  24. The breadcrumb will be updated accordingly (Endpoints » {agent} » Inventory Data).
  25. Select any agent.
  26. Select "Stats".
  27. Click on unPinAgent.
  28. You should redirect to the PromptNoSelectedAgent page.
  29. The breadcrumb will be updated accordingly (Endpoints » {agent} » Stats).
  30. Select any agent.
  31. Select "Configuration".
  32. Click on unPinAgent.
  33. You should redirect to the PromptNoSelectedAgent page.
  34. The breadcrumb will be updated accordingly (Endpoints » {agent} » Configuration).

Changing the pinned agent in "Configuration" should alter the data.

  1. Go to Agents Management » Summary.
  2. Select any agent.
  3. Select "Configuration".
  4. Change the pinned agent.
  5. Confirm that the data has been updated.

Changing the pinned agent in "Stats" should alter the data.

  1. Go to Agents Management » Summary.
  2. Select any agent.
  3. Select "Stats".
  4. Change the pinned agent.
  5. Confirm that the data has been updated.

🟢 Unit tests

image


Changing the pinned agent in "Inventory Data" should alter the data.

  1. Go to Agents Management » Summary.
  2. Select any agent.
  3. Select "Inventory Data".
  4. Change the pinned agent.
  5. Confirm that the data has been updated.

Warning

A new table appears with the Windows agent.

🟢 Unit tests

image


Changing the pinned agent in "Inventory Data" should initiate a new request regarding the ribbon.

  1. Go to Agents Management » Summary.
  2. Select any agent.
  3. Select "Inventory Data".
  4. Change the pinned agent.
  5. Confirm that the request has been made again.

🟢 Unit tests

image


Ensure that the line on the top bar is displayed across the entire bar, not just over the tabs.

BEFORE

image

AFTER

image

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

… enhanced agent interaction and updated layout consistency
@JuanGarriuz JuanGarriuz self-requested a review October 29, 2024 12:54
@Machi3mfl Machi3mfl self-requested a review October 29, 2024 15:45
asteriscos
asteriscos previously approved these changes Oct 29, 2024
Copy link
Member

@asteriscos asteriscos left a comment

Choose a reason for hiding this comment

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

CR: 🟢
Test: 🟢

Peek.2024-10-29.18-19.mp4

…abs for improved coverage and verification of UI functionality

refactor: enhance MainModuleAgent layout by adding margin and padding styles to EuiFlexItems for improved UI consistency
…nd code consistency in explore agent button component
asteriscos

This comment was marked as outdated.

Machi3mfl

This comment was marked as outdated.

chantal-kelm

This comment was marked as outdated.

@JuanGarriuz

This comment was marked as outdated.

JuanGarriuz

This comment was marked as outdated.

CHANGELOG.md Outdated Show resolved Hide resolved
@Desvelao
Copy link
Member

Desvelao commented Oct 30, 2024

In Inventory data view, changing the selected agent should fetch the inventory data for the new selected agent and this request is not done according to my tests. Could you review it?

image

EDIT:
Data should be fetched with the new agent selected in:

  • Inventory data
  • Stats
  • Configuration

@JuanGarriuz

This comment was marked as outdated.

@guidomodarelli guidomodarelli changed the title All pages must include the pinned agent mechanic Inventory data, stats and configuration must include the pinned agent mechanic Oct 30, 2024
…, stats, and configuration for consistency across pages
…nt for safer access to sorting fields when rendering table
…able rendering for different agent IDs in syscollector component
…ltiple syscollector table components during rendering
…s and rendering behavior for changing agent IDs
…le for clarity on data being fetched for given agent IDs
…and rendering behavior for different agent IDs
@Machi3mfl
Copy link
Member

@guidomodarelli Do you remove the endpoints summary redirect when unpinning an agent?

Screen.Recording.2024-11-01.at.5.58.16.PM.mov

@guidomodarelli
Copy link
Contributor Author

@guidomodarelli Do you remove the endpoints summary redirect when unpinning an agent?

Screen.Recording.2024-11-01.at.5.58.16.PM.mov

Yes, It's okay. It's to prevent flickering.

@JuanGarriuz
Copy link
Member

Test Updated

Grabacion.2024-10-29.094722.mp4

…ields in network tables for better readability
…and endpoint rendering in various system collector tables
Machi3mfl
Machi3mfl previously approved these changes Nov 4, 2024
@guidomodarelli guidomodarelli force-pushed the enhancement/7130-all-pages-must-include-the-pinned-agent-mechanic branch from b6507df to 924e8e6 Compare November 4, 2024 19:21
chantal-kelm
chantal-kelm previously approved these changes Nov 4, 2024
Copy link
Member

@chantal-kelm chantal-kelm left a comment

Choose a reason for hiding this comment

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

Grabacion.de.pantalla.2024-11-04.a.la.s.5.13.44.p.m.mov
Grabacion.de.pantalla.2024-11-04.a.la.s.5.12.59.p.m.mov

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Wazuh Core plugin code coverage (Jest) test % values
Statements 45.5% ( 400 / 879 )
Branches 41.09% ( 157 / 382 )
Functions 43.87% ( 136 / 310 )
Lines 45.69% ( 398 / 871 )

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.44% ( 172 / 225 )
Branches 58.65% ( 61 / 104 )
Functions 61.7% ( 29 / 47 )
Lines 76.44% ( 172 / 225 )

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Main plugin code coverage (Jest) test % values
Statements 14.93% ( 4443 / 29756 )
Branches 9.79% ( 1886 / 19255 )
Functions 14.69% ( 1056 / 7186 )
Lines 15.14% ( 4337 / 28628 )

@asteriscos asteriscos merged commit a20c60a into 4.10.0 Nov 5, 2024
5 checks passed
@asteriscos asteriscos deleted the enhancement/7130-all-pages-must-include-the-pinned-agent-mechanic branch November 5, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Added pinned agent mechanic to inventory data, stats, and configuration for consistent functionality
6 participants