diff --git a/public/pages/QueryDetails/Components/QuerySummary.tsx b/public/pages/QueryDetails/Components/QuerySummary.tsx index ca6ae82..f24c8e4 100644 --- a/public/pages/QueryDetails/Components/QuerySummary.tsx +++ b/public/pages/QueryDetails/Components/QuerySummary.tsx @@ -4,7 +4,14 @@ */ import React from 'react'; -import { EuiFlexGrid, EuiFlexItem, EuiHorizontalRule, EuiPanel, EuiText } from '@elastic/eui'; +import { + EuiFlexGrid, + EuiFlexItem, + EuiHorizontalRule, + EuiPanel, + EuiTitle, + EuiDescriptionList, +} from '@elastic/eui'; import { SearchQueryRecord } from '../../../../types/types'; import { CPU_TIME, @@ -21,10 +28,15 @@ import { calculateMetric } from '../../../../common/utils/MetricUtils'; // Panel component for displaying query detail values const PanelItem = ({ label, value }: { label: string; value: string | number }) => ( - -

{label}

-
- {value} + {label}, + description: value, + }, + ]} + />
); @@ -33,9 +45,9 @@ const QuerySummary = ({ query }: { query: SearchQueryRecord | null }) => { if (!query) { return ( - +

No Data Available

-
+
); } @@ -49,9 +61,9 @@ const QuerySummary = ({ query }: { query: SearchQueryRecord | null }) => { const { timestamp, measurements, indices, search_type, node_id, total_shards } = query; return ( - +

Summary

-
+ diff --git a/public/pages/QueryDetails/QueryDetails.test.tsx b/public/pages/QueryDetails/QueryDetails.test.tsx index c55eda5..aa3eeb2 100644 --- a/public/pages/QueryDetails/QueryDetails.test.tsx +++ b/public/pages/QueryDetails/QueryDetails.test.tsx @@ -142,7 +142,7 @@ describe('QueryDetails component', () => { expect(retrieveQueryById).toHaveBeenCalled(); }); - const dateElements = container.getElementsByClassName('euiText euiText--extraSmall'); + const dateElements = container.getElementsByClassName('euiDescriptionList__description'); Array.from(dateElements).forEach((element) => { if (element.textContent?.includes('@')) { element.textContent = 'Sep 24, 2021 @ 12:00:00 AM'; diff --git a/public/pages/QueryDetails/QueryDetails.tsx b/public/pages/QueryDetails/QueryDetails.tsx index e9ff5ca..ab1c085 100644 --- a/public/pages/QueryDetails/QueryDetails.tsx +++ b/public/pages/QueryDetails/QueryDetails.tsx @@ -15,7 +15,6 @@ import { EuiHorizontalRule, EuiPanel, EuiSpacer, - EuiText, EuiTitle, } from '@elastic/eui'; import { useHistory, useLocation } from 'react-router-dom'; @@ -162,12 +161,13 @@ const QueryDetails = ({ - +

Query

-
+
- +

Latency

-
- + +
diff --git a/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap b/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap index 4f2f277..9769341 100644 --- a/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap +++ b/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap @@ -18,13 +18,11 @@ exports[`QueryDetails component matches snapshot 1`] = ` class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow" data-test-subj="query-details-summary-section" > -
-

- Summary -

-
+ Summary +
@@ -34,130 +32,162 @@ exports[`QueryDetails component matches snapshot 1`] = `
-
-

- Timestamp -

-
-
- Sep 24, 2021 @ 12:00:00 AM -
+
+

+ Timestamp +

+
+
+ Sep 24, 2021 @ 12:00:00 AM +
+
-
-

- Latency -

-
-
- 8.00 ms -
+
+

+ Latency +

+
+
+ 8.00 ms +
+
-
-

- CPU Time -

-
-
- 5.51 ms -
+
+

+ CPU Time +

+
+
+ 5.51 ms +
+
-
-

- Memory Usage -

-
-
- N/A -
+
+

+ Memory Usage +

+
+
+ N/A +
+
-
-

- Indices -

-
-
- top_queries-2024.09.12 -
+
+

+ Indices +

+
+
+ top_queries-2024.09.12 +
+
-
-

- Search Type -

-
-
- query then fetch -
+
+

+ Search Type +

+
+
+ query then fetch +
+
-
-

- Coordinator Node ID -

-
-
- Q36D2z_NRGKim6EZZMgi6A -
+
+

+ Coordinator Node ID +

+
+
+ Q36D2z_NRGKim6EZZMgi6A +
+
-
-

- Total Shards -

-
-
- 1 -
+
+

+ Total Shards +

+
+
+ 1 +
+
@@ -180,19 +210,17 @@ exports[`QueryDetails component matches snapshot 1`] = `
-
-

- Query -

-
+ Query +