mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-23 06:46:11 +08:00
(ui): Fix QueueSizeMetricsChart
This commit is contained in:
@@ -140,6 +140,8 @@ function MetricsView(props: Props) {
|
||||
}
|
||||
}, [pollInterval, getMetricsAsync, durationSec, endTimeSec, endTimeOption]);
|
||||
|
||||
const now = currentUnixtime();
|
||||
|
||||
return (
|
||||
<Container maxWidth="lg" className={classes.container}>
|
||||
<Grid container spacing={3}>
|
||||
@@ -322,7 +324,15 @@ function MetricsView(props: Props) {
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Typography>Queue Size</Typography>
|
||||
<QueueSizeMetricsChart data={data?.data.result || []} />
|
||||
<QueueSizeMetricsChart
|
||||
data={data?.data.result || []}
|
||||
endTime={endTimeOption === "real_time" ? now : endTimeSec}
|
||||
startTime={
|
||||
endTimeOption === "real_time"
|
||||
? now - durationSec
|
||||
: endTimeSec - durationSec
|
||||
}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
|
||||
Reference in New Issue
Block a user