@@ -75,12 +75,7 @@ const isActiveSlot = (value: unknown): value is string =>
7575 typeof value === "string" && value . length > 0 && value !== "-1" ;
7676
7777type FilterOption =
78- | "all"
79- | "with-migration"
80- | "no-migration"
81- | "with-slots"
82- | "no-slots"
83- | "with-importing" ;
78+ "all" | "with-migration" | "no-migration" | "with-slots" | "no-slots" | "with-importing" ;
8479type SortOption =
8580 | "name-asc"
8681 | "name-desc"
@@ -127,16 +122,16 @@ async function buildClusterData(namespace: string): Promise<{
127122
128123 const shards = ( ( clusterInfo as any ) . shards as any [ ] ) || [ ] ;
129124 const nodeLists = await Promise . all (
130- shards . map ( ( _ , i ) => listNodes ( namespace , cluster , i . toString ( ) ) ) ,
125+ shards . map ( ( _ , i ) => listNodes ( namespace , cluster , i . toString ( ) ) )
131126 ) ;
132127 const nodeCount = nodeLists . reduce (
133128 ( acc , nodes ) => acc + ( Array . isArray ( nodes ) ? nodes . length : 0 ) ,
134- 0 ,
129+ 0
135130 ) ;
136131
137132 const slotCount = shards . reduce (
138133 ( acc : number , s : any ) => acc + parseSlotCount ( s ?. slot_ranges ) ,
139- 0 ,
134+ 0
140135 ) ;
141136 const slotRanges : string [ ] = shards
142137 . flatMap ( ( s : any ) => ( Array . isArray ( s ?. slot_ranges ) ? s . slot_ranges : [ ] ) )
@@ -164,7 +159,7 @@ async function buildClusterData(namespace: string): Promise<{
164159 console . error ( `Failed to load cluster ${ cluster } :` , error ) ;
165160 return null ;
166161 }
167- } ) ,
162+ } )
168163 ) ;
169164
170165 return {
@@ -183,9 +178,7 @@ function formatSummary(clusters: number, shards: number, nodes: number, coverage
183178 return parts . join ( " · " ) ;
184179}
185180
186- export default function NamespacePage ( props : {
187- params : Promise < { namespace : string } > ;
188- } ) {
181+ export default function NamespacePage ( props : { params : Promise < { namespace : string } > } ) {
189182 const params = use ( props . params ) ;
190183 const [ rows , setRows ] = useState < ClusterData [ ] > ( [ ] ) ;
191184 const [ totals , setTotals ] = useState ( { shards : 0 , nodes : 0 , slots : 0 } ) ;
@@ -485,11 +478,11 @@ function ActivityStrip({
485478 const bits : string [ ] = [ ] ;
486479 if ( migrating . length > 0 )
487480 bits . push (
488- `${ migrating . length } ${ migrating . length === 1 ? "cluster" : "clusters" } migrating` ,
481+ `${ migrating . length } ${ migrating . length === 1 ? "cluster" : "clusters" } migrating`
489482 ) ;
490483 if ( importing . length > 0 )
491484 bits . push (
492- `${ importing . length } ${ importing . length === 1 ? "cluster" : "clusters" } importing` ,
485+ `${ importing . length } ${ importing . length === 1 ? "cluster" : "clusters" } importing`
493486 ) ;
494487
495488 const active = [
@@ -586,10 +579,7 @@ function ClusterRow({
586579 className = "group grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-4 px-6 py-4 transition-colors hover:bg-surface-hover dark:hover:bg-surface-dark-hover md:grid-cols-[auto_minmax(0,1fr)_auto_auto]"
587580 aria-label = { `${ cluster . name } , ${ stateLabel . toLowerCase ( ) } ` }
588581 >
589- < span
590- className = { `h-2 w-2 shrink-0 rounded-full ${ dotClass } ` }
591- aria-hidden
592- />
582+ < span className = { `h-2 w-2 shrink-0 rounded-full ${ dotClass } ` } aria-hidden />
593583
594584 < div className = "min-w-0" >
595585 < div className = "flex items-center gap-2" >
@@ -654,7 +644,7 @@ function ClusterRow({
654644 </ div >
655645 < div className = "mt-1 flex items-center justify-between text-2xs text-text-muted dark:text-text-dark-muted" >
656646 < span > { stateLabel } </ span >
657- < span className = "font-medium text-text-secondary tabular-nums dark:text-text-dark-secondary" >
647+ < span className = "font-medium tabular-nums text-text-secondary dark:text-text-dark-secondary" >
658648 { coverage } %
659649 </ span >
660650 </ div >
0 commit comments