diff --git a/Client/src/Pages/Settings/styled.jsx b/Client/src/Components/ConfigBox/index.jsx
similarity index 91%
rename from Client/src/Pages/Settings/styled.jsx
rename to Client/src/Components/ConfigBox/index.jsx
index aeefdaebb..7650dd47f 100644
--- a/Client/src/Pages/Settings/styled.jsx
+++ b/Client/src/Components/ConfigBox/index.jsx
@@ -1,6 +1,6 @@
import { Stack, styled } from "@mui/material";
-export const ConfigBox = styled(Stack)(({ theme }) => ({
+const ConfigBox = styled(Stack)(({ theme }) => ({
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
@@ -34,3 +34,5 @@ export const ConfigBox = styled(Stack)(({ theme }) => ({
color: theme.palette.text.tertiary,
},
}));
+
+export default ConfigBox;
diff --git a/Client/src/Components/Inputs/Search/index.jsx b/Client/src/Components/Inputs/Search/index.jsx
index c944955b9..9a1995726 100644
--- a/Client/src/Components/Inputs/Search/index.jsx
+++ b/Client/src/Components/Inputs/Search/index.jsx
@@ -40,6 +40,7 @@ const SearchAdornment = () => {
//TODO keep search state inside of component
const Search = ({
+ label,
id,
options,
filteredBy,
@@ -76,6 +77,14 @@ const Search = ({
getOptionLabel={(option) => option[filteredBy]}
renderInput={(params) => (
+
+ {label}
+
{
Your pings won't be sent during this time frame
-
-
- General Settings
-
-
+
+
+
+ General Settings
+
+
+
+ {
+ handleFormChange("name", event.target.value);
+ }}
+ error={errors["name"] ? true : false}
+ helperText={errors["name"]}
+ />
+
-
-
-
- Start time
-
- All dates and times are in GMT+0 time zone.
-
-
-
- {
- handleTimeChange("startTime", newTime);
- }}
- slotProps={{
- nextIconButton: { sx: { ml: theme.spacing(2) } },
- field: {
- sx: {
- width: "fit-content",
- "& > .MuiOutlinedInput-root": {
- flexDirection: "row-reverse",
- },
- "& input": {
- height: 34,
- p: 0,
- pl: theme.spacing(5),
- },
- "& fieldset": {
+
+
+ Start time
+
+ All dates and times are in GMT+0 time zone.
+
+
+
+ {
+ handleTimeChange("startTime", newTime);
+ }}
+ slotProps={{
+ nextIconButton: { sx: { ml: theme.spacing(2) } },
+ field: {
+ sx: {
+ width: "fit-content",
+ "& > .MuiOutlinedInput-root": {
+ flexDirection: "row-reverse",
+ },
+ "& input": {
+ height: 34,
+ p: 0,
+ pl: theme.spacing(5),
+ },
+ "& fieldset": {
+ borderColor: theme.palette.border.dark,
+ borderRadius: theme.shape.borderRadius,
+ },
+ "&:not(:has(.Mui-disabled)):not(:has(.Mui-error)) .MuiOutlinedInput-root:not(:has(input:focus)):hover fieldset":
+ {
borderColor: theme.palette.border.dark,
- borderRadius: theme.shape.borderRadius,
},
- "&:not(:has(.Mui-disabled)):not(:has(.Mui-error)) .MuiOutlinedInput-root:not(:has(input:focus)):hover fieldset":
- {
- borderColor: theme.palette.border.dark,
- },
- },
},
- }}
- error={errors["startTime"]}
- />
-
-
-
-
-
-
- Duration
-
-
+ },
+ }}
+ error={errors["startTime"]}
+ />
+
+
{
handleFormChange("duration", event.target.value);
@@ -491,66 +489,34 @@ const CreateMaintenance = () => {
-
-
- Monitor related settings
-
-
-
-
-
- Friendly name
-
-
-
- {
- handleFormChange("name", event.target.value);
- }}
- error={errors["name"] ? true : false}
- helperText={errors["name"]}
- />
-
-
-
-
-
- Add monitors
-
-
-
-
-
-
-
-
+
+
+
+
+ Monitors to apply maintenance window to
+
+
+
+
+
+
({
- border: 1,
- borderStyle: "solid",
- borderColor: theme.palette.border.light,
- borderRadius: theme.spacing(2),
- backgroundColor: theme.palette.background.main,
- "& > *": { padding: theme.spacing(14) },
- "& > :first-of-type, & > .MuiStack-root > div:first-of-type": {
- flex: 0.6,
- },
- "& > div:last-of-type, & > .MuiStack-root > div:last-of-type": {
- flex: 1,
- },
- "& > .MuiStack-root > div:first-of-type": { paddingRight: theme.spacing(14) },
- "& > .MuiStack-root > div:last-of-type": {
- paddingLeft: theme.spacing(14),
- },
- "& h2": { fontSize: 13.5, fontWeight: 500 },
- "& h3, & p": {
- color: theme.palette.text.tertiary,
- },
- "& h3": { fontWeight: 500 },
-}));
diff --git a/Client/src/Pages/PageSpeed/Configure/index.jsx b/Client/src/Pages/PageSpeed/Configure/index.jsx
index 0c94678d2..3cb40f8d2 100644
--- a/Client/src/Pages/PageSpeed/Configure/index.jsx
+++ b/Client/src/Pages/PageSpeed/Configure/index.jsx
@@ -13,7 +13,7 @@ import {
import { monitorValidation } from "../../../Validation/validation";
import { createToast } from "../../../Utils/toastUtils";
import { logger } from "../../../Utils/Logger";
-import { ConfigBox } from "../../Uptime/styled";
+import ConfigBox from "../../../Components/ConfigBox";
import TextInput from "../../../Components/Inputs/TextInput";
import Select from "../../../Components/Inputs/Select";
import Checkbox from "../../../Components/Inputs/Checkbox";
diff --git a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx
index 30592e2eb..e5d4a6d79 100644
--- a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx
+++ b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx
@@ -20,8 +20,7 @@ import LoadingButton from "@mui/lab/LoadingButton";
import Breadcrumbs from "../../../Components/Breadcrumbs";
import TextInput from "../../../Components/Inputs/TextInput";
import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments";
-import { ConfigBox } from "../../Uptime/styled";
-
+import ConfigBox from "../../../Components/ConfigBox";
import { createToast } from "../../../Utils/toastUtils";
import Radio from "../../../Components/Inputs/Radio";
import Checkbox from "../../../Components/Inputs/Checkbox";
diff --git a/Client/src/Pages/Settings/index.jsx b/Client/src/Pages/Settings/index.jsx
index f3fcb8376..5c53f3d01 100644
--- a/Client/src/Pages/Settings/index.jsx
+++ b/Client/src/Pages/Settings/index.jsx
@@ -18,13 +18,12 @@ import LoadingButton from "@mui/lab/LoadingButton";
import { setTimezone, setMode } from "../../Features/UI/uiSlice";
import timezones from "../../Utils/timezones.json";
import { useState, useEffect } from "react";
-import { ConfigBox } from "./styled";
import { networkService } from "../../main";
import { settingsValidation } from "../../Validation/validation";
import { useNavigate } from "react-router";
import Dialog from "../../Components/Dialog";
import { useIsAdmin } from "../../Hooks/useIsAdmin";
-
+import ConfigBox from "../../Components/ConfigBox";
const SECONDS_PER_DAY = 86400;
const Settings = () => {
diff --git a/Client/src/Pages/Uptime/Configure/index.jsx b/Client/src/Pages/Uptime/Configure/index.jsx
index 0d7388d14..32532d462 100644
--- a/Client/src/Pages/Uptime/Configure/index.jsx
+++ b/Client/src/Pages/Uptime/Configure/index.jsx
@@ -6,7 +6,7 @@ import { Box, Stack, Tooltip, Typography } from "@mui/material";
import { monitorValidation } from "../../../Validation/validation";
import { createToast } from "../../../Utils/toastUtils";
import { logger } from "../../../Utils/Logger";
-import { ConfigBox } from "../styled";
+import ConfigBox from "../../../Components/ConfigBox";
import {
updateUptimeMonitor,
pauseUptimeMonitor,
diff --git a/Client/src/Pages/Uptime/CreateUptime/index.jsx b/Client/src/Pages/Uptime/CreateUptime/index.jsx
index 6d5682415..d72a4fa25 100644
--- a/Client/src/Pages/Uptime/CreateUptime/index.jsx
+++ b/Client/src/Pages/Uptime/CreateUptime/index.jsx
@@ -17,14 +17,13 @@ import LoadingButton from "@mui/lab/LoadingButton";
//Components
import Breadcrumbs from "../../../Components/Breadcrumbs";
-import { ConfigBox } from "../styled";
import TextInput from "../../../Components/Inputs/TextInput";
import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments";
import { createToast } from "../../../Utils/toastUtils";
import Radio from "../../../Components/Inputs/Radio";
import Checkbox from "../../../Components/Inputs/Checkbox";
import Select from "../../../Components/Inputs/Select";
-
+import ConfigBox from "../../../Components/ConfigBox";
const CreateMonitor = () => {
const MS_PER_MINUTE = 60000;
const SELECT_VALUES = [
diff --git a/Client/src/Pages/Uptime/styled.jsx b/Client/src/Pages/Uptime/styled.jsx
deleted file mode 100644
index f159d44f2..000000000
--- a/Client/src/Pages/Uptime/styled.jsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Stack, styled } from "@mui/material";
-
-export const ConfigBox = styled(Stack)(({ theme }) => ({
- flexDirection: "row",
- border: 1,
- borderStyle: "solid",
- borderColor: theme.palette.border.light,
- borderRadius: theme.spacing(2),
- backgroundColor: theme.palette.background.main,
- "& > *": {
- paddingTop: theme.spacing(12),
- paddingBottom: theme.spacing(18),
- },
- "& > div:first-of-type": {
- flex: 0.7,
- borderRight: 1,
- borderRightStyle: "solid",
- borderRightColor: theme.palette.border.light,
- paddingRight: theme.spacing(15),
- paddingLeft: theme.spacing(15),
- },
- "& > div:last-of-type": {
- flex: 1,
- paddingRight: theme.spacing(20),
- paddingLeft: theme.spacing(18),
- },
- "& h2": {
- color: theme.palette.text.secondary,
- fontSize: 15,
- fontWeight: 600,
- },
- "& h3, & p": {
- color: theme.palette.text.tertiary,
- },
- "& p": {
- fontSize: 13,
- },
-}));