Skip to content

Conversation

@yenienserrano
Copy link
Member

@yenienserrano yenienserrano commented Aug 13, 2025

Description

Creates a reusable header navigation control system that dynamically positions CTI subscription components based on the new home page setting.

Introduces a complete CTI subscription workflow with modal dialogs for registration and status checking, supporting both active and pending subscription states.

Registers the navigation control in the main plugin to display CTI subscription options in either the top-right or bottom-left position depending on UI configuration.

Evidence

image image image image image

Test

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

UI

Test Chrome Firefox Safari
The subscribe button must be rendered.
Clicking on it should open a modal with information and accept the subscription.
Accepting the subscription should open a new window with the subscription page.
When you return to the dashboard you should see another modal with information and check the status.
Check status should check whether the status has changed.
You have to see the subscription status where the subscribe button appeared.
The status must have a popover with the option to query the status.
With the new home should work but the button appears at the bottom left.

Details

⚫ The subscribe button must be rendered.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Clicking on it should open a modal with information and accept the subscription.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Accepting the subscription should open a new window with the subscription page.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ When you return to the dashboard you should see another modal with information and check the status.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check status should check whether the status has changed.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ You have to see the subscription status where the subscribe button appeared.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ The status must have a popover with the option to query the status.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ With the new home should work but the button appears at the bottom left.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

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

Creates a reusable header navigation control system that dynamically positions CTI subscription components based on the new home page setting.

Introduces a complete CTI subscription workflow with modal dialogs for registration and status checking, supporting both active and pending subscription states.

Registers the navigation control in the main plugin to display CTI subscription options in either the top-right or bottom-left position depending on UI configuration.
Implements real-time CTI subscription status checking by integrating with the Wazuh API instead of using mock data.

Creates new API endpoint to retrieve subscription information from cluster or manager nodes, automatically detecting cluster mode and querying the appropriate endpoint.

Refactors components to use async status checking and removes hardcoded status simulation, enabling dynamic status updates based on actual API responses.

Simplifies component props by removing unnecessary configuration parameters and centralizing status management logic.
Replaces static manager info responses with dynamic subscription status cycling through active, inactive, and processing states.

Implements stateful behavior using JavaScript controllers that rotate subscription status on each API call, enabling comprehensive testing of subscription state transitions in both manager and cluster node endpoints.

Removes outdated static response file and initializes subscription state as inactive for consistent test scenarios.
…g mechanism to automatically check registration status updates and improves the user experience by removing manual status refresh requirement.
@yenienserrano
Copy link
Member Author

Update 28/08

Added some error messages when API fails

Screen.Recording.2025-08-29.at.2.37.26.PM.mov

Updates the CTI (Cyber Threat Intelligence) registration status flow to use more descriptive terminology and improves the authentication process workflow.

Renames status values from generic terms to specific CTI authentication states:
- 'inactive' becomes 'pending' for initial state
- 'active' becomes 'available' for successful registration
- Introduces 'polling' for ongoing registration process
- Introduces 'denied' for failed registration attempts

Enhances mock data structure by replacing 'registration' field with 'wazuh_cti_auth' to better reflect the authentication context and adds descriptive details for each status state.

Improves status checking logic to handle the new workflow states and provides clearer user feedback through updated UI components.
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.

3 participants