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

Create unique agents preview react component #6196

Conversation

lucianogorza
Copy link
Contributor

@lucianogorza lucianogorza commented Dec 6, 2023

Description

Replace the rendering of several agent preview components with a single React component on the angular template context.
Additionally, add a new page when there are no registered agents instead of redirecting to the page to register agents.

Issues Resolved

#6150

Evidence

With registered Agents: Go to Endpoints Summary -> Click Deploy new agent

Register agent from Endpoints Summary with Agents

With no registered Agents: Go to Endpoints Summary -> Click Deploy new agent

Register agent from Endpoints Summary

With no registered Agents: Go to Overview -> Click Add agent

Register agent from Overview

Generate commands for Linux

Linux

Generate commands for Windows

Windows

Generate commands for Mac

Mac

With no registered Agents and read only user: Go to Overview

image

With no registered Agents and read only user: Go to Endpoints Summary

image

With no registered Agents and read only user: Go to /app/endpoints-summary#/agents-preview/deploy

image

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

Guide to create read only user

https://documentation.wazuh.com/current/user-manual/user-administration/rbac.html#creating-and-setting-a-wazuh-read-only-user

Test Chrome Firefox Safari
With registered Agents: Go to Endpoints Summary -> Click Deploy new agent
With no registered Agents: Go to Endpoints Summary -> Click Deploy new agent
With no registered Agents: Go to Overview -> Click Add agent
Generate commands for Linux
Generate commands for Windows
Generate commands for Mac
With no registered Agents and read only user: Go to Overview
With no registered Agents and read only user: Go to Endpoints Summary
With no registered Agents and read only user: Go to /app/endpoints-summary#/agents-preview/deploy

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

@lucianogorza lucianogorza self-assigned this Dec 6, 2023
@lucianogorza lucianogorza linked an issue Dec 7, 2023 that may be closed by this pull request
6 tasks
@lucianogorza lucianogorza marked this pull request as ready for review December 12, 2023 14:26
@lucianogorza lucianogorza requested a review from a team as a code owner December 12, 2023 14:26
@yenienserrano
Copy link
Member

yenienserrano commented Dec 13, 2023

Test Chrome Firefox Safari
With registered Agents: Go to Endpoints Summary -> Click Deploy new agent 🟢
With no registered Agents: Go to Endpoints Summary -> Click Deploy new agent 🟢
With no registered Agents: Go to Overview -> Click Add agent 🟢
Generate commands for Linux 🟢
Generate commands for Windows 🟢
Generate commands for Mac 🟢
With no registered Agents and read only user: Go to Overview 🟢
With no registered Agents and read only user: Go to Endpoints Summary 🟢
With no registered Agents and read only user: Go to /app/endpoints-summary#/agents-preview/deploy 🟢
🟢 With registered Agents: Go to Endpoints Summary -> Click `Deploy new agent`

image

image

🟢 With no registered Agents: Go to Endpoints Summary -> Click `Deploy new agent`

image

image

🟢 With no registered Agents: Go to Overview -> Click `Add agent`

image

image

🟢 Generate commands for Linux

image

🟢 Generate commands for Windows

image

🟢 Generate commands for Mac

image

🟢 With no registered Agents and read only user: Go to `Overview`

image

🟢 With no registered Agents and read only user: Go to E`ndpoints Summary`

image

🟢 With no registered Agents and read only user: Go to `/app/endpoints-summary#/agents-preview/deploy`

image

@JuanGarriuz JuanGarriuz self-requested a review December 13, 2023 15:11
@JuanGarriuz
Copy link
Member

JuanGarriuz commented Dec 13, 2023

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

Guide to create read only user

https://documentation.wazuh.com/current/user-manual/user-administration/rbac.html#creating-and-setting-a-wazuh-read-only-user

Test Chrome Firefox Safari
With registered Agents: Go to Endpoints Summary -> Click Deploy new agent
With no registered Agents: Go to Endpoints Summary -> Click Deploy new agent
With no registered Agents: Go to Overview -> Click Add agent
Generate commands for Linux
Generate commands for Windows
Generate commands for Mac
With no registered Agents and read only user: Go to Overview
With no registered Agents and read only user: Go to Endpoints Summary
With no registered Agents and read only user: Go to /app/endpoints-summary#/agents-preview/deploy
🟢 With registered Agents: Go to Endpoints Summary -> Click `Deploy new agent`

image
image

🟢 With no registered Agents: Go to Endpoints Summary -> Click `Deploy new agent`

image

image

🟢 With no registered Agents: Go to Overview -> Click `Add agent`

image

image

🟢 Generate commands for Linux

image

🟢 Generate commands for Windows

image

🟢 Generate commands for Mac

image

🟢 With no registered Agents and read only user: Go to `Overview`

image

🟢 With no registered Agents and read only user: Go to E`ndpoints Summary`

image

🟢 With no registered Agents and read only user: Go to `/app/endpoints-summary#/agents-preview/deploy`

image

@lucianogorza lucianogorza force-pushed the enhancement/6150/create-unique-agents-preview-react-component branch from 7801d5b to d163ae1 Compare December 13, 2023 16:37
Copy link
Member

@JuanGarriuz JuanGarriuz left a comment

Choose a reason for hiding this comment

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

LGTM!!

@lucianogorza lucianogorza force-pushed the enhancement/6150/create-unique-agents-preview-react-component branch from 408cb34 to f4f7a31 Compare December 15, 2023 12:29
@lucianogorza lucianogorza force-pushed the enhancement/6129-new-endpoint-management-plugin branch from 4357c94 to 67c3e40 Compare December 15, 2023 12:33
Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.95% ( 167 / 217 )
Branches 54.63% ( 53 / 97 )
Functions 60.86% ( 28 / 46 )
Lines 76.95% ( 167 / 217 )

Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 21.38% ( 185 / 865 )
Branches 18.07% ( 79 / 437 )
Functions 14.22% ( 36 / 253 )
Lines 21.61% ( 182 / 842 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 11.6% ( 4051 / 34898 )
Branches 7.62% ( 1762 / 23108 )
Functions 11.08% ( 922 / 8321 )
Lines 11.79% ( 3938 / 33401 )

@lucianogorza lucianogorza merged commit 1fcc5a3 into enhancement/6129-new-endpoint-management-plugin Dec 15, 2023
4 checks passed
@lucianogorza lucianogorza deleted the enhancement/6150/create-unique-agents-preview-react-component branch December 15, 2023 13:58
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.

Create unique Agents preview React component
3 participants