From f9df58001624967fb9653c481a8e9ecd7e643cf8 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Sat, 1 Aug 2020 08:35:54 -0700 Subject: [PATCH] Inspector: hide invalid stats (#26750) --- .../dashboard/components/Inspector/InspectStatsTab.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/components/Inspector/InspectStatsTab.tsx b/public/app/features/dashboard/components/Inspector/InspectStatsTab.tsx index c487181cf42..3e64aedf469 100644 --- a/public/app/features/dashboard/components/Inspector/InspectStatsTab.tsx +++ b/public/app/features/dashboard/components/Inspector/InspectStatsTab.tsx @@ -23,8 +23,12 @@ export const InspectStatsTab: React.FC = ({ data, dashboar dataRows += frame.length; } - stats.push({ displayName: 'Total request time', value: requestTime, unit: 'ms' }); - stats.push({ displayName: 'Data processing time', value: processingTime, unit: 'ms' }); + if (requestTime > 0) { + stats.push({ displayName: 'Total request time', value: requestTime, unit: 'ms' }); + } + if (processingTime > 0) { + stats.push({ displayName: 'Data processing time', value: processingTime, unit: 'ms' }); + } stats.push({ displayName: 'Number of queries', value: data.request.targets.length }); stats.push({ displayName: 'Total number rows', value: dataRows });