resolve errors
This commit is contained in:
1 parent
fcd9e78367
commit
7771a0ce35
3 files changed
+21
-16
No files matched your search
@@ -2,31 +2,23 @@ import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import { HeatmapResponseTime, HistogramResponseTime } from "@/Components/v2/common";
|
||||
import type { Check } from "@/Types/Check";
|
||||
import type { CheckSnapshot } from "@/Types/Check";
|
||||
|
||||
interface DummyChartProps {
|
||||
chartType: string;
|
||||
}
|
||||
|
||||
const generateDummyChecks = (): Check[] => {
|
||||
const checks: Check[] = [];
|
||||
const generateDummyChecks = (): CheckSnapshot[] => {
|
||||
const checks: CheckSnapshot[] = [];
|
||||
for (let i = 0; i < 25; i++) {
|
||||
const isUp = Math.random() > 0.1;
|
||||
checks.push({
|
||||
id: `dummy-${i}`,
|
||||
metadata: {
|
||||
monitorId: "dummy-monitor",
|
||||
teamId: "dummy-team",
|
||||
type: "http",
|
||||
},
|
||||
status: isUp,
|
||||
statusCode: isUp ? 200 : 500,
|
||||
responseTime: Math.floor(Math.random() * 80) + 20,
|
||||
message: "",
|
||||
ack: false,
|
||||
expiry: new Date(Date.now() + 86400000).toISOString(),
|
||||
createdAt: new Date(Date.now() - i * 60000).toISOString(),
|
||||
updatedAt: new Date(Date.now() - i * 60000).toISOString(),
|
||||
});
|
||||
}
|
||||
return checks;
|
||||
|
||||
Reference in new issue
Block a user