-
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
Change message for API version mismatch in Kibana #4529
Merged
Tostti
merged 12 commits into
4.4-7.10
from
feature/Enhance-mismatch-API-plugin-message-ES
Sep 26, 2022
Merged
Change message for API version mismatch in Kibana #4529
Tostti
merged 12 commits into
4.4-7.10
from
feature/Enhance-mismatch-API-plugin-message-ES
Sep 26, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
AlexRuiz7
reviewed
Sep 26, 2022
Mayons95
approved these changes
Sep 26, 2022
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.
AlexRuiz7
approved these changes
Sep 26, 2022
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-7.16 4.4-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.4-7.16
# Create a new branch
git switch --create backport-4529-to-4.4-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 28370ee826292a40f658ac0f36791e8a7dec773a
# Push it to GitHub
git push --set-upstream origin backport-4529-to-4.4-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-7.16 Then, create a pull request where the |
7 tasks
1 task
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #4299
Important information
On PR #4103, a method was changed to request the API endpoint. Only for testing purposes of this particular issue, it is possible to replace line 50 of
server/lib/api-interceptor.ts
with the following:method: !!authContext ? 'POST' : 'GET',
to avoid getting an error due to a not allowed method and trigger the desired error.Changes made:
PLUGIN_APP_NAME
constant to make the message match the same structure as in Wazuh Dashboard, for easier modifications in the future.addTagsToUrl
function onhealth-check-container.tsx
and modified the displayed error message to use that function.addTagsToUrl
This function receives a string and returns it with the next modifications:
<something> guide: <URL>
, it will modify that part to return<something> guide
wrapped in <a> tags with the href pointing to the URL.guide:
before it, it will wrap the URL in <a> tags.Before the changes:
After the changes:
Tests
Scenario: have an environment with different versions of Wazuh API and Wazuh app, in which the major and minor are not the same.
When the user opens the Wazuh plugin
Then the health-check confirmation should show an error on
Check Wazuh API Version
And the log message should contain a URL to the Elasticsearch troubleshooting section of Wazuh Documentation.
And the log message should not contain any <a> tags or HTML structure
And the message shown at the bottom should contain a clickable link to the Elasticsearch troubleshooting section of Wazuh Documentation.
Scenario: have an environment with different versions of Wazuh API and Wazuh app, in which the major and minor are not the same.
When the user forces a health check in debug mode
Then the health-check confirmation should show an error on
Check Wazuh API Version
And the log message should contain a URL to the Elasticsearch troubleshooting section of Wazuh Documentation.
And the log message should not contain any <a> tags or HTML structure
And the message shown at the bottom should contain a clickable link to the Elasticsearch troubleshooting section of Wazuh Documentation.