From 63caa61478baba311941033ec91cb2bbe3ae8894 Mon Sep 17 00:00:00 2001 From: maryliag Date: Wed, 25 Jan 2023 18:45:30 -0500 Subject: [PATCH] ui: add check for cpu usage Add a check, for cases when the value might no be returned (cluster with mixed versions). Part Of #87213 Release note: None --- .../cluster-ui/src/statementsTable/statementsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx b/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx index f33416e31d74..efe5387fcfdb 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementsTable/statementsTable.tsx @@ -224,7 +224,7 @@ export function makeStatementsColumns( title: statisticsTableTitles.cpu(statType), cell: cpuBar, sort: (stmt: AggregateStatistics) => - FixLong(Number(stmt.stats.exec_stats.cpu_nanos.mean)), + FixLong(Number(stmt.stats.exec_stats.cpu_nanos?.mean)), }, { name: "maxMemUsage",