fix(striker-ui): adjust texts in anvil summary

main
Tsu-ba-me 1 year ago
parent 134e11489c
commit 3e27af973b
  1. 25
      striker-ui/components/Anvils/AnvilSummary.tsx

@ -107,7 +107,11 @@ const AnvilSummary: FC<AnvilSummaryProps> = (props) => {
} }
return ( return (
<BodyText key={`anvil-summary-host-${uuid}`} whiteSpace="nowrap"> <BodyText
key={`anvil-summary-host-${uuid}`}
variant="caption"
whiteSpace="nowrap"
>
{name}{' '} {name}{' '}
<InlineMonoText inheritColour color={stateColour}> <InlineMonoText inheritColour color={stateColour}>
{stateValue} {stateValue}
@ -124,10 +128,11 @@ const AnvilSummary: FC<AnvilSummaryProps> = (props) => {
() => () =>
cpu && cpu &&
cpuSubnodes && ( cpuSubnodes && (
<FlexBox justifyContent="center" row> <FlexBox row>
<FlexBox spacing={0}> <FlexBox spacing={0}>
<BodyText variant="caption">{cpuSubnodes[0].name}</BodyText> <BodyText variant="caption" whiteSpace="nowrap">
<MonoText>{cpuSubnodes[0].vendor}</MonoText> Vendor <InlineMonoText>{cpuSubnodes[0].vendor}</InlineMonoText>
</BodyText>
</FlexBox> </FlexBox>
<Grid <Grid
columns={2} columns={2}
@ -141,22 +146,18 @@ const AnvilSummary: FC<AnvilSummaryProps> = (props) => {
width="calc(0% + 4em)" width="calc(0% + 4em)"
> >
<Grid item xs={1}> <Grid item xs={1}>
<BodyText variant="caption">CORES</BodyText> <BodyText variant="caption">Cores</BodyText>
</Grid> </Grid>
<Grid display="flex" item justifyContent="flex-end" xs={1}> <Grid display="flex" item justifyContent="flex-end" xs={1}>
<MonoText variant="caption">{cpu.cores}</MonoText> <MonoText variant="caption">{cpu.cores}</MonoText>
</Grid> </Grid>
<Grid item xs={1}> <Grid item xs={1}>
<BodyText variant="caption">THREADS</BodyText> <BodyText variant="caption">Threads</BodyText>
</Grid> </Grid>
<Grid display="flex" item justifyContent="flex-end" xs={1}> <Grid display="flex" item justifyContent="flex-end" xs={1}>
<MonoText variant="caption">{cpu.threads}</MonoText> <MonoText variant="caption">{cpu.threads}</MonoText>
</Grid> </Grid>
</Grid> </Grid>
<FlexBox spacing={0}>
<BodyText variant="caption">{cpuSubnodes[1].name}</BodyText>
<MonoText>{cpuSubnodes[1].vendor}</MonoText>
</FlexBox>
</FlexBox> </FlexBox>
), ),
[cpu, cpuSubnodes], [cpu, cpuSubnodes],
@ -168,7 +169,7 @@ const AnvilSummary: FC<AnvilSummaryProps> = (props) => {
<FlexBox spacing={0}> <FlexBox spacing={0}>
<FlexBox row justifyContent="flex-end"> <FlexBox row justifyContent="flex-end">
<BodyText mb="-.3em" variant="caption"> <BodyText mb="-.3em" variant="caption">
FREE Free
<InlineMonoText> <InlineMonoText>
{dSizeStr(memory.total - (memory.reserved + memory.allocated), { {dSizeStr(memory.total - (memory.reserved + memory.allocated), {
toUnit: 'ibyte', toUnit: 'ibyte',
@ -205,7 +206,7 @@ const AnvilSummary: FC<AnvilSummaryProps> = (props) => {
<FlexBox spacing={0}> <FlexBox spacing={0}>
<FlexBox row justifyContent="flex-end"> <FlexBox row justifyContent="flex-end">
<BodyText mb="-.3em" variant="caption"> <BodyText mb="-.3em" variant="caption">
FREE Total free
<InlineMonoText> <InlineMonoText>
{dSizeStr(storages.totalFree, { toUnit: 'ibyte' })} {dSizeStr(storages.totalFree, { toUnit: 'ibyte' })}
</InlineMonoText> </InlineMonoText>

Loading…
Cancel
Save