@@ -38,6 +38,7 @@ import SQLResultLog from './SQLResultLog';
3838import DBPermissionTable from './DBPermissionTable' ;
3939import { IUnauthorizedDBResources } from '@/d.ts/table' ;
4040import { ProfileType } from '@/component/ExecuteSqlDetailModal/constant' ;
41+ import sessionManager from '@/store/sessionManager' ;
4142
4243export const recordsTabKey = 'records' ;
4344export const sqlLintTabKey = 'sqlLint' ;
@@ -236,15 +237,21 @@ const SQLResultSet: React.FC<IProps> = function (props) {
236237 const stopRunning = ( ) => {
237238 sqlStore . stopExec ( ctx . props . pageKey , ctx ?. getSession ( ) ?. sessionId ) ;
238239 } ;
239- const onOpenExecutingDetailModal = ( id : string , sql ?: string , sessionId ?: string ) => {
240- const session = sessionId ? { sessionId : sessionId } : ctx ?. getSession ( ) ;
240+ const onOpenExecutingDetailModal = (
241+ id : string ,
242+ sql ?: string ,
243+ sessionId ?: string ,
244+ traceEmptyReason ?: string ,
245+ ) => {
246+ const session = sessionId ? sessionManager . sessionMap . get ( sessionId ) : ctx ?. getSession ( ) ;
241247 modalStore . changeExecuteSqlDetailModalVisible (
242248 true ,
243249 id ,
244250 sql ,
245251 session ,
246252 ctx ?. editor . getSelectionContent ( ) ,
247253 ProfileType . Execute ,
254+ traceEmptyReason ,
248255 ) ;
249256 } ;
250257
@@ -477,7 +484,7 @@ const SQLResultSet: React.FC<IProps> = function (props) {
477484 stopRunning = { stopRunning }
478485 onOpenExecutingDetailModal = { onOpenExecutingDetailModal }
479486 loading = { sqlStore . logLoading }
480- isSupportProfile = { isSupportProfile }
487+ isSupportProfile = { isSupportProfile && set ?. withQueryProfile }
481488 />
482489 ) ,
483490 } ;
0 commit comments