diff --git a/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.tsx b/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.tsx index 0d9e1e0..03d2bd7 100644 --- a/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.tsx +++ b/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.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 { AVERAGE_CPU_TIME, AVERAGE_LATENCY, @@ -17,28 +24,37 @@ import { calculateMetric } from '../../../../common/utils/MetricUtils'; // Panel component for displaying query group detail values const PanelItem = ({ label, value }: { label: string; value: string | number }) => ( - -

{label}

-
- {value} + {label}, + description: value, + }, + ]} + />
); export const QueryGroupAggregateSummary = ({ query }: { query: any }) => { if (!query) { - return No query data available.; + return ( + +

No query data available.

+
+ ); } const { measurements, id: id, group_by: groupBy } = query; const queryCount = measurements.latency?.count || measurements.cpu?.count || measurements.memory?.count || 1; return ( - +

Aggregate summary for {queryCount} {queryCount === 1 ? 'query' : 'queries'}

-
- + + ( - -

{label}

-
- {value} + {label}, + description: value, + }, + ]} + />
); export const QueryGroupSampleQuerySummary = ({ query }: { query: any }) => { if (!query) { - return No query data available.; + return ( + +

No query data available.

+
+ ); } const convertTime = (unixTime: number) => { const date = new Date(unixTime); @@ -41,10 +57,10 @@ export const QueryGroupSampleQuerySummary = ({ query }: { query: any }) => { } = query; return ( - +

Sample query summary

-
- + + diff --git a/public/pages/QueryGroupDetails/QueryGroupDetails.tsx b/public/pages/QueryGroupDetails/QueryGroupDetails.tsx index d892d89..0f43cd3 100644 --- a/public/pages/QueryGroupDetails/QueryGroupDetails.tsx +++ b/public/pages/QueryGroupDetails/QueryGroupDetails.tsx @@ -18,7 +18,6 @@ import { EuiHorizontalRule, EuiPanel, EuiSpacer, - EuiText, EuiTitle, EuiIconTip, } from '@elastic/eui'; @@ -193,12 +192,13 @@ export const QueryGroupDetails = ({ - +

Query

-
+
- +

Latency

-
- + +
diff --git a/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap b/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap index e561247..6143988 100644 --- a/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap +++ b/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap @@ -41,18 +41,16 @@ exports[`QueryGroupDetails matches snapshot 1`] = `
-
-

- Aggregate summary for - 8 - - queries -

-
+ Aggregate summary for + 8 + + queries +
-
-

- Id -

-
-
- 8c1e50c035663459d567fa11d8eb494d -
+
+

+ Id +

+
+
+ 8c1e50c035663459d567fa11d8eb494d +
+
-
-

- Average Latency -

-
-
- 2.50 ms -
+
+

+ Average Latency +

+
+
+ 2.50 ms +
+
-
-

- Average CPU Time -

-
-
- 1.42 ms -
+
+

+ Average CPU Time +

+
+
+ 1.42 ms +
+
-
-

- Average Memory Usage -

-
-
- 16528.00 B -
+
+

+ Average Memory Usage +

+
+
+ 16528.00 B +
+
-
-

- Group by -

-
-
- SIMILARITY -
+
+

+ Group by +

+
+
+ SIMILARITY +
+
@@ -184,15 +202,13 @@ exports[`QueryGroupDetails matches snapshot 1`] = `
-
-

- Sample query summary -

-
+ Sample query summary +
-
-

- Timestamp -

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

+ Timestamp +

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

- Indices -

-
-
- my-index -
+
+

+ Indices +

+
+
+ my-index +
+
-
-

- Search Type -

-
-
- query then fetch -
+
+

+ Search Type +

+
+
+ query then fetch +
+
-
-

- Coordinator Node ID -

-
-
- HjvgxQ4AQTiddd43OV7pJA -
+
+

+ Coordinator Node ID +

+
+
+ HjvgxQ4AQTiddd43OV7pJA +
+
-
-

- Total Shards -

-
-
- 1 -
+
+

+ Total Shards +

+
+
+ 1 +
+
@@ -297,19 +333,17 @@ exports[`QueryGroupDetails matches snapshot 1`] = `
-
-

- Query -

-
+ Query +