From 60b7b7910ee83c4be658bb88802ebea9dd924ff8 Mon Sep 17 00:00:00 2001 From: KROSY Date: Mon, 23 Oct 2023 15:31:00 +0300 Subject: [PATCH] fix: convert hash to hex --- .../Tenant/Diagnostics/TopQueries/getTopQueriesColumns.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.tsx b/src/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.tsx index 456681018..b8abb68bf 100644 --- a/src/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.tsx +++ b/src/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.tsx @@ -81,7 +81,9 @@ const oneLineQueryTextColumn: Column = { const queryHashColumn: Column = { name: TOP_QUERIES_COLUMNS_IDS.QueryHash, - render: ({row}) => String(crc32.str(String(row.QueryText))), + // We use unsigned right shift operator (>>>) to avoid negative values + // eslint-disable-next-line no-bitwise + render: ({row}) => (crc32.str(String(row.QueryText)) >>> 0).toString(16).toUpperCase(), width: 130, sortable: false, };