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

TypeError resolved #4362

Merged
merged 7 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to the Wazuh app project will be documented in this file.
### Fixed

- Fixed path in logo customization section [#4352](https://github.com/wazuh/wazuh-kibana-app/pull/4352)
- Fixed a TypeError in Firefox [#4362](https://github.com/wazuh/wazuh-kibana-app/pull/4362)
chantal-kelm marked this conversation as resolved.
Show resolved Hide resolved

## Wazuh v4.3.6 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4307

Expand Down
12 changes: 9 additions & 3 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class WazuhPlugin implements Plugin<WazuhSetup, WazuhStart, WazuhSetupPlu
private innerAngularInitialized: boolean = false;
private stateUpdater = new BehaviorSubject<AppUpdater>(() => ({}));
private hideTelemetryBanner?: () => void;

public setup(core: CoreSetup, plugins: WazuhSetupPlugins): WazuhSetup {
const UI_THEME = core.uiSettings.get('theme:darkMode') ? 'dark' : 'light';

Expand All @@ -46,14 +46,17 @@ export class WazuhPlugin implements Plugin<WazuhSetup, WazuhStart, WazuhSetupPlu
title: 'Wazuh',
icon: core.http.basePath.prepend(getThemeAssetURL('icon.svg', UI_THEME)),
mount: async (params: AppMountParameters) => {
try {
await core.http.get(`/api/check-wazuh`);
chantal-kelm marked this conversation as resolved.
Show resolved Hide resolved

if (!this.initializeInnerAngular) {
throw Error('Wazuh plugin method initializeInnerAngular is undefined');
}

// hide the telemetry banner.
// hide the telemetry banner.
// Set the flag in the telemetry saved object as the notice was seen and dismissed
this.hideTelemetryBanner && await this.hideTelemetryBanner();

setScopedHistory(params.history);
// Load application bundle
const { renderApp } = await import('./application');
Expand Down Expand Up @@ -92,6 +95,9 @@ export class WazuhPlugin implements Plugin<WazuhSetup, WazuhStart, WazuhSetupPlu
return () => {
unmount();
};
}catch(error){
console.debug(error);
}
chantal-kelm marked this conversation as resolved.
Show resolved Hide resolved
},
category: {
id: 'wazuh',
Expand Down