diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e69f1130e..d46e33536d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ All notable changes to the Wazuh app project will be documented in this file. ### Changed -- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) +- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) - Develop logic of a new index for the fim module [#6227](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6227) - Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250) diff --git a/plugins/main/public/components/common/doc-viewer/doc-viewer.tsx b/plugins/main/public/components/common/doc-viewer/doc-viewer.tsx index c7ce052e16..70315ae2fc 100644 --- a/plugins/main/public/components/common/doc-viewer/doc-viewer.tsx +++ b/plugins/main/public/components/common/doc-viewer/doc-viewer.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import { escapeRegExp } from 'lodash'; import { i18n } from '@osd/i18n'; import { FieldIcon } from '../../../../../../src/plugins/opensearch_dashboards_react/public'; -import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; const COLLAPSE_LINE_LENGTH = 350; const DOT_PREFIX_RE = /(.).+?\./g; @@ -134,15 +134,10 @@ const DocViewer = (props: tDocViewerProps) => { {...fieldIconProps} /> - - - {displayName} - + + + {displayName} + @@ -156,7 +151,7 @@ const DocViewer = (props: tDocViewerProps) => { */ // eslint-disable-next-line react/no-danger dangerouslySetInnerHTML={{ __html: value as string }} - style={{ overflowY: 'auto' }} + style={{ overflowY: 'auto', wordBreak: 'break-all' }} /> diff --git a/plugins/main/public/components/common/hooks/index.ts b/plugins/main/public/components/common/hooks/index.ts index a4cd7dbf91..e3ce7584c7 100644 --- a/plugins/main/public/components/common/hooks/index.ts +++ b/plugins/main/public/components/common/hooks/index.ts @@ -28,4 +28,3 @@ export * from './use_async_action_run_on_start'; export { useEsSearch } from './use-es-search'; export { useValueSuggestion, IValueSuggestion } from './use-value-suggestion'; export * from './use-state-storage'; -export * from './useDockedSideNav'; diff --git a/plugins/main/public/components/common/hooks/useDockedSideNav.tsx b/plugins/main/public/components/common/hooks/useDockedSideNav.tsx deleted file mode 100644 index 489536b4d6..0000000000 --- a/plugins/main/public/components/common/hooks/useDockedSideNav.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { useEffect, useState } from 'react'; -import { getChrome } from '../../../kibana-services'; - -export const useDockedSideNav = () => { - const [sideNavDocked, setSideNavDocked] = useState(false); - - useEffect(() => { - const isNavDrawerSubscription = getChrome() - .getIsNavDrawerLocked$() - .subscribe((value: boolean) => { - setSideNavDocked(value); - }); - - return () => { - isNavDrawerSubscription.unsubscribe(); - }; - }, []); - - return sideNavDocked; -}; diff --git a/plugins/main/public/components/common/modules/modules-defaults.js b/plugins/main/public/components/common/modules/modules-defaults.js index 41f5391fe3..eacc114770 100644 --- a/plugins/main/public/components/common/modules/modules-defaults.js +++ b/plugins/main/public/components/common/modules/modules-defaults.js @@ -27,6 +27,7 @@ import { vulnerabilitiesColumns } from '../../overview/vulnerabilities/events/vu import { DashboardFim } from '../../overview/fim/dashboard/dashboard'; import { InventoryFim } from '../../overview/fim/inventory/inventory'; import React from 'react'; +import { amazonWebServicesColumns } from '../../overview/amazon-web-services/events/amazon-web-services-columns'; import { office365Columns } from '../../overview/office-panel/events/office-365-columns'; import { fileIntegrityMonitoringColumns } from '../../overview/fim/events/file-integrity-monitoring-columns'; import { configurationAssessmentColumns } from '../../agents/sca/events/configuration-assessment-columns'; @@ -99,7 +100,10 @@ export const ModulesDefaults = { }, aws: { init: 'dashboard', - tabs: [DashboardTab, EventsTab], + tabs: [ + DashboardTab, + renderDiscoverTab(DEFAULT_INDEX_PATTERN, amazonWebServicesColumns), + ], availableFor: ['manager', 'agent'], }, gcp: { diff --git a/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx b/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx index 8b72bb01e4..0eec91a272 100644 --- a/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx +++ b/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx @@ -37,7 +37,7 @@ import useSearchBar from '../search-bar/use-search-bar'; import { search } from '../search-bar'; import { getPlugins } from '../../../kibana-services'; import { histogramChartInput } from './config/histogram-chart'; -import { useDockedSideNav } from '../hooks/useDockedSideNav'; +import { getWazuhCorePlugin } from '../../../kibana-services'; const DashboardByRenderer = getPlugins().dashboard.DashboardContainerByValueRenderer; import './discover.scss'; @@ -60,7 +60,7 @@ const WazuhDiscoverComponent = (props: WazuhDiscoverProps) => { ); const [isSearching, setIsSearching] = useState(false); const [isExporting, setIsExporting] = useState(false); - const sideNavDocked = useDockedSideNav(); + const sideNavDocked = getWazuhCorePlugin().hooks.useDockedSideNav(); const onClickInspectDoc = useMemo( () => (index: number) => { diff --git a/plugins/main/public/components/overview/amazon-web-services/events/amazon-web-services-columns.tsx b/plugins/main/public/components/overview/amazon-web-services/events/amazon-web-services-columns.tsx new file mode 100644 index 0000000000..f8a901f748 --- /dev/null +++ b/plugins/main/public/components/overview/amazon-web-services/events/amazon-web-services-columns.tsx @@ -0,0 +1,16 @@ +import { tDataGridColumn } from '../../../common/data-grid'; + +export const amazonWebServicesColumns: tDataGridColumn[] = [ + { + id: 'data.aws.source', + }, + { + id: 'rule.description', + }, + { + id: 'rule.level', + }, + { + id: 'rule.id', + }, +];