From 143fe0e719370b92557b5e93b7b901e780cc526e Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Mon, 31 Jul 2023 05:16:54 -0700 Subject: [PATCH] Cmd failures should be displayed as errors too Summary: Styles are applied depending on entry type. This was an issue when we had 'cmd' as a type too. So, let's simplify and keep type to denote info, warning, or errors. Later on we can add a different tag if we want to differentiate between logs, command, others. Reviewed By: passy Differential Revision: D47912857 fbshipit-source-id: 213a0768a95f63cbd692ba96f6745ab740346a58 --- desktop/flipper-common/src/server-types.tsx | 2 +- desktop/flipper-server-core/src/recorder.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/flipper-common/src/server-types.tsx b/desktop/flipper-common/src/server-types.tsx index 31095ca4e3a..1b4035f175f 100644 --- a/desktop/flipper-common/src/server-types.tsx +++ b/desktop/flipper-common/src/server-types.tsx @@ -78,7 +78,7 @@ export type DeviceLogLevel = export type ConnectionRecordEntry = { time: Date; - type: 'cmd' | 'info' | 'error'; + type: 'warning' | 'info' | 'error'; device: string; app: string; message: string; diff --git a/desktop/flipper-server-core/src/recorder.tsx b/desktop/flipper-server-core/src/recorder.tsx index 1b7e41f0d5d..a9915622d4d 100644 --- a/desktop/flipper-server-core/src/recorder.tsx +++ b/desktop/flipper-server-core/src/recorder.tsx @@ -42,7 +42,7 @@ class Recorder { const entry: CommandRecordEntry = { time: new Date(), - type: 'cmd', + type: payload.success ? 'info' : 'error', device, app, message: payload.cmd,