@@ -48,7 +48,7 @@ export function LogDetailsDialog({ log, open, onOpenChange }: LogDetailsDialogPr
4848
4949 return (
5050 < Dialog open = { open } onOpenChange = { onOpenChange } >
51- < DialogContent className = "max-w-4xl max-h-[90vh]" >
51+ < DialogContent className = "! max-w-7xl max-h-[90vh] w-[95vw ]" >
5252 < DialogHeader >
5353 < DialogTitle className = "flex items-center gap-2" >
5454 Log Details
@@ -65,7 +65,7 @@ export function LogDetailsDialog({ log, open, onOpenChange }: LogDetailsDialogPr
6565 { /* Basic Information */ }
6666 < div >
6767 < h3 className = "text-sm font-semibold mb-2" > Basic Information</ h3 >
68- < div className = "grid grid-cols-2 gap-2 text-sm" >
68+ < div className = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 text-sm" >
6969 < div >
7070 < span className = "font-medium" > Source:</ span > { log . source }
7171 </ div >
@@ -93,51 +93,57 @@ export function LogDetailsDialog({ log, open, onOpenChange }: LogDetailsDialogPr
9393 { ( log . method || log . path || log . uri || log . statusCode ) && (
9494 < div >
9595 < h3 className = "text-sm font-semibold mb-2" > Request Information</ h3 >
96- < div className = "grid grid-cols-2 gap-2 text-sm" >
96+ < div className = "space-y-3 text-sm" >
9797 { log . method && (
9898 < div >
9999 < span className = "font-medium" > Method:</ span > { " " }
100100 < Badge variant = "outline" > { log . method } </ Badge >
101101 </ div >
102102 ) }
103103 { log . path && (
104- < div >
105- < span className = "font-medium" > Path:</ span > { " " }
106- < code className = "text-xs bg-muted px-1 py-0.5 rounded" >
107- { log . path }
108- </ code >
104+ < div className = "flex flex-col gap-1" >
105+ < span className = "font-medium" > Path:</ span >
106+ < div className = "bg-muted px-3 py-2 rounded" >
107+ < code className = "text-xs font-mono whitespace-pre-wrap break-all" >
108+ { log . path }
109+ </ code >
110+ </ div >
109111 </ div >
110112 ) }
111113 { log . uri && (
112- < div className = "col-span-2" >
113- < span className = "font-medium" > URI:</ span > { " " }
114- < code className = "text-xs bg-muted px-1 py-0.5 rounded" >
115- { log . uri }
116- </ code >
117- </ div >
118- ) }
119- { log . statusCode && (
120- < div >
121- < span className = "font-medium" > Status Code:</ span > { " " }
122- < Badge
123- variant = {
124- log . statusCode >= 500
125- ? "destructive"
126- : log . statusCode >= 400
127- ? "outline"
128- : "default"
129- }
130- >
131- { log . statusCode }
132- </ Badge >
133- </ div >
134- ) }
135- { log . responseTime && (
136- < div >
137- < span className = "font-medium" > Response Time:</ span > { " " }
138- { log . responseTime } ms
114+ < div className = "flex flex-col gap-1" >
115+ < span className = "font-medium" > URI:</ span >
116+ < div className = "bg-muted px-3 py-2 rounded" >
117+ < code className = "text-xs font-mono whitespace-pre-wrap break-all" >
118+ { log . uri }
119+ </ code >
120+ </ div >
139121 </ div >
140122 ) }
123+ < div className = "grid grid-cols-1 md:grid-cols-2 gap-3" >
124+ { log . statusCode && (
125+ < div >
126+ < span className = "font-medium" > Status Code:</ span > { " " }
127+ < Badge
128+ variant = {
129+ log . statusCode >= 500
130+ ? "destructive"
131+ : log . statusCode >= 400
132+ ? "outline"
133+ : "default"
134+ }
135+ >
136+ { log . statusCode }
137+ </ Badge >
138+ </ div >
139+ ) }
140+ { log . responseTime && (
141+ < div >
142+ < span className = "font-medium" > Response Time:</ span > { " " }
143+ { log . responseTime } ms
144+ </ div >
145+ ) }
146+ </ div >
141147 </ div >
142148 </ div >
143149 ) }
@@ -186,11 +192,13 @@ export function LogDetailsDialog({ log, open, onOpenChange }: LogDetailsDialogPr
186192 </ div >
187193 ) }
188194 { log . file && (
189- < div className = "flex items-start gap-2" >
190- < span className = "font-medium min-w-[100px]" > Rule File:</ span >
191- < code className = "text-xs bg-muted px-2 py-1 rounded flex-1 break-all" >
192- { log . file }
193- </ code >
195+ < div className = "flex flex-col gap-1" >
196+ < span className = "font-medium" > Rule File:</ span >
197+ < div className = "bg-muted px-3 py-2 rounded" >
198+ < code className = "text-xs font-mono whitespace-pre-wrap break-all" >
199+ { log . file }
200+ </ code >
201+ </ div >
194202 </ div >
195203 ) }
196204 { log . line && (
@@ -208,11 +216,13 @@ export function LogDetailsDialog({ log, open, onOpenChange }: LogDetailsDialogPr
208216 </ div >
209217 ) }
210218 { log . data && (
211- < div className = "flex items-start gap-2" >
212- < span className = "font-medium min-w-[100px]" > Data:</ span >
213- < code className = "text-xs bg-muted px-2 py-1 rounded flex-1 break-all" >
214- { log . data }
215- </ code >
219+ < div className = "flex flex-col gap-1" >
220+ < span className = "font-medium" > Data:</ span >
221+ < div className = "bg-muted px-3 py-2 rounded overflow-x-auto max-h-[200px] overflow-y-auto" >
222+ < code className = "text-xs font-mono whitespace-pre-wrap break-words" >
223+ { log . data }
224+ </ code >
225+ </ div >
216226 </ div >
217227 ) }
218228 </ div >
@@ -223,16 +233,16 @@ export function LogDetailsDialog({ log, open, onOpenChange }: LogDetailsDialogPr
223233 < div >
224234 < h3 className = "text-sm font-semibold mb-2" > Message</ h3 >
225235 < div className = "bg-muted p-3 rounded-md" >
226- < p className = "text-sm font-medium mb-2 " > { log . message } </ p >
236+ < p className = "text-sm font-medium whitespace-pre-wrap break-all " > { log . message } </ p >
227237 </ div >
228238 </ div >
229239
230240 { /* Full Log Entry */ }
231241 { log . fullMessage && (
232242 < div >
233243 < h3 className = "text-sm font-semibold mb-2" > Complete Log Entry</ h3 >
234- < div className = "bg-muted p-3 rounded-md" >
235- < pre className = "text-xs whitespace-pre-wrap break-words font-mono" >
244+ < div className = "bg-muted p-3 rounded-md max-h-[300px] overflow-y-auto " >
245+ < pre className = "text-xs whitespace-pre-wrap break-all font-mono" >
236246 { log . fullMessage }
237247 </ pre >
238248 </ div >
0 commit comments