diff --git a/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/DefaultSelectionRenderer.tsx b/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/DefaultSelectionRenderer.tsx index a325e2b271c..89dfa3884cc 100644 --- a/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/DefaultSelectionRenderer.tsx +++ b/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/DefaultSelectionRenderer.tsx @@ -1,32 +1,93 @@ import Table from 'components/to-be-cleaned/Table' +import { LOGS_TAILWIND_CLASSES } from '../Logs.constants' import { jsonSyntaxHighlight } from '../LogsFormatters' const DefaultSelectionRenderer = ({ log }: any) => { + const DetailedRow = ({ + label, + value, + code, + }: { + label: string + value: string | React.ReactNode + code?: boolean + }) => { + return ( +
+ {label} + + {value} + +
+ ) + } + + const DetailedJsonRow = ({ + label, + value, + code, + }: { + label: string + value: Object + code?: boolean + }) => { + return ( +
+ {label} + +
+        
+      
+ ) + } + return ( - - {Object.entries(log).map(([key, value]) => ( - - {key} - -
-                  {value && typeof value === 'object' ? (
-                    
- ) : ( - String(value) - )} -
-
-
- ))} - - } - /> +
+ {/*
+ {Object.entries(log).map(([key, value]) => ( + + + {key} + + +
+                    {value && typeof value === 'object' ? (
+                      
+ ) : ( + + {String(value)} + + )} +
+
+
+ ))} + + } + /> */} + {Object.entries(log).map(([key, value]) => { + return ( +
+ {value && typeof value === 'object' ? ( + + ) : ( + + )} +
+ ) + })} + ) } diff --git a/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionInvocationSelectionRender.tsx b/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionInvocationSelectionRender.tsx index 5684ab8b3cc..087efa95153 100644 --- a/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionInvocationSelectionRender.tsx +++ b/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionInvocationSelectionRender.tsx @@ -1,4 +1,5 @@ import dayjs from 'dayjs' +import { LOGS_TAILWIND_CLASSES } from '../Logs.constants' import { jsonSyntaxHighlight, ResponseCodeFormatter } from '../LogsFormatters' const FunctionInvocationSelectionRender = ({ log }: any) => { @@ -31,7 +32,7 @@ const FunctionInvocationSelectionRender = ({ log }: any) => { return ( <> -
+
} /> @@ -41,7 +42,7 @@ const FunctionInvocationSelectionRender = ({ log }: any) => {
-
+

Request body

           
{ />
-
+

Response{method ? ` ${method}` : null} body

diff --git a/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionLogsSelectionRender.tsx b/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionLogsSelectionRender.tsx index c1dd5e69609..325005b83f8 100644 --- a/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionLogsSelectionRender.tsx +++ b/studio/components/interfaces/Settings/Logs/LogSelectionRenderers/FunctionLogsSelectionRender.tsx @@ -1,4 +1,5 @@ import dayjs from 'dayjs' +import { LOGS_TAILWIND_CLASSES } from '../Logs.constants' import { jsonSyntaxHighlight, ResponseCodeFormatter, SeverityFormatter } from '../LogsFormatters' const FunctionLogsSelectionRender = ({ log }: any) => { @@ -25,7 +26,7 @@ const FunctionLogsSelectionRender = ({ log }: any) => { return ( <> -
+
Event message
{ />
-
+
} /> @@ -44,7 +45,7 @@ const FunctionLogsSelectionRender = ({ log }: any) => {
-
+

Metadata