Merge pull request #667 from bluewave-labs/feat/breadcrumbs-re-layout
Breadcrumbs
This commit is contained in:
13 files changed
+140
-218
No files matched your search
@@ -22,7 +22,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.MuiBreadcrumbs-root .MuiBreadcrumbs-li:last-child a {
|
.MuiBreadcrumbs-root .MuiBreadcrumbs-li:last-child a {
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,7 @@
|
|||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
.configure-monitor h6.MuiTypography-root,
|
.configure-monitor h6.MuiTypography-root,
|
||||||
.configure-monitor p.MuiTypography-root:has(span),
|
.configure-monitor h1.MuiTypography-root + span.MuiTypography-root {
|
||||||
.configure-monitor p.MuiTypography-root span.MuiTypography-root {
|
|
||||||
font-size: var(--env-var-font-size-small-plus);
|
font-size: var(--env-var-font-size-small-plus);
|
||||||
}
|
}
|
||||||
.configure-monitor button.MuiButtonBase-root {
|
.configure-monitor button.MuiButtonBase-root {
|
||||||
@@ -33,19 +32,20 @@
|
|||||||
.configure-monitor button.MuiButtonBase-root {
|
.configure-monitor button.MuiButtonBase-root {
|
||||||
height: var(--env-var-height-2);
|
height: var(--env-var-height-2);
|
||||||
}
|
}
|
||||||
.configure-monitor button.MuiButtonBase-root:has(svg) {
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
.configure-monitor .config-box {
|
.configure-monitor .config-box {
|
||||||
padding: var(--env-var-spacing-4) 50px;
|
|
||||||
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);
|
||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
}
|
}
|
||||||
.configure-monitor .config-box .MuiBox-root,
|
.configure-monitor .config-box > .MuiBox-root,
|
||||||
.configure-monitor .config-box .MuiStack-root {
|
.configure-monitor .config-box > .MuiStack-root {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
padding: 24px 30px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
.configure-monitor .config-box > *:first-child {
|
||||||
|
flex: 0.7;
|
||||||
|
border-right: solid 1px var(--env-var-color-16);
|
||||||
}
|
}
|
||||||
.configure-monitor .MuiStack-root:has(span.MuiTypography-root.input-error) {
|
.configure-monitor .MuiStack-root:has(span.MuiTypography-root.input-error) {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -72,12 +72,6 @@
|
|||||||
border-color: var(--env-var-color-29);
|
border-color: var(--env-var-color-29);
|
||||||
}
|
}
|
||||||
|
|
||||||
.configure-monitor-form {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--env-var-spacing-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
body:has(.configure-monitor) .select-dropdown .MuiMenuItem-root,
|
body:has(.configure-monitor) .select-dropdown .MuiMenuItem-root,
|
||||||
.configure-monitor .select-wrapper .select-component > .MuiSelect-select {
|
.configure-monitor .select-wrapper .select-component > .MuiSelect-select {
|
||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
|
|||||||
@@ -5,15 +5,11 @@ import { useEffect, useState } from "react";
|
|||||||
import Button from "../../../Components/Button";
|
import Button from "../../../Components/Button";
|
||||||
import Field from "../../../Components/Inputs/Field";
|
import Field from "../../../Components/Inputs/Field";
|
||||||
import { Box, Modal, Skeleton, Stack, Typography } from "@mui/material";
|
import { Box, Modal, Skeleton, Stack, Typography } from "@mui/material";
|
||||||
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
|
||||||
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
||||||
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
||||||
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
||||||
import { getLastChecked } from "../../../Utils/monitorUtils";
|
|
||||||
import "./index.css";
|
|
||||||
import { monitorValidation } from "../../../Validation/validation";
|
import { monitorValidation } from "../../../Validation/validation";
|
||||||
import Select from "../../../Components/Inputs/Select";
|
import Select from "../../../Components/Inputs/Select";
|
||||||
import { formatDurationRounded } from "../../../Utils/timeUtils";
|
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import {
|
import {
|
||||||
updateUptimeMonitor,
|
updateUptimeMonitor,
|
||||||
@@ -22,6 +18,7 @@ import {
|
|||||||
} from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
} from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
import Checkbox from "../../../Components/Inputs/Checkbox";
|
import Checkbox from "../../../Components/Inputs/Checkbox";
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
import "./index.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a URL string and returns a URL object.
|
* Parses a URL string and returns a URL object.
|
||||||
@@ -97,7 +94,6 @@ const Configure = () => {
|
|||||||
const { user, authToken } = useSelector((state) => state.auth);
|
const { user, authToken } = useSelector((state) => state.auth);
|
||||||
const { monitors } = useSelector((state) => state.uptimeMonitors);
|
const { monitors } = useSelector((state) => state.uptimeMonitors);
|
||||||
const [monitor, setMonitor] = useState({});
|
const [monitor, setMonitor] = useState({});
|
||||||
const [duration, setDuration] = useState(0);
|
|
||||||
const [errors, setErrors] = useState({});
|
const [errors, setErrors] = useState({});
|
||||||
const { monitorId } = useParams();
|
const { monitorId } = useParams();
|
||||||
|
|
||||||
@@ -118,7 +114,6 @@ const Configure = () => {
|
|||||||
setMonitor({
|
setMonitor({
|
||||||
...data,
|
...data,
|
||||||
});
|
});
|
||||||
setDuration(formatDurationRounded(data?.interval));
|
|
||||||
}, [monitorId, authToken, monitors]);
|
}, [monitorId, authToken, monitors]);
|
||||||
|
|
||||||
const handleChange = (event, name) => {
|
const handleChange = (event, name) => {
|
||||||
@@ -211,12 +206,10 @@ const Configure = () => {
|
|||||||
const parsedUrl = parseUrl(monitor?.url);
|
const parsedUrl = parseUrl(monitor?.url);
|
||||||
const protocol = parsedUrl?.protocol?.replace(":", "") || "";
|
const protocol = parsedUrl?.protocol?.replace(":", "") || "";
|
||||||
|
|
||||||
var lastChecked = formatDurationRounded(getLastChecked(monitor?.checks));
|
|
||||||
|
|
||||||
let loading = Object.keys(monitor).length === 0;
|
let loading = Object.keys(monitor).length === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="configure-monitor">
|
<Stack className="configure-monitor" gap={theme.gap.large}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<SkeletonLayout />
|
<SkeletonLayout />
|
||||||
) : (
|
) : (
|
||||||
@@ -228,49 +221,39 @@ const Configure = () => {
|
|||||||
{ name: "configure", path: `/monitors/configure/${monitorId}` },
|
{ name: "configure", path: `/monitors/configure/${monitorId}` },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<form
|
<Stack
|
||||||
className="configure-monitor-form"
|
component="form"
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
style={{
|
gap={theme.gap.large}
|
||||||
marginTop: theme.gap.medium,
|
flex={1}
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Stack direction="row" gap={theme.gap.small} mt={theme.gap.small}>
|
<Stack direction="row" gap={theme.gap.small}>
|
||||||
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
||||||
<Box>
|
<Box>
|
||||||
{parsedUrl?.host ? (
|
{parsedUrl?.host ? (
|
||||||
<Typography
|
<Typography component="h1" mb={theme.gap.xs} lineHeight={1}>
|
||||||
component="h1"
|
|
||||||
mb={theme.gap.small}
|
|
||||||
sx={{ lineHeight: 1 }}
|
|
||||||
>
|
|
||||||
{parsedUrl.host || "..."}
|
{parsedUrl.host || "..."}
|
||||||
</Typography>
|
</Typography>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<Typography lineHeight={parsedUrl?.host ? 1 : theme.gap.large}>
|
<Typography
|
||||||
<Typography
|
component="span"
|
||||||
component="span"
|
lineHeight={theme.gap.large}
|
||||||
sx={{
|
sx={{
|
||||||
color: monitor?.status
|
color: monitor?.status
|
||||||
? "var(--env-var-color-17)"
|
? "var(--env-var-color-17)"
|
||||||
: "var(--env-var-color-24)",
|
: "var(--env-var-color-24)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Your site is {monitor?.status ? "up" : "down"}.
|
Your site is {monitor?.status ? "up" : "down"}.
|
||||||
</Typography>{" "}
|
|
||||||
Checking every {duration}.{" "}
|
|
||||||
{lastChecked ? `Last time checked ${lastChecked} ago.` : ""}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack
|
<Box
|
||||||
direction="row"
|
|
||||||
gap={theme.gap.medium}
|
|
||||||
sx={{
|
sx={{
|
||||||
ml: "auto",
|
|
||||||
alignSelf: "flex-end",
|
alignSelf: "flex-end",
|
||||||
|
ml: "auto",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
@@ -279,9 +262,10 @@ const Configure = () => {
|
|||||||
animate="rotate180"
|
animate="rotate180"
|
||||||
img={<PauseCircleOutlineIcon />}
|
img={<PauseCircleOutlineIcon />}
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: "#f4f4f4",
|
backgroundColor: theme.palette.otherColors.fillGray,
|
||||||
pl: theme.gap.small,
|
pl: theme.gap.small,
|
||||||
pr: theme.gap.medium,
|
pr: theme.gap.medium,
|
||||||
|
mr: theme.gap.medium,
|
||||||
"& svg": {
|
"& svg": {
|
||||||
mr: theme.gap.xs,
|
mr: theme.gap.xs,
|
||||||
},
|
},
|
||||||
@@ -296,17 +280,16 @@ const Configure = () => {
|
|||||||
}}
|
}}
|
||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack
|
<Stack
|
||||||
className="config-box"
|
className="config-box"
|
||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
gap={theme.gap.xxl}
|
|
||||||
>
|
>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">General settings</Typography>
|
<Typography component="h2">General settings</Typography>
|
||||||
<Typography component="p" sx={{ mt: theme.gap.small }}>
|
<Typography component="p" sx={{ mt: theme.gap.xs }}>
|
||||||
Here you can select the URL of the host, together with the
|
Here you can select the URL of the host, together with the
|
||||||
type of monitor.
|
type of monitor.
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -338,11 +321,10 @@ const Configure = () => {
|
|||||||
className="config-box"
|
className="config-box"
|
||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
gap={theme.gap.xxl}
|
|
||||||
>
|
>
|
||||||
<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>
|
||||||
@@ -401,7 +383,6 @@ const Configure = () => {
|
|||||||
className="config-box"
|
className="config-box"
|
||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
gap={theme.gap.xxl}
|
|
||||||
>
|
>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2">Advanced settings</Typography>
|
<Typography component="h2">Advanced settings</Typography>
|
||||||
@@ -416,7 +397,7 @@ const Configure = () => {
|
|||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" justifyContent="flex-end">
|
<Stack direction="row" justifyContent="flex-end" mt="auto">
|
||||||
<Button
|
<Button
|
||||||
level="primary"
|
level="primary"
|
||||||
label="Save"
|
label="Save"
|
||||||
@@ -424,7 +405,7 @@ const Configure = () => {
|
|||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
@@ -473,7 +454,7 @@ const Configure = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
</Box>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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: "create", 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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import axiosInstance from "../../../Utils/axiosConfig";
|
|||||||
import MonitorDetailsAreaChart from "../../../Components/Charts/MonitorDetailsAreaChart";
|
import MonitorDetailsAreaChart from "../../../Components/Charts/MonitorDetailsAreaChart";
|
||||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
import ButtonGroup from "@mui/material/ButtonGroup";
|
||||||
import Button from "../../../Components/Button";
|
import Button from "../../../Components/Button";
|
||||||
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
|
||||||
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
||||||
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
||||||
import SettingsIcon from "../../../assets/icons/settings-bold.svg?react";
|
import SettingsIcon from "../../../assets/icons/settings-bold.svg?react";
|
||||||
@@ -18,6 +17,7 @@ import {
|
|||||||
} from "../../../Utils/timeUtils";
|
} from "../../../Utils/timeUtils";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import MonitorDetails60MinChart from "../../../Components/Charts/MonitorDetails60MinChart";
|
import MonitorDetails60MinChart from "../../../Components/Charts/MonitorDetails60MinChart";
|
||||||
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
|
||||||
const StatBox = ({ title, value }) => {
|
const StatBox = ({ title, value }) => {
|
||||||
return (
|
return (
|
||||||
@@ -163,39 +163,19 @@ const DetailsPage = () => {
|
|||||||
<SkeletonLayout />
|
<SkeletonLayout />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Breadcrumbs
|
||||||
level="tertiary"
|
list={[
|
||||||
label="Back"
|
{ name: "monitors", path: "/monitors" },
|
||||||
animate="slideLeft"
|
{ name: "details", path: `/monitors/${monitorId}` },
|
||||||
img={<WestRoundedIcon />}
|
]}
|
||||||
onClick={() => navigate("/monitors")}
|
|
||||||
sx={{
|
|
||||||
backgroundColor: theme.palette.otherColors.fillGray,
|
|
||||||
px: theme.gap.ml,
|
|
||||||
"& svg.MuiSvgIcon-root": {
|
|
||||||
mr: theme.gap.small,
|
|
||||||
fill: theme.palette.otherColors.slateGray,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
<Stack gap={theme.gap.xl} mt={theme.gap.medium}>
|
<Stack gap={theme.gap.large} mt={theme.gap.large}>
|
||||||
<Stack
|
<Stack direction="row" gap={theme.gap.small}>
|
||||||
direction="row"
|
|
||||||
gap={theme.gap.small}
|
|
||||||
mt={theme.gap.small}
|
|
||||||
alignItems="baseline"
|
|
||||||
>
|
|
||||||
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
||||||
<Box>
|
<Box>
|
||||||
<Stack direction="row">
|
<Typography component="h1" sx={{ lineHeight: 1 }}>
|
||||||
<Typography
|
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
component="h1"
|
</Typography>
|
||||||
sx={{ lineHeight: 1, alignSelf: "flex-end" }}
|
|
||||||
>
|
|
||||||
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
|
||||||
</Typography>
|
|
||||||
<MonitorDetails60MinChart data={monitor.statusBar} />
|
|
||||||
</Stack>
|
|
||||||
<Typography mt={theme.gap.small}>
|
<Typography mt={theme.gap.small}>
|
||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
border: solid 1px var(--env-var-color-6);
|
border: solid 1px var(--env-var-color-6);
|
||||||
border-radius: var(--env-var-radius-1);
|
border-radius: var(--env-var-radius-1);
|
||||||
padding: var(--env-var-default-2);
|
padding: var(--env-var-font-size-large-plus) var(--env-var-font-size-xlarge);
|
||||||
}
|
}
|
||||||
.configure-pagespeed h1.MuiTypography-root {
|
.configure-pagespeed h1.MuiTypography-root {
|
||||||
font-size: var(--env-var-font-size-large-plus);
|
font-size: var(--env-var-font-size-large-plus);
|
||||||
@@ -60,9 +60,12 @@ body:has(.configure-pagespeed) .select-dropdown .MuiMenuItem-root,
|
|||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.configure-pagespeed h3.MuiTypography-root {
|
||||||
|
flex: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.configure-pagespeed .field,
|
.configure-pagespeed .field,
|
||||||
.configure-pagespeed .section-disabled,
|
.configure-pagespeed .section-disabled,
|
||||||
.configure-pagespeed .select-wrapper,
|
.configure-pagespeed .select-wrapper {
|
||||||
.configure-pagespeed h3.MuiTypography-root {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@@ -15,9 +15,9 @@ 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 PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
import PauseCircleOutlineIcon from "@mui/icons-material/PauseCircleOutline";
|
||||||
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
|
||||||
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
||||||
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
||||||
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
@@ -147,37 +147,25 @@ const PageSpeedConfigure = () => {
|
|||||||
let loading = Object.keys(monitor).length === 0;
|
let loading = Object.keys(monitor).length === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="configure-pagespeed">
|
<Stack className="configure-pagespeed" gap={theme.gap.large}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<SkeletonLayout />
|
<SkeletonLayout />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Breadcrumbs
|
||||||
level="tertiary"
|
list={[
|
||||||
label="Back"
|
{ name: "pagespeed", path: "/pagespeed" },
|
||||||
animate="slideLeft"
|
{ name: "details", path: `/pagespeed/${monitorId}` },
|
||||||
img={<WestRoundedIcon />}
|
{ name: "configure", path: `/pagespeed/configure/${monitorId}` },
|
||||||
onClick={() => navigate(-1)}
|
]}
|
||||||
sx={{
|
|
||||||
backgroundColor: theme.palette.otherColors.fillGray,
|
|
||||||
mb: theme.gap.large,
|
|
||||||
px: theme.gap.ml,
|
|
||||||
"& svg.MuiSvgIcon-root": {
|
|
||||||
mr: theme.gap.small,
|
|
||||||
fill: theme.palette.otherColors.slateGray,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
<form
|
<Stack
|
||||||
|
component="form"
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
onSubmit={handleSave}
|
onSubmit={handleSave}
|
||||||
style={{
|
flex={1}
|
||||||
display: "flex",
|
gap={theme.gap.large}
|
||||||
flexDirection: "column",
|
|
||||||
gap: theme.gap.large,
|
|
||||||
maxWidth: "1000px",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Stack direction="row" gap={theme.gap.small}>
|
<Stack direction="row" gap={theme.gap.small}>
|
||||||
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
||||||
@@ -300,7 +288,7 @@ const PageSpeedConfigure = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" justifyContent="flex-end">
|
<Stack direction="row" justifyContent="flex-end" mt="auto">
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
level="primary"
|
level="primary"
|
||||||
@@ -309,7 +297,7 @@ const PageSpeedConfigure = () => {
|
|||||||
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
@@ -358,7 +346,7 @@ const PageSpeedConfigure = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
</Box>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
border: solid 1px var(--env-var-color-6);
|
border: solid 1px var(--env-var-color-6);
|
||||||
border-radius: var(--env-var-radius-1);
|
border-radius: var(--env-var-radius-1);
|
||||||
padding: var(--env-var-default-2);
|
padding: var(--env-var-font-size-large-plus) var(--env-var-font-size-xlarge);
|
||||||
}
|
}
|
||||||
.create-page-speed h1.MuiTypography-root {
|
.create-page-speed h1.MuiTypography-root {
|
||||||
font-size: var(--env-var-font-size-large);
|
font-size: 22px;
|
||||||
color: var(--env-var-color-1);
|
color: var(--env-var-color-1);
|
||||||
}
|
}
|
||||||
.create-page-speed p.MuiTypography-root,
|
.create-page-speed p.MuiTypography-root,
|
||||||
@@ -50,9 +50,12 @@ body:has(.create-page-speed) .select-dropdown .MuiMenuItem-root,
|
|||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.create-page-speed h3.MuiTypography-root {
|
||||||
|
flex: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.create-page-speed .field,
|
.create-page-speed .field,
|
||||||
.create-page-speed .section-disabled,
|
.create-page-speed .section-disabled,
|
||||||
.create-page-speed .select-wrapper,
|
.create-page-speed .select-wrapper {
|
||||||
.create-page-speed h3.MuiTypography-root {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ import Checkbox from "../../../Components/Inputs/Checkbox";
|
|||||||
import { monitorValidation } from "../../../Validation/validation";
|
import { monitorValidation } from "../../../Validation/validation";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { createPageSpeed } from "../../../Features/PageSpeedMonitor/pageSpeedMonitorSlice";
|
import { createPageSpeed } from "../../../Features/PageSpeedMonitor/pageSpeedMonitorSlice";
|
||||||
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
const CreatePageSpeed = () => {
|
const CreatePageSpeed = () => {
|
||||||
@@ -97,34 +97,22 @@ const CreatePageSpeed = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="create-page-speed">
|
<Stack className="create-page-speed" gap={theme.gap.mlplus}>
|
||||||
<Button
|
<Breadcrumbs
|
||||||
level="tertiary"
|
list={[
|
||||||
label="Back"
|
{ name: "pagespeed", path: "/pagespeed" },
|
||||||
animate="slideLeft"
|
{ name: "create", path: `/pagespeed/create` },
|
||||||
img={<WestRoundedIcon />}
|
]}
|
||||||
onClick={() => navigate("/pagespeed")}
|
|
||||||
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"
|
||||||
noValidate
|
noValidate
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
onSubmit={handleCreate}
|
onSubmit={handleCreate}
|
||||||
style={{
|
gap={theme.gap.large}
|
||||||
display: "flex",
|
flex={1}
|
||||||
flexDirection: "column",
|
|
||||||
gap: theme.gap.large,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Typography component="h1">Create a page speed monitor</Typography>
|
<Typography component="h1">Create pagespeed monitor</Typography>
|
||||||
<Stack gap={theme.gap.xl}>
|
<Stack gap={theme.gap.xl}>
|
||||||
<Stack direction="row">
|
<Stack direction="row">
|
||||||
<Typography component="h3">Monitor friendly name</Typography>
|
<Typography component="h3">Monitor friendly name</Typography>
|
||||||
@@ -197,7 +185,7 @@ const CreatePageSpeed = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction="row" justifyContent="flex-end">
|
<Stack direction="row" justifyContent="flex-end" mt="auto">
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
level="primary"
|
level="primary"
|
||||||
@@ -206,8 +194,8 @@ const CreatePageSpeed = () => {
|
|||||||
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
sx={{ px: theme.gap.large, mt: theme.gap.large }}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</form>
|
</Stack>
|
||||||
</Box>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
.page-speed-details > .MuiStack-root:last-child,
|
.page-speed-details > .MuiStack-root:last-child,
|
||||||
.page-speed-details > .MuiBox-root:nth-last-child(3) {
|
.page-speed-details > .MuiBox-root:nth-last-child(3) {
|
||||||
border: solid 1px var(--env-var-color-6);
|
border: solid 1px var(--env-var-color-6);
|
||||||
border-radius: var(--env-var-radius-2);
|
border-radius: var(--env-var-radius-1);
|
||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ import {
|
|||||||
} from "../../../Utils/timeUtils";
|
} from "../../../Utils/timeUtils";
|
||||||
import axiosInstance from "../../../Utils/axiosConfig";
|
import axiosInstance from "../../../Utils/axiosConfig";
|
||||||
import Button from "../../../Components/Button";
|
import Button from "../../../Components/Button";
|
||||||
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
|
||||||
import SettingsIcon from "../../../assets/icons/settings-bold.svg?react";
|
import SettingsIcon from "../../../assets/icons/settings-bold.svg?react";
|
||||||
import LastCheckedIcon from "../../../assets/icons/calendar-check.svg?react";
|
import LastCheckedIcon from "../../../assets/icons/calendar-check.svg?react";
|
||||||
import ClockIcon from "../../../assets/icons/maintenance.svg?react";
|
import ClockIcon from "../../../assets/icons/maintenance.svg?react";
|
||||||
import IntervalCheckIcon from "../../../assets/icons/interval-check.svg?react";
|
import IntervalCheckIcon from "../../../assets/icons/interval-check.svg?react";
|
||||||
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
import GreenCheck from "../../../assets/icons/checkbox-green.svg?react";
|
||||||
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
import RedCheck from "../../../assets/icons/checkbox-red.svg?react";
|
||||||
|
|
||||||
import "./index.css";
|
|
||||||
import PageSpeedLineChart from "../../../Components/Charts/PagespeedLineChart";
|
import PageSpeedLineChart from "../../../Components/Charts/PagespeedLineChart";
|
||||||
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
import "./index.css";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a box with an icon, title, and value.
|
* Displays a box with an icon, title, and value.
|
||||||
@@ -39,7 +39,8 @@ const StatBox = ({ icon, title, value }) => {
|
|||||||
className="stat-box"
|
className="stat-box"
|
||||||
direction="row"
|
direction="row"
|
||||||
gap={theme.gap.small}
|
gap={theme.gap.small}
|
||||||
p={theme.gap.ml}
|
pt={theme.gap.ml}
|
||||||
|
px={theme.gap.ml}
|
||||||
pb={theme.gap.mlplus}
|
pb={theme.gap.mlplus}
|
||||||
>
|
>
|
||||||
{icon}
|
{icon}
|
||||||
@@ -306,21 +307,11 @@ const PageSpeedDetails = () => {
|
|||||||
<SkeletonLayout />
|
<SkeletonLayout />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Breadcrumbs
|
||||||
level="tertiary"
|
list={[
|
||||||
label="Back"
|
{ name: "pagespeed", path: "/pagespeed" },
|
||||||
animate="slideLeft"
|
{ name: "details", path: `/pagespeed/${monitorId}` },
|
||||||
img={<WestRoundedIcon />}
|
]}
|
||||||
onClick={() => navigate("/pagespeed")}
|
|
||||||
sx={{
|
|
||||||
width: "fit-content",
|
|
||||||
backgroundColor: theme.palette.otherColors.fillGray,
|
|
||||||
px: theme.gap.ml,
|
|
||||||
"& svg.MuiSvgIcon-root": {
|
|
||||||
mr: theme.gap.small,
|
|
||||||
fill: theme.palette.otherColors.slateGray,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
<Stack direction="row" gap={theme.gap.small}>
|
<Stack direction="row" gap={theme.gap.small}>
|
||||||
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
{monitor?.status ? <GreenCheck /> : <RedCheck />}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
--env-var-width-2: 360px;
|
--env-var-width-2: 360px;
|
||||||
|
|
||||||
--env-var-height-1: 100vh;
|
--env-var-height-1: 100vh;
|
||||||
--env-var-height-2: 34px;
|
--env-var-height-2: 36px;
|
||||||
|
|
||||||
--env-var-nav-bar-height: 70px;
|
--env-var-nav-bar-height: 70px;
|
||||||
--env-var-side-bar-width: 250px;
|
--env-var-side-bar-width: 250px;
|
||||||
@@ -141,6 +141,10 @@ button:focus-visible {
|
|||||||
outline: 4px auto -webkit-focus-ring-color;
|
outline: 4px auto -webkit-focus-ring-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.MuiInputBase-root.Mui-disabled input {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
.Toastify__toast-container {
|
.Toastify__toast-container {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user