From 2b42c03358c440ee4f41ffc0f3bcb184a07d7303 Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra Date: Tue, 16 Jul 2024 15:26:21 -0300 Subject: [PATCH 1/6] Add document details header component with links --- .../components/doc-details-header.tsx | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 plugins/main/public/components/common/wazuh-discover/components/doc-details-header.tsx 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..3e067b84e2 --- /dev/null +++ b/plugins/main/public/components/common/wazuh-discover/components/doc-details-header.tsx @@ -0,0 +1,54 @@ +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'; + +const DocDetailsHeader = ({ doc, indexPattern }) => { + return ( + + +

Document Details

+
+
+ + + + + + View surrounding documents + + + + + + + View single document + + + + + +
); + +} + +export default DocDetailsHeader; \ No newline at end of file From 30a98e2966491f886c72161410d96bf1e2b47098 Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra Date: Tue, 16 Jul 2024 15:26:46 -0300 Subject: [PATCH 2/6] Apply document header in flyout details --- .../common/wazuh-data-grid/wz-data-grid.tsx | 7 ++- .../common/wazuh-discover/wz-discover.tsx | 9 ++-- .../threat-hunting/dashboard/dashboard.tsx | 43 ++++++++++--------- 3 files changed, 35 insertions(+), 24 deletions(-) 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..f13eab5e1a 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 @@ -11,6 +11,7 @@ import { EuiTitle, EuiFlyoutBody, EuiFlexGroup, + EuiLink } from '@elastic/eui'; import { useDataGrid, exportSearchToCSV, tDataGridColumn } from '../data-grid'; import { getWazuhCorePlugin } from '../../../kibana-services'; @@ -30,6 +31,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 +182,10 @@ const WazuhDataGrid = (props: tWazuhDataGridProps) => { setInspectedHit(undefined)} size='m'> -

Document Details

+
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..39c0142c27 100644 --- a/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx +++ b/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx @@ -12,6 +12,7 @@ import { EuiFlyoutHeader, EuiTitle, EuiPanel, + EuiLink } from '@elastic/eui'; import { IntlProvider } from 'react-intl'; import { IndexPattern } from '../../../../../../src/plugins/data/common'; @@ -43,6 +44,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 +269,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..0ba8ce19c3 100644 --- a/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx +++ b/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useMemo } from 'react'; -import { getPlugins, getWazuhCorePlugin } from '../../../../kibana-services'; +import { getPlugins, getWazuhCorePlugin, getCore } from '../../../../kibana-services'; import { ViewMode } from '../../../../../../../src/plugins/embeddable/public'; import { SearchResponse } from '../../../../../../../src/core/server'; import { IndexPattern } from '../../../../../../../src/plugins/data/common'; @@ -19,6 +19,7 @@ import { EuiFlyoutHeader, EuiTitle, EuiButtonEmpty, + EuiLink } from '@elastic/eui'; import { ErrorFactory, @@ -55,6 +56,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; @@ -228,11 +231,10 @@ const DashboardTH: React.FC = () => { ) : null}
0 - ? '' - : 'wz-no-display' - }`} + className={`th-container ${!isDataSourceLoading && dataSource && results?.hits?.total > 0 + ? '' + : 'wz-no-display' + }`} >
@@ -293,20 +295,20 @@ const DashboardTH: React.FC = () => { {}} + onResetQuery={() => { }} tooltip={ results?.hits?.total && - results?.hits?.total > MAX_ENTRIES_PER_QUERY + results?.hits?.total > MAX_ENTRIES_PER_QUERY ? { - ariaLabel: 'Warning', - content: `The query results has exceeded the limit of ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits.`, - iconType: 'alert', - position: 'top', - } + ariaLabel: 'Warning', + content: `The query results has exceeded the limit of ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits.`, + iconType: 'alert', + position: 'top', + } : undefined } /> @@ -332,9 +334,10 @@ const DashboardTH: React.FC = () => { {inspectedHit && ( setInspectedHit(undefined)} size='m'> - -

Document details

-
+
From 4209f657622e14eeb0343dcba45e802171391cab Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra Date: Fri, 19 Jul 2024 13:17:50 -0300 Subject: [PATCH 3/6] Apply prettier --- .../common/wazuh-data-grid/wz-data-grid.tsx | 2 +- .../components/doc-details-header.tsx | 92 +++++++++---------- .../common/wazuh-discover/wz-discover.tsx | 2 +- .../threat-hunting/dashboard/dashboard.tsx | 39 ++++---- 4 files changed, 68 insertions(+), 67 deletions(-) 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 f13eab5e1a..9c6256d8e7 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 @@ -11,7 +11,7 @@ import { EuiTitle, EuiFlyoutBody, EuiFlexGroup, - EuiLink + EuiLink, } from '@elastic/eui'; import { useDataGrid, exportSearchToCSV, tDataGridColumn } from '../data-grid'; import { getWazuhCorePlugin } from '../../../kibana-services'; 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 index 3e067b84e2..947ee3816f 100644 --- 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 @@ -1,54 +1,50 @@ import React from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiTitle, - EuiLink, -} from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiLink } from '@elastic/eui'; import { RedirectAppLinks } from '../../../../../../../src/plugins/opensearch_dashboards_react/public'; import { getCore } from '../../../../kibana-services'; const DocDetailsHeader = ({ doc, indexPattern }) => { - return ( - - -

Document Details

-
-
- - - - - - View surrounding documents - - - - - - - View single document - - - - - -
); + return ( + + + +

Document Details

+
+
+ + + + + + View surrounding documents + + + + + + + View single document + + + + + +
+ ); +}; -} - -export default DocDetailsHeader; \ No newline at end of file +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 39c0142c27..1c771ce90e 100644 --- a/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx +++ b/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx @@ -12,7 +12,7 @@ import { EuiFlyoutHeader, EuiTitle, EuiPanel, - EuiLink + EuiLink, } from '@elastic/eui'; import { IntlProvider } from 'react-intl'; import { IndexPattern } from '../../../../../../src/plugins/data/common'; 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 0ba8ce19c3..d037861377 100644 --- a/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx +++ b/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx @@ -1,5 +1,9 @@ import React, { useState, useEffect, useMemo } from 'react'; -import { getPlugins, getWazuhCorePlugin, getCore } from '../../../../kibana-services'; +import { + getPlugins, + getWazuhCorePlugin, + getCore, +} from '../../../../kibana-services'; import { ViewMode } from '../../../../../../../src/plugins/embeddable/public'; import { SearchResponse } from '../../../../../../../src/core/server'; import { IndexPattern } from '../../../../../../../src/plugins/data/common'; @@ -19,7 +23,7 @@ import { EuiFlyoutHeader, EuiTitle, EuiButtonEmpty, - EuiLink + EuiLink, } from '@elastic/eui'; import { ErrorFactory, @@ -231,10 +235,11 @@ const DashboardTH: React.FC = () => { ) : null}
0 - ? '' - : 'wz-no-display' - }`} + className={`th-container ${ + !isDataSourceLoading && dataSource && results?.hits?.total > 0 + ? '' + : 'wz-no-display' + }`} >
@@ -295,20 +300,20 @@ const DashboardTH: React.FC = () => { { }} + onResetQuery={() => {}} tooltip={ results?.hits?.total && - results?.hits?.total > MAX_ENTRIES_PER_QUERY + results?.hits?.total > MAX_ENTRIES_PER_QUERY ? { - ariaLabel: 'Warning', - content: `The query results has exceeded the limit of ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits.`, - iconType: 'alert', - position: 'top', - } + ariaLabel: 'Warning', + content: `The query results has exceeded the limit of ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits.`, + iconType: 'alert', + position: 'top', + } : undefined } /> From fc282b33fe3346d802e17076cf1e688566e1056b Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra Date: Fri, 19 Jul 2024 18:01:29 -0300 Subject: [PATCH 4/6] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bc55521a9..f6c94673be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,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) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6459) [#6434](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6434) [#6504](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6504) [#6649](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6649) [#6506](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6506) [#6537](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6537) [#6528](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6528) [#6675](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6675) [#6674](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6674) [#6558](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6558) [#6685](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6685) [#6691](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6691) [#6712](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6712) [#6734](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6734) [#6746](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6746) [#6752](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6752) [#6753](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6753) [#6756](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6756) [#6771](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6771) [#6792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6792) +- 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) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6459) [#6434](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6434) [#6504](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6504) [#6649](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6649) [#6506](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6506) [#6537](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6537) [#6528](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6528) [#6675](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6675) [#6674](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6674) [#6558](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6558) [#6685](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6685) [#6691](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6691) [#6712](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6712) [#6734](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6734) [#6746](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6746) [#6752](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6752) [#6753](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6753) [#6756](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6756) [#6771](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6771) [#6792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6792) [#6831](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6831) - Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250) - Change how the configuration is managed in the backend side [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337) [#6519](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6519) [#6573](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6573) - Change the view of API is down and check connection to Server APIs application [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337) From 42168192f7c168920b7b6cf111b812f32b894094 Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra Date: Mon, 22 Jul 2024 16:27:19 -0300 Subject: [PATCH 5/6] Remove unused imports --- .../common/wazuh-data-grid/wz-data-grid.tsx | 1 - .../common/wazuh-discover/wz-discover.tsx | 1 - .../threat-hunting/dashboard/dashboard.tsx | 33 +++++++++---------- 3 files changed, 15 insertions(+), 20 deletions(-) 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 9c6256d8e7..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 @@ -11,7 +11,6 @@ import { EuiTitle, EuiFlyoutBody, EuiFlexGroup, - EuiLink, } from '@elastic/eui'; import { useDataGrid, exportSearchToCSV, tDataGridColumn } from '../data-grid'; import { getWazuhCorePlugin } from '../../../kibana-services'; 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 1c771ce90e..8e5ee43d35 100644 --- a/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx +++ b/plugins/main/public/components/common/wazuh-discover/wz-discover.tsx @@ -12,7 +12,6 @@ import { EuiFlyoutHeader, EuiTitle, EuiPanel, - EuiLink, } from '@elastic/eui'; import { IntlProvider } from 'react-intl'; import { IndexPattern } from '../../../../../../src/plugins/data/common'; 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 d037861377..8c245ce40a 100644 --- a/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx +++ b/plugins/main/public/components/overview/threat-hunting/dashboard/dashboard.tsx @@ -2,7 +2,6 @@ import React, { useState, useEffect, useMemo } from 'react'; import { getPlugins, getWazuhCorePlugin, - getCore, } from '../../../../kibana-services'; import { ViewMode } from '../../../../../../../src/plugins/embeddable/public'; import { SearchResponse } from '../../../../../../../src/core/server'; @@ -23,7 +22,6 @@ import { EuiFlyoutHeader, EuiTitle, EuiButtonEmpty, - EuiLink, } from '@elastic/eui'; import { ErrorFactory, @@ -235,11 +233,10 @@ const DashboardTH: React.FC = () => { ) : null}
0 - ? '' - : 'wz-no-display' - }`} + className={`th-container ${!isDataSourceLoading && dataSource && results?.hits?.total > 0 + ? '' + : 'wz-no-display' + }`} >
@@ -300,20 +297,20 @@ const DashboardTH: React.FC = () => { {}} + onResetQuery={() => { }} tooltip={ results?.hits?.total && - results?.hits?.total > MAX_ENTRIES_PER_QUERY + results?.hits?.total > MAX_ENTRIES_PER_QUERY ? { - ariaLabel: 'Warning', - content: `The query results has exceeded the limit of ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits.`, - iconType: 'alert', - position: 'top', - } + ariaLabel: 'Warning', + content: `The query results has exceeded the limit of ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits.`, + iconType: 'alert', + position: 'top', + } : undefined } /> From 2f08e0b75116cd71f533b71d277000fac6480c0a Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra Date: Tue, 23 Jul 2024 09:45:53 -0300 Subject: [PATCH 6/6] Change link method --- .../components/doc-details-header.tsx | 5 +-- .../threat-hunting/dashboard/dashboard.tsx | 36 +++++++++---------- 2 files changed, 20 insertions(+), 21 deletions(-) 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 index 947ee3816f..6e961cfe26 100644 --- 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 @@ -2,6 +2,7 @@ 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 ( @@ -16,7 +17,7 @@ const DocDetailsHeader = ({ doc, indexPattern }) => { { { ) : null}
0 - ? '' - : 'wz-no-display' - }`} + className={`th-container ${ + !isDataSourceLoading && dataSource && results?.hits?.total > 0 + ? '' + : 'wz-no-display' + }`} >
@@ -297,20 +295,20 @@ const DashboardTH: React.FC = () => { { }} + onResetQuery={() => {}} tooltip={ results?.hits?.total && - results?.hits?.total > MAX_ENTRIES_PER_QUERY + results?.hits?.total > MAX_ENTRIES_PER_QUERY ? { - ariaLabel: 'Warning', - content: `The query results has exceeded the limit of ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( - MAX_ENTRIES_PER_QUERY, - )} hits.`, - iconType: 'alert', - position: 'top', - } + ariaLabel: 'Warning', + content: `The query results has exceeded the limit of ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits. To provide a better experience the table only shows the first ${formatNumWithCommas( + MAX_ENTRIES_PER_QUERY, + )} hits.`, + iconType: 'alert', + position: 'top', + } : undefined } />