Added breadcrumbs to monitor details
This commit is contained in:
1 parent
031463f8c5
commit
2f50893ead
3 files changed
+16
-32
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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