@@ -2,7 +2,9 @@ import SessionActionButtons, {
22 PrimaryAppOption ,
33} from './ComputeSessionNodeItems/SessionActionButtons' ;
44import SessionStatusTag from './ComputeSessionNodeItems/SessionStatusTag' ;
5+ import QuestionIconWithTooltip from './QuestionIconWithTooltip' ;
56import { useUpdateEffect } from 'ahooks' ;
7+ import { Switch , theme } from 'antd' ;
68import { BAIFlex , BAILink , BAINotificationItem , BAIText } from 'backend.ai-ui' ;
79import dayjs from 'dayjs' ;
810import React , { useEffect , useState } from 'react' ;
@@ -35,6 +37,7 @@ const BAIComputeSessionNodeNotificationItem: React.FC<
3537 const { closeNotification } = useSetBAINotification ( ) ;
3638 const { t } = useTranslation ( ) ;
3739 const navigate = useNavigate ( ) ;
40+ const { token } = theme . useToken ( ) ;
3841 const node = useFragment (
3942 graphql `
4043 fragment BAIComputeSessionNodeNotificationItemFragment on ComputeSessionNode {
@@ -98,19 +101,33 @@ const BAIComputeSessionNodeNotificationItem: React.FC<
98101 </ BAIText >
99102 }
100103 description = {
101- < BAIFlex justify = "between" >
102- < SessionStatusTag
103- sessionFrgmt = { node || null }
104- showQueuePosition = { false }
105- showTooltip = { false }
106- />
107- < SessionActionButtons
108- compact
109- size = "small"
110- sessionFrgmt = { node || null }
111- hiddenButtonKeys = { [ 'containerCommit' ] }
112- primaryAppOption = { primaryAppOption }
113- />
104+ < BAIFlex direction = "column" align = "stretch" gap = "xs" >
105+ < BAIFlex justify = "between" >
106+ < SessionStatusTag
107+ sessionFrgmt = { node || null }
108+ showQueuePosition = { false }
109+ showTooltip = { false }
110+ />
111+ < SessionActionButtons
112+ compact
113+ size = "small"
114+ sessionFrgmt = { node || null }
115+ hiddenButtonKeys = { [ 'containerCommit' ] }
116+ primaryAppOption = { primaryAppOption }
117+ />
118+ </ BAIFlex >
119+ < BAIFlex
120+ style = { {
121+ alignSelf : 'stretch' ,
122+ } }
123+ gap = { 'xs' }
124+ >
125+ < Switch size = "small" /> { t ( 'notification.RunAppOnSessionStart' ) }
126+ < QuestionIconWithTooltip
127+ title = { t ( 'notification.RunAppOnSessionStartTooltip' ) }
128+ zIndex = { ( token . Notification ?. zIndexPopup || 2050 ) + 1 }
129+ />
130+ </ BAIFlex >
114131 </ BAIFlex >
115132 }
116133 footer = {
0 commit comments