nuke theme
This commit is contained in:
1 parent
32fbb8f434
commit
dd463bb60b
83 files changed
+225
-349
No files matched your search
@@ -52,7 +52,7 @@ export const HeaderCreate = ({
|
|||||||
<Button
|
<Button
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
disabled={limitReached}
|
disabled={limitReached}
|
||||||
onClick={() => navigate(path)}
|
onClick={() => navigate(path)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -53,24 +53,20 @@ export const HeatmapResponseTime = ({
|
|||||||
{data.map((check, index) => {
|
{data.map((check, index) => {
|
||||||
const statusBg =
|
const statusBg =
|
||||||
check.status === "placeholder"
|
check.status === "placeholder"
|
||||||
? theme.palette.primary.lowContrast
|
? theme.palette.action.hover
|
||||||
: check.status === "up"
|
: check.status === "up"
|
||||||
? theme.palette.success.lowContrast
|
? theme.palette.success.light
|
||||||
: theme.palette.error.lowContrast;
|
: theme.palette.error.light;
|
||||||
const respBg =
|
const respBg =
|
||||||
check.status === "placeholder"
|
check.status === "placeholder"
|
||||||
? theme.palette.primary.lowContrast
|
? theme.palette.action.hover
|
||||||
: getResponseColor(check.responseTime, {
|
: getResponseColor(check.responseTime, {
|
||||||
start: theme.palette.success.lowContrast,
|
start: theme.palette.success.main,
|
||||||
mid: theme.palette.warning.lowContrast,
|
mid: theme.palette.warning.main,
|
||||||
end: theme.palette.error.lowContrast,
|
end: theme.palette.error.main,
|
||||||
});
|
});
|
||||||
const statusBorder =
|
const statusBorder =
|
||||||
check.status === "placeholder"
|
check.status === "placeholder" ? theme.palette.divider : check.status === "up" ? theme.palette.success.main : theme.palette.error.main;
|
||||||
? theme.palette.primary.lowContrast
|
|
||||||
: check.status === "up"
|
|
||||||
? theme.palette.success.main
|
|
||||||
: theme.palette.error.main;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HeatmapResponseTimeTooltip key={`${check}-${index}`} check={check}>
|
<HeatmapResponseTimeTooltip key={`${check}-${index}`} check={check}>
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ export const HeatmapResponseTimeTooltip: React.FC<{
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const getColor = (status: string) => {
|
const getColor = (status: string) => {
|
||||||
if (status === "up") return theme.palette.success.lowContrast;
|
if (status === "up") return theme.palette.success.light;
|
||||||
if (status === "down") return theme.palette.error.lowContrast;
|
if (status === "down") return theme.palette.error.light;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (check.status === "placeholder") {
|
if (check.status === "placeholder") {
|
||||||
@@ -37,7 +37,7 @@ export const HeatmapResponseTimeTooltip: React.FC<{
|
|||||||
sx={{
|
sx={{
|
||||||
backgroundColor: theme.palette.secondary.main,
|
backgroundColor: theme.palette.secondary.main,
|
||||||
border: 1,
|
border: 1,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
p: theme.spacing(4),
|
p: theme.spacing(4),
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ export const HistogramResponseTime = ({
|
|||||||
const heightPct = `${Math.max(0, Math.min(100, (check as any).normalResponseTime ?? 0))}%`;
|
const heightPct = `${Math.max(0, Math.min(100, (check as any).normalResponseTime ?? 0))}%`;
|
||||||
const barColor =
|
const barColor =
|
||||||
check.status === "up"
|
check.status === "up"
|
||||||
? theme.palette.success.lowContrast
|
? theme.palette.success.light
|
||||||
: theme.palette.error.lowContrast;
|
: theme.palette.error.light;
|
||||||
const bar = (
|
const bar = (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@@ -66,7 +66,7 @@ export const HistogramResponseTime = ({
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
borderRadius: theme.spacing(1),
|
borderRadius: theme.spacing(1),
|
||||||
bgcolor: theme.palette.primary.lowContrast,
|
bgcolor: theme.palette.action.hover,
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ export const BaseBox = ({ sx, ...rest }: BoxProps) => {
|
|||||||
<Box
|
<Box
|
||||||
{...rest}
|
{...rest}
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: theme.palette.primary.main,
|
backgroundColor: theme.palette.background.paper,
|
||||||
border: 1,
|
border: 1,
|
||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export const Breadcrumb = ({
|
|||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
marginBottom: theme.spacing(6),
|
marginBottom: theme.spacing(6),
|
||||||
"& .MuiBreadcrumbs-separator": {
|
"& .MuiBreadcrumbs-separator": {
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -60,16 +60,16 @@ export const Breadcrumb = ({
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(2),
|
gap: theme.spacing(2),
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Home size={16} strokeWidth={1.5} />
|
<Home size={16} strokeWidth={1.5} />
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
color: theme.palette.accent.main,
|
color: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -94,7 +94,7 @@ export const Breadcrumb = ({
|
|||||||
sx={{
|
sx={{
|
||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
color: theme.palette.accent.main,
|
color: theme.palette.primary.main,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{displayName}
|
{displayName}
|
||||||
@@ -110,9 +110,9 @@ export const Breadcrumb = ({
|
|||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
color: theme.palette.accent.main,
|
color: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const BulletPointCheck = ({
|
|||||||
const colors: Record<string, string | undefined> = {
|
const colors: Record<string, string | undefined> = {
|
||||||
success: theme.palette.success.main,
|
success: theme.palette.success.main,
|
||||||
error: theme.palette.error.main,
|
error: theme.palette.error.main,
|
||||||
info: theme.palette.primary.contrastTextSecondary,
|
info: theme.palette.text.secondary,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -29,11 +29,7 @@ export const BulletPointCheck = ({
|
|||||||
/>
|
/>
|
||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
color={
|
color={variant === "info" ? theme.palette.text.secondary : colors[variant]}
|
||||||
variant === "info"
|
|
||||||
? theme.palette.primary.contrastTextSecondary
|
|
||||||
: colors[variant]
|
|
||||||
}
|
|
||||||
fontWeight={450}
|
fontWeight={450}
|
||||||
sx={{
|
sx={{
|
||||||
opacity: 0.9,
|
opacity: 0.9,
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ export const BaseFallback: React.FC<BaseFallbackProps> = ({
|
|||||||
xl: "40%",
|
xl: "40%",
|
||||||
}}
|
}}
|
||||||
padding={{ xs: theme.spacing(8), md: theme.spacing(16) }}
|
padding={{ xs: theme.spacing(8), md: theme.spacing(16) }}
|
||||||
bgcolor={theme.palette.primary.main}
|
bgcolor={theme.palette.background.paper}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.divider}
|
||||||
borderRadius={theme.shape.borderRadius}
|
borderRadius={theme.shape.borderRadius}
|
||||||
sx={{
|
sx={{
|
||||||
borderStyle: "dashed",
|
borderStyle: "dashed",
|
||||||
@@ -60,7 +60,7 @@ export const ErrorFallback = ({
|
|||||||
<Typography
|
<Typography
|
||||||
variant="h1"
|
variant="h1"
|
||||||
marginY={theme.spacing(4)}
|
marginY={theme.spacing(4)}
|
||||||
color={theme.palette.primary.contrastTextTertiary}
|
color={theme.palette.text.secondary}
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -106,7 +106,7 @@ export const EmptyFallback = ({
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={() => navigate(actionLink)}
|
onClick={() => navigate(actionLink)}
|
||||||
>
|
>
|
||||||
{actionButtonText}
|
{actionButtonText}
|
||||||
@@ -158,7 +158,7 @@ export const EmptyMonitorFallback = ({
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={() => navigate(actionLink)}
|
onClick={() => navigate(actionLink)}
|
||||||
disabled={monitorLimitReached}
|
disabled={monitorLimitReached}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export const Gauge = ({
|
|||||||
position={"relative"}
|
position={"relative"}
|
||||||
width={radius}
|
width={radius}
|
||||||
height={radius}
|
height={radius}
|
||||||
bgcolor={theme.palette.primary.main}
|
bgcolor={theme.palette.background.paper}
|
||||||
borderRadius={"50%"}
|
borderRadius={"50%"}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|||||||
@@ -22,27 +22,27 @@ export const InfoBox: React.FC<InfoBoxProps> = ({ title, description }) => {
|
|||||||
? "rgba(59, 130, 246, 0.1)"
|
? "rgba(59, 130, 246, 0.1)"
|
||||||
: "rgba(59, 130, 246, 0.05)",
|
: "rgba(59, 130, 246, 0.05)",
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
borderLeft: `4px solid ${theme.palette.accent.main}`,
|
borderLeft: `4px solid ${theme.palette.primary.main}`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Info
|
<Info
|
||||||
size={24}
|
size={24}
|
||||||
strokeWidth={1.5}
|
strokeWidth={1.5}
|
||||||
style={{
|
style={{
|
||||||
color: theme.palette.accent.main,
|
color: theme.palette.primary.main,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
marginTop: theme.spacing(1),
|
marginTop: theme.spacing(1),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Stack spacing={theme.spacing(4)}>
|
<Stack spacing={theme.spacing(4)}>
|
||||||
<Typography variant="h2" sx={{ color: theme.palette.accent.main }}>
|
<Typography variant="h2" sx={{ color: theme.palette.primary.main }}>
|
||||||
{title}
|
{title}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
variant="body1"
|
variant="body1"
|
||||||
sx={{
|
sx={{
|
||||||
lineHeight: 1.7,
|
lineHeight: 1.7,
|
||||||
color: theme.palette.primary.contrastTextSecondary,
|
color: theme.palette.text.secondary,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{description}
|
{description}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const PlanCard = ({
|
|||||||
? theme.palette.success.main
|
? theme.palette.success.main
|
||||||
: plan.plan === "free"
|
: plan.plan === "free"
|
||||||
? theme.palette.text.secondary
|
? theme.palette.text.secondary
|
||||||
: theme.palette.accent.main;
|
: theme.palette.primary.main;
|
||||||
const Icon = (() => {
|
const Icon = (() => {
|
||||||
switch (plan.plan) {
|
switch (plan.plan) {
|
||||||
case "free":
|
case "free":
|
||||||
@@ -98,7 +98,7 @@ export const PlanCard = ({
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
border: selected ? 2 : 1,
|
border: selected ? 2 : 1,
|
||||||
borderColor: selected ? theme.palette.accent.main : "divider",
|
borderColor: selected ? theme.palette.primary.main : "divider",
|
||||||
transition:
|
transition:
|
||||||
"transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease",
|
"transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease",
|
||||||
...(selected
|
...(selected
|
||||||
@@ -130,9 +130,9 @@ export const PlanCard = ({
|
|||||||
size="small"
|
size="small"
|
||||||
label="Most popular"
|
label="Most popular"
|
||||||
sx={{
|
sx={{
|
||||||
bgcolor: theme.palette.accent.main,
|
bgcolor: theme.palette.primary.main,
|
||||||
color: theme.palette.getContrastText(
|
color: theme.palette.getContrastText(
|
||||||
theme.palette.accent.main
|
theme.palette.primary.main
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -171,7 +171,7 @@ export const PlanCard = ({
|
|||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
onClick?.(plan.plan);
|
onClick?.(plan.plan);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const PulseDot = ({ color }: { color: string }) => {
|
|||||||
width: "7px",
|
width: "7px",
|
||||||
height: "7px",
|
height: "7px",
|
||||||
borderRadius: "50%",
|
borderRadius: "50%",
|
||||||
backgroundColor: theme.palette.accent.contrastText,
|
backgroundColor: theme.palette.getContrastText(theme.palette.primary.main),
|
||||||
top: "50%",
|
top: "50%",
|
||||||
left: "50%",
|
left: "50%",
|
||||||
transform: "translate(-50%, -50%)",
|
transform: "translate(-50%, -50%)",
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ export const ResolutionCard = ({
|
|||||||
durationLabel,
|
durationLabel,
|
||||||
}: ResolutionCardProps) => {
|
}: ResolutionCardProps) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const bg = resolved
|
const bg = resolved ? theme.palette.success.light : theme.palette.error.light;
|
||||||
? theme.palette.success.lowContrast
|
|
||||||
: theme.palette.error.lowContrast;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseBox sx={{ width: "100%", maxWidth: 420 }}>
|
<BaseBox sx={{ width: "100%", maxWidth: 420 }}>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ const SkeletonCard: React.FC<SkeletonCardProps> = ({
|
|||||||
height: 34,
|
height: 34,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
background: theme.palette.secondary.main,
|
background: theme.palette.secondary.main,
|
||||||
border: `1px solid ${theme.palette.primary.lowContrast}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
animation: "pulse 1.6s ease-in-out infinite",
|
animation: "pulse 1.6s ease-in-out infinite",
|
||||||
...pulseAnimation,
|
...pulseAnimation,
|
||||||
};
|
};
|
||||||
@@ -60,7 +60,7 @@ const SkeletonCard: React.FC<SkeletonCardProps> = ({
|
|||||||
height: 7,
|
height: 7,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
background: theme.palette.secondary.main,
|
background: theme.palette.secondary.main,
|
||||||
border: `1px solid ${theme.palette.primary.lowContrast}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
animation: "pulse 1.6s ease-in-out infinite",
|
animation: "pulse 1.6s ease-in-out infinite",
|
||||||
...pulseAnimation,
|
...pulseAnimation,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,16 +15,16 @@ export const SplitBox = ({
|
|||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
direction={isSmall ? "column" : "row"}
|
direction={isSmall ? "column" : "row"}
|
||||||
bgcolor={theme.palette.primary.main}
|
bgcolor={theme.palette.background.paper}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.divider}
|
||||||
borderRadius={theme.spacing(2)}
|
borderRadius={theme.spacing(2)}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
padding={theme.spacing(15)}
|
padding={theme.spacing(15)}
|
||||||
borderRight={isSmall ? 0 : 1}
|
borderRight={isSmall ? 0 : 1}
|
||||||
borderBottom={isSmall ? 1 : 0}
|
borderBottom={isSmall ? 1 : 0}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.divider}
|
||||||
flex={0.7}
|
flex={0.7}
|
||||||
sx={{
|
sx={{
|
||||||
background:
|
background:
|
||||||
|
|||||||
@@ -20,16 +20,14 @@ export const GradientBox: React.FC<GradientBox> = ({
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
|
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
|
||||||
const bg = palette
|
const bg = palette
|
||||||
? `linear-gradient(to bottom right, ${theme.palette[palette].main} 30%, ${theme.palette[palette].lowContrast} 70%)`
|
? `linear-gradient(135deg, ${theme.palette[palette].light} 0%, ${theme.palette[palette].main} 100%)`
|
||||||
: `linear-gradient(340deg, ${theme.palette.tertiary.main} 10%, ${theme.palette.primary.main} 45%)`;
|
: theme.palette.background.paper;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseBox
|
<BaseBox
|
||||||
sx={{
|
sx={{
|
||||||
padding: `${theme.spacing(4)} ${theme.spacing(8)}`,
|
padding: `${theme.spacing(4)} ${theme.spacing(8)}`,
|
||||||
width: isSmall
|
width: isSmall ? `100%` : `calc(25% - (3 * ${theme.spacing(8)} / 4))`,
|
||||||
? `100%`
|
|
||||||
: `calc(25% - (3 * ${theme.spacing(8)} / 4))`,
|
|
||||||
|
|
||||||
background: bg,
|
background: bg,
|
||||||
...sx,
|
...sx,
|
||||||
@@ -66,9 +64,7 @@ export const StatBox: React.FC<StatBoxProps> = ({
|
|||||||
palette={palette}
|
palette={palette}
|
||||||
sx={{
|
sx={{
|
||||||
...(sx as object),
|
...(sx as object),
|
||||||
...(onClick
|
...(onClick ? { cursor: "pointer", "&:hover": { opacity: 0.95 } } : {}),
|
||||||
? { cursor: "pointer", '&:hover': { opacity: 0.95 } }
|
|
||||||
: {}),
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Stack onClick={onClick}>
|
<Stack onClick={onClick}>
|
||||||
|
|||||||
@@ -41,11 +41,7 @@ const StatusBox = ({
|
|||||||
return (
|
return (
|
||||||
<BGBox>
|
<BGBox>
|
||||||
<Stack spacing={theme.spacing(4)}>
|
<Stack spacing={theme.spacing(4)}>
|
||||||
<Typography
|
<Typography variant={"h2"} textTransform="uppercase" color={theme.palette.text.secondary}>
|
||||||
variant={"h2"}
|
|
||||||
textTransform="uppercase"
|
|
||||||
color={theme.palette.primary.contrastTextTertiary}
|
|
||||||
>
|
|
||||||
{label}
|
{label}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="h1" color={color}>
|
<Typography variant="h1" color={color}>
|
||||||
@@ -59,47 +55,23 @@ const StatusBox = ({
|
|||||||
export const UpStatusBox = ({ n }: { n: number }) => {
|
export const UpStatusBox = ({ n }: { n: number }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return <StatusBox label={t("monitorStatus.up")} n={n} color={theme.palette.success.light} />;
|
||||||
<StatusBox
|
|
||||||
label={t("monitorStatus.up")}
|
|
||||||
n={n}
|
|
||||||
color={theme.palette.success.lowContrast}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DownStatusBox = ({ n }: { n: number }) => {
|
export const DownStatusBox = ({ n }: { n: number }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return <StatusBox label={t("monitorStatus.down")} n={n} color={theme.palette.error.light} />;
|
||||||
<StatusBox
|
|
||||||
label={t("monitorStatus.down")}
|
|
||||||
n={n}
|
|
||||||
color={theme.palette.error.lowContrast}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PausedStatusBox = ({ n }: { n: number }) => {
|
export const PausedStatusBox = ({ n }: { n: number }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return <StatusBox label={t("monitorStatus.paused")} n={n} color={theme.palette.warning.light} />;
|
||||||
<StatusBox
|
|
||||||
label={t("monitorStatus.paused")}
|
|
||||||
n={n}
|
|
||||||
color={theme.palette.warning.lowContrast}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const InitializingStatusBox = ({ n }: { n: number }) => {
|
export const InitializingStatusBox = ({ n }: { n: number }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return <StatusBox label={t("monitorStatus.initializing")} n={n} color={theme.palette.warning.light} />;
|
||||||
<StatusBox
|
|
||||||
label={t("monitorStatus.initializing")}
|
|
||||||
n={n}
|
|
||||||
color={theme.palette.warning.lowContrast}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
@@ -37,13 +37,7 @@ export const StatusLabel = ({
|
|||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box width={7} height={7} bgcolor={theme.palette[palette].light} borderRadius="50%" marginRight="5px" />
|
||||||
width={7}
|
|
||||||
height={7}
|
|
||||||
bgcolor={theme.palette[palette].lowContrast}
|
|
||||||
borderRadius="50%"
|
|
||||||
marginRight="5px"
|
|
||||||
/>
|
|
||||||
{transformedText}
|
{transformedText}
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
);
|
);
|
||||||
@@ -76,13 +70,7 @@ export const ValueLabel = ({
|
|||||||
: "rgba(0, 0, 0, 0.08)",
|
: "rgba(0, 0, 0, 0.08)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box width={7} height={7} bgcolor={theme.palette[palette].light} borderRadius="50%" marginRight="5px" />
|
||||||
width={7}
|
|
||||||
height={7}
|
|
||||||
bgcolor={theme.palette[palette].lowContrast}
|
|
||||||
borderRadius="50%"
|
|
||||||
marginRight="5px"
|
|
||||||
/>
|
|
||||||
{transformedText}
|
{transformedText}
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ export const Tab = (props: CustomTabProps) => {
|
|||||||
paddingBottom: 0,
|
paddingBottom: 0,
|
||||||
minWidth: "auto",
|
minWidth: "auto",
|
||||||
alignItems: "flex-start",
|
alignItems: "flex-start",
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: theme.palette.accent.main,
|
color: theme.palette.primary.main,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
},
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
color: theme.palette.primary.contrastTextSecondary,
|
color: theme.palette.text.secondary,
|
||||||
},
|
},
|
||||||
"& .MuiTab-iconWrapper": {
|
"& .MuiTab-iconWrapper": {
|
||||||
marginRight: theme.spacing(2),
|
marginRight: theme.spacing(2),
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export function DataTable<
|
|||||||
sx={{
|
sx={{
|
||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
padding: theme.spacing(4),
|
padding: theme.spacing(4),
|
||||||
cursor: onRowClick ? "pointer" : "default",
|
cursor: onRowClick ? "pointer" : "default",
|
||||||
@@ -126,20 +126,23 @@ export function DataTable<
|
|||||||
{
|
{
|
||||||
paddingLeft: theme.spacing(8),
|
paddingLeft: theme.spacing(8),
|
||||||
},
|
},
|
||||||
|
"& .MuiTableCell-root": {
|
||||||
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
|
},
|
||||||
"& .MuiTableHead-root .MuiTableRow-root": {
|
"& .MuiTableHead-root .MuiTableRow-root": {
|
||||||
height: "28px",
|
height: "28px",
|
||||||
},
|
},
|
||||||
"& :is(th)": {
|
"& :is(th)": {
|
||||||
backgroundColor: theme.palette.tertiary.main,
|
backgroundColor: theme.palette.background.paper,
|
||||||
color: theme.palette.secondary.contrastText,
|
color: theme.palette.text.secondary,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
padding: `${theme.spacing(2)} ${theme.spacing(8)}`,
|
padding: `${theme.spacing(2)} ${theme.spacing(8)}`,
|
||||||
fontSize: theme.typography.fontSize,
|
fontSize: theme.typography.fontSize,
|
||||||
},
|
},
|
||||||
"& :is(td)": {
|
"& :is(td)": {
|
||||||
backgroundColor: theme.palette.primary.main,
|
backgroundColor: theme.palette.background.paper,
|
||||||
color: theme.palette.primary.contrastTextSecondary,
|
color: theme.palette.text.secondary,
|
||||||
padding: `${theme.spacing(7)} ${theme.spacing(8)}`,
|
padding: `${theme.spacing(7)} ${theme.spacing(8)}`,
|
||||||
fontSize: theme.typography.fontSize,
|
fontSize: theme.typography.fontSize,
|
||||||
},
|
},
|
||||||
@@ -346,7 +349,7 @@ export const Pagination: React.FC<TablePaginationProps> = ({ ...props }) => {
|
|||||||
},
|
},
|
||||||
"& .MuiSelect-select": {
|
"& .MuiSelect-select": {
|
||||||
border: 1,
|
border: 1,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -363,7 +366,7 @@ const EmptyView = () => {
|
|||||||
p: theme.spacing(4),
|
p: theme.spacing(4),
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ export const Tabs = (props: CustomTabsProps) => {
|
|||||||
<MuiTabs
|
<MuiTabs
|
||||||
sx={{
|
sx={{
|
||||||
minHeight: 34,
|
minHeight: 34,
|
||||||
borderBottom: `1px solid ${theme.palette.primary.lowContrast}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
"& .MuiTabs-indicator": {
|
"& .MuiTabs-indicator": {
|
||||||
backgroundColor: theme.palette.accent.main,
|
backgroundColor: theme.palette.primary.main,
|
||||||
height: 2,
|
height: 2,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const TooltipWithInfo: React.FC<TooltipWithInfoProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const defaultColor = theme.palette.primary.contrastTextTertiary;
|
const defaultColor = theme.palette.text.secondary;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip {...props}>
|
<Tooltip {...props}>
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ export const ButtonInput = ({ sx, ...props }: ButtonProps) => {
|
|||||||
boxShadow: "none",
|
boxShadow: "none",
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
boxShadow: "none",
|
boxShadow: "none",
|
||||||
backgroundColor: props.color === "primary"
|
|
||||||
? theme.palette.tertiary.main
|
|
||||||
: undefined,
|
|
||||||
},
|
},
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ export const CheckboxInput = forwardRef<HTMLInputElement, CheckboxInputProps>(
|
|||||||
checkedIcon={<SquareCheck size={16} strokeWidth={1.5} />}
|
checkedIcon={<SquareCheck size={16} strokeWidth={1.5} />}
|
||||||
sx={{
|
sx={{
|
||||||
padding: 0,
|
padding: 0,
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
"&.Mui-checked": {
|
"&.Mui-checked": {
|
||||||
color: theme.palette.accent.main,
|
color: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
"&:hover": { backgroundColor: "transparent" },
|
"&:hover": { backgroundColor: "transparent" },
|
||||||
"& svg": {
|
"& svg": {
|
||||||
|
|||||||
@@ -29,17 +29,17 @@ export const DateTimePicker = forwardRef<HTMLDivElement, CustomDateTimePickerPro
|
|||||||
"& .MuiPickersOutlinedInput-root ": {
|
"& .MuiPickersOutlinedInput-root ": {
|
||||||
height: 34,
|
height: 34,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
"& .MuiPickersOutlinedInput-notchedOutline": {
|
"& .MuiPickersOutlinedInput-notchedOutline": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
"&:hover .MuiPickersOutlinedInput-notchedOutline": {
|
"&:hover .MuiPickersOutlinedInput-notchedOutline": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
"& .MuiPickersInputBase-root.MuiPickersOutlinedInput-root.Mui-focused:not(.Mui-error) .MuiPickersOutlinedInput-notchedOutline":
|
"& .MuiPickersInputBase-root.MuiPickersOutlinedInput-root.Mui-focused:not(.Mui-error) .MuiPickersOutlinedInput-notchedOutline":
|
||||||
{
|
{
|
||||||
borderColor: theme.palette.accent.main,
|
borderColor: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
"& .MuiFormHelperText-root": {
|
"& .MuiFormHelperText-root": {
|
||||||
marginLeft: 0,
|
marginLeft: 0,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const DialogInput = ({
|
|||||||
content,
|
content,
|
||||||
onConfirm,
|
onConfirm,
|
||||||
onCancel,
|
onCancel,
|
||||||
confirmColor = "accent",
|
confirmColor = "primary",
|
||||||
cancelColor = "error",
|
cancelColor = "error",
|
||||||
loading = false,
|
loading = false,
|
||||||
}: {
|
}: {
|
||||||
@@ -21,8 +21,8 @@ export const DialogInput = ({
|
|||||||
content?: string;
|
content?: string;
|
||||||
onConfirm?(item: any): any;
|
onConfirm?(item: any): any;
|
||||||
onCancel?(item: any): any;
|
onCancel?(item: any): any;
|
||||||
confirmColor?: "error" | "accent";
|
confirmColor?: "error" | "primary";
|
||||||
cancelColor?: "error" | "accent";
|
cancelColor?: "error" | "primary";
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const FieldLabel: React.FC<FieldLabelProps> = ({
|
|||||||
sx={{
|
sx={{
|
||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: theme.palette.primary.contrastTextSecondary,
|
color: theme.palette.text.secondary,
|
||||||
marginBottom: theme.spacing(2),
|
marginBottom: theme.spacing(2),
|
||||||
display: "block",
|
display: "block",
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ export const RadioInput: React.FC<RadioInputProps> = ({ ...props }) => {
|
|||||||
sx={{
|
sx={{
|
||||||
padding: 0,
|
padding: 0,
|
||||||
mt: theme.spacing(0.5),
|
mt: theme.spacing(0.5),
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
"&.Mui-checked": {
|
"&.Mui-checked": {
|
||||||
color: theme.palette.accent.main,
|
color: theme.palette.primary.main,
|
||||||
"& svg circle": {
|
"& svg circle": {
|
||||||
fill: theme.palette.accent.main,
|
fill: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"& .MuiSvgIcon-root": {
|
"& .MuiSvgIcon-root": {
|
||||||
@@ -51,7 +51,7 @@ export const RadioWithDescription: React.FC<
|
|||||||
<Typography component="p">{label}</Typography>
|
<Typography component="p">{label}</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
component="h6"
|
component="h6"
|
||||||
color={theme.palette.primary.contrastTextSecondary}
|
color={theme.palette.text.secondary}
|
||||||
>
|
>
|
||||||
{description}
|
{description}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -64,7 +64,7 @@ export const RadioWithDescription: React.FC<
|
|||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
|
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.palette.tertiary.main,
|
backgroundColor: theme.palette.background.paper,
|
||||||
},
|
},
|
||||||
"& .MuiButtonBase-root": {
|
"& .MuiButtonBase-root": {
|
||||||
p: 0,
|
p: 0,
|
||||||
|
|||||||
@@ -83,10 +83,10 @@ export const SelectInput = <T,>({
|
|||||||
},
|
},
|
||||||
"& .MuiOutlinedInput-notchedOutline": {
|
"& .MuiOutlinedInput-notchedOutline": {
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
"&:hover .MuiOutlinedInput-notchedOutline": {
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
...props.sx,
|
...props.sx,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const SwitchComponent = forwardRef<HTMLInputElement, SwitchProps>(
|
|||||||
"&.Mui-checked": {
|
"&.Mui-checked": {
|
||||||
color: "#E0E0E0",
|
color: "#E0E0E0",
|
||||||
"& + .MuiSwitch-track": {
|
"& + .MuiSwitch-track": {
|
||||||
backgroundColor: theme.palette.accent.main,
|
backgroundColor: theme.palette.primary.main,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
border: 0,
|
border: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export const LogoutSwitch = () => {
|
|||||||
},
|
},
|
||||||
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
||||||
{
|
{
|
||||||
stroke: theme.palette.accent.main,
|
stroke: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export const SettingsSwitch = () => {
|
|||||||
},
|
},
|
||||||
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
||||||
{
|
{
|
||||||
stroke: theme.palette.accent.main,
|
stroke: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export const TeamSwitch = () => {
|
|||||||
},
|
},
|
||||||
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
||||||
{
|
{
|
||||||
stroke: theme.palette.accent.main,
|
stroke: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const ThemeSwitch = () => {
|
|||||||
},
|
},
|
||||||
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
|
||||||
{
|
{
|
||||||
stroke: theme.palette.accent.main,
|
stroke: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
|
|||||||
fontSize: typographyLevels.base,
|
fontSize: typographyLevels.base,
|
||||||
},
|
},
|
||||||
"& .MuiOutlinedInput-notchedOutline": {
|
"& .MuiOutlinedInput-notchedOutline": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
"&:hover .MuiOutlinedInput-notchedOutline": {
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
"& .MuiFormHelperText-root": {
|
"& .MuiFormHelperText-root": {
|
||||||
marginLeft: 0,
|
marginLeft: 0,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const TextLink = ({
|
|||||||
return (
|
return (
|
||||||
<Stack direction="row" gap={theme.spacing(4)}>
|
<Stack direction="row" gap={theme.spacing(4)}>
|
||||||
<Typography>{text}</Typography>
|
<Typography>{text}</Typography>
|
||||||
<Link color="accent" to={href} component={RouterLink} target={target}>
|
<Link color="primary" to={href} component={RouterLink} target={target}>
|
||||||
{linkText}
|
{linkText}
|
||||||
</Link>
|
</Link>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ export const CollapseButton = ({ sidebarOpen }: { sidebarOpen: boolean }) => {
|
|||||||
<ArrowLeft
|
<ArrowLeft
|
||||||
height={theme.spacing(8)}
|
height={theme.spacing(8)}
|
||||||
width={theme.spacing(8)}
|
width={theme.spacing(8)}
|
||||||
color={theme.palette.primary.contrastTextSecondary}
|
color={theme.palette.text.secondary}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ArrowRight
|
<ArrowRight
|
||||||
height={theme.spacing(8)}
|
height={theme.spacing(8)}
|
||||||
width={theme.spacing(8)}
|
width={theme.spacing(8)}
|
||||||
color={theme.palette.primary.contrastTextSecondary}
|
color={theme.palette.text.secondary}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -30,14 +30,14 @@ export const CollapseButton = ({ sidebarOpen }: { sidebarOpen: boolean }) => {
|
|||||||
top: 60,
|
top: 60,
|
||||||
right: 0,
|
right: 0,
|
||||||
transform: `translate(50%, 0)`,
|
transform: `translate(50%, 0)`,
|
||||||
backgroundColor: theme.palette.tertiary.main,
|
backgroundColor: theme.palette.background.paper,
|
||||||
border: `1px solid ${theme.palette.primary.lowContrast}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
p: theme.spacing(2.5),
|
p: theme.spacing(2.5),
|
||||||
|
|
||||||
"&:focus": { outline: "none" },
|
"&:focus": { outline: "none" },
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.palette.primary.lowContrast,
|
backgroundColor: theme.palette.action.hover,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ export const Logo = ({ sidebarOpen }: { sidebarOpen: boolean }) => {
|
|||||||
display={"flex"}
|
display={"flex"}
|
||||||
justifyContent={"center"}
|
justifyContent={"center"}
|
||||||
alignItems={"center"}
|
alignItems={"center"}
|
||||||
bgcolor={theme.palette.accent.main}
|
bgcolor={theme.palette.primary.main}
|
||||||
borderRadius={theme.shape.borderRadius}
|
borderRadius={theme.shape.borderRadius}
|
||||||
color={theme.palette.accent.contrastText}
|
color={theme.palette.getContrastText(theme.palette.primary.main)}
|
||||||
fontSize={18}
|
fontSize={18}
|
||||||
>
|
>
|
||||||
C
|
C
|
||||||
|
|||||||
@@ -23,13 +23,15 @@ export const NavItem = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const iconStroke = selected
|
const iconStroke = selected
|
||||||
? theme.palette.accent.main
|
? theme.palette.primary.main
|
||||||
: theme.palette.primary.contrastTextTertiary;
|
: theme.palette.text.secondary;
|
||||||
|
|
||||||
const buttonBgColor = selected ? theme.palette.secondary.main : "transparent";
|
const buttonBgColor = selected
|
||||||
|
? theme.palette.action.selected
|
||||||
|
: "transparent";
|
||||||
const buttonBgHoverColor = selected
|
const buttonBgHoverColor = selected
|
||||||
? theme.palette.secondary.main
|
? theme.palette.action.selected
|
||||||
: theme.palette.tertiary.main;
|
: theme.palette.action.hover;
|
||||||
const fontWeight = selected ? 600 : 400;
|
const fontWeight = selected ? 600 : 400;
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@@ -52,16 +54,12 @@ export const NavItem = ({
|
|||||||
<ListItemButton
|
<ListItemButton
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: buttonBgColor,
|
backgroundColor: buttonBgColor,
|
||||||
backgroundImage: selected
|
backgroundImage: "none",
|
||||||
? `linear-gradient(135deg, ${theme.palette.secondary.main} 0%, ${theme.palette.secondary.dark} 100%)`
|
|
||||||
: "none",
|
|
||||||
border: 1,
|
border: 1,
|
||||||
borderColor: selected ? theme.palette.primary.veryLowContrast : "transparent",
|
borderColor: "transparent",
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: buttonBgHoverColor,
|
backgroundColor: buttonBgHoverColor,
|
||||||
backgroundImage: selected
|
backgroundImage: "none",
|
||||||
? `linear-gradient(135deg, ${theme.palette.secondary.main} 0%, ${theme.palette.secondary.dark} 100%)`
|
|
||||||
: "none",
|
|
||||||
},
|
},
|
||||||
height: 32,
|
height: 32,
|
||||||
gap: theme.spacing(4),
|
gap: theme.spacing(4),
|
||||||
@@ -80,13 +78,15 @@ export const NavItem = ({
|
|||||||
opacity: 0.81,
|
opacity: 0.81,
|
||||||
transition: "stroke 0.2s ease",
|
transition: "stroke 0.2s ease",
|
||||||
},
|
},
|
||||||
"& svg path, & svg line, & svg polyline, & svg rect, & svg circle": {
|
"& svg path, & svg line, & svg polyline, & svg rect, & svg circle":
|
||||||
stroke: iconStroke,
|
{
|
||||||
},
|
stroke: iconStroke,
|
||||||
".MuiListItemButton-root:hover &": {
|
|
||||||
"& svg path, & svg line, & svg polyline, & svg rect, & svg circle": {
|
|
||||||
stroke: theme.palette.accent.main,
|
|
||||||
},
|
},
|
||||||
|
".MuiListItemButton-root:hover &": {
|
||||||
|
"& svg path, & svg line, & svg polyline, & svg rect, & svg circle":
|
||||||
|
{
|
||||||
|
stroke: theme.palette.primary.main,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export const SideBar = () => {
|
|||||||
paddingTop={theme.spacing(6)}
|
paddingTop={theme.spacing(6)}
|
||||||
paddingBottom={theme.spacing(6)}
|
paddingBottom={theme.spacing(6)}
|
||||||
gap={theme.spacing(6)}
|
gap={theme.spacing(6)}
|
||||||
borderRight={`1px solid ${theme.palette.primary.lowContrast}`}
|
borderRight={`1px solid ${theme.palette.divider}`}
|
||||||
width={sideBarOpen ? EXPANDED_WIDTH : COLLAPSED_WIDTH}
|
width={sideBarOpen ? EXPANDED_WIDTH : COLLAPSED_WIDTH}
|
||||||
sx={{
|
sx={{
|
||||||
transition: "width 650ms cubic-bezier(0.36, -0.01, 0, 0.77)",
|
transition: "width 650ms cubic-bezier(0.36, -0.01, 0, 0.77)",
|
||||||
@@ -103,7 +103,7 @@ export const SideBar = () => {
|
|||||||
})}
|
})}
|
||||||
</List>
|
</List>
|
||||||
<Divider
|
<Divider
|
||||||
sx={{ mt: "auto", borderColor: theme.palette.primary.lowContrast }}
|
sx={{ mt: "auto", borderColor: theme.palette.divider }}
|
||||||
/>
|
/>
|
||||||
<BottomControls />
|
<BottomControls />
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ export const BaseChart: React.FC<BaseChartProps> = ({
|
|||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
width: 34,
|
width: 34,
|
||||||
height: 34,
|
height: 34,
|
||||||
backgroundColor: theme.palette.primary.veryLowContrast,
|
backgroundColor: theme.palette.action.hover,
|
||||||
"& svg": {
|
"& svg": {
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
"& path": {
|
"& path": {
|
||||||
stroke: theme.palette.primary.contrastTextTertiary,
|
stroke: theme.palette.text.secondary,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export const ChartAvgResponse = ({
|
|||||||
>
|
>
|
||||||
<RadialBar
|
<RadialBar
|
||||||
dataKey="value"
|
dataKey="value"
|
||||||
background={{ fill: theme.palette[palette].lowContrast }}
|
background={{ fill: theme.palette[palette].light }}
|
||||||
>
|
>
|
||||||
<Cell visibility={"hidden"} />
|
<Cell visibility={"hidden"} />
|
||||||
<Cell fill={theme.palette[palette].main} />
|
<Cell fill={theme.palette[palette].main} />
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export const ChartPageSpeedReport = ({ latestCheck }: { latestCheck: any }) => {
|
|||||||
{
|
{
|
||||||
value: 100,
|
value: 100,
|
||||||
fill: alpha(
|
fill: alpha(
|
||||||
theme.palette[pageSpeedPalette].lowContrast || "#ffffff",
|
theme.palette[pageSpeedPalette].light || "#ffffff",
|
||||||
0.6
|
0.6
|
||||||
),
|
),
|
||||||
stroke: "none",
|
stroke: "none",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const MetricBox = ({
|
|||||||
sx={{
|
sx={{
|
||||||
border: 1,
|
border: 1,
|
||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -37,7 +37,7 @@ const MetricBox = ({
|
|||||||
</Stack>
|
</Stack>
|
||||||
<Box
|
<Box
|
||||||
width={4}
|
width={4}
|
||||||
bgcolor={theme.palette[palette].lowContrast}
|
bgcolor={theme.palette[palette].light}
|
||||||
sx={{
|
sx={{
|
||||||
borderTopRightRadius: theme.shape.borderRadius,
|
borderTopRightRadius: theme.shape.borderRadius,
|
||||||
borderBottomRightRadius: theme.shape.borderRadius,
|
borderBottomRightRadius: theme.shape.borderRadius,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export const XTick: React.FC<XTickProps> = ({ x, y, payload, range }) => {
|
|||||||
x={x}
|
x={x}
|
||||||
y={y + 10}
|
y={y + 10}
|
||||||
textAnchor="middle"
|
textAnchor="middle"
|
||||||
fill={theme.palette.primary.contrastTextTertiary}
|
fill={theme.palette.text.secondary}
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
fontWeight={400}
|
fontWeight={400}
|
||||||
>
|
>
|
||||||
@@ -98,7 +98,7 @@ export const ChartResponseTime = ({
|
|||||||
<ResponsiveContainer width="100%" height={300}>
|
<ResponsiveContainer width="100%" height={300}>
|
||||||
<AreaChart data={normalized?.slice().reverse()}>
|
<AreaChart data={normalized?.slice().reverse()}>
|
||||||
<CartesianGrid
|
<CartesianGrid
|
||||||
stroke={theme.palette.primary.lowContrast}
|
stroke={theme.palette.divider}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
strokeOpacity={1}
|
strokeOpacity={1}
|
||||||
fill="transparent"
|
fill="transparent"
|
||||||
@@ -108,12 +108,12 @@ export const ChartResponseTime = ({
|
|||||||
<linearGradient id="colorUv" x1="0" y1="0" x2="0" y2="1">
|
<linearGradient id="colorUv" x1="0" y1="0" x2="0" y2="1">
|
||||||
<stop
|
<stop
|
||||||
offset="0%"
|
offset="0%"
|
||||||
stopColor={theme.palette.accent.main}
|
stopColor={theme.palette.primary.main}
|
||||||
stopOpacity={0.8}
|
stopOpacity={0.8}
|
||||||
/>
|
/>
|
||||||
<stop
|
<stop
|
||||||
offset="100%"
|
offset="100%"
|
||||||
stopColor={theme.palette.accent.light}
|
stopColor={theme.palette.primary.light}
|
||||||
stopOpacity={0}
|
stopOpacity={0}
|
||||||
/>
|
/>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
@@ -138,7 +138,7 @@ export const ChartResponseTime = ({
|
|||||||
<Area
|
<Area
|
||||||
type="monotone"
|
type="monotone"
|
||||||
dataKey="normalResponseTime"
|
dataKey="normalResponseTime"
|
||||||
stroke={theme.palette.accent.main}
|
stroke={theme.palette.primary.main}
|
||||||
fill="url(#colorUv)"
|
fill="url(#colorUv)"
|
||||||
/>
|
/>
|
||||||
</AreaChart>
|
</AreaChart>
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export const HistogramInfrastructure = ({
|
|||||||
<YAxis domain={title === "temp" ? tempYDomain : yDomain} />
|
<YAxis domain={title === "temp" ? tempYDomain : yDomain} />
|
||||||
|
|
||||||
<CartesianGrid
|
<CartesianGrid
|
||||||
stroke={theme.palette.primary.lowContrast}
|
stroke={theme.palette.divider}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
strokeOpacity={1}
|
strokeOpacity={1}
|
||||||
fill="transparent"
|
fill="transparent"
|
||||||
|
|||||||
@@ -68,14 +68,14 @@ export const HistogramPageSpeed = ({
|
|||||||
style={{ cursor: "pointer" }}
|
style={{ cursor: "pointer" }}
|
||||||
>
|
>
|
||||||
<CartesianGrid
|
<CartesianGrid
|
||||||
stroke={theme.palette.primary.lowContrast}
|
stroke={theme.palette.divider}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
strokeOpacity={1}
|
strokeOpacity={1}
|
||||||
fill="transparent"
|
fill="transparent"
|
||||||
vertical={false}
|
vertical={false}
|
||||||
/>
|
/>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
cursor={{ stroke: theme.palette.primary.lowContrast }}
|
cursor={{ stroke: theme.palette.divider }}
|
||||||
content={<HistogramPageSpeedTooltip />}
|
content={<HistogramPageSpeedTooltip />}
|
||||||
/>
|
/>
|
||||||
<defs>
|
<defs>
|
||||||
|
|||||||
@@ -12,10 +12,7 @@ import { HistogramPageSpeedScoresTooltip } from "./HistogramPageSpeedScoresToolt
|
|||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import type { GroupedCheck } from "@/types/check";
|
import type { GroupedCheck } from "@/types/check";
|
||||||
import type { Palette } from "@mui/material/styles";
|
import type { Palette } from "@mui/material/styles";
|
||||||
type PaletteColorKey = Extract<
|
type PaletteColorKey = Extract<keyof Palette, "primary" | "secondary" | "success" | "warning">;
|
||||||
keyof Palette,
|
|
||||||
"primary" | "secondary" | "success" | "warning" | "accent"
|
|
||||||
>;
|
|
||||||
|
|
||||||
export interface ConfigItem {
|
export interface ConfigItem {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -42,7 +39,7 @@ const config: Record<string, ConfigItem> = {
|
|||||||
accessibility: {
|
accessibility: {
|
||||||
id: "accessibility",
|
id: "accessibility",
|
||||||
text: "accessibility",
|
text: "accessibility",
|
||||||
palette: "accent",
|
palette: "secondary",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -57,20 +54,20 @@ export const HistogramPageSpeedScores = ({
|
|||||||
<ResponsiveContainer width="100%" minWidth={25} height={215}>
|
<ResponsiveContainer width="100%" minWidth={25} height={215}>
|
||||||
<AreaChart data={checks}>
|
<AreaChart data={checks}>
|
||||||
<CartesianGrid
|
<CartesianGrid
|
||||||
stroke={theme.palette.primary.lowContrast}
|
stroke={theme.palette.divider}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
strokeOpacity={1}
|
strokeOpacity={1}
|
||||||
fill="transparent"
|
fill="transparent"
|
||||||
vertical={false}
|
vertical={false}
|
||||||
/>
|
/>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
cursor={{ stroke: theme.palette.primary.lowContrast }}
|
cursor={{ stroke: theme.palette.divider }}
|
||||||
content={<HistogramPageSpeedScoresTooltip config={config} />}
|
content={<HistogramPageSpeedScoresTooltip config={config} />}
|
||||||
/>
|
/>
|
||||||
<defs>
|
<defs>
|
||||||
{Object.values(config).map(({ id, palette }) => {
|
{Object.values(config).map(({ id, palette }) => {
|
||||||
const startColor = theme.palette[palette].main;
|
const startColor = theme.palette[palette].main;
|
||||||
const endColor = theme.palette[palette].lowContrast;
|
const endColor = theme.palette[palette].light;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<linearGradient id={id} x1="0" y1="0" x2="0" y2="1" key={id}>
|
<linearGradient id={id} x1="0" y1="0" x2="0" y2="1" key={id}>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const HistogramPageSpeedScoresTooltip = ({
|
|||||||
sx={{
|
sx={{
|
||||||
backgroundColor: theme.palette.primary.main,
|
backgroundColor: theme.palette.primary.main,
|
||||||
border: 1,
|
border: 1,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
py: theme.spacing(2),
|
py: theme.spacing(2),
|
||||||
px: theme.spacing(4),
|
px: theme.spacing(4),
|
||||||
@@ -34,7 +34,7 @@ export const HistogramPageSpeedScoresTooltip = ({
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.text.secondary,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const HistogramPageSpeedTooltip = ({
|
|||||||
sx={{
|
sx={{
|
||||||
backgroundColor: theme.palette.secondary.main,
|
backgroundColor: theme.palette.secondary.main,
|
||||||
border: 1,
|
border: 1,
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
p: theme.spacing(4),
|
p: theme.spacing(4),
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const XLabel = ({
|
|||||||
dy={-3}
|
dy={-3}
|
||||||
textAnchor="start"
|
textAnchor="start"
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
fill={theme.palette.primary.contrastTextTertiary}
|
fill={theme.palette.text.secondary}
|
||||||
>
|
>
|
||||||
{formatDateWithTz(p1._id, dateFormat, uiTimezone)}
|
{formatDateWithTz(p1._id, dateFormat, uiTimezone)}
|
||||||
</text>
|
</text>
|
||||||
@@ -44,7 +44,7 @@ const XLabel = ({
|
|||||||
dy={-3}
|
dy={-3}
|
||||||
textAnchor="end"
|
textAnchor="end"
|
||||||
fontSize={11}
|
fontSize={11}
|
||||||
fill={theme.palette.primary.contrastTextTertiary}
|
fill={theme.palette.text.secondary}
|
||||||
>
|
>
|
||||||
{formatDateWithTz(p2._id, dateFormat, uiTimezone)}
|
{formatDateWithTz(p2._id, dateFormat, uiTimezone)}
|
||||||
</text>
|
</text>
|
||||||
@@ -118,7 +118,7 @@ export const HistogramStatus = ({
|
|||||||
<ResponsiveContainer width="100%" height={155}>
|
<ResponsiveContainer width="100%" height={155}>
|
||||||
<BarChart data={normalChecks}>
|
<BarChart data={normalChecks}>
|
||||||
<XAxis
|
<XAxis
|
||||||
stroke={theme.palette.primary.lowContrast}
|
stroke={theme.palette.divider}
|
||||||
height={15}
|
height={15}
|
||||||
tick={false}
|
tick={false}
|
||||||
label={
|
label={
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const MonitorStatus = ({ monitor }: { monitor: IMonitor }) => {
|
|||||||
<Stack direction="row" alignItems={"center"} gap={theme.spacing(4)}>
|
<Stack direction="row" alignItems={"center"} gap={theme.spacing(4)}>
|
||||||
<PulseDot color={getStatusColor(monitor.status, theme)} />
|
<PulseDot color={getStatusColor(monitor.status, theme)} />
|
||||||
<Typography
|
<Typography
|
||||||
color={theme.palette.primary.contrastTextSecondary}
|
color={theme.palette.text.secondary}
|
||||||
fontSize={typographyLevels.l}
|
fontSize={typographyLevels.l}
|
||||||
fontWeight={"bolder"}
|
fontWeight={"bolder"}
|
||||||
fontFamily={"monospace"}
|
fontFamily={"monospace"}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const HistogramStatusPage = ({ checks }: { checks: ICheck[] }) => {
|
|||||||
xs: theme.spacing(2),
|
xs: theme.spacing(2),
|
||||||
sm: theme.spacing(6),
|
sm: theme.spacing(6),
|
||||||
}}
|
}}
|
||||||
bgcolor={theme.palette.primary.lowContrast}
|
bgcolor={theme.palette.action.hover}
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius: theme.spacing(1.5),
|
borderRadius: theme.spacing(1.5),
|
||||||
}}
|
}}
|
||||||
@@ -54,8 +54,8 @@ export const HistogramStatusPage = ({ checks }: { checks: ICheck[] }) => {
|
|||||||
height={`${check.normalResponseTime}%`}
|
height={`${check.normalResponseTime}%`}
|
||||||
bgcolor={
|
bgcolor={
|
||||||
check.status === "up"
|
check.status === "up"
|
||||||
? theme.palette.success.lowContrast
|
? theme.palette.success.light
|
||||||
: theme.palette.error.lowContrast
|
: theme.palette.error.light
|
||||||
}
|
}
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius: theme.spacing(1.5),
|
borderRadius: theme.spacing(1.5),
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const StatusHeader = ({
|
|||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
width={"100%"}
|
width={"100%"}
|
||||||
bgcolor={theme.palette[headerConfig.paletteKey].lowContrast}
|
bgcolor={theme.palette[headerConfig.paletteKey].light}
|
||||||
borderRadius={theme.shape.borderRadius}
|
borderRadius={theme.shape.borderRadius}
|
||||||
padding={theme.spacing(4)}
|
padding={theme.spacing(4)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ const Invite = () => {
|
|||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
Send Invite
|
Send Invite
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ const Login = () => {
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
color="accent"
|
color="primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const RegisterForm = ({
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={() => onSubmit(defaults)}
|
onClick={() => onSubmit(defaults)}
|
||||||
>
|
>
|
||||||
Accept invite
|
Accept invite
|
||||||
@@ -165,7 +165,7 @@ export const RegisterForm = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
color="accent"
|
color="primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ const BillingSuccessPage = () => {
|
|||||||
>
|
>
|
||||||
<Typography variant="h1">Finishing subscription update...</Typography>
|
<Typography variant="h1">Finishing subscription update...</Typography>
|
||||||
<Stack direction="row" alignItems={"center"} gap={theme.spacing(10)}>
|
<Stack direction="row" alignItems={"center"} gap={theme.spacing(10)}>
|
||||||
<CircularProgress color="accent" size={28} />
|
<CircularProgress color="primary" size={28} />
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="h2">
|
<Typography variant="h2">
|
||||||
{plan ? (
|
{plan ? (
|
||||||
<>
|
<>
|
||||||
{"Selected plan: "}
|
{"Selected plan: "}
|
||||||
<span style={{ color: theme.palette.accent.main }}>
|
<span style={{ color: theme.palette.primary.main }}>
|
||||||
{plan.charAt(0).toUpperCase() + plan.slice(1)}
|
{plan.charAt(0).toUpperCase() + plan.slice(1)}
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
@@ -70,13 +70,13 @@ const BillingSuccessPage = () => {
|
|||||||
nothing will change.
|
nothing will change.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button
|
<Button
|
||||||
color="accent"
|
color="primary"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onClick={() => refetch?.()}
|
onClick={() => refetch?.()}
|
||||||
>
|
>
|
||||||
Try again
|
Try again
|
||||||
</Button>
|
</Button>
|
||||||
<Button color="accent" variant="contained" href="/billing">
|
<Button color="primary" variant="contained" href="/billing">
|
||||||
Back to billing
|
Back to billing
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const DiagnosticsLogTab = () => {
|
|||||||
info: theme.palette.success.main,
|
info: theme.palette.success.main,
|
||||||
warn: theme.palette.warning.main,
|
warn: theme.palette.warning.main,
|
||||||
error: theme.palette.error.main,
|
error: theme.palette.error.main,
|
||||||
debug: theme.palette.accent.main,
|
debug: theme.palette.primary.main,
|
||||||
};
|
};
|
||||||
|
|
||||||
const headers: Header<ILogEntry>[] = [
|
const headers: Header<ILogEntry>[] = [
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const NoTeam = () => {
|
|||||||
<Box>
|
<Box>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await post("/auth/logout", {});
|
await post("/auth/logout", {});
|
||||||
navigate("/login");
|
navigate("/login");
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const NotFound = ({ title = DefaultValue.title, desc = DefaultValue.desc }) => {
|
|||||||
<Typography variant="body1">{desc}</Typography>
|
<Typography variant="body1">{desc}</Typography>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
sx={{ mt: theme.spacing(10) }}
|
sx={{ mt: theme.spacing(10) }}
|
||||||
onClick={() => navigate("/")}
|
onClick={() => navigate("/")}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const ExportPage = () => {
|
|||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={handleExport}
|
onClick={handleExport}
|
||||||
>
|
>
|
||||||
Export to JSON
|
Export to JSON
|
||||||
@@ -130,7 +130,7 @@ const ExportPage = () => {
|
|||||||
<Button
|
<Button
|
||||||
loading={isPosting}
|
loading={isPosting}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={handleImport}
|
onClick={handleImport}
|
||||||
>
|
>
|
||||||
Import from JSON
|
Import from JSON
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export const IncidentTable = ({
|
|||||||
refetch();
|
refetch();
|
||||||
}}
|
}}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
Resolve
|
Resolve
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ const getChartConfigs = (theme: any, checks: IInfraCheck[]) => {
|
|||||||
{
|
{
|
||||||
type: "memory",
|
type: "memory",
|
||||||
dataKeys: ["memory.usage_percent"],
|
dataKeys: ["memory.usage_percent"],
|
||||||
strokeColor: theme.palette.accent.main,
|
strokeColor: theme.palette.primary.main,
|
||||||
gradientStartColor: theme.palette.accent.main,
|
gradientStartColor: theme.palette.primary.main,
|
||||||
yDomain: [0, 1],
|
yDomain: [0, 1],
|
||||||
idx: null,
|
idx: null,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ const getChartConfigs = (
|
|||||||
{
|
{
|
||||||
type: "Bytes received",
|
type: "Bytes received",
|
||||||
dataKeys: [`net[${idx}].bytes_recv`],
|
dataKeys: [`net[${idx}].bytes_recv`],
|
||||||
strokeColor: theme.palette.accent.main,
|
strokeColor: theme.palette.primary.main,
|
||||||
gradientStartColor: theme.palette.accent.main,
|
gradientStartColor: theme.palette.primary.main,
|
||||||
yDomain: [0, 1],
|
yDomain: [0, 1],
|
||||||
idx: null,
|
idx: null,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ export const InfraForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ export const MaintenanceForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ export const NotificationChannelsForm = ({
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={handleTest}
|
onClick={handleTest}
|
||||||
loading={isPosting || loading}
|
loading={isPosting || loading}
|
||||||
>
|
>
|
||||||
@@ -223,7 +223,7 @@ export const NotificationChannelsForm = ({
|
|||||||
loading={isPosting || loading}
|
loading={isPosting || loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ export const PageSpeedForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export const ProfileForm = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
color="accent"
|
color="primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export const RecoveryForm = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
color="accent"
|
color="primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export const ResetForm = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
color="accent"
|
color="primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
sx={{ width: "100%", alignSelf: "center", fontWeight: 700 }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ export const SettingsForm = ({
|
|||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onTest(formValues);
|
onTest(formValues);
|
||||||
}}
|
}}
|
||||||
@@ -320,7 +320,7 @@ export const SettingsForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
Save e-mail settings
|
Save e-mail settings
|
||||||
</Button>
|
</Button>
|
||||||
@@ -364,7 +364,7 @@ export const SettingsForm = ({
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ export const StatusPageForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export const TeamMemberForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export const TeamsForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ export const UptimeForm = ({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="primary"
|
||||||
>
|
>
|
||||||
{t("settingsSave")}
|
{t("settingsSave")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
const typographyBase = 13;
|
|
||||||
|
|
||||||
export const typographyLevels = {
|
|
||||||
base: typographyBase,
|
|
||||||
xs: `${(typographyBase - 4) / 16}rem`,
|
|
||||||
s: `${(typographyBase - 2) / 16}rem`,
|
|
||||||
m: `${typographyBase / 16}rem`,
|
|
||||||
l: `${(typographyBase + 2) / 16}rem`,
|
|
||||||
xl: `${(typographyBase + 10) / 16}rem`,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const lightPalette = {
|
|
||||||
primary: {
|
|
||||||
main: "#1570ef",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
export const darkPalette = {
|
|
||||||
primary: {
|
|
||||||
main: "#1570ef",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
+20
-40
@@ -47,85 +47,65 @@ export const colors = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const lightPalette = {
|
export const lightPalette = {
|
||||||
accent: {
|
|
||||||
main: colors.blueBlueWave,
|
|
||||||
light: lighten(colors.blueBlueWave, 0.2),
|
|
||||||
dark: darken(colors.blueBlueWave, 0.2),
|
|
||||||
contrastText: colors.offWhite,
|
|
||||||
},
|
|
||||||
primary: {
|
primary: {
|
||||||
main: colors.offWhite,
|
main: colors.blueBlueWave,
|
||||||
contrastText: colors.blueGray800,
|
light: lighten(colors.blueBlueWave, 0.4),
|
||||||
contrastTextSecondary: colors.blueGray600,
|
dark: darken(colors.blueBlueWave, 0.2),
|
||||||
contrastTextTertiary: colors.blueGray500,
|
|
||||||
lowContrast: colors.gray250,
|
|
||||||
veryLowContrast: lighten(colors.gray250, 0.5),
|
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
main: colors.gray200,
|
main: colors.gray200,
|
||||||
light: colors.lightBlueWave,
|
light: colors.lightBlueWave,
|
||||||
dark: lighten(colors.gray200, 0.1),
|
dark: lighten(colors.gray200, 0.1),
|
||||||
contrastText: colors.blueGray600,
|
|
||||||
},
|
|
||||||
tertiary: {
|
|
||||||
main: colors.gray100,
|
|
||||||
contrastText: colors.blueGray800,
|
|
||||||
},
|
},
|
||||||
|
// Tertiary is a custom helper palette
|
||||||
success: {
|
success: {
|
||||||
main: colors.green700,
|
main: colors.green700,
|
||||||
contrastText: colors.offWhite,
|
contrastText: colors.offWhite,
|
||||||
lowContrast: colors.green400,
|
light: lighten(colors.green700, 0.35),
|
||||||
|
dark: darken(colors.green700, 0.2),
|
||||||
},
|
},
|
||||||
warning: {
|
warning: {
|
||||||
main: colors.orange700,
|
main: colors.orange700,
|
||||||
contrastText: colors.offWhite,
|
contrastText: colors.offWhite,
|
||||||
lowContrast: colors.orange100,
|
light: lighten(colors.orange700, 0.4),
|
||||||
|
dark: darken(colors.orange700, 0.2),
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
main: colors.red700,
|
main: colors.red700,
|
||||||
contrastText: colors.offWhite,
|
contrastText: colors.offWhite,
|
||||||
lowContrast: colors.red400,
|
light: lighten(colors.red700, 0.35),
|
||||||
|
dark: darken(colors.red700, 0.2),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const darkPalette = {
|
export const darkPalette = {
|
||||||
accent: {
|
|
||||||
main: colors.blueBlueWave,
|
|
||||||
light: lighten(colors.blueBlueWave, 0.2),
|
|
||||||
dark: darken(colors.blueBlueWave, 0.2),
|
|
||||||
contrastText: colors.offWhite,
|
|
||||||
},
|
|
||||||
primary: {
|
primary: {
|
||||||
main: colors.offBlack,
|
main: colors.blueBlueWave,
|
||||||
contrastText: colors.blueGray50,
|
light: lighten(colors.blueBlueWave, 0.4),
|
||||||
contrastTextSecondary: colors.gray200,
|
dark: darken(colors.blueBlueWave, 0.2),
|
||||||
contrastTextTertiary: colors.gray500,
|
|
||||||
lowContrast: colors.blueGray600,
|
|
||||||
veryLowContrast: darken(colors.blueGray600, 0.5),
|
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
main: colors.gray700,
|
main: colors.gray700,
|
||||||
light: colors.lightBlueWave,
|
light: colors.lightBlueWave,
|
||||||
dark: lighten(colors.gray700, 0.1),
|
dark: lighten(colors.gray700, 0.1),
|
||||||
contrastText: colors.gray200,
|
|
||||||
},
|
|
||||||
tertiary: {
|
|
||||||
main: colors.blueGray800,
|
|
||||||
contrastText: colors.gray100,
|
|
||||||
},
|
},
|
||||||
|
// Tertiary is a custom helper palette
|
||||||
success: {
|
success: {
|
||||||
main: colors.green100,
|
main: colors.green100,
|
||||||
contrastText: colors.offBlack,
|
contrastText: colors.offBlack,
|
||||||
lowContrast: colors.green200,
|
light: lighten(colors.green100, 0.25),
|
||||||
|
dark: darken(colors.green100, 0.15),
|
||||||
},
|
},
|
||||||
warning: {
|
warning: {
|
||||||
main: colors.orange200,
|
main: colors.orange200,
|
||||||
contrastText: colors.offBlack,
|
contrastText: colors.offBlack,
|
||||||
lowContrast: colors.orange600,
|
light: lighten(colors.orange200, 0.25),
|
||||||
|
dark: darken(colors.orange200, 0.15),
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
main: colors.red100,
|
main: colors.red100,
|
||||||
contrastText: colors.offBlack,
|
contrastText: colors.offBlack,
|
||||||
lowContrast: colors.red600,
|
light: lighten(colors.red100, 0.25),
|
||||||
|
dark: darken(colors.red100, 0.15),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import { createTheme } from "@mui/material";
|
import { createTheme } from "@mui/material";
|
||||||
// import { lightPalette, darkPalette, typographyLevels } from "./palette";
|
import { lightPalette, darkPalette, typographyLevels } from "./palette";
|
||||||
import { lightPalette, darkPalette, typographyLevels } from "./new_palette";
|
|
||||||
|
|
||||||
import type { Theme } from "@mui/material/styles";
|
import type { Theme } from "@mui/material/styles";
|
||||||
|
|
||||||
@@ -35,23 +34,18 @@ export const theme = (mode: string, palette: any) =>
|
|||||||
fontSize: typographyLevels.base,
|
fontSize: typographyLevels.base,
|
||||||
h1: {
|
h1: {
|
||||||
fontSize: typographyLevels.xl,
|
fontSize: typographyLevels.xl,
|
||||||
color: palette.primary.contrastText,
|
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
h2: {
|
h2: {
|
||||||
fontSize: typographyLevels.l,
|
fontSize: typographyLevels.l,
|
||||||
color: palette.primary.contrastTextSecondary,
|
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
},
|
},
|
||||||
|
|
||||||
body1: {
|
body1: {
|
||||||
fontSize: typographyLevels.m,
|
fontSize: typographyLevels.m,
|
||||||
color: palette.primary.contrastTextTertiary,
|
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
},
|
},
|
||||||
body2: {
|
body2: {
|
||||||
fontSize: typographyLevels.s,
|
fontSize: typographyLevels.s,
|
||||||
color: palette.primary.contrastTextTertiary,
|
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -87,7 +81,7 @@ export const theme = (mode: string, palette: any) =>
|
|||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: {
|
root: {
|
||||||
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
||||||
borderColor: palette.accent.main,
|
borderColor: palette.primary.main,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -101,10 +95,10 @@ export const theme = (mode: string, palette: any) =>
|
|||||||
padding: 0,
|
padding: 0,
|
||||||
border: 1,
|
border: 1,
|
||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.divider,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
boxShadow: shadow,
|
boxShadow: shadow,
|
||||||
backgroundColor: theme.palette.primary.main,
|
backgroundColor: theme.palette.background.paper,
|
||||||
backgroundImage: "none",
|
backgroundImage: "none",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+3
-23
@@ -1,31 +1,11 @@
|
|||||||
import "@mui/material/Button";
|
import "@mui/material/Button";
|
||||||
|
|
||||||
declare module "@mui/material/styles" {
|
declare module "@mui/material/styles" {}
|
||||||
interface Palette {
|
|
||||||
accent: Palette["primary"];
|
|
||||||
tertiary: Palette["primary"];
|
|
||||||
}
|
|
||||||
interface PaletteOptions {
|
|
||||||
accent?: PaletteOptions["primary"];
|
|
||||||
tertiary?: PaletteOptions["primary"];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PaletteColor {
|
|
||||||
contrastTextSecondary?: string;
|
|
||||||
contrastTextTertiary?: string;
|
|
||||||
lowContrast?: string;
|
|
||||||
veryLowContrast?: string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module "@mui/material/Button" {
|
declare module "@mui/material/Button" {
|
||||||
interface ButtonPropsColorOverrides {
|
interface ButtonPropsColorOverrides {}
|
||||||
accent: true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "@mui/material/CircularProgress" {
|
declare module "@mui/material/CircularProgress" {
|
||||||
interface CircularProgressPropsColorOverrides {
|
interface CircularProgressPropsColorOverrides {}
|
||||||
accent: true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@ export const normalizeResponseTimes = <
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Interpolate color between three theme colors over 0-100 range.
|
// Interpolate color between three theme colors over 0-100 range.
|
||||||
// 0-50 => start (success.lowContrast), 50-75 => mid (warning.lowContrast), 75-100 => end (error.lowContrast)
|
// 0-50 => start (success.light), 50-75 => mid (warning.light), 75-100 => end (error.light)
|
||||||
export const getResponseColor = (
|
export const getResponseColor = (
|
||||||
ms: number,
|
ms: number,
|
||||||
colors: {
|
colors: {
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ export const getValuePalette = (value: ValueType): PaletteKey => {
|
|||||||
|
|
||||||
export const getStatusColor = (status: MonitorStatus, theme: any): string => {
|
export const getStatusColor = (status: MonitorStatus, theme: any): string => {
|
||||||
const statusColors: Record<MonitorStatus, string> = {
|
const statusColors: Record<MonitorStatus, string> = {
|
||||||
up: theme.palette.success.lowContrast,
|
up: theme.palette.success.light,
|
||||||
down: theme.palette.error.lowContrast,
|
down: theme.palette.error.light,
|
||||||
paused: theme.palette.warning.lowContrast,
|
paused: theme.palette.warning.light,
|
||||||
initializing: theme.palette.warning.lowContrast,
|
initializing: theme.palette.warning.light,
|
||||||
};
|
};
|
||||||
return statusColors[status];
|
return statusColors[status];
|
||||||
};
|
};
|
||||||
@@ -58,9 +58,9 @@ export const getInfraGaugeColor = (val: number, theme: any) => {
|
|||||||
if (val < 50) {
|
if (val < 50) {
|
||||||
return theme.palette.success.main;
|
return theme.palette.success.main;
|
||||||
} else if (val < 80) {
|
} else if (val < 80) {
|
||||||
return theme.palette.warning.lowContrast;
|
return theme.palette.warning.light;
|
||||||
} else {
|
} else {
|
||||||
return theme.palette.error.lowContrast;
|
return theme.palette.error.light;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user