reject unauthorized

This commit is contained in:
Alex Holliday committed 2025-11-27 20:41:49 +00:00
1 parent 686b96d4b3
commit 5876b97ede
19 files changed
+37 -14

No files matched your search

-1
View File
@@ -51,7 +51,6 @@ const ExportPage = () => {
const text = await file.text();
const json = JSON.parse(text);
const res = await post("/monitors/import", { monitors: json });
console.log(res);
} catch (error) {
console.error("Failed to parse JSON", error);
} finally {
@@ -17,7 +17,6 @@ const MaintenanceCreatePage = () => {
useGet<ApiResponse<IMonitor[]>>("/monitors");
const monitors = response?.data || [];
console.log(monitors);
const onSubmit = async (data: FormValues) => {
const res = await post("/maintenance", data);
@@ -52,8 +52,7 @@ export const MaintenanceForm = ({
}, [initialData, reset, defaults]);
const onError = (errors: any) => {
console.log(errors);
console.log(getValues());
console.error(errors);
};
return (
@@ -56,8 +56,7 @@ export const NotificationChannelsForm = ({
const type = watch("type");
const onError = (errors: any) => {
console.log(errors);
console.log(getValues());
console.error(errors);
};
const handleTest = async () => {
@@ -38,7 +38,6 @@ const PageSpeedConfigurePage = () => {
notificationChannels: data.notificationChannels,
interval,
};
console.log(submitData);
const result = await patch(`/monitors/${id}`, submitData);
if (result) {
navigate(`/pagespeed/${id}`);
@@ -55,7 +55,7 @@ export const StatusPageForm = ({
}, [initialData, reset, defaults]);
const onError = (errors: any) => {
console.log(errors);
console.error(errors);
};
const monitors = useWatch({
@@ -38,6 +38,7 @@ const UptimeConfigurePage = () => {
n: data.n,
notificationChannels: data.notificationChannels,
interval,
rejectUnauthorized: data.rejectUnauthorized,
};
const result = await patch(`/monitors/${id}`, submitData);
if (result) {
@@ -69,7 +69,6 @@ const UptimeDetailsPage = () => {
}
const stats = response?.data?.stats || null;
console.log(stats);
const avgResponseTime = stats?.avgResponseTime || 0;
const maxResponseTime = stats?.maxResponseTime || 0;
+19
View File
@@ -4,6 +4,7 @@ import {
Button,
AutoComplete,
RadioWithDescription,
Switch,
} from "@/components/inputs";
import { ConfigBox, BasePage } from "@/components/design-elements";
import RadioGroup from "@mui/material/RadioGroup";
@@ -314,6 +315,24 @@ export const UptimeForm = ({
/>
}
/>
<ConfigBox
title={t("createMonitorPage.rejectUnauthorizedTitle")}
subtitle={t("createMonitorPage.rejectUnauthorizedDescription")}
rightContent={
<Controller
name="rejectUnauthorized"
control={control}
render={({ field }) => (
<Stack direction="row" alignItems={"center"}>
<Switch {...field} checked={field.value} />
<Typography>
{field.value ? "Enabled (recommended)" : "Disabled"}
</Typography>
</Stack>
)}
/>
}
/>
<Stack direction="row" justifyContent="flex-end">
<Button
loading={loading}