From 7e9228985bad092a26a89f3ab4f8b4cc1af35f13 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Tue, 1 Aug 2023 03:45:05 -0700 Subject: [PATCH] Show command details Summary: This is the most basic visualiser for command details. Reviewed By: antonk52 Differential Revision: D47917006 fbshipit-source-id: 7654a3c6e416346548b45dbc72ca4a1838bea787 --- .../src/chrome/ConnectivityLogs.tsx | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx b/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx index bf7fd8588..b27d7ce3f 100644 --- a/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx +++ b/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx @@ -136,19 +136,43 @@ const Placeholder = styled(Layout.Container)({ }); function Sidebar({selection}: {selection: undefined | ConnectionRecordEntry}) { - return ( - - {selection != null ? ( - - - - ) : ( - - Select an entry to visualize details - - )} - - ); + const content: JSX.Element[] = []; + + if (selection) { + if ('cmd' in selection) { + const cmd = selection as CommandRecordEntry; + content.push( + + {cmd.cmd} + , + + {cmd.description} + , + + {cmd.stdout} + , + + {cmd.stderr} + , + + {cmd.troubleshoot} + , + ); + } + content.push( + + + , + ); + } else { + content.push( + + Select an entry to visualize details + , + ); + } + + return {content}; } function clearMessages() {