mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
20 lines
617 B
TypeScript
20 lines
617 B
TypeScript
import { Box } from "@mantine/core"
|
|
import { MetricMeter } from "app/types"
|
|
|
|
interface MeterProps {
|
|
meter: MetricMeter
|
|
}
|
|
|
|
export function Meter(props: MeterProps) {
|
|
return (
|
|
<Box>
|
|
<Box>Mean: {props.meter.mean_rate.toFixed(2)}</Box>
|
|
<Box>Last minute: {props.meter.m1_rate.toFixed(2)}</Box>
|
|
<Box>Last 5 minutes: {props.meter.m5_rate.toFixed(2)}</Box>
|
|
<Box>Last 15 minutes: {props.meter.m15_rate.toFixed(2)}</Box>
|
|
<Box>Units: {props.meter.units}</Box>
|
|
<Box>Total: {props.meter.count}</Box>
|
|
</Box>
|
|
)
|
|
}
|