fix bad merge
This commit is contained in:
1 parent
97e4eb557d
commit
254e2fd244
1 file changed
+24
-25
@@ -11,7 +11,6 @@ import { checkEndpointResolution } from "../../../Features/UptimeMonitors/uptime
|
|||||||
import { monitorValidation } from "../../../Validation/validation";
|
import { monitorValidation } from "../../../Validation/validation";
|
||||||
import { getUptimeMonitorById } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
import { getUptimeMonitorById } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
import { createUptimeMonitor } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
import { createUptimeMonitor } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
// MUI
|
// MUI
|
||||||
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material";
|
||||||
|
|
||||||
@@ -75,7 +74,6 @@ const CreateMonitor = () => {
|
|||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
|
||||||
const { monitorId } = useParams();
|
const { monitorId } = useParams();
|
||||||
const crumbs = [
|
const crumbs = [
|
||||||
{ name: "uptime", path: "/uptime" },
|
{ name: "uptime", path: "/uptime" },
|
||||||
@@ -86,8 +84,8 @@ const CreateMonitor = () => {
|
|||||||
const [isNotificationModalOpen, setIsNotificationModalOpen] = useState(false);
|
const [isNotificationModalOpen, setIsNotificationModalOpen] = useState(false);
|
||||||
|
|
||||||
const handleOpenNotificationModal = () => {
|
const handleOpenNotificationModal = () => {
|
||||||
setIsNotificationModalOpen(true);
|
setIsNotificationModalOpen(true);
|
||||||
};
|
};
|
||||||
const [errors, setErrors] = useState({});
|
const [errors, setErrors] = useState({});
|
||||||
const [https, setHttps] = useState(true);
|
const [https, setHttps] = useState(true);
|
||||||
const [monitor, setMonitor] = useState({
|
const [monitor, setMonitor] = useState({
|
||||||
@@ -212,7 +210,7 @@ const CreateMonitor = () => {
|
|||||||
|
|
||||||
const handleAddNotification = () => {
|
const handleAddNotification = () => {
|
||||||
console.log("Add notification clicked");
|
console.log("Add notification clicked");
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchMonitor = async () => {
|
const fetchMonitor = async () => {
|
||||||
@@ -356,9 +354,7 @@ const CreateMonitor = () => {
|
|||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">{t("settingsGeneralSettings")}</Typography>
|
<Typography component="h2">{t("settingsGeneralSettings")}</Typography>
|
||||||
<Typography component="p">
|
<Typography component="p">{t("distributedUptimeCreateSelectURL")}</Typography>
|
||||||
{t("distributedUptimeCreateSelectURL")}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(15)}>
|
<Stack gap={theme.spacing(15)}>
|
||||||
<TextInput
|
<TextInput
|
||||||
@@ -401,7 +397,9 @@ const CreateMonitor = () => {
|
|||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">{t("distributedUptimeCreateIncidentNotification")}</Typography>
|
<Typography component="h2">
|
||||||
|
{t("distributedUptimeCreateIncidentNotification")}
|
||||||
|
</Typography>
|
||||||
<Typography component="p">
|
<Typography component="p">
|
||||||
{t("distributedUptimeCreateIncidentDescription")}
|
{t("distributedUptimeCreateIncidentDescription")}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -417,21 +415,22 @@ const CreateMonitor = () => {
|
|||||||
onChange={(event) => handleNotifications(event, "email")}
|
onChange={(event) => handleNotifications(event, "email")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Box mt={theme.spacing(2)}>
|
<Box mt={theme.spacing(2)}>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
onClick={handleOpenNotificationModal}
|
onClick={handleOpenNotificationModal}
|
||||||
>
|
>
|
||||||
{t('notifications.integrationButton')}
|
{t("notifications.integrationButton")}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">{t("distributedUptimeCreateAdvancedSettings")}</Typography>
|
<Typography component="h2">
|
||||||
|
{t("distributedUptimeCreateAdvancedSettings")}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(12)}>
|
<Stack gap={theme.spacing(12)}>
|
||||||
<Select
|
<Select
|
||||||
@@ -522,11 +521,11 @@ const CreateMonitor = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<NotificationIntegrationModal
|
<NotificationIntegrationModal
|
||||||
open={isNotificationModalOpen}
|
open={isNotificationModalOpen}
|
||||||
onClose={() => setIsNotificationModalOpen(false)}
|
onClose={() => setIsNotificationModalOpen(false)}
|
||||||
monitor={monitor}
|
monitor={monitor}
|
||||||
setMonitor={setMonitor}
|
setMonitor={setMonitor}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user