Merge pull request #816 from bluewave-labs/fix/minor-bugs-and-style-adjustments

Fixed minor bugs and updated area tooltip styling
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-09-07 20:39:24 -07:00
commit 15b79bc420
3 files changed
+8 -5

No files matched your search

@@ -9,8 +9,8 @@ import {
} from "recharts"; } from "recharts";
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMemo } from "react";
import "./index.css"; import "./index.css";
import React, { useMemo } from "react";
const CustomToolTip = ({ active, payload, label }) => { const CustomToolTip = ({ active, payload, label }) => {
const theme = useTheme(); const theme = useTheme();
@@ -143,13 +143,17 @@ const MonitorDetailsAreaChart = ({ checks }) => {
tickLine={false} tickLine={false}
height={18} height={18}
/> />
<Tooltip content={<CustomToolTip />} /> <Tooltip
cursor={{ stroke: theme.palette.border.light }}
content={<CustomToolTip />}
/>
<Area <Area
type="monotone" type="monotone"
dataKey="responseTime" dataKey="responseTime"
stroke={theme.palette.primary.main} stroke={theme.palette.primary.main}
fill="url(#colorUv)" fill="url(#colorUv)"
strokeWidth={1.5} strokeWidth={1.5}
activeDot={{ stroke: theme.palette.background.main, r: 5 }}
/> />
</AreaChart> </AreaChart>
</ResponsiveContainer> </ResponsiveContainer>
+1 -1
View File
@@ -93,7 +93,7 @@ function Sidebar() {
const { user } = useSelector((state) => state.auth); const { user } = useSelector((state) => state.auth);
// Remove demo password if demo // Remove demo password if demo
if (user.role.includes("demo")) { if (user.role?.includes("demo")) {
menu[3].nested = menu[3].nested.filter((item) => { menu[3].nested = menu[3].nested.filter((item) => {
return item.name !== "Password"; return item.name !== "Password";
}); });
+1 -2
View File
@@ -110,8 +110,7 @@ const Monitors = ({ isAdmin }) => {
borderColor={theme.palette.border.light} borderColor={theme.palette.border.light}
backgroundColor={theme.palette.background.accent} backgroundColor={theme.palette.background.accent}
> >
{monitorState?.monitorsSummary?.monitors?.monitors {monitorState?.monitorsSummary?.monitorCounts?.total || 0}
?.length || 0}
</Box> </Box>
{/* TODO - add search bar */} {/* TODO - add search bar */}
</Stack> </Stack>