diff --git a/client/src/App.tsx b/client/src/App.tsx
index a8a25669e..127426c85 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -3,16 +3,14 @@ import { useSelector } from "react-redux";
import "react-toastify/dist/ReactToastify.css";
import { ToastContainer } from "react-toastify";
import { ThemeProvider } from "@emotion/react";
-import lightTheme from "./Utils/Theme/lightTheme";
-import darkTheme from "./Utils/Theme/darkTheme";
import { CssBaseline, GlobalStyles } from "@mui/material";
import { Routes } from "./Routes";
-import AppLayout from "@/Components/v2/layout/AppLayout";
+import AppLayout from "@/Components/layout/AppLayout";
import type { RootState } from "@/Types/state";
+import { lightTheme, darkTheme } from "@/Utils/Theme/Theme";
function App() {
const mode = useSelector((state: RootState) => state.ui.mode);
-
const theme = mode === "light" ? lightTheme : darkTheme;
return (
@@ -21,8 +19,7 @@ function App() {
diff --git a/client/src/Components/v2/actions-menu/index.tsx b/client/src/Components/actions-menu/index.tsx
similarity index 100%
rename from client/src/Components/v2/actions-menu/index.tsx
rename to client/src/Components/actions-menu/index.tsx
diff --git a/client/src/Components/v2/common/charts/HeatmapResponseTime.tsx b/client/src/Components/common/charts/HeatmapResponseTime.tsx
similarity index 97%
rename from client/src/Components/v2/common/charts/HeatmapResponseTime.tsx
rename to client/src/Components/common/charts/HeatmapResponseTime.tsx
index 972291f57..8178ffb92 100644
--- a/client/src/Components/v2/common/charts/HeatmapResponseTime.tsx
+++ b/client/src/Components/common/charts/HeatmapResponseTime.tsx
@@ -2,7 +2,7 @@ import Box from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
import type { CheckSnapshot } from "@/Types/Check";
import { getResponseColor } from "@/Utils/DataUtils";
-import { HeatmapResponseTimeTooltip } from "@/Components/v2/common/charts/HeatmapResponseTimeTooltip";
+import { HeatmapResponseTimeTooltip } from "@/Components/common/charts/HeatmapResponseTimeTooltip";
import type { SxProps } from "@mui/material/styles";
import type { ResponsiveStyleValue } from "@mui/system";
diff --git a/client/src/Components/v2/common/charts/HeatmapResponseTimeTooltip.tsx b/client/src/Components/common/charts/HeatmapResponseTimeTooltip.tsx
similarity index 100%
rename from client/src/Components/v2/common/charts/HeatmapResponseTimeTooltip.tsx
rename to client/src/Components/common/charts/HeatmapResponseTimeTooltip.tsx
diff --git a/client/src/Components/v2/common/charts/HistogramResponseTime.tsx b/client/src/Components/common/charts/HistogramResponseTime.tsx
similarity index 100%
rename from client/src/Components/v2/common/charts/HistogramResponseTime.tsx
rename to client/src/Components/common/charts/HistogramResponseTime.tsx
diff --git a/client/src/Components/v2/common/controls/HeaderCreate.tsx b/client/src/Components/common/controls/HeaderCreate.tsx
similarity index 100%
rename from client/src/Components/v2/common/controls/HeaderCreate.tsx
rename to client/src/Components/common/controls/HeaderCreate.tsx
diff --git a/client/src/Components/v2/common/controls/HeaderTimeRange.tsx b/client/src/Components/common/controls/HeaderTimeRange.tsx
similarity index 96%
rename from client/src/Components/v2/common/controls/HeaderTimeRange.tsx
rename to client/src/Components/common/controls/HeaderTimeRange.tsx
index c66ee9ff6..d7c7102bc 100644
--- a/client/src/Components/v2/common/controls/HeaderTimeRange.tsx
+++ b/client/src/Components/common/controls/HeaderTimeRange.tsx
@@ -1,7 +1,7 @@
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
-import { ToggleButtonGroup, ToggleButton } from "@/Components/v2/inputs";
+import { ToggleButtonGroup, ToggleButton } from "@/Components/inputs";
import { useTheme } from "@mui/material/styles";
import CircularProgress from "@mui/material/CircularProgress";
import { useTranslation } from "react-i18next";
diff --git a/client/src/Components/common/index.ts b/client/src/Components/common/index.ts
new file mode 100644
index 000000000..4db9cac34
--- /dev/null
+++ b/client/src/Components/common/index.ts
@@ -0,0 +1,5 @@
+export * from "./charts/HistogramResponseTime";
+export * from "./charts/HeatmapResponseTime";
+export * from "./charts/HeatmapResponseTimeTooltip";
+export * from "./controls/HeaderCreate";
+export * from "./controls/HeaderTimeRange";
diff --git a/client/src/Components/v2/design-elements/Avatar.tsx b/client/src/Components/design-elements/Avatar.tsx
similarity index 100%
rename from client/src/Components/v2/design-elements/Avatar.tsx
rename to client/src/Components/design-elements/Avatar.tsx
diff --git a/client/src/Components/v2/design-elements/BaseBox.tsx b/client/src/Components/design-elements/BaseBox.tsx
similarity index 100%
rename from client/src/Components/v2/design-elements/BaseBox.tsx
rename to client/src/Components/design-elements/BaseBox.tsx
diff --git a/client/src/Components/v2/design-elements/BaseChart.tsx b/client/src/Components/design-elements/BaseChart.tsx
similarity index 96%
rename from client/src/Components/v2/design-elements/BaseChart.tsx
rename to client/src/Components/design-elements/BaseChart.tsx
index fd9251915..569652b20 100644
--- a/client/src/Components/v2/design-elements/BaseChart.tsx
+++ b/client/src/Components/design-elements/BaseChart.tsx
@@ -1,4 +1,4 @@
-import { BaseBox } from "../design-elements";
+import { BaseBox } from ".";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
diff --git a/client/src/Components/v2/design-elements/BasePage.tsx b/client/src/Components/design-elements/BasePage.tsx
similarity index 97%
rename from client/src/Components/v2/design-elements/BasePage.tsx
rename to client/src/Components/design-elements/BasePage.tsx
index 48c836e54..cf28da40f 100644
--- a/client/src/Components/v2/design-elements/BasePage.tsx
+++ b/client/src/Components/design-elements/BasePage.tsx
@@ -8,8 +8,8 @@ import {
EmptyFallback,
EmptyMonitorFallback,
BaseFallback,
-} from "@/Components/v2/design-elements/Fallback";
-import { Breadcrumb } from "@/Components/v2/design-elements/Breadcrumb";
+} from "@/Components/design-elements/Fallback";
+import { Breadcrumb } from "@/Components/design-elements/Breadcrumb";
import CircularProgress from "@mui/material/CircularProgress";
import { HeaderAuthControls } from "@/Pages/Auth/components/HeaderAuthControls";
diff --git a/client/src/Components/v2/design-elements/Breadcrumb.tsx b/client/src/Components/design-elements/Breadcrumb.tsx
similarity index 100%
rename from client/src/Components/v2/design-elements/Breadcrumb.tsx
rename to client/src/Components/design-elements/Breadcrumb.tsx
diff --git a/client/src/Components/v2/design-elements/BulletPointCheck.tsx b/client/src/Components/design-elements/BulletPointCheck.tsx
similarity index 100%
rename from client/src/Components/v2/design-elements/BulletPointCheck.tsx
rename to client/src/Components/design-elements/BulletPointCheck.tsx
diff --git a/client/src/Components/v2/design-elements/Dot.tsx b/client/src/Components/design-elements/Dot.tsx
similarity index 100%
rename from client/src/Components/v2/design-elements/Dot.tsx
rename to client/src/Components/design-elements/Dot.tsx
diff --git a/client/src/Components/v2/design-elements/Fallback.tsx b/client/src/Components/design-elements/Fallback.tsx
similarity index 93%
rename from client/src/Components/v2/design-elements/Fallback.tsx
rename to client/src/Components/design-elements/Fallback.tsx
index 16eece25a..93cdac410 100644
--- a/client/src/Components/v2/design-elements/Fallback.tsx
+++ b/client/src/Components/design-elements/Fallback.tsx
@@ -1,7 +1,7 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
-import { BulletPointCheck, SkeletonCard } from "@/Components/v2/design-elements";
-import { Button } from "@/Components/v2/inputs";
+import { BulletPointCheck, SkeletonCard } from "@/Components/design-elements";
+import { Button } from "@/Components/inputs";
import { useNavigate } from "react-router";
import useMediaQuery from "@mui/material/useMediaQuery";
@@ -85,12 +85,7 @@ export const EmptyFallback = ({
zIndex={1}
alignItems="center"
>
-
- {title}
-
+ {title}
{
const theme = useTheme();
@@ -19,7 +19,6 @@ export const MonitorStatus = ({ monitor }: { monitor: Monitor }) => {
{linkText}
diff --git a/client/src/Components/v2/design-elements/Tooltip.tsx b/client/src/Components/design-elements/Tooltip.tsx
similarity index 100%
rename from client/src/Components/v2/design-elements/Tooltip.tsx
rename to client/src/Components/design-elements/Tooltip.tsx
diff --git a/client/src/Components/v2/design-elements/index.tsx b/client/src/Components/design-elements/index.tsx
similarity index 100%
rename from client/src/Components/v2/design-elements/index.tsx
rename to client/src/Components/design-elements/index.tsx
diff --git a/client/src/Components/v2/i18nLoader/index.tsx b/client/src/Components/i18nLoader/index.tsx
similarity index 100%
rename from client/src/Components/v2/i18nLoader/index.tsx
rename to client/src/Components/i18nLoader/index.tsx
diff --git a/client/src/Components/v2/inputs/AutoComplete.tsx b/client/src/Components/inputs/AutoComplete.tsx
similarity index 97%
rename from client/src/Components/v2/inputs/AutoComplete.tsx
rename to client/src/Components/inputs/AutoComplete.tsx
index af0e8cbfd..c98e8ff32 100644
--- a/client/src/Components/v2/inputs/AutoComplete.tsx
+++ b/client/src/Components/inputs/AutoComplete.tsx
@@ -1,6 +1,6 @@
import Autocomplete from "@mui/material/Autocomplete";
import type { AutocompleteProps } from "@mui/material/Autocomplete";
-import { TextField, Checkbox } from "@/Components/v2/inputs";
+import { TextField, Checkbox } from "@/Components/inputs";
import ListItem from "@mui/material/ListItem";
import Stack from "@mui/material/Stack";
import { useTheme } from "@mui/material/styles";
diff --git a/client/src/Components/v2/inputs/Button.tsx b/client/src/Components/inputs/Button.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/Button.tsx
rename to client/src/Components/inputs/Button.tsx
diff --git a/client/src/Components/v2/inputs/Checkbox.tsx b/client/src/Components/inputs/Checkbox.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/Checkbox.tsx
rename to client/src/Components/inputs/Checkbox.tsx
diff --git a/client/src/Components/v2/inputs/ColorPicker.tsx b/client/src/Components/inputs/ColorPicker.tsx
similarity index 89%
rename from client/src/Components/v2/inputs/ColorPicker.tsx
rename to client/src/Components/inputs/ColorPicker.tsx
index f52e66317..de736c85d 100644
--- a/client/src/Components/v2/inputs/ColorPicker.tsx
+++ b/client/src/Components/inputs/ColorPicker.tsx
@@ -1,9 +1,9 @@
import { MuiColorInput } from "mui-color-input";
import type { MuiColorInputProps } from "mui-color-input";
-import { typographyLevels } from "@/Utils/Theme/v2Palette";
+import { typographyLevels } from "@/Utils/Theme/Palette";
import { useTheme } from "@mui/material";
import Stack from "@mui/material/Stack";
-import { FieldLabel } from "@/Components/v2/inputs/FieldLabel";
+import { FieldLabel } from "@/Components/inputs/FieldLabel";
interface ColorPickerProps extends MuiColorInputProps {
fieldLabel?: string;
diff --git a/client/src/Components/v2/inputs/DatePicker.tsx b/client/src/Components/inputs/DatePicker.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/DatePicker.tsx
rename to client/src/Components/inputs/DatePicker.tsx
diff --git a/client/src/Components/v2/inputs/Dialog.tsx b/client/src/Components/inputs/Dialog.tsx
similarity index 94%
rename from client/src/Components/v2/inputs/Dialog.tsx
rename to client/src/Components/inputs/Dialog.tsx
index b581e7390..b0c924f55 100644
--- a/client/src/Components/v2/inputs/Dialog.tsx
+++ b/client/src/Components/inputs/Dialog.tsx
@@ -4,8 +4,8 @@ import DialogActions from "@mui/material/DialogActions";
import DialogContent from "@mui/material/DialogContent";
import DialogContentText from "@mui/material/DialogContentText";
import DialogTitle from "@mui/material/DialogTitle";
-import { Button } from "@/Components/v2/inputs";
-import { typographyLevels } from "@/Utils/Theme/v2Palette";
+import { Button } from "@/Components/inputs";
+import { typographyLevels } from "@/Utils/Theme/Palette";
import { useTranslation } from "react-i18next";
import type { ReactNode } from "react";
diff --git a/client/src/Components/v2/inputs/FieldLabel.tsx b/client/src/Components/inputs/FieldLabel.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/FieldLabel.tsx
rename to client/src/Components/inputs/FieldLabel.tsx
diff --git a/client/src/Components/v2/inputs/ImageUpload.tsx b/client/src/Components/inputs/ImageUpload.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/ImageUpload.tsx
rename to client/src/Components/inputs/ImageUpload.tsx
diff --git a/client/src/Components/v2/inputs/LanguageSelector.tsx b/client/src/Components/inputs/LanguageSelector.tsx
similarity index 97%
rename from client/src/Components/v2/inputs/LanguageSelector.tsx
rename to client/src/Components/inputs/LanguageSelector.tsx
index 2a1274ef2..a6d52a555 100644
--- a/client/src/Components/v2/inputs/LanguageSelector.tsx
+++ b/client/src/Components/inputs/LanguageSelector.tsx
@@ -1,7 +1,7 @@
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import MenuItem from "@mui/material/MenuItem";
-import { Select } from "@/Components/v2/inputs";
+import { Select } from "@/Components/inputs";
import "flag-icons/css/flag-icons.min.css";
import { useTranslation } from "react-i18next";
diff --git a/client/src/Components/v2/inputs/Radio.tsx b/client/src/Components/inputs/Radio.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/Radio.tsx
rename to client/src/Components/inputs/Radio.tsx
diff --git a/client/src/Components/v2/inputs/Select.tsx b/client/src/Components/inputs/Select.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/Select.tsx
rename to client/src/Components/inputs/Select.tsx
diff --git a/client/src/Components/v2/inputs/Slider.tsx b/client/src/Components/inputs/Slider.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/Slider.tsx
rename to client/src/Components/inputs/Slider.tsx
diff --git a/client/src/Components/v2/inputs/Switch.tsx b/client/src/Components/inputs/Switch.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/Switch.tsx
rename to client/src/Components/inputs/Switch.tsx
diff --git a/client/src/Components/v2/inputs/SwitchTheme.tsx b/client/src/Components/inputs/SwitchTheme.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/SwitchTheme.tsx
rename to client/src/Components/inputs/SwitchTheme.tsx
diff --git a/client/src/Components/v2/inputs/TextInput.tsx b/client/src/Components/inputs/TextInput.tsx
similarity index 95%
rename from client/src/Components/v2/inputs/TextInput.tsx
rename to client/src/Components/inputs/TextInput.tsx
index 9a16a43c7..718b60327 100644
--- a/client/src/Components/v2/inputs/TextInput.tsx
+++ b/client/src/Components/inputs/TextInput.tsx
@@ -1,7 +1,7 @@
import { forwardRef } from "react";
import TextField from "@mui/material/TextField";
import type { TextFieldProps } from "@mui/material";
-import { typographyLevels } from "@/Utils/Theme/v2Palette";
+import { typographyLevels } from "@/Utils/Theme/Palette";
import { useTheme } from "@mui/material/styles";
import Stack from "@mui/material/Stack";
import { FieldLabel } from "./FieldLabel";
diff --git a/client/src/Components/v2/inputs/TimePicker.tsx b/client/src/Components/inputs/TimePicker.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/TimePicker.tsx
rename to client/src/Components/inputs/TimePicker.tsx
diff --git a/client/src/Components/v2/inputs/ToggleButton.tsx b/client/src/Components/inputs/ToggleButton.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/ToggleButton.tsx
rename to client/src/Components/inputs/ToggleButton.tsx
diff --git a/client/src/Components/v2/inputs/index.tsx b/client/src/Components/inputs/index.tsx
similarity index 100%
rename from client/src/Components/v2/inputs/index.tsx
rename to client/src/Components/inputs/index.tsx
diff --git a/client/src/Components/v2/layout/AppLayout.tsx b/client/src/Components/layout/AppLayout.tsx
similarity index 74%
rename from client/src/Components/v2/layout/AppLayout.tsx
rename to client/src/Components/layout/AppLayout.tsx
index 7c9c3c903..baadd85ca 100644
--- a/client/src/Components/v2/layout/AppLayout.tsx
+++ b/client/src/Components/layout/AppLayout.tsx
@@ -1,11 +1,10 @@
import Box from "@mui/material/Box";
import { useState, useEffect, useRef } from "react";
-import { ThemeProvider, useTheme } from "@mui/material/styles";
+import { useTheme } from "@mui/material/styles";
import { useSelector } from "react-redux";
import BackgroundSVG from "@/assets/Images/background.svg";
import type { RootState } from "@/Types/state";
-import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme";
-import { OfflineBanner } from "@/Components/v2/design-elements";
+import { OfflineBanner } from "@/Components/design-elements";
import { setServerUnreachableCallback, get } from "@/Utils/ApiClient";
interface AppLayoutProps {
@@ -15,8 +14,6 @@ interface AppLayoutProps {
const AppLayout = ({ children }: AppLayoutProps) => {
const theme = useTheme();
const mode = useSelector((state: RootState) => state.ui.mode);
- const v2theme = mode === "dark" ? darkTheme : lightTheme;
-
const [serverUnreachable, setServerUnreachable] = useState(false);
const retryIntervalRef = useRef(null);
@@ -49,18 +46,14 @@ const AppLayout = ({ children }: AppLayoutProps) => {
-
-
-
+
{children}
);
diff --git a/client/src/Components/v2/layout/RootLayout.tsx b/client/src/Components/layout/RootLayout.tsx
similarity index 66%
rename from client/src/Components/v2/layout/RootLayout.tsx
rename to client/src/Components/layout/RootLayout.tsx
index 0b6defb91..c22bd7455 100644
--- a/client/src/Components/v2/layout/RootLayout.tsx
+++ b/client/src/Components/layout/RootLayout.tsx
@@ -1,26 +1,19 @@
-import { Sidebar } from "@/Components/v2/sidebar";
+import { Sidebar } from "@/Components/sidebar";
import { Outlet } from "react-router";
import Stack from "@mui/material/Stack";
import { useMediaQuery } from "@mui/material";
import { useSidebar } from "@/Hooks/useSidebar";
-import { useSelector } from "react-redux";
-import type { RootState } from "@/Types/state";
-import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme";
-import { ThemeProvider, useTheme } from "@mui/material";
+import { useTheme } from "@mui/material";
const RootLayout = () => {
- const mode = useSelector((state: RootState) => state.ui.mode);
- const v2theme = mode === "dark" ? darkTheme : lightTheme;
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
const { collapsedWidth } = useSidebar();
return (
-
-
-
+
{
- if (type === "double") {
- return (
-
- );
- } else {
- return (
-
- );
- }
-};
-
-ArrowRight.propTypes = {
- type: PropTypes.oneOf(["double", "default"]),
- color: PropTypes.string,
-};
-
-export default ArrowRight;
diff --git a/client/src/Components/v1/Breadcrumbs/index.css b/client/src/Components/v1/Breadcrumbs/index.css
deleted file mode 100644
index 022db9a83..000000000
--- a/client/src/Components/v1/Breadcrumbs/index.css
+++ /dev/null
@@ -1,21 +0,0 @@
-.MuiBreadcrumbs-root {
- min-height: 34px;
-}
-.MuiBreadcrumbs-root svg {
- width: 16px;
- min-height: 16px;
-}
-.MuiBreadcrumbs-root .MuiBreadcrumbs-li a {
- font-weight: 400;
-}
-.MuiBreadcrumbs-root .MuiBreadcrumbs-li:not(:last-child) {
- cursor: pointer;
-}
-.MuiBreadcrumbs-root .MuiBreadcrumbs-li:last-child a {
- font-weight: 500;
- opacity: 1;
- cursor: default;
-}
-.MuiBreadcrumbs-root .MuiBreadcrumbs-separator {
- margin: 0;
-}
diff --git a/client/src/Components/v1/Breadcrumbs/index.jsx b/client/src/Components/v1/Breadcrumbs/index.jsx
deleted file mode 100644
index 34e5d5e95..000000000
--- a/client/src/Components/v1/Breadcrumbs/index.jsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import PropTypes from "prop-types";
-import { Box, Breadcrumbs as MUIBreadcrumbs } from "@mui/material";
-import { useTheme } from "@emotion/react";
-import { useNavigate } from "react-router-dom";
-import ArrowRight from "../ArrowRight/index.jsx";
-import "./index.css";
-
-/**
- * Breadcrumbs component that displays a list of breadcrumb items.
- *
- * @param {Object} props
- * @param {Array} props.list - Array of breadcrumb items. Each item should have `name` and `path` properties.
- * @param {string} props.list.name - The name to display for the breadcrumb.
- * @param {string} props.list.path - The path to navigate to when the breadcrumb is clicked.
- *
- * @returns {JSX.Element} The rendered Breadcrumbs component.
- */
-
-const Breadcrumbs = ({ list }) => {
- const theme = useTheme();
- const navigate = useNavigate();
-
- return (
- }
- aria-label="breadcrumb"
- px={theme.spacing(2)}
- py={theme.spacing(3.5)}
- width="fit-content"
- backgroundColor={theme.palette.secondary.main}
- borderRadius={theme.shape.borderRadius}
- lineHeight="18px"
- sx={{
- "& .MuiBreadcrumbs-li a": {
- transition: "background-color 0.2s ease-in-out, color 0.2s ease-in-out",
- },
- "& .MuiBreadcrumbs-li:not(:last-of-type):hover a": {
- backgroundColor: theme.palette.secondary.contrastText,
- color: theme.palette.secondary.main,
- },
- }}
- >
- {list.map((item, index) => {
- return (
- navigate(item.path)}
- sx={{
- opacity: 0.8,
- textTransform: "capitalize",
- "&, &:hover": {
- color: theme.palette.secondary.contrastText,
- },
- }}
- >
- {item.name}
-
- );
- })}
-
- );
-};
-
-Breadcrumbs.propTypes = {
- list: PropTypes.arrayOf(
- PropTypes.shape({
- name: PropTypes.string.isRequired,
- path: PropTypes.string.isRequired,
- }).isRequired
- ).isRequired,
-};
-
-export default Breadcrumbs;
diff --git a/client/src/Components/v1/ConfigBox/index.jsx b/client/src/Components/v1/ConfigBox/index.jsx
deleted file mode 100644
index 01b35729e..000000000
--- a/client/src/Components/v1/ConfigBox/index.jsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Stack, styled } from "@mui/material";
-
-const ConfigBox = styled(Stack)(({ theme }) => ({
- display: "flex",
- flexDirection: "row",
- justifyContent: "space-between",
- backgroundColor: theme.palette.primary.main,
- border: 1,
- borderStyle: "solid",
- borderColor: theme.palette.primary.lowContrast,
- borderRadius: theme.spacing(2),
- "& > *": {
- paddingTop: theme.spacing(15),
- paddingBottom: theme.spacing(15),
- },
- "& > div:first-of-type": {
- flex: 0.7,
- borderRight: 1,
- borderRightStyle: "solid",
- borderRightColor: theme.palette.primary.lowContrast,
- paddingRight: theme.spacing(15),
- paddingLeft: theme.spacing(15),
- backgroundColor: theme.palette.tertiary.background,
- "& :is(h1, h2):first-of-type": {
- fontWeight: 600,
- marginBottom: theme.spacing(4),
- },
- },
- "& > div:last-of-type": {
- flex: 1,
- paddingRight: theme.spacing(20),
- paddingLeft: theme.spacing(20),
- },
- "& h1, & h2": {
- color: theme.palette.primary.contrastTextSecondary,
- },
-}));
-
-export default ConfigBox;
diff --git a/client/src/Components/v1/Dialog/genericDialog.jsx b/client/src/Components/v1/Dialog/genericDialog.jsx
deleted file mode 100644
index a13eba849..000000000
--- a/client/src/Components/v1/Dialog/genericDialog.jsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import { useId } from "react";
-import PropTypes from "prop-types";
-import { Modal, Stack, Typography } from "@mui/material";
-
-const GenericDialog = ({ title, description, open, onClose, theme, children, width }) => {
- const titleId = useId();
- const descriptionId = useId();
- const ariaDescribedBy = description?.length > 0 ? descriptionId : "";
- return (
- e.stopPropagation()}
- >
-
-
- {title}
-
- {description && (
-
- {description}
-
- )}
- {children}
-
-
- );
-};
-
-GenericDialog.propTypes = {
- title: PropTypes.string.isRequired,
- description: PropTypes.string,
- open: PropTypes.bool.isRequired,
- onClose: PropTypes.func.isRequired,
- theme: PropTypes.object.isRequired,
- children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
- .isRequired,
- width: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
-};
-
-export { GenericDialog };
diff --git a/client/src/Components/v1/Dialog/index.jsx b/client/src/Components/v1/Dialog/index.jsx
deleted file mode 100644
index b8cf07439..000000000
--- a/client/src/Components/v1/Dialog/index.jsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import PropTypes from "prop-types";
-import { Button, Stack } from "@mui/material";
-import { GenericDialog } from "./genericDialog.jsx";
-import { useTheme } from "@emotion/react";
-import { useTranslation } from "react-i18next";
-
-const Dialog = ({
- title,
- description,
- open,
- onCancel,
- confirmationButtonLabel,
- onConfirm,
- isLoading,
-}) => {
- const theme = useTheme();
- const { t } = useTranslation();
-
- return (
-
-
-
-
-
-
- );
-};
-
-Dialog.propTypes = {
- title: PropTypes.string.isRequired,
- description: PropTypes.string,
- open: PropTypes.bool.isRequired,
- onCancel: PropTypes.func.isRequired,
- confirmationButtonLabel: PropTypes.string.isRequired,
- onConfirm: PropTypes.func.isRequired,
- isLoading: PropTypes.bool,
-};
-
-export default Dialog;
diff --git a/client/src/Components/v1/Icon/iconMap.js b/client/src/Components/v1/Icon/iconMap.js
deleted file mode 100644
index 58da7304b..000000000
--- a/client/src/Components/v1/Icon/iconMap.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Maps legacy icon names to Lucide icon names
- * Use: import { iconMap } from './iconMap'; LucideIcons[iconMap['monitors']]
- */
-export const iconMap = {
- // Navigation/Sidebar icons
- monitors: "Globe",
- incidents: "AlertTriangle",
- integrations: "Link",
- "page-speed": "Gauge",
- settings: "Settings",
- notifications: "Bell",
- maintenance: "Wrench",
- "status-pages": "Wifi",
- docs: "FileText",
- discussions: "MessageCircle",
- support: "HelpCircle",
- changeLog: "Code",
- logs: "Database",
-
- // User icons
- user: "User",
- "user-two": "Users",
- "user-edit": "UserPen",
- groups: "Users",
- lock: "Lock",
- key: "Key",
- logout: "LogOut",
-
- // Action icons
- edit: "Pencil",
- "trash-bin": "Trash2",
- search: "Search",
- "close-icon": "X",
- check: "Check",
- "check-icon": "CheckCircle",
- "check-outlined": "CheckCircle",
-
- // Arrow icons
- "left-arrow": "ChevronLeft",
- "right-arrow": "ChevronRight",
- "up-arrow": "ChevronUp",
- "down-arrow": "ChevronDown",
- "left-arrow-double": "ChevronsLeft",
- "right-arrow-double": "ChevronsRight",
- "left-arrow-long": "ArrowLeft",
- "top-right-arrow": "ArrowUpRight",
- "open-in-new-page": "ExternalLink",
- "selector-vertical": "ChevronsUpDown",
-
- // Status/Alert icons
- "alert-icon": "Bell",
- "warning-icon": "AlertCircle",
- "history-icon": "History",
-
- // Data/Chart icons
- dashboard: "LayoutGrid",
- "monitor-graph-line": "TrendingUp",
- "response-time-icon": "TrendingUp",
- "uptime-icon": "Activity",
- "speedometer-icon": "Gauge",
- "spedometer-icon": "Gauge",
- "ruler-icon": "Ruler",
- "performance-report": "Layers",
- "average-response-icon": "BarChart3",
- "distributed-uptime": "Network",
-
- // Misc icons
- calendar: "Calendar",
- "calendar-check": "CalendarCheck",
- "clock-snooze": "Clock",
- mail: "Mail",
- email: "Mail",
- folder: "Folder",
- "dots-vertical": "MoreVertical",
- "pause-icon": "PauseCircle",
- "resume-icon": "PlayCircle",
- "checkbox-filled": "CheckSquare",
- "checkbox-outline": "Square",
- "radio-checked": "Circle",
- "cpu-chip": "Cpu",
- certificate: "Award",
- "interval-check": "RefreshCw",
-};
-
-/**
- * MUI icon to Lucide mapping
- */
-export const muiToLucideMap = {
- AddCircleOutline: "PlusCircle",
- ArrowDownwardRounded: "ArrowDown",
- ArrowUpwardRounded: "ArrowUp",
- ArrowDropDown: "ChevronDown",
- ArrowOutward: "ExternalLink",
- CheckCircle: "CheckCircle2",
- Clear: "X",
- Close: "X",
- CloseRounded: "X",
- CloudUpload: "Upload",
- Delete: "Trash2",
- DeleteOutlineRounded: "Trash2",
- Email: "Mail",
- ErrorOutline: "AlertTriangle",
- ErrorOutlineOutlined: "AlertTriangle",
- Image: "ImageIcon",
- InfoOutlined: "Info",
- KeyboardArrowDown: "ChevronDown",
- Menu: "Menu",
- PauseCircleOutline: "PauseCircle",
- PauseOutlined: "Pause",
- PlayArrowOutlined: "Play",
- PlayCircleOutlineRounded: "PlayCircle",
- RadioButtonChecked: "Circle",
- ReorderRounded: "GripVertical",
- SettingsOutlined: "Settings",
- Share: "Share2",
- Visibility: "Eye",
- VisibilityOff: "EyeOff",
- WarningAmberOutlined: "AlertTriangle",
-};
diff --git a/client/src/Components/v1/Icon/index.jsx b/client/src/Components/v1/Icon/index.jsx
deleted file mode 100644
index 9f7c61585..000000000
--- a/client/src/Components/v1/Icon/index.jsx
+++ /dev/null
@@ -1,198 +0,0 @@
-import { useTheme } from "@mui/material";
-import PropTypes from "prop-types";
-import {
- Activity,
- AlertCircle,
- AlertTriangle,
- ArrowDown,
- ArrowLeft,
- ArrowUp,
- ArrowUpRight,
- Bell,
- Calendar,
- Check,
- CheckCircle,
- CheckCircle2,
- CheckSquare,
- ChevronDown,
- ChevronLeft,
- ChevronRight,
- ChevronsLeft,
- ChevronsRight,
- ChevronsUpDown,
- Circle,
- CircleDot,
- Clock,
- Code,
- Cpu,
- Database,
- ExternalLink,
- Eye,
- EyeOff,
- FileText,
- Gauge,
- Globe,
- GripVertical,
- HelpCircle,
- History,
- Image as ImageIcon,
- Info,
- Key,
- Layers,
- Link,
- Lock,
- LogOut,
- Mail,
- Menu,
- MessageCircle,
- MoreVertical,
- Pause,
- PauseCircle,
- Play,
- PlayCircle,
- PlusCircle,
- RefreshCw,
- Ruler,
- Search,
- Settings,
- Square,
- Trash2,
- TrendingUp,
- Upload,
- User,
- Users,
- Wifi,
- Wrench,
- X,
-} from "lucide-react";
-
-/**
- * Map of icon names to Lucide icon components.
- * Only icons explicitly imported here will be included in the bundle (tree-shaking).
- * To add a new icon: import it above and add it to this object.
- */
-const iconComponents = {
- Activity,
- AlertCircle,
- AlertTriangle,
- ArrowDown,
- ArrowLeft,
- ArrowUp,
- ArrowUpRight,
- Bell,
- Calendar,
- Check,
- CheckCircle,
- CheckCircle2,
- CheckSquare,
- ChevronDown,
- ChevronLeft,
- ChevronRight,
- ChevronsLeft,
- ChevronsRight,
- ChevronsUpDown,
- Circle,
- CircleDot,
- Clock,
- Code,
- Cpu,
- Database,
- ExternalLink,
- Eye,
- EyeOff,
- FileText,
- Gauge,
- Globe,
- GripVertical,
- HelpCircle,
- History,
- Image: ImageIcon,
- Info,
- Key,
- Layers,
- Link,
- Lock,
- LogOut,
- Mail,
- Menu,
- MessageCircle,
- MoreVertical,
- Pause,
- PauseCircle,
- Play,
- PlayCircle,
- PlusCircle,
- RefreshCw,
- Ruler,
- Search,
- Settings,
- Square,
- Trash2,
- TrendingUp,
- Upload,
- User,
- Users,
- Wifi,
- Wrench,
- X,
-};
-
-/**
- * Theme-aware icon component wrapping Lucide icons
- *
- * @param {string} name - Lucide icon name (e.g., "Bell", "Check", "ArrowLeft")
- * @param {number} size - Icon size in pixels (default: 20)
- * @param {string} color - Direct color value OR theme path like "primary.contrastText"
- * @param {number} strokeWidth - Stroke width (default: 1.5)
- * @param {string} fill - Fill color (default: "none")
- */
-const Icon = ({ name, size = 20, color, strokeWidth = 1.5, fill = "none", ...props }) => {
- const theme = useTheme();
-
- // Resolve color from theme path or use direct value
- const resolveColor = (colorValue) => {
- if (!colorValue) {
- return theme.palette.primary.contrastTextTertiary; // Default icon color
- }
-
- // If it's a theme path like "primary.contrastText"
- if (typeof colorValue === "string" && colorValue.includes(".")) {
- const parts = colorValue.split(".");
- let resolved = theme.palette;
- for (const part of parts) {
- resolved = resolved?.[part];
- }
- return resolved || colorValue;
- }
-
- // Direct color value
- return colorValue;
- };
-
- const LucideIcon = iconComponents[name];
-
- if (!LucideIcon) {
- console.warn(`Icon "${name}" not found in Icon component`);
- return null;
- }
-
- return (
-
- );
-};
-
-Icon.propTypes = {
- name: PropTypes.string.isRequired,
- size: PropTypes.number,
- color: PropTypes.string,
- strokeWidth: PropTypes.number,
- fill: PropTypes.string,
-};
-
-export default Icon;
diff --git a/client/src/Components/v1/Inputs/Checkbox/index.jsx b/client/src/Components/v1/Inputs/Checkbox/index.jsx
deleted file mode 100644
index caa6830e7..000000000
--- a/client/src/Components/v1/Inputs/Checkbox/index.jsx
+++ /dev/null
@@ -1,116 +0,0 @@
-import PropTypes from "prop-types";
-import { FormControlLabel, Checkbox as MuiCheckbox } from "@mui/material";
-import { useTheme } from "@emotion/react";
-import Icon from "../../Icon";
-
-/**
- * Checkbox Component
- *
- * A customized checkbox component using Material-UI that supports custom sizing,
- * disabled states, and custom icons.
- *
- * @component
- * @param {Object} props - Component properties
- * @param {string} props.id - Unique identifier for the checkbox input
- * @param {string} [props.name] - Optional name attribute for the checkbox
- * @param {(string|React.ReactNode)} props.label - Label text or node for the checkbox
- * @param {('small'|'medium'|'large')} [props.size='medium'] - Size of the checkbox icon
- * @param {boolean} props.isChecked - Current checked state of the checkbox
- * @param {string} [props.value] - Optional value associated with the checkbox
- * @param {Function} [props.onChange] - Callback function triggered when checkbox state changes
- * @param {boolean} [props.isDisabled] - Determines if the checkbox is disabled
- *
- * @returns {React.ReactElement} Rendered Checkbox component
- *
- * @example
- * // Basic usage
- *
- *
- * @example
- * // With custom size and disabled state
- *
- */
-const Checkbox = ({
- id,
- name,
- label,
- size = "medium",
- isChecked,
- value,
- onChange,
- isDisabled,
-}) => {
- /* TODO move sizes to theme */
- const sizes = { small: "14px", medium: "16px", large: "18px" };
- const theme = useTheme();
- return (
- }
- checkedIcon={}
- inputProps={{
- "aria-label": "controlled checkbox",
- id: id,
- }}
- sx={{
- "&:hover": { backgroundColor: "transparent" },
- "& svg": { width: sizes[size], height: sizes[size] },
- }}
- />
- }
- label={label}
- disabled={isDisabled}
- sx={{
- borderRadius: theme.shape.borderRadius,
- p: theme.spacing(2.5),
- "& .MuiButtonBase-root": {
- width: theme.spacing(10),
- p: 0,
- mr: theme.spacing(6),
- },
- "&:not(:has(.Mui-disabled)):hover": {
- backgroundColor: theme.palette.tertiary.main,
- },
- "& span.MuiTypography-root": {
- fontSize: 13,
- color: theme.palette.primary.contrastTextTertiary,
- },
- ".MuiFormControlLabel-label.Mui-disabled": {
- color: theme.palette.primary.contrastTextTertiary,
- opacity: 0.25,
- },
- }}
- />
- );
-};
-
-Checkbox.propTypes = {
- id: PropTypes.string,
- name: PropTypes.string,
- label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
- size: PropTypes.oneOf(["small", "medium", "large"]),
- isChecked: PropTypes.bool.isRequired,
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
- onChange: PropTypes.func,
- isDisabled: PropTypes.bool,
-};
-
-export default Checkbox;
diff --git a/client/src/Components/v1/Inputs/ColorPicker/index.jsx b/client/src/Components/v1/Inputs/ColorPicker/index.jsx
deleted file mode 100644
index e64c936fc..000000000
--- a/client/src/Components/v1/Inputs/ColorPicker/index.jsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import PropTypes from "prop-types";
-import { Stack, Typography } from "@mui/material";
-import { useTheme } from "@emotion/react";
-import { MuiColorInput } from "mui-color-input";
-
-/**
- *
- * @param {*} id The ID of the component
- * @param {*} value The color value of the component
- * @param {*} error The error of the component
- * @param {*} onChange The Change handler function
- * @param {*} onBlur The Blur handler function
- * @returns The ColorPicker component
- * Example usage:
- *
- *
- */
-const ColorPicker = ({ id, name, value, error, onChange, onBlur }) => {
- const theme = useTheme();
- return (
-
- onChange({ target: { name, value: color } })}
- onBlur={onBlur}
- />
- {error && (
-
- {error}
-
- )}
-
- );
-};
-
-ColorPicker.propTypes = {
- id: PropTypes.string.isRequired,
- value: PropTypes.string,
- error: PropTypes.string,
- onChange: PropTypes.func.isRequired,
- onBlur: PropTypes.func,
- name: PropTypes.string,
-};
-
-export default ColorPicker;
diff --git a/client/src/Components/v1/Inputs/FieldWrapper/index.jsx b/client/src/Components/v1/Inputs/FieldWrapper/index.jsx
deleted file mode 100644
index cc5061af8..000000000
--- a/client/src/Components/v1/Inputs/FieldWrapper/index.jsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Stack, Typography } from "@mui/material";
-import PropTypes from "prop-types";
-import { useTheme } from "@emotion/react";
-
-const DEFAULT_GAP = 6;
-const FieldWrapper = ({
- label,
- children,
- gap,
- labelMb,
- labelFontWeight = 500,
- labelVariant = "h3",
- labelSx = {},
- sx = {},
-}) => {
- const theme = useTheme();
- return (
-
- {label && (
-
- {label}
-
- )}
- {children}
-
- );
-};
-
-FieldWrapper.propTypes = {
- label: PropTypes.node,
- children: PropTypes.node.isRequired,
- gap: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
- labelMb: PropTypes.number,
- labelFontWeight: PropTypes.number,
- labelVariant: PropTypes.string,
- labelSx: PropTypes.object,
- sx: PropTypes.object,
-};
-
-export default FieldWrapper;
diff --git a/client/src/Components/v1/Inputs/ImageUpload/index.jsx b/client/src/Components/v1/Inputs/ImageUpload/index.jsx
deleted file mode 100644
index d224418e0..000000000
--- a/client/src/Components/v1/Inputs/ImageUpload/index.jsx
+++ /dev/null
@@ -1,249 +0,0 @@
-// Components
-import { Box, Stack, Typography } from "@mui/material";
-import Icon from "../../Icon";
-import Image from "../../Image/index.jsx";
-import TextField from "@mui/material/TextField";
-import IconButton from "@mui/material/IconButton";
-import ProgressUpload from "../../ProgressBars/index.jsx";
-
-// Utils
-import PropTypes from "prop-types";
-import { useCallback, useState, useRef, useEffect } from "react";
-import { useTheme } from "@emotion/react";
-import { useTranslation } from "react-i18next";
-
-/**
- * ImageUpload component allows users to upload images with drag-and-drop functionality.
- * It supports file size and format validation.
- *
- * @component
- * @param {Object} props - Component props
- * @param {boolean} [props.previewIsRound=false] - Determines if the image preview should be round
- * @param {string} [props.src] - Source URL of the image to display
- * @param {function} props.onChange - Callback function to handle file change, takes a file as an argument
- * @param {number} [props.maxSize=3145728] - Maximum file size allowed in bytes (default is 3MB)
- * @param {Array} [props.accept=['jpg', 'jpeg', 'png']] - Array of accepted file formats
- * @param {Object} [props.errors] - Object containing error messages
- * @returns {JSX.Element} The rendered component
- */
-const ImageUpload = ({
- previewIsRound = false,
- src,
- onChange,
- maxSize = 3 * 1024 * 1024,
- accept = ["jpg", "jpeg", "png"],
- error,
-}) => {
- const theme = useTheme();
- const { t } = useTranslation();
- const [uploadComplete, setUploadComplete] = useState(false);
- const [completedFile, setCompletedFile] = useState(null);
- const [file, setFile] = useState(null);
- const [progress, setProgress] = useState({ value: 0, isLoading: false });
- const intervalRef = useRef(null);
- const [localError, setLocalError] = useState(null);
- const [isDragging, setIsDragging] = useState(false);
-
- const roundStyle = previewIsRound ? { borderRadius: "50%" } : {};
-
- const handleImageChange = useCallback(
- (file) => {
- if (!file) return;
-
- const isValidType = accept.some((type) => file.type.includes(type));
- const isValidSize = file.size <= maxSize;
-
- if (!isValidType) {
- setLocalError(t("invalidFileFormat"));
- return;
- }
- if (!isValidSize) {
- setLocalError(t("invalidFileSize"));
- return;
- }
-
- setLocalError(null);
-
- const previewFile = {
- src: URL.createObjectURL(file),
- name: file.name,
- file,
- };
-
- setFile(previewFile);
- setProgress({ value: 0, isLoading: true });
-
- intervalRef.current = setInterval(() => {
- setProgress((prev) => {
- const buffer = 12;
- if (prev.value + buffer >= 100) {
- clearInterval(intervalRef.current);
- setUploadComplete(true);
- setCompletedFile(previewFile);
- return { value: 100, isLoading: false };
- }
- return { value: prev.value + buffer, isLoading: true };
- });
- }, 120);
- },
- [maxSize, accept]
- );
-
- useEffect(() => {
- if (uploadComplete && completedFile) {
- onChange?.(completedFile);
- setUploadComplete(false);
- setCompletedFile(null);
- }
- }, [uploadComplete, completedFile, onChange]);
-
- return (
- <>
- {src ? (
-
-
-
- ) : (
- <>
- setIsDragging(true)}
- onDragLeave={() => setIsDragging(false)}
- onDrop={() => setIsDragging(false)}
- sx={{
- position: "relative",
- height: "fit-content",
- border: "dashed",
- borderRadius: theme.shape.borderRadius,
- borderColor: isDragging
- ? theme.palette.primary.main
- : theme.palette.primary.lowContrast,
- backgroundColor: isDragging ? "hsl(215, 87%, 51%, 0.05)" : "transparent",
- borderWidth: "2px",
- transition: "0.2s",
- "&:hover": {
- borderColor: theme.palette.primary.main,
- backgroundColor: "hsl(215, 87%, 51%, 0.05)",
- },
- }}
- >
- handleImageChange(e?.target?.files?.[0])}
- sx={{
- width: "100%",
- "& .MuiInputBase-input[type='file']": {
- opacity: 0,
- cursor: "pointer",
- maxWidth: "500px",
- minHeight: "175px",
- zIndex: 1,
- },
- "& fieldset": {
- padding: 0,
- border: "none",
- },
- }}
- />
-
-
-
-
-
-
- {t("ClickUpload")}
- {" "}
- or {t("DragandDrop")}
-
-
- ({t("MaxSize")}: {Math.round(maxSize / 1024 / 1024)}MB)
-
-
-
- {(localError || progress.isLoading || progress.value !== 0) && (
-
- }
- label={file?.name || "Upload failed"}
- size={file?.size}
- progress={progress.value}
- onClick={() => {
- clearInterval(intervalRef.current);
- setFile(null);
- setProgress({ value: 0, isLoading: false });
- setLocalError(null);
- onChange(undefined);
- }}
- error={localError || error}
- />
- )}
-
- {t("SupportedFormats")}: {accept.join(", ").toUpperCase()}
-
- >
- )}
- >
- );
-};
-
-ImageUpload.propTypes = {
- previewIsRound: PropTypes.bool,
- src: PropTypes.string,
- onChange: PropTypes.func,
- maxSize: PropTypes.number,
- accept: PropTypes.array,
- error: PropTypes.string,
-};
-
-export default ImageUpload;
diff --git a/client/src/Components/v1/Inputs/Radio/index.css b/client/src/Components/v1/Inputs/Radio/index.css
deleted file mode 100644
index e69de29bb..000000000
diff --git a/client/src/Components/v1/Inputs/Radio/index.jsx b/client/src/Components/v1/Inputs/Radio/index.jsx
deleted file mode 100644
index b6bd4e69c..000000000
--- a/client/src/Components/v1/Inputs/Radio/index.jsx
+++ /dev/null
@@ -1,117 +0,0 @@
-import PropTypes from "prop-types";
-import { FormControlLabel, Radio as MUIRadio, Typography } from "@mui/material";
-import { useTheme } from "@emotion/react";
-import Icon from "../../Icon";
-import "./index.css";
-
-/**
- * Radio component.
- *
- * @component
- * @example
- * // Usage:
- *
- *
- * @param {Object} props - The component
- * @param {string} id - The id of the radio button.
- * @param {string} title - The title of the radio button.
- * @param {string} [desc] - The description of the radio button.
- * @param {string} [size="small"] - The size of the radio button.
- * @returns {JSX.Element} - The rendered Radio component.
- */
-
-const Radio = ({
- name,
- checked,
- value,
- id,
- size,
- title,
- desc,
- onChange,
- labelSpacing,
-}) => {
- const theme = useTheme();
-
- return (
-
- }
- sx={{
- color: "transparent",
- width: 16,
- height: 16,
- boxShadow: `inset 0 0 0 1px ${theme.palette.secondary.main}`,
- "&:not(.Mui-checked)": {
- boxShadow: `inset 0 0 0 1px ${theme.palette.primary.contrastText}70`, // Use theme text color for the outline
- },
- mt: theme.spacing(0.5),
- }}
- />
- }
- onChange={onChange}
- label={
- <>
-
- {title}
-
-
- {desc}
-
- >
- }
- labelPlacement="end"
- sx={{
- alignItems: "flex-start",
- p: theme.spacing(2.5),
- m: theme.spacing(-2.5),
- borderRadius: theme.shape.borderRadius,
- "&:hover": {
- backgroundColor: theme.palette.tertiary.main,
- },
- "& .MuiButtonBase-root": {
- p: 0,
- mr: theme.spacing(6),
- },
- }}
- />
- );
-};
-
-Radio.propTypes = {
- title: PropTypes.string,
- desc: PropTypes.string,
- size: PropTypes.string,
- name: PropTypes.string,
- checked: PropTypes.bool,
- value: PropTypes.string,
- id: PropTypes.string,
- onChange: PropTypes.func,
-};
-
-export default Radio;
diff --git a/client/src/Components/v1/Inputs/Search/index.jsx b/client/src/Components/v1/Inputs/Search/index.jsx
deleted file mode 100644
index 4371ef971..000000000
--- a/client/src/Components/v1/Inputs/Search/index.jsx
+++ /dev/null
@@ -1,315 +0,0 @@
-import PropTypes from "prop-types";
-import {
- Box,
- ListItem,
- Autocomplete,
- TextField,
- Typography,
- Checkbox,
-} from "@mui/material";
-import { useTheme } from "@emotion/react";
-import Icon from "../../Icon";
-import React, { useEffect } from "react";
-import { useTranslation } from "react-i18next";
-import FieldWrapper from "../FieldWrapper/index.jsx";
-
-/**
- * Search component using Material UI's Autocomplete.
- *
- * @param {Object} props
- * @param {string} props.id - Unique identifier for the Autocomplete component
- * @param {Array
+ }
+ />
+ )}
+
+
+ {/* Email Settings - Admin Only */}
+ {isAdmin && (
+
+
+
+
+ {JSON.stringify(
+ {
+ host: form.watch("systemEmailHost") || "",
+ port: form.watch("systemEmailPort") || "",
+ secure: form.watch("systemEmailSecure") ?? false,
+ auth: {
+ user:
+ form.watch("systemEmailUser") ||
+ form.watch("systemEmailAddress") ||
+ "",
+ pass: "",
+ },
+ name: form.watch("systemEmailConnectionHost") || "localhost",
+ pool: form.watch("systemEmailPool") ?? false,
+ tls: {
+ rejectUnauthorized:
+ form.watch("systemEmailRejectUnauthorized") ?? true,
+ ignoreTLS: form.watch("systemEmailIgnoreTLS") ?? false,
+ requireTLS: form.watch("systemEmailRequireTLS") ?? false,
+ servername: form.watch("systemEmailTLSServername") || "",
+ },
+ },
+ null,
+ 2
+ )}
+
+
+
+ }
+ rightContent={
+
+ {/* Email Host */}
+ (
+
+ )}
+ />
+
+ {/* Email Port */}
+ (
+ {
+ const val = e.target.value;
+ field.onChange(val === "" ? 0 : Number(val));
+ }}
+ fieldLabel={t("pages.settings.form.email.option.port.label")}
+ type="number"
+ inputProps={{ min: 0 }}
+ placeholder={t("pages.settings.form.email.option.port.placeholder")}
+ error={!!fieldState.error}
+ helperText={fieldState.error?.message}
+ />
+ )}
+ />
+
+ {/* Email Address */}
+ (
+
+ )}
+ />
+
+ {/* Email User (Optional) */}
+ (
+
+ )}
+ />
+
+ {/* Email Password with Reset Pattern */}
+ {isEmailPasswordSet && !emailPasswordHasBeenReset ? (
+
+
+ {t("pages.settings.form.email.option.password.labelSet")}
+
+
+
+
+
+ ) : (
+ (
+
+ )}
+ />
+ )}
+
+ {/* TLS Servername (Optional) */}
+ (
+
+ )}
+ />
+
+ {/* Connection Host (Optional) */}
+ (
+
+ )}
+ />
+
+ {/* Boolean Switches */}
+
+ {[
+ {
+ name: "systemEmailSecure",
+ label: t("pages.settings.form.email.option.secure.label"),
+ },
+ {
+ name: "systemEmailPool",
+ label: t("pages.settings.form.email.option.pool.label"),
+ },
+ {
+ name: "systemEmailIgnoreTLS",
+ label: t("pages.settings.form.email.option.ignoreTLS.label"),
+ },
+ {
+ name: "systemEmailRequireTLS",
+ label: t("pages.settings.form.email.option.requireTLS.label"),
+ },
+ {
+ name: "systemEmailRejectUnauthorized",
+ label: t("pages.settings.form.email.option.rejectUnauthorized.label"),
+ },
+ ].map(({ name, label }) => (
+ (
+
+ {label}
+ ) =>
+ field.onChange(e.target.checked)
+ }
+ />
+
+ )}
+ />
+ ))}
+
+
+ {/* Test Email Button */}
+
+
+
+
+ }
+ />
+ )}
+
+ {/* Demo Monitors - Admin Only */}
+ {isAdmin && (
+
+
+
+ }
+ />
+ )}
+
+ {/* Remove All Monitors - Admin Only */}
+ {isAdmin && (
+
+
+
+ }
+ />
+ )}
+
+ {/* Export Monitors - Admin Only */}
+ {isAdmin && (
+
+
+
+ }
+ />
+ )}
+
+ {/* About */}
+
+
+ {t("common.appName")} {__APP_VERSION__}
+
+
+ {t("pages.settings.form.about.developedBy")}
+
+
+ https://github.com/bluewave-labs/checkmate
+
+
+ }
+ />
+
+ {/* Clear Stats Confirmation Dialog */}
+