diff --git a/CHANGELOG.md b/CHANGELOG.md index a8eb6c2425..0a5c9f311f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to the Wazuh app project will be documented in this file. ### Fixed - Fixed an error with the commands in the Deploy new agent section for Oracle Linux 6+ agents [#5764](https://github.com/wazuh/wazuh-kibana-app/pull/5764) +- Fixed broken documentation links in `Management/Configuration` section [#5796](https://github.com/wazuh/wazuh-kibana-app/pull/5796) ## Wazuh v4.5.1 - OpenSearch Dashboards 2.6.0 - Revision 01 diff --git a/public/controllers/management/components/management/configuration/aws-s3/help-links.js b/public/controllers/management/components/management/configuration/aws-s3/help-links.js index 92876d18f6..c02b783b86 100644 --- a/public/controllers/management/components/management/configuration/aws-s3/help-links.js +++ b/public/controllers/management/components/management/configuration/aws-s3/help-links.js @@ -9,15 +9,17 @@ * * Find more information about this on the LICENSE file. */ -import { webDocumentationLink } from "../../../../../../../common/services/web_documentation"; +import { webDocumentationLink } from '../../../../../../../common/services/web_documentation'; export default [ { text: 'Using Wazuh to monitor AWS', - href: webDocumentationLink('amazon/index.html') + href: webDocumentationLink('cloud-security/amazon/index.html'), }, { text: 'Amazon S3 module reference', - href: webDocumentationLink('user-manual/reference/ossec-conf/wodle-s3.html') - } + href: webDocumentationLink( + 'user-manual/reference/ossec-conf/wodle-s3.html', + ), + }, ]; diff --git a/public/controllers/management/components/management/configuration/azure-logs/azure-logs.js b/public/controllers/management/components/management/configuration/azure-logs/azure-logs.js index bc37e599f1..f41b08b595 100644 --- a/public/controllers/management/components/management/configuration/azure-logs/azure-logs.js +++ b/public/controllers/management/components/management/configuration/azure-logs/azure-logs.js @@ -23,12 +23,14 @@ import { webDocumentationLink } from '../../../../../../../common/services/web_d const helpLinks = [ { text: 'Using Wazuh to monitor Azure', - href: webDocumentationLink('azure/index.html') + href: webDocumentationLink('cloud-security/azure/index.html'), }, { text: 'Azure reference', - href: webDocumentationLink('user-manual/reference/ossec-conf/wodle-azure-logs.html') - } + href: webDocumentationLink( + 'user-manual/reference/ossec-conf/wodle-azure-logs.html', + ), + }, ]; const mainSettings = [ @@ -40,8 +42,8 @@ const mainSettings = [ { field: 'interval', label: 'Interval between Azure-Logs executions' }, { field: 'run_on_start', - label: 'Run evaluation immediately when service is started' - } + label: 'Run evaluation immediately when service is started', + }, ]; const contentSettings = [ @@ -54,8 +56,8 @@ const contentSettings = [ { field: 'auth_path', label: - 'Path of the file that contains the application identifier and the application key' - } + 'Path of the file that contains the application identifier and the application key', + }, ]; class WzConfigurationAzure extends Component { @@ -87,12 +89,12 @@ class WzConfigurationAzure extends Component { {currentConfig && !this.wodleConfig['azure-logs'] && !isString(currentConfig['wmodules-wmodules']) && ( - + )} {currentConfig && this.wodleConfig['azure-logs'] && ( )} - ) + ), )} ) : null} diff --git a/public/controllers/management/components/management/configuration/docker-listener/docker-listener.js b/public/controllers/management/components/management/configuration/docker-listener/docker-listener.js index 07c02e3355..63f4d3c3ba 100644 --- a/public/controllers/management/components/management/configuration/docker-listener/docker-listener.js +++ b/public/controllers/management/components/management/configuration/docker-listener/docker-listener.js @@ -18,7 +18,7 @@ import { isString, renderValueOrDefault, renderValueNoThenEnabled, - renderValueOrYes + renderValueOrYes, } from '../utils/utils'; import withWzConfig from '../util-hocs/wz-config'; @@ -28,35 +28,39 @@ import { webDocumentationLink } from '../../../../../../../common/services/web_d const helpLinks = [ { text: 'Monitoring containers activity', - href: webDocumentationLink('container-security/docker-monitor/monitoring-containers-activity.html') + href: webDocumentationLink( + 'user-manual/capabilities/container-security/use-cases.html', + ), }, { text: 'Docker listener module reference', - href: webDocumentationLink('user-manual/reference/ossec-conf/wodle-docker.html') - } + href: webDocumentationLink( + 'user-manual/reference/ossec-conf/wodle-docker.html', + ), + }, ]; const mainSettings = [ { field: 'disabled', label: 'Docker listener status', - render: renderValueNoThenEnabled + render: renderValueNoThenEnabled, }, { field: 'attempts', label: 'Number of attempts to execute the listener', - render: renderValueOrDefault('5') + render: renderValueOrDefault('5'), }, { field: 'interval', label: 'Waiting time to rerun the listener in case it fails', - render: renderValueOrDefault('10m') + render: renderValueOrDefault('10m'), }, { field: 'run_on_start', label: 'Run the listener immediately when service is started', - render: renderValueOrYes - } + render: renderValueOrYes, + }, ]; class WzConfigurationDockerListener extends Component { @@ -64,7 +68,7 @@ class WzConfigurationDockerListener extends Component { super(props); this.wodleConfig = wodleBuilder( this.props.currentConfig, - 'docker-listener' + 'docker-listener', ); } componentDidMount() { @@ -91,12 +95,12 @@ class WzConfigurationDockerListener extends Component { {currentConfig && !this.wodleConfig['docker-listener'] && !isString(currentConfig['wmodules-wmodules']) && ( - + )} {currentConfig && this.wodleConfig['docker-listener'] && ( { - const wodleConfiguration = useMemo(() => wodleBuilder(currentConfig, 'github'), [currentConfig]); - - useEffect(() => { - updateBadge(currentConfig && - wodleConfiguration && - wodleConfiguration['github'] && - wodleConfiguration['github'].enabled === 'yes'); - }, [currentConfig]); +export const WzConfigurationGitHub = withWzConfig(sections)( + ({ currentConfig, updateBadge, ...rest }) => { + const wodleConfiguration = useMemo( + () => wodleBuilder(currentConfig, 'github'), + [currentConfig], + ); - return ( - - - - - - - - - ) -}); + useEffect(() => { + updateBadge( + currentConfig && + wodleConfiguration && + wodleConfiguration['github'] && + wodleConfiguration['github'].enabled === 'yes', + ); + }, [currentConfig]); + return ( + + + + + + + + + ); + }, +); const tabWrapper = compose( - withGuard(({currentConfig}) => currentConfig['wmodules-wmodules'] && isString(currentConfig['wmodules-wmodules']), ({currentConfig}) => ), - withGuard(({wodleConfiguration}) => !wodleConfiguration['github'], (props) => ), + withGuard( + ({ currentConfig }) => + currentConfig['wmodules-wmodules'] && + isString(currentConfig['wmodules-wmodules']), + ({ currentConfig }) => ( + + ), + ), + withGuard( + ({ wodleConfiguration }) => !wodleConfiguration['github'], + props => , + ), ); -const GeneralTab = tabWrapper(({agent, wodleConfiguration}) => ( +const GeneralTab = tabWrapper(({ agent, wodleConfiguration }) => ( ( + /> )); - - -const CredentialsTab = tabWrapper(({agent, wodleConfiguration}) => { - const credentials = useMemo(() => settingsListBuilder( - wodleConfiguration['github'].api_auth, - 'org_name' - ), [wodleConfiguration]); +const CredentialsTab = tabWrapper(({ agent, wodleConfiguration }) => { + const credentials = useMemo( + () => + settingsListBuilder(wodleConfiguration['github'].api_auth, 'org_name'), + [wodleConfiguration], + ); return ( { settings={columns} /> - ) + ); }); diff --git a/public/controllers/management/components/management/configuration/google-cloud-pub-sub/google-cloud-pub-sub.js b/public/controllers/management/components/management/configuration/google-cloud-pub-sub/google-cloud-pub-sub.js index 7b908ab6a6..bca9622964 100644 --- a/public/controllers/management/components/management/configuration/google-cloud-pub-sub/google-cloud-pub-sub.js +++ b/public/controllers/management/components/management/configuration/google-cloud-pub-sub/google-cloud-pub-sub.js @@ -1,5 +1,3 @@ - - import React, { Component, Fragment } from 'react'; import WzConfigurationSettingsTabSelector from '../util-components/configuration-settings-tab-selector'; @@ -10,34 +8,33 @@ import withWzConfig from '../util-hocs/wz-config'; import { wodleBuilder } from '../utils/builders'; -import { - renderValueYesThenEnabled, - isString -} from '../utils/utils'; +import { renderValueYesThenEnabled, isString } from '../utils/utils'; import { webDocumentationLink } from '../../../../../../../common/services/web_documentation'; const helpLinks = [ { text: 'Using Wazuh to monitor GCP services', - href: webDocumentationLink('gcp/index.html') + href: webDocumentationLink('cloud-security/gcp/index.html'), }, { text: 'Google Cloud Pub/Sub module reference', - href: webDocumentationLink('user-manual/reference/ossec-conf/gcp-pubsub.html') - } + href: webDocumentationLink( + 'user-manual/reference/ossec-conf/gcp-pubsub.html', + ), + }, ]; const mainSettings = [ { field: 'enabled', label: 'Google Cloud Pub/Sub integration status', - render: renderValueYesThenEnabled + render: renderValueYesThenEnabled, }, { field: 'project_id', label: 'Project ID' }, { field: 'subscription_name', label: 'Subscription to read from' }, { field: 'credentials_file', - label: 'Path of the credentials file' + label: 'Path of the credentials file', }, { field: 'logging', label: 'Logging level' }, { field: 'max_messages', label: 'Maximum messages pulled in each iteration' }, @@ -48,7 +45,7 @@ const mainSettings = [ { field: 'time', label: 'Time of the day to fetch logs' }, ]; -class WzConfigurationGoogleCloudPubSub extends Component{ +class WzConfigurationGoogleCloudPubSub extends Component { constructor(props) { super(props); this.wodleConfig = wodleBuilder(this.props.currentConfig, 'gcp-pubsub'); @@ -63,7 +60,7 @@ class WzConfigurationGoogleCloudPubSub extends Component{ this.wodleConfig['gcp-pubsub'].enabled === 'yes' ); } - render(){ + render() { const { currentConfig } = this.props; return ( @@ -75,14 +72,14 @@ class WzConfigurationGoogleCloudPubSub extends Component{ /> )} {currentConfig && - !this.wodleConfig['gcp-pubsub'] && + !this.wodleConfig['gcp-pubsub'] && !isString(currentConfig['wmodules-wmodules']) && ( - - )} + + )} {currentConfig && this.wodleConfig['gcp-pubsub'] && ( )} - ) + ); } } diff --git a/public/controllers/management/components/management/configuration/integrations/integrations.js b/public/controllers/management/components/management/configuration/integrations/integrations.js index f76db6110a..cd0d0c5985 100644 --- a/public/controllers/management/components/management/configuration/integrations/integrations.js +++ b/public/controllers/management/components/management/configuration/integrations/integrations.js @@ -16,7 +16,7 @@ import { WzConfigurationSettingsHeaderViewer } from '../util-components/configur import WzNoConfig from '../util-components/no-config'; import { WzSettingsViewer } from '../util-components/code-viewer'; import WzViewSelector, { - WzViewSelectorSwitch + WzViewSelectorSwitch, } from '../util-components/view-selector'; import WzConfigurationSettingsGroup from '../util-components/configuration-settings-group'; import withWzConfig from '../util-hocs/wz-config'; @@ -26,28 +26,32 @@ import { webDocumentationLink } from '../../../../../../../common/services/web_d const helpLinks = [ { text: 'Integration with external APIs', - href: webDocumentationLink('user-manual/manager/manual-integration.html') + href: webDocumentationLink('user-manual/manager/manual-integration.html'), }, { text: 'VirusTotal integration', - href: webDocumentationLink('user-manual/capabilities/virustotal-scan/index.html') + href: webDocumentationLink( + 'user-manual/capabilities/malware-detection/virus-total-integration.html', + ), }, { text: 'Integration reference', - href: webDocumentationLink('user-manual/reference/ossec-conf/integration.html') - } + href: webDocumentationLink( + 'user-manual/reference/ossec-conf/integration.html', + ), + }, ]; const defaultIntegrations = [ { title: 'Slack', description: 'Get alerts directly on Slack' }, { title: 'VirusTotal', - description: 'Get notified when malicious software is found' + description: 'Get notified when malicious software is found', }, { title: 'PagerDuty', - description: 'Get alerts on this streamlined incident resolution software' - } + description: 'Get alerts on this streamlined incident resolution software', + }, ]; const integrationsSettings = [ @@ -57,16 +61,16 @@ const integrationsSettings = [ { field: 'group', label: 'Filter alerts by these rule groupst' }, { field: 'event_location', - label: 'Filter alerts by location (agent, IP address or file)' + label: 'Filter alerts by location (agent, IP address or file)', }, - { field: 'alert_format', label: 'Used format to write alerts' } + { field: 'alert_format', label: 'Used format to write alerts' }, ]; class WzConfigurationIntegrations extends Component { constructor(props) { super(props); this.state = { - view: '' + view: '', }; } changeView(view) { @@ -75,7 +79,7 @@ class WzConfigurationIntegrations extends Component { buildIntegration(integration) { return ( defaultIntegrations.find( - i => i.title && i.title.toLocaleLowerCase() === integration + i => i.title && i.title.toLocaleLowerCase() === integration, ) || { title: capitalize(integration), description: 'Custom integration' } ); } @@ -110,7 +114,7 @@ class WzConfigurationIntegrations extends Component { integrations.map((integrationInfo, key) => { const integration = Object.assign( this.buildIntegration(integrationInfo.name), - integrationInfo + integrationInfo, ); return ( @@ -137,9 +141,9 @@ class WzConfigurationIntegrations extends Component { ); })} - + this.changeView('')} json={() => this.changeView('json')} @@ -147,14 +151,14 @@ class WzConfigurationIntegrations extends Component { help={helpLinks} /> - + this.changeView('')} json={() => this.changeView('json')} @@ -162,7 +166,7 @@ class WzConfigurationIntegrations extends Component { help={helpLinks} /> diff --git a/public/controllers/management/components/management/configuration/inventory/inventory.js b/public/controllers/management/components/management/configuration/inventory/inventory.js index f3472b8598..9073852932 100644 --- a/public/controllers/management/components/management/configuration/inventory/inventory.js +++ b/public/controllers/management/components/management/configuration/inventory/inventory.js @@ -24,10 +24,10 @@ const mainSettings = [ { field: 'disabled', label: 'Syscollector integration status', - render: renderValueNoThenEnabled + render: renderValueNoThenEnabled, }, { field: 'interval', label: 'Interval between system scans' }, - { field: 'scan-on-start', label: 'Scan on start' } + { field: 'scan-on-start', label: 'Scan on start' }, ]; const scanSettings = [ @@ -37,18 +37,22 @@ const scanSettings = [ { field: 'packages', label: 'Scan installed packages' }, { field: 'network', label: 'Scan network interfaces' }, { field: 'ports', label: 'Scan listening network ports' }, - { field: 'ports_all', label: 'Scan all network ports' } + { field: 'ports_all', label: 'Scan all network ports' }, ]; const helpLinks = [ { text: 'System inventory', - href: webDocumentationLink('user-manual/capabilities/syscollector.html') + href: webDocumentationLink( + 'user-manual/capabilities/system-inventory/index.html', + ), }, { text: 'Syscollector module reference', - href: webDocumentationLink('user-manual/reference/ossec-conf/wodle-syscollector.html') - } + href: webDocumentationLink( + 'user-manual/reference/ossec-conf/wodle-syscollector.html', + ), + }, ]; class WzConfigurationInventory extends Component { @@ -80,12 +84,12 @@ class WzConfigurationInventory extends Component { {currentConfig && !this.wodleConfig.syscollector && !isString(currentConfig['wmodules-wmodules']) && ( - + )} {currentConfig && this.wodleConfig && this.wodleConfig.syscollector && ( diff --git a/public/controllers/management/components/management/configuration/office365/components/SubscriptionTab/__snapshots__/SubscriptionTab.test.tsx.snap b/public/controllers/management/components/management/configuration/office365/components/SubscriptionTab/__snapshots__/SubscriptionTab.test.tsx.snap index f8a679939c..9eb8de9f73 100644 --- a/public/controllers/management/components/management/configuration/office365/components/SubscriptionTab/__snapshots__/SubscriptionTab.test.tsx.snap +++ b/public/controllers/management/components/management/configuration/office365/components/SubscriptionTab/__snapshots__/SubscriptionTab.test.tsx.snap @@ -60,7 +60,7 @@ exports[`SubscriptionTab component renders correctly to match the snapshot 1`] = helpLinks={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { @@ -76,7 +76,7 @@ exports[`SubscriptionTab component renders correctly to match the snapshot 1`] = help={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { @@ -238,7 +238,7 @@ exports[`SubscriptionTab component renders correctly to match the snapshot 1`] = links={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { diff --git a/public/controllers/management/components/management/configuration/office365/components/api-auth-tab/__snapshots__/api-auth-tab.test.tsx.snap b/public/controllers/management/components/management/configuration/office365/components/api-auth-tab/__snapshots__/api-auth-tab.test.tsx.snap index ff206b16db..82dc37bc03 100644 --- a/public/controllers/management/components/management/configuration/office365/components/api-auth-tab/__snapshots__/api-auth-tab.test.tsx.snap +++ b/public/controllers/management/components/management/configuration/office365/components/api-auth-tab/__snapshots__/api-auth-tab.test.tsx.snap @@ -70,7 +70,7 @@ exports[`ApiAuthTab component renders correctly to match the snapshot 1`] = ` helpLinks={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { @@ -86,7 +86,7 @@ exports[`ApiAuthTab component renders correctly to match the snapshot 1`] = ` help={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { @@ -248,7 +248,7 @@ exports[`ApiAuthTab component renders correctly to match the snapshot 1`] = ` links={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { diff --git a/public/controllers/management/components/management/configuration/office365/components/general-tab/__snapshots__/general-tab.test.tsx.snap b/public/controllers/management/components/management/configuration/office365/components/general-tab/__snapshots__/general-tab.test.tsx.snap index 95982582db..75e30f1e6e 100644 --- a/public/controllers/management/components/management/configuration/office365/components/general-tab/__snapshots__/general-tab.test.tsx.snap +++ b/public/controllers/management/components/management/configuration/office365/components/general-tab/__snapshots__/general-tab.test.tsx.snap @@ -61,7 +61,7 @@ exports[`GeneralTab component renders correctly to match the snapshot 1`] = ` helpLinks={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { @@ -78,7 +78,7 @@ exports[`GeneralTab component renders correctly to match the snapshot 1`] = ` help={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { @@ -258,7 +258,7 @@ exports[`GeneralTab component renders correctly to match the snapshot 1`] = ` links={ Array [ Object { - "href": "https://documentation.wazuh.com/4.5/office365/index.html", + "href": "https://documentation.wazuh.com/4.5/cloud-security/office365/index.html", "text": "Using Wazuh to monitor Office 365", }, Object { diff --git a/public/controllers/management/components/management/configuration/office365/constants.tsx b/public/controllers/management/components/management/configuration/office365/constants.tsx index 8d47070a6d..4115565af6 100644 --- a/public/controllers/management/components/management/configuration/office365/constants.tsx +++ b/public/controllers/management/components/management/configuration/office365/constants.tsx @@ -10,17 +10,19 @@ * Find more information about this on the LICENSE file. */ -import { webDocumentationLink } from "../../../../../../../common/services/web_documentation"; +import { webDocumentationLink } from '../../../../../../../common/services/web_documentation'; export const OFFICE_365 = 'office365'; export const WMODULES_WMODULES = 'wmodules-wmodules'; export const HELP_LINKS = [ { text: 'Using Wazuh to monitor Office 365', - href: webDocumentationLink('office365/index.html'), + href: webDocumentationLink('cloud-security/office365/index.html'), }, { text: 'Configuration options for the module', - href: webDocumentationLink('user-manual/reference/ossec-conf/office365-module.html'), + href: webDocumentationLink( + 'user-manual/reference/ossec-conf/office365-module.html', + ), }, ];