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

Replace discover AWS #6288

Merged
merged 9 commits into from
Feb 15, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
17 changes: 6 additions & 11 deletions plugins/main/public/components/common/doc-viewer/doc-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -134,15 +134,10 @@ const DocViewer = (props: tDocViewerProps) => {
{...fieldIconProps}
/>
</EuiFlexItem>
<EuiFlexItem className='eui-textTruncate'>
<EuiToolTip
position='top'
content={displayName}
delay='long'
anchorClassName='eui-textTruncate'
>
<span>{displayName}</span>
</EuiToolTip>
<EuiFlexItem style={{ maxWidth: '25vw' }}>
<span style={{ wordBreak: 'break-all' }}>
<b>{displayName}</b>
</span>
</EuiFlexItem>
</EuiFlexGroup>
</td>
Expand All @@ -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' }}
/>
</td>
</tr>
Expand Down
1 change: 0 additions & 1 deletion plugins/main/public/components/common/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
20 changes: 0 additions & 20 deletions plugins/main/public/components/common/hooks/useDockedSideNav.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -99,7 +100,10 @@ export const ModulesDefaults = {
},
aws: {
init: 'dashboard',
tabs: [DashboardTab, EventsTab],
tabs: [
DashboardTab,
renderDiscoverTab(DEFAULT_INDEX_PATTERN, amazonWebServicesColumns),
],
availableFor: ['manager', 'agent'],
},
gcp: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -60,7 +60,7 @@ const WazuhDiscoverComponent = (props: WazuhDiscoverProps) => {
);
const [isSearching, setIsSearching] = useState<boolean>(false);
const [isExporting, setIsExporting] = useState<boolean>(false);
const sideNavDocked = useDockedSideNav();
const sideNavDocked = getWazuhCorePlugin().hooks.useDockedSideNav();

const onClickInspectDoc = useMemo(
() => (index: number) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
},
];
Loading