diff --git a/Client/src/Components/Inputs/Field/index.css b/Client/src/Components/Inputs/Field/index.css
index 2d251e4bf..3dfaf6142 100644
--- a/Client/src/Components/Inputs/Field/index.css
+++ b/Client/src/Components/Inputs/Field/index.css
@@ -1,6 +1,15 @@
.field {
min-width: 250px;
}
+
+.field-infrastructure-alert {
+ max-width: 100px;
+}
+
+.field-infrastructure-alert .MuiInputBase-root:has(input) {
+ height: 34px;
+}
+
.field h3.MuiTypography-root,
.field h5.MuiTypography-root,
.field input,
diff --git a/Client/src/Components/Inputs/Field/index.jsx b/Client/src/Components/Inputs/Field/index.jsx
index 4ead8a705..0e52dda2d 100644
--- a/Client/src/Components/Inputs/Field/index.jsx
+++ b/Client/src/Components/Inputs/Field/index.jsx
@@ -46,6 +46,7 @@ const Field = forwardRef(
error,
disabled,
hidden,
+ className
},
ref
) => {
@@ -56,7 +57,7 @@ const Field = forwardRef(
return (
{
+ const CustomAlertStack = ({
+ checkboxId,
+ checkboxLabel,
+ checkboxValue,
+ isChecked,
+ onChange,
+ fieldId,
+ fieldValue,
+ alertUnit,
+ }) => {
+ console.log("fieldValue")
+ console.log(fieldValue)
+ return (
+
+
+
+
+
+
+
+ {alertUnit}
+
+
+
+ );}
+
const MS_PER_MINUTE = 60000;
const { user, authToken } = useSelector((state) => state.auth);
const monitorState = useSelector((state) => state.infrastructureMonitor);
@@ -30,19 +80,16 @@ const CreateInfrastructureMonitor = () => {
"monitor-url": "url",
"monitor-name": "name",
"monitor-secret": "secret",
- "monitor-checks-http": "type",
- "monitor-checks-ping": "type",
"notify-email-default": "notification-email",
};
const [infrastructureMonitor, setInfrastructureMonitor] = useState({
url: "",
name: "",
- type: "http",
notifications: [],
interval: 1,
+ threshold: {cpu: "", disk: "", memory: ""}
});
- const [https, setHttps] = useState(true);
const [errors, setErrors] = useState({});
const handleChange = (event, name) => {
@@ -80,7 +127,7 @@ const CreateInfrastructureMonitor = () => {
[name]: value,
}));
- const { error } = monitorValidation.validate(
+ const { error } = infrastractureMonitorValidation.validate(
{ [name]: value },
{ abortEarly: false }
);
@@ -98,20 +145,15 @@ const CreateInfrastructureMonitor = () => {
event.preventDefault();
//obj to submit
let form = {
- url:
- //preprending protocol for url
- infrastructureMonitor.type === "http"
- ? `http${https ? "s" : ""}://` + infrastructureMonitor.url
- : infrastructureMonitor.url,
+ url:infrastructureMonitor.url,
name:
infrastructureMonitor.name === ""
? infrastructureMonitor.url
: infrastructureMonitor.name,
- type: infrastructureMonitor.type,
interval: infrastructureMonitor.interval * MS_PER_MINUTE,
};
- const { error } = monitorValidation.validate(form, {
+ const { error } =infrastractureMonitorValidation.validate(form, {
abortEarly: false,
});
@@ -287,166 +329,75 @@ const CreateInfrastructureMonitor = () => {
-
-
- handleChange(event)}
- />
-
-
-
-
-
-
-
- %
-
-
-
-
-
-
- handleChange(event)}
- />
-
-
-
-
- %
-
-
-
-
-
-
- handleChange(event)}
- />
-
-
-
-
- %
-
-
-
-
-
-
- handleChange(event)}
- />
-
-
-
-
- °C
-
-
-
-
-
-
- handleChange(event)}
- />
-
-
-
-
- %
-
-
-
+ handleChange(event)}
+ alertUnit="%"
+ />
+ handleChange(event)}
+ alertUnit="%"
+ />
+ handleChange(event)}
+ alertUnit="%"
+ />
+ {/* handleChange(event)}
+ alertUnit="°C"
+ />
+ handleChange(event)}
+ alertUnit="%"
+ />
+ handleChange(event)}
+ alertUnit="%"
+ /> */}
-
+
+
+ Logging retention
+
+ Configure how logn logs are stored. After this period, the Uptime Manager
+ will start deleting oldest data.
+
+
+ {/*
+ handleChange(event)}
+ alertUnit="days"
+ />
+ */}
+
Advanced settings
@@ -459,6 +410,14 @@ const CreateInfrastructureMonitor = () => {
onChange={(event) => handleChange(event, "interval")}
items={frequencies}
/>
+