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 Wazuh version and links #27

Merged
merged 6 commits into from
Apr 27, 2023
Merged

Add Wazuh version and links #27

merged 6 commits into from
Apr 27, 2023

Conversation

AlexRuiz7
Copy link
Member

@AlexRuiz7 AlexRuiz7 commented Feb 20, 2023

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).

image

The links generated are:

Issues Resolved

#18

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@AlexRuiz7 AlexRuiz7 self-assigned this Feb 20, 2023
@AlexRuiz7 AlexRuiz7 linked an issue Feb 20, 2023 that may be closed by this pull request
@AlexRuiz7 AlexRuiz7 changed the title Add Wazuh metadata (version) to package.json Add Wazuh version and links Apr 19, 2023
},

getWazuhDocVersion: () => {
return this.state.wazuhVersion.slice(0, 3) || 'current';
Copy link
Member

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.

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

Screenshots

image

image

image

image

@chantal-kelm chantal-kelm self-requested a review April 27, 2023 15:45
Copy link
Member

@chantal-kelm chantal-kelm 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: ✅

Captura de pantalla 2023-04-27 a la(s) 12 42 27

@asteriscos asteriscos merged commit fc05131 into 2.4.1 Apr 27, 2023
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.

Replace documentation links with Wazuh's
5 participants