Commented out unfinished features
This commit is contained in:
1 parent
081eb1727a
commit
16006934cd
2 files changed
+21
-21
No files matched your search
@@ -3,10 +3,10 @@ import React from "react";
|
|||||||
|
|
||||||
const ConfigBox = ({ leftLayout, rightLayout }) => {
|
const ConfigBox = ({ leftLayout, rightLayout }) => {
|
||||||
return (
|
return (
|
||||||
<form className="config-box" noValidate spellCheck="false">
|
<div className="config-box">
|
||||||
{leftLayout}
|
{leftLayout}
|
||||||
{rightLayout}
|
{rightLayout}
|
||||||
</form>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const CreateNewMonitor = () => {
|
|||||||
//General Settings Form
|
//General Settings Form
|
||||||
const [generalSettings, setGeneralSettings] = useState({ url: "", name: "" });
|
const [generalSettings, setGeneralSettings] = useState({ url: "", name: "" });
|
||||||
//Checks Form
|
//Checks Form
|
||||||
const [checks, setChecks] = useState({ monitor: "", port: "" });
|
const [checks, setChecks] = useState({ type: "", port: "" });
|
||||||
//Incidents Form
|
//Incidents Form
|
||||||
const [notifications, setNotifications] = useState({
|
const [notifications, setNotifications] = useState({
|
||||||
viaSms: false,
|
viaSms: false,
|
||||||
@@ -48,19 +48,15 @@ const CreateNewMonitor = () => {
|
|||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log({
|
const handleCreateNewMonitor = () => {
|
||||||
...generalSettings,
|
|
||||||
...checks,
|
}
|
||||||
...notifications,
|
|
||||||
...advancedSettings,
|
|
||||||
...proxy,
|
|
||||||
});
|
|
||||||
|
|
||||||
const ports = ["Port 1", "Port 2", "Port 3"];
|
const ports = ["Port 1", "Port 2", "Port 3"];
|
||||||
const frequencies = [1, 2, 3, 4, 5];
|
const frequencies = [1, 2, 3, 4, 5];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<form onSubmit={handleCreateNewMonitor} noValidate spellCheck="false">
|
||||||
<div className="new-monitor-header">Create new monitor</div>
|
<div className="new-monitor-header">Create new monitor</div>
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<ConfigBox
|
<ConfigBox
|
||||||
@@ -130,7 +126,8 @@ const CreateNewMonitor = () => {
|
|||||||
onChange={(event) => handleChange(event, "monitor", setChecks)}
|
onChange={(event) => handleChange(event, "monitor", setChecks)}
|
||||||
/>
|
/>
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<RadioButton
|
{/* TODO */}
|
||||||
|
{/* <RadioButton
|
||||||
id="monitor-checks-port"
|
id="monitor-checks-port"
|
||||||
title="Port monitoring"
|
title="Port monitoring"
|
||||||
desc="Monitor a specific service on your server."
|
desc="Monitor a specific service on your server."
|
||||||
@@ -155,11 +152,12 @@ const CreateNewMonitor = () => {
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<div className="monitors-gaps-medium"></div>
|
{/* TODO */}
|
||||||
|
{/* <div className="monitors-gaps-medium"></div>
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<ConfigBox
|
<ConfigBox
|
||||||
leftLayout={
|
leftLayout={
|
||||||
@@ -212,7 +210,7 @@ const CreateNewMonitor = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<ConfigBox
|
<ConfigBox
|
||||||
@@ -240,7 +238,8 @@ const CreateNewMonitor = () => {
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<FlexibileTextField
|
{/* TODO */}
|
||||||
|
{/* <FlexibileTextField
|
||||||
id="monitor-settings-retries"
|
id="monitor-settings-retries"
|
||||||
title="Maximum retries before the service is marked as down"
|
title="Maximum retries before the service is marked as down"
|
||||||
type="number"
|
type="number"
|
||||||
@@ -268,11 +267,12 @@ const CreateNewMonitor = () => {
|
|||||||
onChange={(event) =>
|
onChange={(event) =>
|
||||||
handleChange(event, "redirects", setAdvancedSettings)
|
handleChange(event, "redirects", setAdvancedSettings)
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<div className="monitors-gaps-medium"></div>
|
{/* TODO */}
|
||||||
|
{/* <div className="monitors-gaps-medium"></div>
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<ConfigBox
|
<ConfigBox
|
||||||
leftLayout={
|
leftLayout={
|
||||||
@@ -311,7 +311,7 @@ const CreateNewMonitor = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<div className="monitors-gaps-small"></div>
|
<div className="monitors-gaps-small"></div>
|
||||||
<div className="monitors-create-button-holder">
|
<div className="monitors-create-button-holder">
|
||||||
@@ -320,10 +320,10 @@ const CreateNewMonitor = () => {
|
|||||||
level="primary"
|
level="primary"
|
||||||
label="Create new monitor"
|
label="Create new monitor"
|
||||||
sx={{ width: "210px", fontSize: "var(--env-var-font-size-medium)" }}
|
sx={{ width: "210px", fontSize: "var(--env-var-font-size-medium)" }}
|
||||||
// onClick={() => handleCreateNewMonitor()}
|
onClick={() => handleCreateNewMonitor()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user