11import HeroEpochCard from '@/components/Hero/HeroEpochCard' ;
2+ import * as types from '@/typedefs/blockchain' ;
23import { Skeleton } from '@heroui/skeleton' ;
4+ import { round } from 'lodash' ;
35import { Suspense } from 'react' ;
46import R1MintedLastEpoch from '../R1MintedLastEpoch' ;
57import { BorderedCard } from '../shared/cards/BorderedCard' ;
68import { CardHorizontal } from '../shared/cards/CardHorizontal' ;
79import R1TotalSupply from '../shared/R1TotalSupply' ;
810
9- export default async function Hero ( { nodesTotalItems } ) {
11+ export default async function Hero ( {
12+ nodesTotalItems,
13+ resourcesTotal,
14+ } : {
15+ nodesTotalItems : number ;
16+ resourcesTotal : types . ResourcesTotal ;
17+ } ) {
1018 return (
1119 < div className = "w-full" >
1220 < BorderedCard >
1321 < div className = "card-title-big font-bold" > Nodes</ div >
1422
1523 < div className = "flexible-row" >
16- < CardHorizontal label = "Active Nodes" value = { nodesTotalItems } isFlexible widthClasses = "min-w-[192px]" />
24+ < CardHorizontal label = "Active Nodes" value = { nodesTotalItems } isFlexible widthClasses = "min-w-[196px]" />
25+
26+ < CardHorizontal
27+ label = "CPU Cores Available"
28+ value = { round ( resourcesTotal . cpu_cores_avail , 1 ) }
29+ isFlexible
30+ widthClasses = "min-w-[274px]"
31+ />
32+
33+ < CardHorizontal
34+ label = "Memory Available"
35+ value = {
36+ < div >
37+ { round ( resourcesTotal . mem_avail , 1 ) } < span className = "text-slate-500" > GB</ span >
38+ </ div >
39+ }
40+ isFlexible
41+ widthClasses = "min-w-[302px]"
42+ />
43+
44+ < CardHorizontal
45+ label = "Disk Available"
46+ value = {
47+ < div >
48+ { round ( resourcesTotal . disk_avail , 1 ) } < span className = "text-slate-500" > GB</ span >
49+ </ div >
50+ }
51+ isFlexible
52+ widthClasses = "min-w-[282px]"
53+ />
1754
1855 < CardHorizontal
1956 label = {
@@ -35,7 +72,7 @@ export default async function Hero({ nodesTotalItems }) {
3572 }
3673 value = { < R1MintedLastEpoch /> }
3774 isFlexible
38- widthClasses = "min-w-[254px ]"
75+ widthClasses = "min-w-[300px ]"
3976 />
4077 </ Suspense >
4178
0 commit comments