-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add Fleet Management > Agents view #7283
base: main
Are you sure you want to change the base?
Add Fleet Management > Agents view #7283
Conversation
- Copy the register-agent folder from wazuh plugin to wazuh-fleet - Add the webDocumentationLink and form components/hook to register-agent copy - Register minimal Fleet management app to display the register agent assistant view
Added: - Added inputs to match with the `wazuh-agent` cli: - Input to manage the username - Input to manage the password - Input to manage the SSL verification mode - Input to manage the key (This key must have 32 alphanumeric characters validation) - Added new step "Server credentials" to define the username and password - Added tests for the new inputs Changed: - Changed the generation of command to install and enroll the agent - Changed the validation of "Assign a server address" input - Changed the placeholder of "Assign a server address" input - Changed the description of "Server address" step to indicate the usage of URL instead of raw IP or FQDNS Removed: - Groups management was removed because the current Wazuh agent enrollment does not support the definition of these. - Removed groups form input - Removed fetch information about available groups - Removed fetch information about authentication password provided through the Wazuh server API - Removed fetch information about protocol provided through the Wazuh server API - Temporally: - The command to download the package were temporaly removed because the packages are not publically hosted. A warning message was added to inform about this.
…hancement/517-create-agent-management-apps
…hancement/517-create-agent-management-apps
…sons The setting is saved in the advanced settings (tenant configuration) and is visible to each user with read permissions in the tenant. So we remove the setting to avoid other users can see the value. The user should indicate the username and password each time the enroll agent assistant is used.
… enhancement/514-add-enrollment-agent-assistant
…hancement/517-create-agent-management-apps
…ckage type options - Extract package type options into a constant array for better maintainability - Simplify toast handling by directly using `getToasts().addInfo` and `getToasts().addDanger` - Rename `handleOnSave` to `handleSave` for consistency
…ate functions Improve code maintainability by breaking down complex rendering logic into smaller, reusable functions such as `renderAgentsAccordion`, `renderErrorCallout`, and `AgentGroupActionResult`. This reduces redundancy and enhances readability.
- Replace ambiguous types with specific type imports from Elastic UI and Wazuh Core - Split `results` state into `items` and `total` for better clarity - Remove unused `TDocumentDetailsTab` interface - Update `setParams` to use explicit types for filters and query
…leSave Refactor the `reloadAgents` callback to invoke the `reloadAgents` function instead of an empty function. Rename `handleOnSave` to `handleSave` for consistency and clarity. Additionally, centralize error messages in `EditAgentNameModal` to improve maintainability.
…to separate components Improve code maintainability by breaking down the large component into smaller, more focused components for handling agents data and upgrade tasks
The `handleOnSave` function was renamed to `handleSave` for consistency and clarity. Additionally, the logic for processing agents was extracted into a separate `processAgent` function to improve readability and maintainability. This change does not alter the behavior of the code.
This commit relocates the `transformDateRange` function from the search-service to a dedicated utils module for better code organization and reusability. The function is now exported from the utils index and used in the search-bar component, reducing redundancy and improving maintainability.
Replace the generic 'any' type with the specific 'IAgentResponse' type in the agent details component to improve type safety and maintainability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: ✅
Test: ✅
Screen.Recording.2025-03-20.at.3.48.58.PM.mov
Move the NavigationService implementation to wazuh-core and update all references to use the service from wazuh-core. This change improves code maintainability by centralizing the navigation logic and reducing redundancy across the codebase.
Refactor the pre-commit hook to handle cases where no files are staged, improving clarity and reducing unnecessary checks. Also, update the output messages for better readability.
The `interface.ts` file in the search-bar component was deleted as it was no longer used in the codebase. This change helps in maintaining a cleaner and more efficient project structure by removing unnecessary files.
This change introduces an `isValid` flag to the validation state, improving clarity and consistency when checking if the agent name is valid. The flag is used in the Enter key handler to determine if the save action should proceed.
Renames error message object for clarity Updates references to new object name in validation logic
Extracts agent name length constraints into constants for reusability. Updates validation logic to use new constants.
Removes redundant isInvalid state property to streamline validation logic. Updates related condition checks to use !isValid instead.
Legend: TestingVisualizations interaction 🟢Screen.Recording.2025-03-25.103733.mp4Search bar interaction 🟢Screen.Recording.2025-03-25.104217.mp4Screen.Recording.2025-03-25.105244.mp4Bulk actions 🟢Screen.Recording.2025-03-25.105644.mp4Agent Actions 🟢Screen.Recording.2025-03-25.110101.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🟢
…for clarity Rename `getVisTopAgentByNode` to `getVisStatus` for better readability and reorder the visualization functions in the `getKPIsPanel` method to match the updated naming convention. This improves code maintainability and consistency.
e8bba67
|
|
|
Description
Adds rendering of fleet management summary and detail views
Added the script to generate sample data of
wazuh-agents*
with this templateIssues Resolved
Evidence
Edit group
Screen.Recording.2025-02-20.at.5.34.53.PM.mov
Test
Check that the interface is visible, you can add sample data of the agents from the script (The table is using information from the indexer but the other actions are mocked up.)
Check List