@@ -85,14 +85,14 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
8585 clusterType === "cloud" ? buildApiUrl ( "instances/status" ) : null ,
8686 ( url : string ) =>
8787 apiFetch ( url , { credentials : "include" } ) . then ( ( res ) => res . json ( ) ) ,
88- { refreshInterval : 2000 }
88+ { refreshInterval : 2000 } ,
8989 ) ;
9090
9191 // Process nodes based on cluster type
9292 let processedNodes = cluster . nodes ;
9393 let activeCount = cluster . nodes . filter ( ( n ) => n . status === "active" ) . length ;
9494 let assignedToYouCount = cluster . nodes . filter (
95- ( n ) => n . user === currentUser
95+ ( n ) => n . user === currentUser ,
9696 ) . length ;
9797
9898 if ( clusterType === "cloud" ) {
@@ -104,7 +104,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
104104 ac . status === "ClusterStatus.UP" ||
105105 ac . status === "ClusterStatus.INIT" ||
106106 ac . status === "UP" ||
107- ac . status === "INIT"
107+ ac . status === "INIT" ,
108108 ) || false ;
109109
110110 // Update the node status based on active clusters
@@ -116,7 +116,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
116116 ac . status === "ClusterStatus.UP" ||
117117 ac . status === "ClusterStatus.INIT" ||
118118 ac . status === "UP" ||
119- ac . status === "INIT"
119+ ac . status === "INIT" ,
120120 ) ;
121121
122122 return {
@@ -144,7 +144,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
144144 // For other cloud providers (RunPod, Azure), use the old SkyPilot status matching
145145 const skyPilotClusters = skyPilotStatus ?. clusters || [ ] ;
146146 const skyPilotCluster = skyPilotClusters . find (
147- ( c : any ) => c . cluster_name === displayName
147+ ( c : any ) => c . cluster_name === displayName ,
148148 ) ;
149149 const isActiveCluster =
150150 skyPilotCluster ?. status === "ClusterStatus.UP" ||
@@ -168,7 +168,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
168168 } ) ) ;
169169
170170 activeCount = processedNodes . filter (
171- ( n : Node ) => n . status === "active"
171+ ( n : Node ) => n . status === "active" ,
172172 ) . length ;
173173 assignedToYouCount = 0 ; // All nodes are available, none assigned
174174 }
@@ -177,7 +177,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
177177 const sortedNodes = [ ...processedNodes ] . sort (
178178 ( a , b ) =>
179179 getStatusOrder ( a . status , a . type , a . user , currentUser ) -
180- getStatusOrder ( b . status , b . type , b . user , currentUser )
180+ getStatusOrder ( b . status , b . type , b . user , currentUser ) ,
181181 ) ;
182182
183183 const handleReserveNode = ( ) => {
@@ -284,7 +284,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
284284
285285 // Helper to parse strings like "1 of 2 free"
286286 const parseUtilization = (
287- s ?: string
287+ s ?: string ,
288288 ) : { free ?: number ; total ?: number } => {
289289 if ( ! s ) return { } ;
290290 const m = s . match ( / ( \d + ) \s * o f \s * ( \d + ) / i) ;
@@ -302,18 +302,18 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
302302 const util = parseUtilization ( e . utilization ) ;
303303 const totalParsed = Number . parseInt (
304304 e . total ?? "" ,
305- 10
305+ 10 ,
306306 ) ;
307307 const freeParsed = Number . parseInt (
308308 e . free ?? "" ,
309- 10
309+ 10 ,
310310 ) ;
311311 const total = Number . isFinite ( totalParsed )
312312 ? totalParsed
313- : util . total ?? 0 ;
313+ : ( util . total ?? 0 ) ;
314314 const free = Number . isFinite ( freeParsed )
315315 ? freeParsed
316- : util . free ?? 0 ;
316+ : ( util . free ?? 0 ) ;
317317
318318 totalGpus += total ;
319319 usedGpus += Math . max ( 0 , total - free ) ;
@@ -326,7 +326,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
326326 } else {
327327 // Fall back to capacity calculation for non-SSH clusters
328328 return Math . round (
329- ( activeCount / processedNodes . length ) * 100
329+ ( activeCount / processedNodes . length ) * 100 ,
330330 ) ;
331331 }
332332 } ) ( ) }
@@ -389,7 +389,7 @@ const ClusterCard: React.FC<ClusterCardProps> = ({
389389 // For cloud and regular clusters, show in two columns
390390 [ "dedicated" , "on-demand" ] . map ( ( nodeType ) => {
391391 const nodesOfType = nodesToShow . filter (
392- ( node ) => node . type === nodeType
392+ ( node ) => node . type === nodeType ,
393393 ) ;
394394 if ( nodesOfType . length === 0 ) return null ;
395395
0 commit comments