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

Initialize Wazuh plugin with custom logos #4539

Merged
merged 4 commits into from
Sep 20, 2022

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Sep 16, 2022

Description

This PR fixes an issue when custom logos are configured, Wazuh default logos load first when the plugin initializes and afterwards the custom logos are loaded.

To fix this we created an endpoint to get the sidebar and the main custom logos configuration without the need to be authenticated. This endpoint is used just before the plugin initializes, so the proper logos are set up in the app mounting phase.

Closes #4538

Sample

Peek 2022-09-16 14-54

@asteriscos asteriscos added the 4.4 label Sep 16, 2022
@asteriscos asteriscos self-assigned this Sep 16, 2022
@AlexRuiz7 AlexRuiz7 linked an issue Sep 16, 2022 that may be closed by this pull request
@asteriscos asteriscos marked this pull request as ready for review September 16, 2022 15:44
Copy link
Contributor

@matiasmoreno876 matiasmoreno876 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR : LGTM ✅

Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: 🔴

Check suggestions

server/routes/wazuh-api.ts Outdated Show resolved Hide resolved
Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AlexRuiz7 AlexRuiz7 merged commit b9f7cf3 into 4.4-7.10 Sep 20, 2022
@AlexRuiz7 AlexRuiz7 deleted the fix/initialize-app-with-custom-logos-4538 branch September 20, 2022 12:21
@github-actions
Copy link
Contributor

The backport to 4.4-7.16 failed:

The process '/usr/bin/git' failed with exit code 1

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-4539-to-4.4-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b9f7cf3cc4d4a24bfc4f8995a8096226533dfad1
# Push it to GitHub
git push --set-upstream origin backport-4539-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 base branch is 4.4-7.16 and the compare/head branch is backport-4539-to-4.4-7.16.

@github-actions
Copy link
Contributor

The backport to 4.4-1.2-wzd failed:

The process '/usr/bin/git' failed with exit code 1

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-1.2-wzd 4.4-1.2-wzd
# Navigate to the new working tree
cd .worktrees/backport-4.4-1.2-wzd
# Create a new branch
git switch --create backport-4539-to-4.4-1.2-wzd
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b9f7cf3cc4d4a24bfc4f8995a8096226533dfad1
# Push it to GitHub
git push --set-upstream origin backport-4539-to-4.4-1.2-wzd
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-1.2-wzd

Then, create a pull request where the base branch is 4.4-1.2-wzd and the compare/head branch is backport-4539-to-4.4-1.2-wzd.

AlexRuiz7 pushed a commit that referenced this pull request Sep 20, 2022
* Create get-logos endpoint and initialize custom logos

* Update endpoint name

* Add Changelog

Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit b9f7cf3)
AlexRuiz7 added a commit that referenced this pull request Sep 20, 2022
* Create get-logos endpoint and initialize custom logos

* Update endpoint name

* Add Changelog

Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit b9f7cf3)

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
AlexRuiz7 pushed a commit that referenced this pull request Sep 20, 2022
* Create get-logos endpoint and initialize custom logos

* Update endpoint name

* Add Changelog

Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit b9f7cf3)
AlexRuiz7 added a commit that referenced this pull request Sep 20, 2022
* Create get-logos endpoint and initialize custom logos

* Update endpoint name

* Add Changelog

Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit b9f7cf3)

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
@AlexRuiz7
Copy link
Member

Backports successfully merged

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.

The custom logos are overlapped with Wazuh's at app start
3 participants