File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
packages/backend.ai-ui/src/components/Table Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,7 @@ const BAITable = <RecordType extends object = any>({
326326 styles . neoHeader ,
327327 tableProps . rowSelection ?. columnWidth === 0 &&
328328 styles . zeroWithSelectionColumn ,
329+ styles . adjustZIndex ,
329330 ) }
330331 style = { {
331332 opacity : loading ? 0.7 : 1 ,
@@ -472,6 +473,11 @@ const useStyles = createStyles(({ token, css }) => ({
472473 padding : 0 !important ;
473474 }
474475 ` ,
476+ adjustZIndex : css `
477+ td .ant-table-cell .ant-table-cell-fix-left {
478+ z-index : 4 ;
479+ }
480+ ` ,
475481} ) ) ;
476482
477483const ResizableTitle = (
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ interface SessionActionButtonsProps {
4747 hiddenButtonKeys ?: SessionActionButtonKey [ ] ;
4848 onAction ?: ( action : SessionActionButtonKey ) => void ;
4949 primaryAppOption ?: PrimaryAppOption ;
50+ noPrimaryButton ?: boolean ;
5051}
5152
5253const isActive = ( session : SessionActionButtonsFragment$data ) => {
@@ -76,6 +77,7 @@ const SessionActionButtons: React.FC<SessionActionButtonsProps> = ({
7677 hiddenButtonKeys,
7778 primaryAppOption,
7879 onAction,
80+ noPrimaryButton : noPrimaryColor ,
7981} ) => {
8082 const { t } = useTranslation ( ) ;
8183 const { token } = theme . useToken ( ) ;
@@ -158,7 +160,7 @@ const SessionActionButtons: React.FC<SessionActionButtonsProps> = ({
158160 >
159161 < Button
160162 size = { size }
161- type = { 'primary' }
163+ type = { noPrimaryColor ? undefined : 'primary' }
162164 disabled = {
163165 ! isAppSupported ( session ) || ! isActive ( session ) || ! isOwner
164166 }
@@ -192,7 +194,9 @@ const SessionActionButtons: React.FC<SessionActionButtonsProps> = ({
192194 >
193195 < Button
194196 size = { size }
195- type = { primaryAppOption ? undefined : 'primary' }
197+ type = {
198+ primaryAppOption || noPrimaryColor ? undefined : 'primary'
199+ }
196200 disabled = {
197201 ! isAppSupported ( session ) || ! isActive ( session ) || ! isOwner
198202 }
Original file line number Diff line number Diff line change 44} from '../__generated__/SessionNodesFragment.graphql' ;
55import { useSuspendedBackendaiClient } from '../hooks' ;
66import { useCurrentUserRole } from '../hooks/backendai' ;
7+ import SessionActionButtons from './ComputeSessionNodeItems/SessionActionButtons' ;
78import SessionReservation from './ComputeSessionNodeItems/SessionReservation' ;
89import SessionSlotCell from './ComputeSessionNodeItems/SessionSlotCell' ;
910import SessionStatusTag from './ComputeSessionNodeItems/SessionStatusTag' ;
@@ -60,6 +61,7 @@ const SessionNodes: React.FC<SessionNodesProps> = ({
6061 ...BAISessionAgentIdsFragment
6162 ...BAISessionTypeTagFragment
6263 ...BAISessionClusterModeFragment
64+ ...SessionActionButtonsFragment
6365 kernel_nodes {
6466 edges {
6567 node {
@@ -114,6 +116,20 @@ const SessionNodes: React.FC<SessionNodesProps> = ({
114116 return < SessionStatusTag sessionFrgmt = { session } /> ;
115117 } ,
116118 } ,
119+ {
120+ key : 'actionButtons' ,
121+ title : t ( 'general.Control' ) ,
122+ defaultHidden : true ,
123+ sorter : false ,
124+ render : ( __ , session ) => (
125+ < SessionActionButtons
126+ size = "small"
127+ sessionFrgmt = { session }
128+ compact
129+ noPrimaryButton
130+ />
131+ ) ,
132+ } ,
117133 // This column will be added back when the session list column setting ui is ready
118134 // {
119135 // key: 'utils',
You can’t perform that action at this time.
0 commit comments