-
Notifications
You must be signed in to change notification settings - Fork 52
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 Wazuh version and links #27
Conversation
b2961ed
to
ef48e4d
Compare
}, | ||
|
||
getWazuhDocVersion: () => { | ||
return this.state.wazuhVersion.slice(0, 3) || 'current'; |
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.
nitpick: I would recommend another approach to get the value. This approach returns an unexpected value when the major
or minor
number has more than 1 digit, for example, 4.10
or 10.0
.
suggestion: split by .
and join the first two elements.
return this.state.wazuhVersion.split('.').slice(0, 2).join('.') || 'current';
This should avoid possible future problems while using the version format of major.minor.patch
.
98d8a5a
to
e285cb9
Compare
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.
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.
Description
**Partially depends on #22 **
This pull request completes some of the changes applied in #22 to add the documentation links of Wazuh to the help menu. The OpenSearch's links are replaced.
The documentation links are generated to match the version of the app, meaning that a Wazuh Dashboard at version 4.4.1 will link to the documentation of that version (4.4).
The version of the app is also shown in the menu. The version of Wazuh is defined in the
package.json
file, the loaded during runtime and injected to the section of the main HTML file.This is how it looks with the changes from #22 also applied (which changes the texts).
The links generated are:
Issues Resolved
#18
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr