From d8f62cf35403b44f873c0814ff9d60fa9082dba5 Mon Sep 17 00:00:00 2001 From: Kishore Kumaar Natarajan Date: Thu, 23 Jan 2025 23:42:45 -0800 Subject: [PATCH] Fix:Query-Insights-Dashboards-Trineo-style-integration-QueryDetails Signed-off-by: Kishore Kumaar Natarajan --- .../QueryDetails/Components/QuerySummary.tsx | 27 ++++++++++++------- public/pages/QueryDetails/QueryDetails.tsx | 16 ++++++----- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/public/pages/QueryDetails/Components/QuerySummary.tsx b/public/pages/QueryDetails/Components/QuerySummary.tsx index b192a6f..bc8b741 100644 --- a/public/pages/QueryDetails/Components/QuerySummary.tsx +++ b/public/pages/QueryDetails/Components/QuerySummary.tsx @@ -4,7 +4,15 @@ */ import React from 'react'; -import { EuiFlexGrid, EuiFlexItem, EuiHorizontalRule, EuiPanel, EuiText } from '@elastic/eui'; +import { + EuiFlexGrid, + EuiFlexItem, + EuiHorizontalRule, + EuiPanel, + EuiText, + EuiFormRow, + EuiTitle, +} from '@elastic/eui'; import { SearchQueryRecord } from '../../../../types/types'; import { CPU_TIME, @@ -21,10 +29,9 @@ import { calculateMetric } from '../../Utils/MetricUtils'; // Panel component for displaying query detail values const PanelItem = ({ label, value }: { label: string; value: string | number }) => ( - -

{label}

-
- {value} + + {value} +
); @@ -32,10 +39,10 @@ const QuerySummary = ({ query }: { query: SearchQueryRecord | null }) => { // If query is null, return a message indicating no data is available if (!query) { return ( - - + +

No Data Available

-
+
); } @@ -49,9 +56,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.tsx b/public/pages/QueryDetails/QueryDetails.tsx index 4ecb2d5..a135755 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'; @@ -143,12 +142,13 @@ const QueryDetails = ({ - +

Query

-
+
- -

Latency

-
- + + +

Latency

+
+
+