@@ -34,6 +34,7 @@ import {
3434import {
3535 Dialog ,
3636 DialogContent ,
37+ DialogDescription ,
3738 DialogFooter ,
3839 DialogHeader ,
3940 DialogTitle ,
@@ -66,7 +67,9 @@ import {
6667 getSortIcon ,
6768} from './utils' ;
6869
70+ import JsonView from 'react18-json-view' ;
6971import ServiceDetail from './service-detail' ;
72+ import TaskExecutorDetail from './task-executor-detail' ;
7073
7174const columnHelper = createColumnHelper < AdminService . ListServicesItem > ( ) ;
7275const globalFilterFn = createFuzzySearchFn < AdminService . ListServicesItem > ( [
@@ -381,7 +384,7 @@ function AdminServiceStatus() {
381384 { /* Extra info modal*/ }
382385 < Dialog open = { extraInfoModalOpen } onOpenChange = { setExtraInfoModalOpen } >
383386 < DialogContent
384- className = "p-0 border-border-button "
387+ className = "flex flex-col max-h-[calc(100vh-4rem)] p-0 overflow-hidden "
385388 onAnimationEnd = { ( ) => {
386389 if ( ! extraInfoModalOpen ) {
387390 setItemToMakeAction ( null ) ;
@@ -392,15 +395,16 @@ function AdminServiceStatus() {
392395 < DialogTitle > { t ( 'admin.extraInfo' ) } </ DialogTitle >
393396 </ DialogHeader >
394397
395- < section className = "px-12 pt-6 pb-4" >
396- < div className = "rounded-lg p-4 bg-bg-input" >
397- < pre className = "text-sm" >
398- < code >
399- { JSON . stringify ( itemToMakeAction ?. extra ?? { } , null , 2 ) }
400- </ code >
401- </ pre >
398+ < DialogDescription className = "sr-only" />
399+
400+ < ScrollArea className = "h-0 flex-1 grid" >
401+ < div className = "px-12" >
402+ < JsonView
403+ src = { itemToMakeAction ?. extra ?? { } }
404+ className = "rounded-lg p-4 bg-bg-card break-words text-text-secondary"
405+ />
402406 </ div >
403- </ section >
407+ </ ScrollArea >
404408
405409 < DialogFooter className = "flex justify-end gap-4 px-12 pt-4 pb-8" >
406410 < Button
@@ -417,7 +421,7 @@ function AdminServiceStatus() {
417421 { /* Service details modal */ }
418422 < Dialog open = { detailModalOpen } onOpenChange = { setDetailModalOpen } >
419423 < DialogContent
420- className = "flex flex-col max-h-[calc(100vh-4rem)] max-w-6xl p-0 border-border-button "
424+ className = "flex flex-col max-h-[calc(100vh-4rem)] max-w-6xl p-0 overflow-hidden "
421425 onAnimationEnd = { ( ) => {
422426 if ( ! detailModalOpen ) {
423427 setItemToMakeAction ( null ) ;
@@ -426,14 +430,30 @@ function AdminServiceStatus() {
426430 >
427431 < DialogHeader className = "p-6 border-b-0.5 border-border-button" >
428432 < DialogTitle >
429- < Trans i18nKey = "admin.serviceDetail" >
430- { { name : itemToMakeAction ?. name } }
431- </ Trans >
433+ { itemToMakeAction ?. service_type === 'task_executor' ? (
434+ t ( 'admin.taskExecutorDetail' )
435+ ) : (
436+ < Trans i18nKey = "admin.serviceDetail" >
437+ { { name : itemToMakeAction ?. name } }
438+ </ Trans >
439+ ) }
432440 </ DialogTitle >
433441 </ DialogHeader >
434442
435- < ScrollArea className = "pt-6 pb-4 px-12 h-0 flex-1 text-text-secondary flex flex-col" >
436- < ServiceDetail content = { serviceDetails ?. message } />
443+ < DialogDescription className = "sr-only" />
444+
445+ < ScrollArea className = "h-0 flex-1 text-text-secondary grid" >
446+ < div className = "px-12" >
447+ { itemToMakeAction ?. service_type === 'task_executor' ? (
448+ < TaskExecutorDetail
449+ content = {
450+ serviceDetails ?. message as AdminService . TaskExecutorInfo
451+ }
452+ />
453+ ) : (
454+ < ServiceDetail content = { serviceDetails ?. message } />
455+ ) }
456+ </ div >
437457 </ ScrollArea >
438458
439459 < DialogFooter className = "flex justify-end gap-4 px-12 pt-4 pb-8" >
0 commit comments