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 endpoints plugin and unique Endpoints Summary React component #6230

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

lucianogorza
Copy link
Contributor

@lucianogorza lucianogorza commented Dec 15, 2023

Description

  • Create new plugin wazuh-endpoints to manage the endpoint fleet page components. This issue is only for the plugin creation without any functionality.
  • 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

#6141
#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 and others added 3 commits December 15, 2023 09:32
* Create new plugin wazuh-endpoints

* Delete import

* Add github action to run plugin test

* Remove github action to run plugin test
* Create new plugin wazuh-endpoints (#6142)

* Create new plugin wazuh-endpoints

* Delete import

* Add github action to run plugin test

* Remove github action to run plugin test

* Create react component endpoints-preview

* Fix imports

* Delete AgentsPreview angular registration

* Replace div and className by Eui components

* Modularize agents preview component

* Refactorization agent preview and register agent components

* Fix unit tests

* Fix os-card unit test

* Replace Fleet with EndpointsSummary

* Delete register agent files from controller

* Move files Register agent services

* Delete commented code

* Manage register agent permissions

* Format files

* Format files

* Fix get stats data

* Change the auth configuration endpoint request

* Fix unit test

* Fix router

* Delete console.log
@lucianogorza lucianogorza self-assigned this Dec 15, 2023
@lucianogorza lucianogorza linked an issue Dec 15, 2023 that may be closed by this pull request
11 tasks
@lucianogorza lucianogorza removed a link to an issue Dec 15, 2023
11 tasks
@lucianogorza lucianogorza changed the title Enhancement/6129 new endpoint management plugin Create endpoints plugin and unique Endpoints Summary React component Dec 15, 2023
@lucianogorza lucianogorza marked this pull request as ready for review December 15, 2023 20:35
@lucianogorza lucianogorza requested a review from a team as a code owner December 15, 2023 20:35
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

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

Main plugin code coverage (Jest) test % values
Statements 11.6% ( 4051 / 34904 )
Branches 7.62% ( 1762 / 23108 )
Functions 11.07% ( 922 / 8322 )
Lines 11.78% ( 3938 / 33407 )

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.

LGTM

@jbiset jbiset self-requested a review December 18, 2023 19:42
Copy link
Member

@jbiset jbiset 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 🟢

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 🟢
Test details

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

Evidence_1.webm

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

Evidence_2.webm

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

Evidence_3.webm

Generate commands for Linux 🟢

Evidence_4

Generate commands for Windows 🟢

Evidence_5

Generate commands for Mac 🟢

Evidence_6

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

Evidence_7

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

Evidence_8

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

Evidence_9

@Machi3mfl Machi3mfl merged commit 01cbd74 into master Dec 19, 2023
4 checks passed
@Machi3mfl Machi3mfl deleted the enhancement/6129-new-endpoint-management-plugin branch December 19, 2023 12:59
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.

4 participants