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

Email configuration is not visible in the interface #5516

Open
yenienserrano opened this issue May 30, 2023 · 1 comment
Open

Email configuration is not visible in the interface #5516

yenienserrano opened this issue May 30, 2023 · 1 comment
Labels
level/task Task issue type/bug Bug issue

Comments

@yenienserrano
Copy link
Member

Wazuh
4.x
Browser
Chrome, Firefox, Safari, etc

Description
The /manager/configuration/mail/global request is being made, but the Email settings data is not being rendered in the management/configuration/global configuration view.

The error is due to the fact that in the global-configuration-global.js file the currentConfig['mail-global'] fields are not being added to the mainSettingsConfig object or a new one is being created for the mail configuration.

The error comes from version 3.12.3 when ported from file: public/templates/management/configuration/global-configuration/global.html

Preconditions

  1. Have e-mail notifications configured

Steps to reproduce

  1. Navigate to management/configuration/global configuration
  2. See that only email notification = yes and see that the request /manager/configuration/mail/global returns data

Actual Result
1.
image

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here. Here you can paste log entries too or any other useful information that may help with the issue.

@yenienserrano yenienserrano added level/task Task issue type/bug Bug issue labels May 30, 2023
@JuanGarriuz JuanGarriuz self-assigned this Dec 16, 2024
@JuanGarriuz
Copy link
Member

JuanGarriuz commented Dec 16, 2024

Research

To solve the problem, it is necessary to add the data from currentConfig['mail-global'] to globalSettingsConfig, as this is where the email information is stored.

Image

plugins/main/public/controllers/management/components/management/configuration/global-configuration/global-configuration-global.js

    const globalSettingsConfig =
      agent.id === '000' &&
      currentConfig['analysis-global'] &&
      currentConfig['analysis-global'].global
        ? {
            ...currentConfig['analysis-global'].global,
            ...(currentConfig['mail-global'] &&
            currentConfig['mail-global'].global
              ? currentConfig['mail-global'].global
              : {}),
          }
        : {};

@JuanGarriuz JuanGarriuz removed their assignment Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
None yet
Development

No branches or pull requests

2 participants