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 the GitHub and Office 365 module visibility configuration were not kept when changing the plugin #5376

Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 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.

- Added rel="noopener noreferrer" in documentation links. [#5197](https://github.com/wazuh/wazuh-kibana-app/pull/5197) [#5274](https://github.com/wazuh/wazuh-kibana-app/pull/5274) [#5298](https://github.com/wazuh/wazuh-kibana-app/pull/5298)
- Added `ignore` and `restrict` options to Syslog configuration. [#5203](https://github.com/wazuh/wazuh-kibana-app/pull/5203)
- Added the `extensions.github` and `extensions.office` settings to the default configuration file [#5376](https://github.com/wazuh/wazuh-kibana-app/pull/5376)
Desvelao marked this conversation as resolved.
Show resolved Hide resolved
- Added new global error treatment (client-side) [#4163](https://github.com/wazuh/wazuh-kibana-app/pull/4163)

### Changed
Expand All @@ -23,6 +24,8 @@ All notable changes to the Wazuh app project will be documented in this file.
- Handling endpoint response was done when there is no data to show [#4918](https://github.com/wazuh/wazuh-kibana-app/pull/4918)
- Fixed references to Elasticsearch in Wazuh-stack plugin [4894](https://github.com/wazuh/wazuh-kibana-app/pull/4894)
- Fixed the 2 errors that appeared in console in Settings>Configuration section. [#5135](https://github.com/wazuh/wazuh-kibana-app/pull/5135)
- Fixed the GitHub and Office 365 module visibility configuration for each API host was not kept when changing/upgrading the plugin [#5376](https://github.com/wazuh/wazuh-kibana-app/pull/5376)
- Fixed the GitHub and Office 365 modules appear in the main menu when they were not configured [#5376](https://github.com/wazuh/wazuh-kibana-app/pull/5376)
- Fixed TypeError in FIM Inventory using new error handler [#5364](https://github.com/wazuh/wazuh-kibana-app/pull/5364)

## Wazuh v4.4.1 - OpenSearch Dashboards 2.6.0 - Revision 01
Expand Down
52 changes: 50 additions & 2 deletions common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export const PLUGIN_SETTINGS_CATEGORIES: { [category: number]: TPluginSettingCat
},
[SettingCategory.STATISTICS]: {
title: 'Task:Statistics',
description: "Options related to the daemons manager monitoring job and their storage in indexes..",
description: "Options related to the daemons manager monitoring job and their storage in indexes.",
renderOrder: SettingCategory.STATISTICS,
},
[SettingCategory.CUSTOMIZATION]: {
Expand Down Expand Up @@ -1355,8 +1355,32 @@ export const PLUGIN_SETTINGS: { [key: string]: TPluginSetting } = {
return schema.boolean();
},
},
"extensions.github": {
title: "GitHub",
description: "Enable or disable the GitHub tab on Overview and Agents.",
category: SettingCategory.EXTENSIONS,
type: EpluginSettingType.switch,
defaultValue: false,
isConfigurableFromFile: true,
isConfigurableFromUI: false,
options: {
switch: {
values: {
disabled: { label: 'false', value: false },
enabled: { label: 'true', value: true },
}
}
},
uiFormTransformChangedInputValue: function (value: boolean | string): boolean {
return Boolean(value);
},
validate: SettingsValidator.isBoolean,
validateBackend: function(schema){
return schema.boolean();
},
},
"extensions.hipaa": {
title: "Hipaa",
title: "HIPAA",
description: "Enable or disable the HIPAA tab on Overview and Agents.",
category: SettingCategory.EXTENSIONS,
type: EpluginSettingType.switch,
Expand Down Expand Up @@ -1403,6 +1427,30 @@ export const PLUGIN_SETTINGS: { [key: string]: TPluginSetting } = {
return schema.boolean();
},
},
"extensions.office": {
title: "Office 365",
description: "Enable or disable the Office 365 tab on Overview and Agents.",
category: SettingCategory.EXTENSIONS,
type: EpluginSettingType.switch,
defaultValue: false,
isConfigurableFromFile: true,
isConfigurableFromUI: false,
options: {
switch: {
values: {
disabled: { label: 'false', value: false },
enabled: { label: 'true', value: true },
}
}
},
uiFormTransformChangedInputValue: function (value: boolean | string): boolean {
return Boolean(value);
},
validate: SettingsValidator.isBoolean,
validateBackend: function(schema){
return schema.boolean();
},
},
"extensions.oscap": {
title: "OSCAP",
description: "Enable or disable the Open SCAP tab on Overview and Agents.",
Expand Down
4 changes: 1 addition & 3 deletions server/start/initialize/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,7 @@ describe("[initialize] `wazuh-registry.json` created", () => {
if ( Object.keys(contentRegistryFile.hosts).length ){
Object.entries(contentRegistryFile.hosts).forEach(([hostID, hostData]) => {
if(hostData.extensions){
Object.entries(hostData.extensions).forEach(([extensionID, extensionEnabled]) => {
expect(extensionEnabled).toBe(contentRegistryExpected.hosts[hostID].extensions[extensionID])
});
expect(hostData.extensions).toEqual(contentRegistryExpected.hosts[hostID].extensions);
};
});
};
Expand Down