From 72c92ca187770b6ce09003d84c47c2f8a3d343a9 Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Tue, 18 Jul 2023 19:12:25 +0200 Subject: [PATCH] Logs: Fix shouldRemoveField (#71882) --- public/app/features/logs/components/logParser.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public/app/features/logs/components/logParser.ts b/public/app/features/logs/components/logParser.ts index 88f0544eaca..63344030c3c 100644 --- a/public/app/features/logs/components/logParser.ts +++ b/public/app/features/logs/components/logParser.ts @@ -92,6 +92,11 @@ export function shouldRemoveField( shouldRemoveLine = true, shouldRemoveTime = true ) { + // field that has empty value (we want to keep 0 or empty string) + if (field.values[row.rowIndex] == null) { + return true; + } + // hidden field, remove if (field.config.custom?.hidden) { return true; @@ -101,12 +106,6 @@ export function shouldRemoveField( if ((field.config.links ?? []).length > 0) { return false; } - - // field that has empty value (we want to keep 0 or empty string) - if (field.values[row.rowIndex] == null) { - return true; - } - // the remaining checks use knowledge of how we parse logs-dataframes // Remove field if it is: