diff --git a/plugins/main/public/components/common/wazuh-data-grid/wz-data-grid.tsx b/plugins/main/public/components/common/wazuh-data-grid/wz-data-grid.tsx index 6f01fe5ee9..e5c135e883 100644 --- a/plugins/main/public/components/common/wazuh-data-grid/wz-data-grid.tsx +++ b/plugins/main/public/components/common/wazuh-data-grid/wz-data-grid.tsx @@ -30,6 +30,7 @@ import { DocumentViewTableAndJson } from '../wazuh-discover/components/document- import DiscoverDataGridAdditionalControls from '../wazuh-discover/components/data-grid-additional-controls'; import './wazuh-data-grid.scss'; import { wzDiscoverRenderColumns } from '../wazuh-discover/render-columns'; +import DocDetailsHeader from '../wazuh-discover/components/doc-details-header'; export const MAX_ENTRIES_PER_QUERY = 10000; @@ -180,7 +181,10 @@ const WazuhDataGrid = (props: tWazuhDataGridProps) => { setInspectedHit(undefined)} size='m'> -

Document Details

+
diff --git a/plugins/main/public/components/common/wazuh-discover/components/doc-details-header.tsx b/plugins/main/public/components/common/wazuh-discover/components/doc-details-header.tsx new file mode 100644 index 0000000000..6e961cfe26 --- /dev/null +++ b/plugins/main/public/components/common/wazuh-discover/components/doc-details-header.tsx @@ -0,0 +1,51 @@ +import React from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiLink } from '@elastic/eui'; +import { RedirectAppLinks } from '../../../../../../../src/plugins/opensearch_dashboards_react/public'; +import { getCore } from '../../../../kibana-services'; +import NavigationService from '../../../../react-services/navigation-service'; + +const DocDetailsHeader = ({ doc, indexPattern }) => { + return ( + + + +

Document Details

+
+
+ + + + + + View surrounding documents + + + + + + + View single document + + + + + +
+ ); +}; + +export default DocDetailsHeader; 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 af14c9f6cc..8e5ee43d35 100644 --- a/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx +++ b/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx @@ -43,6 +43,7 @@ import { import DiscoverDataGridAdditionalControls from './components/data-grid-additional-controls'; import { wzDiscoverRenderColumns } from './render-columns'; import { WzSearchBar } from '../search-bar'; +import DocDetailsHeader from './components/doc-details-header'; export const MAX_ENTRIES_PER_QUERY = 10000; @@ -267,9 +268,10 @@ const WazuhDiscoverComponent = (props: WazuhDiscoverProps) => { {inspectedHit && ( setInspectedHit(undefined)} size='m'> - -

Document Details

-
+
diff --git a/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx b/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx index 2e31c0fc10..f35725346f 100644 --- a/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx +++ b/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx @@ -55,6 +55,8 @@ import { useReportingCommunicateSearchContext } from '../../../common/hooks/use- import { wzDiscoverRenderColumns } from '../../../common/wazuh-discover/render-columns'; import { WzSearchBar } from '../../../common/search-bar'; +import DocDetailsHeader from '../../../common/wazuh-discover/components/doc-details-header'; + const plugins = getPlugins(); const DashboardByRenderer = plugins.dashboard.DashboardContainerByValueRenderer; @@ -332,9 +334,10 @@ const DashboardTH: React.FC = () => { {inspectedHit && ( setInspectedHit(undefined)} size='m'> - -

Document details

-
+