Added breadcrumbs to create monitor
This commit is contained in:
1 parent
2f50893ead
commit
14cf13fd82
2 files changed
+32
-42
No files matched your search
@@ -13,7 +13,9 @@
|
|||||||
.create-monitor button.MuiButtonBase-root {
|
.create-monitor button.MuiButtonBase-root {
|
||||||
font-size: var(--env-var-font-size-medium);
|
font-size: var(--env-var-font-size-medium);
|
||||||
}
|
}
|
||||||
.create-monitor h2.MuiTypography-root,
|
.create-monitor h2.MuiTypography-root {
|
||||||
|
color: var(--env-var-color-5);
|
||||||
|
}
|
||||||
.create-monitor h6.MuiTypography-root,
|
.create-monitor h6.MuiTypography-root,
|
||||||
.create-monitor p.MuiTypography-root {
|
.create-monitor p.MuiTypography-root {
|
||||||
color: var(--env-var-color-2);
|
color: var(--env-var-color-2);
|
||||||
@@ -43,23 +45,20 @@
|
|||||||
top: 100%;
|
top: 100%;
|
||||||
}
|
}
|
||||||
.create-monitor .config-box {
|
.create-monitor .config-box {
|
||||||
padding: var(--env-var-spacing-4) 50px;
|
flex-direction: row;
|
||||||
padding-bottom: 60px;
|
|
||||||
border: 1px solid var(--env-var-color-16);
|
border: 1px solid var(--env-var-color-16);
|
||||||
border-radius: var(--env-var-radius-1);
|
border-radius: var(--env-var-radius-1);
|
||||||
flex-direction: row;
|
|
||||||
gap: var(--env-var-spacing-4);
|
|
||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
}
|
}
|
||||||
.create-monitor .config-box .MuiBox-root,
|
.create-monitor .config-box > .MuiBox-root,
|
||||||
.create-monitor .config-box .MuiStack-root {
|
.create-monitor .config-box > .MuiStack-root {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
padding: 24px 30px;
|
||||||
|
padding-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
.create-monitor .config-box > *:first-child {
|
||||||
.create-monitor-form {
|
flex: 0.7;
|
||||||
display: flex;
|
border-right: solid 1px var(--env-var-color-16);
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--env-var-spacing-2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.create-monitor .MuiStack-root .MuiButtonGroup-root button {
|
.create-monitor .MuiStack-root .MuiButtonGroup-root button {
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import { monitorValidation } from "../../../Validation/validation";
|
|||||||
import { createUptimeMonitor } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
import { createUptimeMonitor } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
|
||||||
import Field from "../../../Components/Inputs/Field";
|
import Field from "../../../Components/Inputs/Field";
|
||||||
import Select from "../../../Components/Inputs/Select";
|
import Select from "../../../Components/Inputs/Select";
|
||||||
import Checkbox from "../../../Components/Inputs/Checkbox";
|
import Checkbox from "../../../Components/Inputs/Checkbox";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
|
||||||
const CreateMonitor = () => {
|
const CreateMonitor = () => {
|
||||||
const MS_PER_MINUTE = 60000;
|
const MS_PER_MINUTE = 60000;
|
||||||
@@ -143,33 +143,26 @@ const CreateMonitor = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="create-monitor">
|
<Box className="create-monitor">
|
||||||
<Button
|
<Breadcrumbs
|
||||||
level="tertiary"
|
list={[
|
||||||
label="Back"
|
{ name: "monitors", path: "/monitors" },
|
||||||
animate="slideLeft"
|
{ name: "details", path: `/monitors/create` },
|
||||||
img={<WestRoundedIcon />}
|
]}
|
||||||
onClick={() => navigate("/monitors")}
|
|
||||||
sx={{
|
|
||||||
backgroundColor: theme.palette.otherColors.fillGray,
|
|
||||||
mb: theme.gap.medium,
|
|
||||||
px: theme.gap.ml,
|
|
||||||
"& svg.MuiSvgIcon-root": {
|
|
||||||
mr: theme.gap.small,
|
|
||||||
fill: theme.palette.otherColors.slateGray,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
<form
|
<Stack
|
||||||
|
component="form"
|
||||||
className="create-monitor-form"
|
className="create-monitor-form"
|
||||||
onSubmit={handleCreateMonitor}
|
onSubmit={handleCreateMonitor}
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
|
gap={theme.gap.large}
|
||||||
|
mt={theme.gap.mlplus}
|
||||||
>
|
>
|
||||||
<Typography component="h1">Create new monitor</Typography>
|
<Typography component="h1">Create new monitor</Typography>
|
||||||
<Stack className="config-box">
|
<Stack className="config-box">
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">General settings</Typography>
|
<Typography component="h2">General settings</Typography>
|
||||||
<Typography component="p" mt={theme.gap.small}>
|
<Typography component="p" mt={theme.gap.xs}>
|
||||||
Here you can select the URL of the host, together with the type of
|
Here you can select the URL of the host, together with the type of
|
||||||
monitor.
|
monitor.
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -200,7 +193,7 @@ const CreateMonitor = () => {
|
|||||||
<Stack className="config-box">
|
<Stack className="config-box">
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">Checks to perform</Typography>
|
<Typography component="h2">Checks to perform</Typography>
|
||||||
<Typography component="p" mt={theme.gap.small}>
|
<Typography component="p" mt={theme.gap.xs}>
|
||||||
You can always add or remove checks after adding your site.
|
You can always add or remove checks after adding your site.
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -249,28 +242,26 @@ const CreateMonitor = () => {
|
|||||||
checked={monitor.type === "ping"}
|
checked={monitor.type === "ping"}
|
||||||
onChange={(event) => handleChange(event)}
|
onChange={(event) => handleChange(event)}
|
||||||
/>
|
/>
|
||||||
<Box className="error-container">
|
{errors["type"] ? (
|
||||||
{errors["type"] ? (
|
<Box className="error-container">
|
||||||
<Typography component="p" className="input-error">
|
<Typography component="p" className="input-error">
|
||||||
{errors["type"]}
|
{errors["type"]}
|
||||||
</Typography>
|
</Typography>
|
||||||
) : (
|
</Box>
|
||||||
""
|
) : (
|
||||||
)}
|
""
|
||||||
</Box>
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack className="config-box">
|
<Stack className="config-box">
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">Incident notifications</Typography>
|
<Typography component="h2">Incident notifications</Typography>
|
||||||
<Typography component="p" mt={theme.gap.small}>
|
<Typography component="p" mt={theme.gap.xs}>
|
||||||
When there is an incident, notify users.
|
When there is an incident, notify users.
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.gap.medium}>
|
<Stack gap={theme.gap.medium}>
|
||||||
<Typography component="p" mt={theme.gap.small}>
|
<Typography component="p">When there is a new incident,</Typography>
|
||||||
When there is a new incident,
|
|
||||||
</Typography>
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id="notify-sms"
|
id="notify-sms"
|
||||||
label="Notify via SMS (coming soon)"
|
label="Notify via SMS (coming soon)"
|
||||||
@@ -404,7 +395,7 @@ const CreateMonitor = () => {
|
|||||||
disabled={Object.keys(errors).length !== 0 && true}
|
disabled={Object.keys(errors).length !== 0 && true}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user