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

[FIX] [TELEMETRY] Hide the banner #3709

Merged
merged 4 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

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

- Support for Kibana 7.13.4
- Support for Kibana 7.14.2
- Hide the `telemetry` banner [#3709](https://github.com/wazuh/wazuh-kibana-app/pull/3709)

### Fixed

Expand Down
3 changes: 2 additions & 1 deletion kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"savedObjects",
"kibanaReact",
"kibanaUtils",
"securityOss"
"securityOss",
"telemetry"
],
"optionalPlugins": [
"security",
Expand Down
9 changes: 7 additions & 2 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,16 @@ export class WazuhPlugin implements Plugin<WazuhSetup, WazuhStart, WazuhSetupPlu
return {};
}

public async start(core: CoreStart, plugins: AppPluginStartDependencies): Promise<WazuhStart> {
public start(core: CoreStart, plugins: AppPluginStartDependencies): WazuhStart {
// hide security alert
if(plugins.securityOss) {
plugins.securityOss.insecureCluster.hideAlert(true);
}
};

// hide the telemetry banner. Remove the banner from the UI and set the flag in the telemetry saved object as the notice was seen and dismissed
if(plugins?.telemetry?.telemetryNotifications?.setOptedInNoticeSeen) {
plugins.telemetry.telemetryNotifications.setOptedInNoticeSeen();
};

// we need to register the application service at setup, but to render it
// there are some start dependencies necessary, for this reason
Expand Down
4 changes: 3 additions & 1 deletion public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { NavigationPublicPluginStart } from '../../../src/plugins/navigation/pub
import { UiActionsSetup } from '../../../src/plugins/ui_actions/public';
import { SecurityOssPluginStart } from '../../../src/plugins/security_oss/public/';
import { SavedObjectsStart } from '../../../src/plugins/saved_objects/public';
import { TelemetryPluginStart } from '../../../src/plugins/telemetry/public';

export interface AppPluginStartDependencies {
navigation: NavigationPublicPluginStart;
Expand All @@ -15,7 +16,8 @@ export interface AppPluginStartDependencies {
discover: DiscoverStart;
charts: ChartsPluginStart
securityOss: SecurityOssPluginStart,
savedObjects: SavedObjectsStart
savedObjects: SavedObjectsStart,
telemetry: TelemetryPluginStart
}
export interface AppDependencies {
core: CoreStart;
Expand Down