File tree Expand file tree Collapse file tree
src/dashboard/src/pages/Submission/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,9 +47,16 @@ const ClusterSelectField: React.FC<ClusterSelectFieldProps & BaseTextFieldProps>
4747 if ( ! isEmpty ( res ) ) {
4848 clusterName = ( String ) ( Object . keys ( res [ 'gpu_capacity' ] ) [ 0 ] )
4949 }
50+ if ( clusterName === 'undefined' ) {
51+ clusterName = ( String ) ( Object . keys ( res [ 'cpu_capacity' ] ) [ 0 ] )
52+ }
5053 const gpuCapacity = isEmpty ( res ) ? 0 : ( String ) ( sumValues ( res [ 'gpu_capacity' ] ) ) ;
5154 const gpuAvailable = isEmpty ( res ) ? 0 : ( String ) ( sumValues ( res [ 'gpu_avaliable' ] ) ) ;
52- setHelperText ( `${ clusterName } (${ gpuAvailable } / ${ gpuCapacity } to use)` ) ;
55+ if ( isEmpty ( res [ 'gpu_capacity' ] ) ) {
56+ setHelperText ( `${ clusterName } ` ) ;
57+ } else {
58+ setHelperText ( `${ clusterName } (${ gpuAvailable } / ${ gpuCapacity } to use)` ) ;
59+ }
5360 } )
5461 if ( cluster ) {
5562 onClusterChange ( cluster ) ;
You can’t perform that action at this time.
0 commit comments