mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
complete v2 viewer
This commit is contained in:
parent
2014bcf9d8
commit
61bb51dc3d
1 changed files with 47 additions and 42 deletions
|
|
@ -143,7 +143,7 @@ export function LogDetailsDrawer({
|
||||||
environment={environment}
|
environment={environment}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div style={{ height: "calc(100vh - 100px)", overflowY: "auto", padding: DRAWER_CONTENT_PADDING }}>
|
<div style={{ height: "calc(100vh - 100px)", overflowY: "auto", padding: `${DRAWER_CONTENT_PADDING} ${DRAWER_CONTENT_PADDING} 0` }}>
|
||||||
{/* Error Alert - Show prominently at top for failures */}
|
{/* Error Alert - Show prominently at top for failures */}
|
||||||
{hasError && errorInfo && (
|
{hasError && errorInfo && (
|
||||||
<Alert
|
<Alert
|
||||||
|
|
@ -216,6 +216,9 @@ export function LogDetailsDrawer({
|
||||||
{logEntry.metadata && Object.keys(logEntry.metadata).length > 0 && (
|
{logEntry.metadata && Object.keys(logEntry.metadata).length > 0 && (
|
||||||
<MetadataSection metadata={logEntry.metadata} onCopy={(data) => copyToClipboard(data, "Metadata")} />
|
<MetadataSection metadata={logEntry.metadata} onCopy={(data) => copyToClipboard(data, "Metadata")} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Bottom spacing for scroll area */}
|
||||||
|
<div style={{ height: DRAWER_CONTENT_PADDING }} />
|
||||||
</div>
|
</div>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
);
|
);
|
||||||
|
|
@ -357,6 +360,7 @@ function RequestResponseSection({
|
||||||
<h3 className="text-lg font-medium text-gray-900">Request & Response</h3>
|
<h3 className="text-lg font-medium text-gray-900">Request & Response</h3>
|
||||||
</AccordionHeader>
|
</AccordionHeader>
|
||||||
<AccordionBody className="px-0">
|
<AccordionBody className="px-0">
|
||||||
|
<div style={{ padding: "0 24px" }}>
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={activeTab}
|
activeKey={activeTab}
|
||||||
onChange={(key) => setActiveTab(key as typeof TAB_REQUEST | typeof TAB_RESPONSE)}
|
onChange={(key) => setActiveTab(key as typeof TAB_REQUEST | typeof TAB_RESPONSE)}
|
||||||
|
|
@ -376,7 +380,7 @@ function RequestResponseSection({
|
||||||
key: TAB_REQUEST,
|
key: TAB_REQUEST,
|
||||||
label: "Request",
|
label: "Request",
|
||||||
children: (
|
children: (
|
||||||
<div style={{ padding: SPACING_XLARGE }}>
|
<div style={{ paddingTop: SPACING_XLARGE, paddingBottom: SPACING_XLARGE }}>
|
||||||
<JsonViewer data={getRawRequest()} mode="formatted" />
|
<JsonViewer data={getRawRequest()} mode="formatted" />
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
@ -385,7 +389,7 @@ function RequestResponseSection({
|
||||||
key: TAB_RESPONSE,
|
key: TAB_RESPONSE,
|
||||||
label: "Response",
|
label: "Response",
|
||||||
children: (
|
children: (
|
||||||
<div style={{ padding: SPACING_XLARGE }}>
|
<div style={{ paddingTop: SPACING_XLARGE, paddingBottom: SPACING_XLARGE }}>
|
||||||
{hasResponse ? (
|
{hasResponse ? (
|
||||||
<JsonViewer data={getFormattedResponse()} mode="formatted" />
|
<JsonViewer data={getFormattedResponse()} mode="formatted" />
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -398,6 +402,7 @@ function RequestResponseSection({
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</AccordionBody>
|
</AccordionBody>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue