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

Add initialization service #7145

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Desvelao
Copy link
Member

Description

This pull request adds the initialization service. This allows to initialize some configuration in the global tenant and provides a service and API to manage the tasks.

Issues Resolved

#7133

Evidence

[Provide screenshots or videos to prove this PR solves the issues]

Test

[Provide instructions to test this PR]

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

- Add initialization service
- Migrate frontend healthcheck tasks to run in the backend side through
  the initialization service
  - Check existence of index pattern: alerts
  - Check existence of index pattern: monitoring
  - Check existence of index pattern: statistics
  - Check existence of index pattern: vulnerabilities-states
  - Check defined template for alerts index pattern
  - Check Wazuh dashboard setting: metaFields
  - Check Wazuh dashboard setting: timeline:max_buckets
  - Check Wazuh dashboard setting: timepicker:timeDefaults
  - Check connection-compatibility with Wazuh server APIs
…tasks

- Add API endpoints to manage the initialization tasks
- Move injectected depencencies to get in each task
- Add scopes to differenciate where the task is called
@Desvelao Desvelao self-assigned this Nov 11, 2024
@Desvelao Desvelao linked an issue Nov 11, 2024 that may be closed by this pull request
2 tasks
Copy link
Contributor

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

Wazuh Fleet plugin code coverage (Jest) test % values
Statements 4.68% ( 9 / 192 )
Branches 16.66% ( 7 / 42 )
Functions 1.11% ( 1 / 90 )
Lines 4.76% ( 9 / 189 )

Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 39.47% ( 422 / 1069 )
Branches 39.08% ( 163 / 417 )
Functions 38.22% ( 138 / 361 )
Lines 39.77% ( 420 / 1056 )

Copy link
Contributor

Wazuh Engine plugin code coverage (Jest) test % values
Statements 8.63% ( 64 / 741 )
Branches 7.94% ( 22 / 277 )
Functions 1.87% ( 7 / 373 )
Lines 9.1% ( 64 / 703 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 13.4% ( 4040 / 30144 )
Branches 8.97% ( 1757 / 19571 )
Functions 12.96% ( 947 / 7304 )
Lines 13.56% ( 3938 / 29021 )

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 initialization plugin
1 participant