build errors
This commit is contained in:
1 parent
d71c7c6ee1
commit
967b2b200b
4 files changed
+32
-18
No files matched your search
@@ -66,7 +66,7 @@ export const HeaderMonitorControls = ({
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
startIcon={<Icon icon={Bug} />}
|
startIcon={<Icon icon={Bug} />}
|
||||||
onClick={(e) => {
|
onClick={() => {
|
||||||
navigate(`/incidents/${monitor?.id}`);
|
navigate(`/incidents/${monitor?.id}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -37,10 +37,30 @@ export const HeaderTimeRange = ({
|
|||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<ToggleButton value="recent">Recent</ToggleButton>
|
<ToggleButton
|
||||||
<ToggleButton value="day">Day</ToggleButton>
|
disabled={isLoading}
|
||||||
<ToggleButton value="week">Week</ToggleButton>
|
value="recent"
|
||||||
<ToggleButton value="month">Month</ToggleButton>
|
>
|
||||||
|
Recent
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
disabled={isLoading}
|
||||||
|
value="day"
|
||||||
|
>
|
||||||
|
Day
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
disabled={isLoading}
|
||||||
|
value="week"
|
||||||
|
>
|
||||||
|
Week
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
disabled={isLoading}
|
||||||
|
value="month"
|
||||||
|
>
|
||||||
|
Month
|
||||||
|
</ToggleButton>
|
||||||
</ToggleButtonGroup>
|
</ToggleButtonGroup>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { ResponsiveContainer, BarChart, XAxis, Bar, Cell, Tooltip } from "recharts";
|
import { ResponsiveContainer, BarChart, XAxis, Bar, Cell, Tooltip } from "recharts";
|
||||||
import { getResponseTimeColor } from "@/Utils/MonitorUtils";
|
import { getResponseTimeColor } from "@/Utils/MonitorUtils";
|
||||||
import type { GroupedCheck } from "@/Types/Check";
|
import type { GroupedCheck } from "@/Types/Check";
|
||||||
import type { MonitorData } from "@/Types/Monitor";
|
|
||||||
import type { RootState } from "@/Types/state";
|
import type { RootState } from "@/Types/state";
|
||||||
|
|
||||||
interface XLabelProps {
|
interface XLabelProps {
|
||||||
@@ -50,7 +49,6 @@ const XLabel = ({ p1, p2, range }: XLabelProps) => {
|
|||||||
interface HistogramStatusProps {
|
interface HistogramStatusProps {
|
||||||
title: string;
|
title: string;
|
||||||
icon: React.ReactNode;
|
icon: React.ReactNode;
|
||||||
monitorData?: MonitorData;
|
|
||||||
checks?: GroupedCheck[];
|
checks?: GroupedCheck[];
|
||||||
range: string;
|
range: string;
|
||||||
}
|
}
|
||||||
@@ -58,7 +56,6 @@ interface HistogramStatusProps {
|
|||||||
export const HistogramStatus = ({
|
export const HistogramStatus = ({
|
||||||
title,
|
title,
|
||||||
icon,
|
icon,
|
||||||
monitorData,
|
|
||||||
checks = [],
|
checks = [],
|
||||||
range,
|
range,
|
||||||
}: HistogramStatusProps) => {
|
}: HistogramStatusProps) => {
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ const UptimeDetailsPage = () => {
|
|||||||
const {
|
const {
|
||||||
data: monitorDetailsData,
|
data: monitorDetailsData,
|
||||||
isLoading: monitorIsLoading,
|
isLoading: monitorIsLoading,
|
||||||
error: monitorError,
|
|
||||||
refetch: refetchMonitor,
|
refetch: refetchMonitor,
|
||||||
} = useGet<MonitorDetailsResponse>(
|
} = useGet<MonitorDetailsResponse>(
|
||||||
monitorDetailsUrl,
|
monitorDetailsUrl,
|
||||||
@@ -99,11 +98,11 @@ const UptimeDetailsPage = () => {
|
|||||||
return `/checks/${monitorId}?${params.toString()}`;
|
return `/checks/${monitorId}?${params.toString()}`;
|
||||||
}, [monitorId, monitor?.type, dateRange, page, rowsPerPage]);
|
}, [monitorId, monitor?.type, dateRange, page, rowsPerPage]);
|
||||||
|
|
||||||
const {
|
const { data: checksData, isLoading: checksIsLoading } = useGet<ChecksResponse>(
|
||||||
data: checksData,
|
checksUrl,
|
||||||
isLoading: checksIsLoading,
|
{},
|
||||||
error: checksError,
|
{ keepPreviousData: true }
|
||||||
} = useGet<ChecksResponse>(checksUrl, {}, { keepPreviousData: true });
|
);
|
||||||
|
|
||||||
const checks = checksData?.checks ?? [];
|
const checks = checksData?.checks ?? [];
|
||||||
const checksCount = checksData?.checksCount ?? 0;
|
const checksCount = checksData?.checksCount ?? 0;
|
||||||
@@ -134,15 +133,13 @@ const UptimeDetailsPage = () => {
|
|||||||
<HistogramStatus
|
<HistogramStatus
|
||||||
title={t("common.charts.labels.uptime")}
|
title={t("common.charts.labels.uptime")}
|
||||||
icon={<TrendingUp />}
|
icon={<TrendingUp />}
|
||||||
monitorData={monitorData}
|
checks={monitorData?.groupedUpChecks ?? []}
|
||||||
checks={monitorData?.groupedUpChecks}
|
|
||||||
range={dateRange}
|
range={dateRange}
|
||||||
/>
|
/>
|
||||||
<HistogramStatus
|
<HistogramStatus
|
||||||
title={t("common.charts.labels.downtime")}
|
title={t("common.charts.labels.downtime")}
|
||||||
icon={<AlertTriangle />}
|
icon={<AlertTriangle />}
|
||||||
monitorData={monitorData}
|
checks={monitorData?.groupedDownChecks ?? []}
|
||||||
checks={monitorData?.groupedDownChecks}
|
|
||||||
range={dateRange}
|
range={dateRange}
|
||||||
/>
|
/>
|
||||||
<RadialAvgResponse
|
<RadialAvgResponse
|
||||||
|
|||||||
Reference in new issue
Block a user