diff --git a/Client/src/Components/Button/index.jsx b/Client/src/Components/Button/index.jsx index fe8912255..539076483 100644 --- a/Client/src/Components/Button/index.jsx +++ b/Client/src/Components/Button/index.jsx @@ -48,10 +48,11 @@ const levelConfig = { * */ -const Button = ({ type, level, label, disabled, img, onClick, sx }) => { +const Button = ({ id, type, level, label, disabled, img, onClick, sx }) => { const { variant, color } = levelConfig[level]; return ( { }; Button.propTypes = { + id: PropTypes.string, type: PropTypes.string, level: PropTypes.string.isRequired, label: PropTypes.string.isRequired, diff --git a/Client/src/Components/RadioButton/index.css b/Client/src/Components/RadioButton/index.css new file mode 100644 index 000000000..8193795eb --- /dev/null +++ b/Client/src/Components/RadioButton/index.css @@ -0,0 +1,3 @@ +.MuiButtonBase-root.MuiRadio-root.MuiRadio-colorPrimary.PrivateSwitchBase-root.MuiRadio-root.MuiRadio-colorPrimary.MuiRadio-root.MuiRadio-colorPrimary.css-w5ovia-MuiButtonBase-root-MuiRadio-root { + padding-top: 0; +} diff --git a/Client/src/Components/RadioButton/index.jsx b/Client/src/Components/RadioButton/index.jsx index 782035249..e9c874bee 100644 --- a/Client/src/Components/RadioButton/index.jsx +++ b/Client/src/Components/RadioButton/index.jsx @@ -19,6 +19,7 @@ import { FormControlLabel, Radio } from "@mui/material"; import React from "react"; +import "./index.css"; import PropTypes from "prop-types"; function RadioButton(props) { diff --git a/Client/src/Pages/Monitors/CreateNewMonitor.jsx b/Client/src/Pages/Monitors/CreateNewMonitor.jsx index 132bdc6eb..d4f795b47 100644 --- a/Client/src/Pages/Monitors/CreateNewMonitor.jsx +++ b/Client/src/Pages/Monitors/CreateNewMonitor.jsx @@ -8,6 +8,18 @@ import CustomizableCheckBox from "../../Components/Checkbox/CustomizableCheckbox import Button from "../../Components/Button"; const CreateNewMonitor = () => { + const portOptions = [ + { label: "Port 1", value: "Port1" }, + { label: "Port 2", value: "Port2" }, + // Add more Ports as needed + ]; + + const frequencyOptions = [ + { label: "1 minute", value: "1" }, + { label: "5 minutes", value: "5" }, + // Add more Ports as needed + ]; + const [incidentEmail, setIncidentEmail] = useState(""); const [notifyViaSMS, setNotifyViaSMS] = useState(false); @@ -28,6 +40,17 @@ const CreateNewMonitor = () => { const [urlToMonitor, setUrlToMonitor] = useState(""); const [friendlyName, setFriendlyName] = useState(""); + const [port, setPort] = useState("Select a port to check"); + const [frequncy, setFrequency] = useState("1 minute"); + + const handlePortOptionChange = (newValue) => { + setPort(newValue); + }; + + const handleFrequencyOptionChange = (newValue) => { + setPort(newValue); + }; + const handleUrlToMonitor = (event) => { setUrlToMonitor(event.target.value); console.log(urlToMonitor); @@ -162,9 +185,15 @@ const CreateNewMonitor = () => { checked={selectedMonitorType === "port"} onChange={() => handleMonitorTypeChange("port")} /> - + - + } @@ -228,7 +257,14 @@ const CreateNewMonitor = () => { rightLayout={ Check frequency - + + Maximum retries before the service is marked as down @@ -286,6 +322,7 @@ const CreateNewMonitor = () => { { return ( - + {/* */} + ); }; diff --git a/Client/src/index.css b/Client/src/index.css index 658d513ab..e4a77d5f0 100644 --- a/Client/src/index.css +++ b/Client/src/index.css @@ -77,6 +77,8 @@ --env-var-shadow-1: 0px 4px 24px -4px rgba(16, 24, 40, 0.08), 0px 3px 3px -3px rgba(16, 24, 40, 0.03); + + --env-var-font-familt-1: "Roboto", "Helvetica", "Arial", sans-serif; } a {