From 553751b338a0c159301da4a0327080976039e197 Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Moreno Date: Tue, 27 Jul 2021 16:33:15 -0300 Subject: [PATCH 1/9] feat(cuztomize) new functionality to change app logos --- common/constants.ts | 5 ++++- public/assets/icon_blue.svg | 2 +- public/assets/logotype.svg | 2 +- .../container/health-check.container.tsx | 2 +- public/components/wz-menu/wz-menu.js | 5 +---- public/components/wz-menu/wz-menu.scss | 1 - public/styles/common.scss | 1 - public/utils/config-equivalences.js | 19 ++++++++++++++++--- 8 files changed, 24 insertions(+), 13 deletions(-) diff --git a/common/constants.ts b/common/constants.ts index 32403f55de..f885d7d4c0 100644 --- a/common/constants.ts +++ b/common/constants.ts @@ -170,7 +170,10 @@ export const WAZUH_DEFAULT_APP_CONFIG = { 'alerts.sample.prefix': WAZUH_SAMPLE_ALERT_PREFIX, hideManagerAlerts: false, 'logs.level': 'info', - 'enrollment.dns': '' + 'enrollment.dns': '', + 'customization.logo.app':'/plugins/wazuh/assets/logotype.svg', + 'customization.logo.sidebar':'/plugins/wazuh/assets/logotype.svg', + 'customization.logo.healthcheck':'/plugins/wazuh/assets/icon_blue.svg' }; // Wazuh errors diff --git a/public/assets/icon_blue.svg b/public/assets/icon_blue.svg index 0697247304..131410b093 100644 --- a/public/assets/icon_blue.svg +++ b/public/assets/icon_blue.svg @@ -1 +1 @@ -wazuh_blue_iso \ No newline at end of file +wazuh_blue_iso \ No newline at end of file diff --git a/public/assets/logotype.svg b/public/assets/logotype.svg index 62598ec0e3..c313d82b76 100644 --- a/public/assets/logotype.svg +++ b/public/assets/logotype.svg @@ -1,6 +1,6 @@ - + wazuh_blue_full copia diff --git a/public/components/health-check/container/health-check.container.tsx b/public/components/health-check/container/health-check.container.tsx index 442e0f0ac7..cf025a144c 100644 --- a/public/components/health-check/container/health-check.container.tsx +++ b/public/components/health-check/container/health-check.container.tsx @@ -167,7 +167,7 @@ function HealthCheckComponent() { setChecksReady(prev => ({...prev, [checkID]: isReady})); } - const logoUrl = getHttp().basePath.prepend('/plugins/wazuh/assets/icon_blue.svg'); + const logoUrl = appConfig.data['customization.logo.healthcheck']; const thereAreErrors = Object.keys(checkErrors).length > 0; const renderChecks = () => { diff --git a/public/components/wz-menu/wz-menu.js b/public/components/wz-menu/wz-menu.js index 2c8f69b162..23dfb5098d 100644 --- a/public/components/wz-menu/wz-menu.js +++ b/public/components/wz-menu/wz-menu.js @@ -700,7 +700,6 @@ export const WzMenu = withWindowSize(class WzMenu extends Component { this.setState({ isSelectorsPopoverOpen: !this.state.isSelectorsPopoverOpen }) } - render() { const currentAgent = store.getState().appStateReducers.currentAgentData; const thereAreSelectors = this.thereAreSelectors(); @@ -900,8 +899,6 @@ export const WzMenu = withWindowSize(class WzMenu extends Component { ); - - const logotype_url = getHttp().basePath.prepend('/plugins/wazuh/assets/logotype.svg'); const mainButton = ( + {this.state.menuOpened && ( diff --git a/public/components/wz-menu/wz-menu.scss b/public/components/wz-menu/wz-menu.scss index 4338677f07..c00b22b36b 100644 --- a/public/components/wz-menu/wz-menu.scss +++ b/public/components/wz-menu/wz-menu.scss @@ -77,7 +77,6 @@ wz-menu { .navBarLogo { width: 100px; - filter: brightness(0) saturate(100%) invert(24%) sepia(97%) saturate(1757%) hue-rotate(186deg) brightness(94%) contrast(101%); } .wz-menu-popover{ diff --git a/public/styles/common.scss b/public/styles/common.scss index 1aca2a5c9c..2d675a82e5 100644 --- a/public/styles/common.scss +++ b/public/styles/common.scss @@ -1081,7 +1081,6 @@ wz-xml-file-editor { height: 80px; margin-bottom: 20px; z-index: 1; - filter: brightness(0) saturate(100%) invert(24%) sepia(97%) saturate(1757%) hue-rotate(186deg) brightness(94%) contrast(101%); margin-left: -100px; } diff --git a/public/utils/config-equivalences.js b/public/utils/config-equivalences.js index 0326020e6c..a5104586fe 100644 --- a/public/utils/config-equivalences.js +++ b/public/utils/config-equivalences.js @@ -1,5 +1,8 @@ export const configEquivalences = { pattern: 'Default index pattern to use on the app.', + 'customization.logo.app':'Define the path to the app logo', + 'customization.logo.sidebar':'Define the path to the sidebar logo', + 'customization.logo.healthcheck':'Define the path to the health-check logo', 'checks.pattern': 'Enable or disable the index pattern health check when opening the app.', 'checks.template': @@ -73,6 +76,9 @@ export const configEquivalences = { export const nameEquivalence = { pattern: 'Index pattern', + 'customization.logo.app': 'Logo App', + 'customization.logo.sidebar': 'Logo Sidebar', + 'customization.logo.healthcheck': 'Logo Health Check', 'checks.pattern': 'Index pattern', 'checks.template': 'Index template', 'checks.api': 'API connection', @@ -109,12 +115,16 @@ export const nameEquivalence = { const HEALTH_CHECK = 'Health Check'; const GENERAL = 'General'; const SECURITY = 'Security'; -const MONITORING = 'Monitoring' -const STATISTICS = 'Statistics' -export const categoriesNames = [HEALTH_CHECK, GENERAL, SECURITY, MONITORING, STATISTICS,]; +const MONITORING = 'Monitoring'; +const STATISTICS = 'Statistics'; +const CUSTOMIZATION = 'Logo Customization'; +export const categoriesNames = [HEALTH_CHECK, GENERAL, SECURITY, MONITORING, STATISTICS, CUSTOMIZATION]; export const categoriesEquivalence = { pattern: GENERAL, + 'customization.logo.app':CUSTOMIZATION, + 'customization.logo.sidebar':CUSTOMIZATION, + 'customization.logo.healthcheck':CUSTOMIZATION, 'checks.pattern': HEALTH_CHECK, 'checks.template': HEALTH_CHECK, 'checks.api': HEALTH_CHECK, @@ -156,6 +166,9 @@ const INTERVAL = 'interval' export const formEquivalence = { pattern: { type: TEXT }, + 'customization.logo.app': { type: TEXT }, + 'customization.logo.sidebar': { type: TEXT }, + 'customization.logo.healthcheck': { type: TEXT }, 'checks.pattern': { type: BOOLEAN }, 'checks.template': { type: BOOLEAN }, 'checks.api': { type: BOOLEAN }, From 4e5889237f1da34cc4629666bf7724115c049b81 Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Moreno Date: Wed, 28 Jul 2021 17:54:53 -0300 Subject: [PATCH 2/9] feat(customization) Added functionality to change the sidebar logo --- common/constants.ts | 3 ++- public/plugin.ts | 7 +++++++ public/services/resolves/get-config.js | 3 +++ server/controllers/wazuh-api.ts | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/common/constants.ts b/common/constants.ts index f885d7d4c0..e1b5194d37 100644 --- a/common/constants.ts +++ b/common/constants.ts @@ -97,6 +97,7 @@ export const WAZUH_CONFIGURATION_SETTINGS_NEED_HEALTH_CHECK = [ ]; export const WAZUH_CONFIGURATION_SETTINGS_NEED_RELOAD = [ 'hideManagerAlerts', + 'customization.logo.sidebar' ]; // Reserved ids for Users/Role mapping @@ -172,7 +173,7 @@ export const WAZUH_DEFAULT_APP_CONFIG = { 'logs.level': 'info', 'enrollment.dns': '', 'customization.logo.app':'/plugins/wazuh/assets/logotype.svg', - 'customization.logo.sidebar':'/plugins/wazuh/assets/logotype.svg', + 'customization.logo.sidebar':'/plugins/wazuh/assets/icon_blue.png', 'customization.logo.healthcheck':'/plugins/wazuh/assets/icon_blue.svg' }; diff --git a/public/plugin.ts b/public/plugin.ts index cc664376b9..ebd4cf35b2 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -64,6 +64,13 @@ export class WazuhPlugin implements Plugin { + debugger + return { category: { + id: 'wazuh', + label: 'Wazuh', + order: 0, + euiIconType: core.http.basePath.prepend( response.logoSidebar), + }} if(response.isWazuhDisabled) unmount(); return { status: response.isWazuhDisabled } }) diff --git a/public/services/resolves/get-config.js b/public/services/resolves/get-config.js index eaef3fc064..392d2b2a2a 100644 --- a/public/services/resolves/get-config.js +++ b/public/services/resolves/get-config.js @@ -68,6 +68,9 @@ export async function getWzConfig($q, genericReq, wazuhConfig) { 'logs.level': 'info', 'enrollment.dns': '', 'enrollment.password': '', + 'customization.logo.app':'/plugins/wazuh/assets/logotype.svg', + 'customization.logo.sidebar':'/plugins/wazuh/assets/icon_blue.png', + 'customization.logo.healthcheck':'/plugins/wazuh/assets/icon_blue.svg' }; try { diff --git a/server/controllers/wazuh-api.ts b/server/controllers/wazuh-api.ts index 1d8fb153bf..ddc2a3f316 100644 --- a/server/controllers/wazuh-api.ts +++ b/server/controllers/wazuh-api.ts @@ -1056,13 +1056,14 @@ export class WazuhApiCtrl { try { const disabledRoles = ( await getConfiguration() )['disabled_roles'] || []; + const logoSidebar = ( await getConfiguration() )['customization.logo.sidebar'] || []; const wazuhSecurity = SecurityObj(context.wazuh.plugins); const data = (await wazuhSecurity.getCurrentUser(request, context)).authContext; const isWazuhDisabled = +(data.roles || []).some((role) => disabledRoles.includes(role)); return response.ok({ - body: { isWazuhDisabled } + body: { isWazuhDisabled, logoSidebar } }); } catch (error) { log('wazuh-api:isWazuhDisabled', error.message || error); From 8b7365a252c96a62ac98de7241a0826173b05b74 Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Moreno Date: Thu, 29 Jul 2021 11:45:52 -0300 Subject: [PATCH 3/9] feat(customization) modified path --- common/constants.ts | 6 +++--- .../health-check/container/health-check.container.tsx | 2 +- public/components/wz-menu/wz-menu.js | 2 +- public/plugin.ts | 3 +-- public/services/resolves/get-config.js | 6 +++--- public/utils/config-equivalences.js | 6 +++--- server/lib/initial-wazuh-config.ts | 11 +++++++++++ 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/common/constants.ts b/common/constants.ts index e1b5194d37..87c8a2a4c2 100644 --- a/common/constants.ts +++ b/common/constants.ts @@ -172,9 +172,9 @@ export const WAZUH_DEFAULT_APP_CONFIG = { hideManagerAlerts: false, 'logs.level': 'info', 'enrollment.dns': '', - 'customization.logo.app':'/plugins/wazuh/assets/logotype.svg', - 'customization.logo.sidebar':'/plugins/wazuh/assets/icon_blue.png', - 'customization.logo.healthcheck':'/plugins/wazuh/assets/icon_blue.svg' + 'customization.logo.app':'logotype.svg', + 'customization.logo.sidebar':'icon_blue.png', + 'customization.logo.healthcheck':'icon_blue.svg' }; // Wazuh errors diff --git a/public/components/health-check/container/health-check.container.tsx b/public/components/health-check/container/health-check.container.tsx index cf025a144c..51d39a10b7 100644 --- a/public/components/health-check/container/health-check.container.tsx +++ b/public/components/health-check/container/health-check.container.tsx @@ -167,7 +167,7 @@ function HealthCheckComponent() { setChecksReady(prev => ({...prev, [checkID]: isReady})); } - const logoUrl = appConfig.data['customization.logo.healthcheck']; + const logoUrl = `/plugins/wazuh/assets/${appConfig.data['customization.logo.healthcheck']}` const thereAreErrors = Object.keys(checkErrors).length > 0; const renderChecks = () => { diff --git a/public/components/wz-menu/wz-menu.js b/public/components/wz-menu/wz-menu.js index 23dfb5098d..10e77a574c 100644 --- a/public/components/wz-menu/wz-menu.js +++ b/public/components/wz-menu/wz-menu.js @@ -907,7 +907,7 @@ export const WzMenu = withWindowSize(class WzMenu extends Component { style={{ paddingTop: 2 }} > - + {this.state.menuOpened && ( diff --git a/public/plugin.ts b/public/plugin.ts index ebd4cf35b2..3b906cadb9 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -64,12 +64,11 @@ export class WazuhPlugin implements Plugin { - debugger return { category: { id: 'wazuh', label: 'Wazuh', order: 0, - euiIconType: core.http.basePath.prepend( response.logoSidebar), + euiIconType: core.http.basePath.prepend( `/plugins/wazuh/assets/${response.logoSidebar}`), }} if(response.isWazuhDisabled) unmount(); return { status: response.isWazuhDisabled } diff --git a/public/services/resolves/get-config.js b/public/services/resolves/get-config.js index 392d2b2a2a..811653d13f 100644 --- a/public/services/resolves/get-config.js +++ b/public/services/resolves/get-config.js @@ -68,9 +68,9 @@ export async function getWzConfig($q, genericReq, wazuhConfig) { 'logs.level': 'info', 'enrollment.dns': '', 'enrollment.password': '', - 'customization.logo.app':'/plugins/wazuh/assets/logotype.svg', - 'customization.logo.sidebar':'/plugins/wazuh/assets/icon_blue.png', - 'customization.logo.healthcheck':'/plugins/wazuh/assets/icon_blue.svg' + 'customization.logo.app':'logotype.svg', + 'customization.logo.sidebar':'icon_blue.png', + 'customization.logo.healthcheck':'icon_blue.svg' }; try { diff --git a/public/utils/config-equivalences.js b/public/utils/config-equivalences.js index a5104586fe..c6063bb58c 100644 --- a/public/utils/config-equivalences.js +++ b/public/utils/config-equivalences.js @@ -1,8 +1,8 @@ export const configEquivalences = { pattern: 'Default index pattern to use on the app.', - 'customization.logo.app':'Define the path to the app logo', - 'customization.logo.sidebar':'Define the path to the sidebar logo', - 'customization.logo.healthcheck':'Define the path to the health-check logo', + 'customization.logo.app':'Define the name of the app logo saved in the path /plugins/wazuh/assets/', + 'customization.logo.sidebar':'Define the name of the sidebar logo saved in the path /plugins/wazuh/assets/', + 'customization.logo.healthcheck':'Define the name of the health-check logo saved in the path /plugins/wazuh/assets/', 'checks.pattern': 'Enable or disable the index pattern health check when opening the app.', 'checks.template': diff --git a/server/lib/initial-wazuh-config.ts b/server/lib/initial-wazuh-config.ts index e2e6ae1671..21cf1963f1 100644 --- a/server/lib/initial-wazuh-config.ts +++ b/server/lib/initial-wazuh-config.ts @@ -164,6 +164,17 @@ export const initialWazuhConfig: string = `--- #cron.statistics.shards: 2 #cron.statistics.replicas: 0 # +# ------------------------------ wazuh-logo-customization ------------------------------- +# +#Define the name of the app logo saved in the path /plugins/wazuh/assets/ +#customization.logo.app: logotype.svg +# +#Define the name of the sideba logo saved in the path /plugins/wazuh/assets/ +#customization.logo.sidebar: icon_blue.png +# +#Define the name of the health-check logo saved in the path /plugins/wazuh/assets/ +#customization.logo.healthcheck: icon_blue.svg +# # ---------------------------- Hide manager alerts ------------------------------ # Hide the alerts of the manager in all dashboards and discover #hideManagerAlerts: false From 1b3aec352526e0858f095e737935278deb430e13 Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Moreno Date: Thu, 29 Jul 2021 12:07:10 -0300 Subject: [PATCH 4/9] Modified CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43d2a7cb5f..c2bbd894ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Added confirmation message when closing a form [#3221](https://github.com/wazuh/wazuh-kibana-app/pull/3221) - Improvement to hide navbar Wazuh label. [#3240](https://github.com/wazuh/wazuh-kibana-app/pull/3240) - Add modal creating new rule/decoder [#3274](https://github.com/wazuh/wazuh-kibana-app/pull/3274) +- New functionality to change app logos [#3503](https://github.com/wazuh/wazuh-kibana-app/pull/3503) ### Changed From 2983e487f0bf75645ff72de8e283bf4b577f3253 Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Moreno Date: Fri, 30 Jul 2021 13:37:39 -0300 Subject: [PATCH 5/9] feat(customization) Added functionality to change the Reports logo --- common/constants.ts | 3 ++- public/services/resolves/get-config.js | 3 ++- public/utils/config-equivalences.js | 4 ++++ server/lib/initial-wazuh-config.ts | 4 ++++ server/lib/reporting/printer.ts | 15 +++++++++------ 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/common/constants.ts b/common/constants.ts index 87c8a2a4c2..4be9f48e7a 100644 --- a/common/constants.ts +++ b/common/constants.ts @@ -174,7 +174,8 @@ export const WAZUH_DEFAULT_APP_CONFIG = { 'enrollment.dns': '', 'customization.logo.app':'logotype.svg', 'customization.logo.sidebar':'icon_blue.png', - 'customization.logo.healthcheck':'icon_blue.svg' + 'customization.logo.healthcheck':'icon_blue.svg', + 'customization.logo.reports':'logo.png' }; // Wazuh errors diff --git a/public/services/resolves/get-config.js b/public/services/resolves/get-config.js index 811653d13f..944c51bdfc 100644 --- a/public/services/resolves/get-config.js +++ b/public/services/resolves/get-config.js @@ -70,7 +70,8 @@ export async function getWzConfig($q, genericReq, wazuhConfig) { 'enrollment.password': '', 'customization.logo.app':'logotype.svg', 'customization.logo.sidebar':'icon_blue.png', - 'customization.logo.healthcheck':'icon_blue.svg' + 'customization.logo.healthcheck':'icon_blue.svg', + 'customization.logo.reports':'logo.png' }; try { diff --git a/public/utils/config-equivalences.js b/public/utils/config-equivalences.js index c6063bb58c..e0a438887e 100644 --- a/public/utils/config-equivalences.js +++ b/public/utils/config-equivalences.js @@ -3,6 +3,7 @@ export const configEquivalences = { 'customization.logo.app':'Define the name of the app logo saved in the path /plugins/wazuh/assets/', 'customization.logo.sidebar':'Define the name of the sidebar logo saved in the path /plugins/wazuh/assets/', 'customization.logo.healthcheck':'Define the name of the health-check logo saved in the path /plugins/wazuh/assets/', + 'customization.logo.reports':'Define the name of the reports logo (.png) saved in the path /plugins/wazuh/assets/', 'checks.pattern': 'Enable or disable the index pattern health check when opening the app.', 'checks.template': @@ -79,6 +80,7 @@ export const nameEquivalence = { 'customization.logo.app': 'Logo App', 'customization.logo.sidebar': 'Logo Sidebar', 'customization.logo.healthcheck': 'Logo Health Check', + 'customization.logo.reports': 'Logo Reports', 'checks.pattern': 'Index pattern', 'checks.template': 'Index template', 'checks.api': 'API connection', @@ -125,6 +127,7 @@ export const categoriesEquivalence = { 'customization.logo.app':CUSTOMIZATION, 'customization.logo.sidebar':CUSTOMIZATION, 'customization.logo.healthcheck':CUSTOMIZATION, + 'customization.logo.reports':CUSTOMIZATION, 'checks.pattern': HEALTH_CHECK, 'checks.template': HEALTH_CHECK, 'checks.api': HEALTH_CHECK, @@ -169,6 +172,7 @@ export const formEquivalence = { 'customization.logo.app': { type: TEXT }, 'customization.logo.sidebar': { type: TEXT }, 'customization.logo.healthcheck': { type: TEXT }, + 'customization.logo.reports': { type: TEXT }, 'checks.pattern': { type: BOOLEAN }, 'checks.template': { type: BOOLEAN }, 'checks.api': { type: BOOLEAN }, diff --git a/server/lib/initial-wazuh-config.ts b/server/lib/initial-wazuh-config.ts index 21cf1963f1..3f2a81f5e4 100644 --- a/server/lib/initial-wazuh-config.ts +++ b/server/lib/initial-wazuh-config.ts @@ -175,6 +175,10 @@ export const initialWazuhConfig: string = `--- #Define the name of the health-check logo saved in the path /plugins/wazuh/assets/ #customization.logo.healthcheck: icon_blue.svg # +# +#Define the name of the reports logo (.png) saved in the path /plugins/wazuh/assets/ +#customization.logo.reports: logo.png +# # ---------------------------- Hide manager alerts ------------------------------ # Hide the alerts of the manager in all dashboards and discover #hideManagerAlerts: false diff --git a/server/lib/reporting/printer.ts b/server/lib/reporting/printer.ts index ab0026ac8b..b3700daa44 100644 --- a/server/lib/reporting/printer.ts +++ b/server/lib/reporting/printer.ts @@ -9,12 +9,13 @@ import { } from '../../integration-files/visualizations'; import { log } from '../logger'; import * as TimSort from 'timsort'; +import { getConfiguration } from '../get-configuration'; const COLORS = { PRIMARY: '#00a9e5' }; -const pageConfiguration = { +const pageConfiguration = (nameLogo) => ({ styles: { h1: { fontSize: 22, @@ -52,7 +53,7 @@ const pageConfiguration = { margin: [40, 20, 0, 0], columns: [ { - image: path.join(__dirname, '../../../public/assets/logo.png'), + image: path.join(__dirname, `../../../public/assets/${nameLogo}`), width: 190 }, { @@ -96,7 +97,7 @@ const pageConfiguration = { } return false; } -}; +}); const fonts = { Roboto: { @@ -609,10 +610,12 @@ export class ReportPrinter{ ); } - async print(path: string){ - const document = this._printer.createPdfKitDocument({...pageConfiguration, content: this._content}); + async print(reportPath: string){ + const nameLogo = ( await getConfiguration() )['customization.logo.reports'] || 'logo.png' + + const document = this._printer.createPdfKitDocument({...pageConfiguration(nameLogo), content: this._content}); await document.pipe( - fs.createWriteStream(path) + fs.createWriteStream(reportPath) ); document.end(); } From 7662efe44686cea57971059558ee19365d4e4d32 Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Moreno Date: Fri, 30 Jul 2021 15:05:44 -0300 Subject: [PATCH 6/9] feat(customization) fix double return --- public/plugin.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/plugin.ts b/public/plugin.ts index 3b906cadb9..faa69b1e44 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -64,14 +64,18 @@ export class WazuhPlugin implements Plugin { - return { category: { + if (response.isWazuhDisabled) { + unmount(); + } + + return { + status: response.isWazuhDisabled, + category: { id: 'wazuh', label: 'Wazuh', order: 0, euiIconType: core.http.basePath.prepend( `/plugins/wazuh/assets/${response.logoSidebar}`), }} - if(response.isWazuhDisabled) unmount(); - return { status: response.isWazuhDisabled } }) return () => { unmount(); From 3f857f60dda2935bae57b5852d0c797c0189bf2a Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Moreno Date: Fri, 30 Jul 2021 16:47:27 -0300 Subject: [PATCH 7/9] feat(customization) fix path logo url --- .../health-check/container/health-check.container.tsx | 3 ++- public/components/wz-menu/wz-menu.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/components/health-check/container/health-check.container.tsx b/public/components/health-check/container/health-check.container.tsx index 51d39a10b7..8521178cdc 100644 --- a/public/components/health-check/container/health-check.container.tsx +++ b/public/components/health-check/container/health-check.container.tsx @@ -167,7 +167,8 @@ function HealthCheckComponent() { setChecksReady(prev => ({...prev, [checkID]: isReady})); } - const logoUrl = `/plugins/wazuh/assets/${appConfig.data['customization.logo.healthcheck']}` + + const logoUrl = getHttp().basePath.prepend(`/plugins/wazuh/assets/${appConfig.data['customization.logo.healthcheck']}`); const thereAreErrors = Object.keys(checkErrors).length > 0; const renderChecks = () => { diff --git a/public/components/wz-menu/wz-menu.js b/public/components/wz-menu/wz-menu.js index 10e77a574c..53bfb51a71 100644 --- a/public/components/wz-menu/wz-menu.js +++ b/public/components/wz-menu/wz-menu.js @@ -899,6 +899,7 @@ export const WzMenu = withWindowSize(class WzMenu extends Component { ); + const logotype_url = getHttp().basePath.prepend(`/plugins/wazuh/assets/${this.wazuhConfig.getConfig()['customization.logo.app']}`); const mainButton = (