Updated default https value and disabled multiple emails field
This commit is contained in:
1 parent
6eac076847
commit
73310422da
1 file changed
+28
-48
@@ -36,7 +36,7 @@ const CreateMonitor = () => {
|
|||||||
notifications: [],
|
notifications: [],
|
||||||
interval: 1,
|
interval: 1,
|
||||||
});
|
});
|
||||||
const [https, setHttps] = useState(false);
|
const [https, setHttps] = useState(true);
|
||||||
const [errors, setErrors] = useState({});
|
const [errors, setErrors] = useState({});
|
||||||
|
|
||||||
const handleChange = (event, name) => {
|
const handleChange = (event, name) => {
|
||||||
@@ -217,15 +217,6 @@ const CreateMonitor = () => {
|
|||||||
/>
|
/>
|
||||||
{monitor.type === "http" ? (
|
{monitor.type === "http" ? (
|
||||||
<ButtonGroup sx={{ ml: "32px" }}>
|
<ButtonGroup sx={{ ml: "32px" }}>
|
||||||
<Button
|
|
||||||
level="secondary"
|
|
||||||
label="HTTP"
|
|
||||||
onClick={() => setHttps(false)}
|
|
||||||
sx={{
|
|
||||||
backgroundColor:
|
|
||||||
!https && theme.palette.otherColors.fillGray,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Button
|
<Button
|
||||||
level="secondary"
|
level="secondary"
|
||||||
label="HTTPS"
|
label="HTTPS"
|
||||||
@@ -235,6 +226,15 @@ const CreateMonitor = () => {
|
|||||||
https && theme.palette.otherColors.fillGray,
|
https && theme.palette.otherColors.fillGray,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<Button
|
||||||
|
level="secondary"
|
||||||
|
label="HTTP"
|
||||||
|
onClick={() => setHttps(false)}
|
||||||
|
sx={{
|
||||||
|
backgroundColor:
|
||||||
|
!https && theme.palette.otherColors.fillGray,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
@@ -249,32 +249,6 @@ const CreateMonitor = () => {
|
|||||||
checked={monitor.type === "ping"}
|
checked={monitor.type === "ping"}
|
||||||
onChange={(event) => handleChange(event)}
|
onChange={(event) => handleChange(event)}
|
||||||
/>
|
/>
|
||||||
{/* TODO */}
|
|
||||||
{/* <RadioButton
|
|
||||||
id="monitor-checks-port"
|
|
||||||
title="Port monitoring"
|
|
||||||
desc="Monitor a specific service on your server."
|
|
||||||
value="port"
|
|
||||||
checked={checks.type === "port"}
|
|
||||||
onChange={(event) => handleChange(event, "type", setChecks)}
|
|
||||||
/>
|
|
||||||
<div className="monitors-dropdown-holder">
|
|
||||||
<Select
|
|
||||||
id="monitor-ports"
|
|
||||||
value={checks.port || "placeholder"}
|
|
||||||
inputProps={{ id: "monitor-ports-select" }}
|
|
||||||
onChange={(event) => handleChange(event, "port", setChecks)}
|
|
||||||
>
|
|
||||||
<MenuItem id="port-placeholder" value="placeholder">
|
|
||||||
Select a port to check
|
|
||||||
</MenuItem>
|
|
||||||
{ports.map((port, index) => (
|
|
||||||
<MenuItem key={`port-${index}`} value={port}>
|
|
||||||
{port}
|
|
||||||
</MenuItem>
|
|
||||||
))}
|
|
||||||
</Select>
|
|
||||||
</div> */}
|
|
||||||
<Box className="error-container">
|
<Box className="error-container">
|
||||||
{errors["type"] ? (
|
{errors["type"] ? (
|
||||||
<Typography component="p" className="input-error">
|
<Typography component="p" className="input-error">
|
||||||
@@ -322,18 +296,24 @@ const CreateMonitor = () => {
|
|||||||
onChange={() => console.log("disabled")}
|
onChange={() => console.log("disabled")}
|
||||||
isDisabled={true}
|
isDisabled={true}
|
||||||
/>
|
/>
|
||||||
<Box mx={`calc(${theme.gap.ml} * 2)`}>
|
{monitor.notifications.some(
|
||||||
<Field
|
(notification) => notification.type === "emails"
|
||||||
id="notify-email-list"
|
) ? (
|
||||||
type="text"
|
<Box mx={`calc(${theme.gap.ml} * 2)`}>
|
||||||
placeholder="name@gmail.com"
|
<Field
|
||||||
value=""
|
id="notify-email-list"
|
||||||
onChange={() => console.log("disabled")}
|
type="text"
|
||||||
/>
|
placeholder="name@gmail.com"
|
||||||
<Typography mt={theme.gap.small}>
|
value=""
|
||||||
You can separate multiple emails with a comma
|
onChange={() => console.log("disabled")}
|
||||||
</Typography>
|
/>
|
||||||
</Box>
|
<Typography mt={theme.gap.small}>
|
||||||
|
You can separate multiple emails with a comma
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack className="config-box">
|
<Stack className="config-box">
|
||||||
|
|||||||
Reference in new issue
Block a user