diff --git a/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css b/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css
index a799bf0af..04960d08b 100644
--- a/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css
+++ b/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css
@@ -1,11 +1,18 @@
-.maintenance-options > .MuiStack-root > .MuiStack-root.select-wrapper {
- width: 380px;
+.maintenance-options {
+ > .MuiStack-root {
+ > .MuiStack-root.select-wrapper,
+ .field {
+ width: 380px;
+ }
+ }
}
-.date-picker .MuiOutlinedInput-root,
-.time-picker .MuiOutlinedInput-root {
- height: 34px;
- font-size: var(--env-var-font-size-medium);
+.date-picker,
+.time-picker {
+ .MuiOutlinedInput-root {
+ height: 34px;
+ font-size: var(--env-var-font-size-medium);
+ }
}
.date-picker .MuiOutlinedInput-root {
@@ -19,3 +26,24 @@
.MuiInputAdornment-outlined .MuiIconButton-root svg {
width: 20px;
}
+
+.duration-config {
+ .field-text .MuiTextField-root,
+ .field {
+ width: 70px;
+ min-width: 70px;
+ max-width: 70px;
+ }
+
+ > .MuiStack-root.select-wrapper {
+ width: 100px;
+
+ > .MuiInputBase-root:has(> .MuiSelect-select) {
+ min-width: 100px;
+ }
+ }
+
+ .select-wrapper .select-component > .MuiSelect-select {
+ text-transform: none;
+ }
+}
diff --git a/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.jsx b/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.jsx
index aea012e2c..b60b263a6 100644
--- a/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.jsx
+++ b/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.jsx
@@ -9,6 +9,7 @@ import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
import dayjs from "dayjs";
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
import { MobileTimePicker } from "@mui/x-date-pickers/MobileTimePicker";
+import Field from "../../../Components/Inputs/Field";
const directory = {
title: "Create a maintenance window",
@@ -45,9 +46,29 @@ const configOptionTitle = (title, description) => {
);
};
+const timeFrames = [
+ { _id: "seconds", name: "seconds" },
+ { _id: "minutes", name: "minutes" },
+ { _id: "hours", name: "hours" },
+ { _id: "days", name: "days" },
+];
+
+const sxButtons = {
+ width: 110,
+ height: 34,
+};
+
const CreateNewMaintenanceWindow = () => {
const [values, setValues] = useState({
repeat: 1,
+ date: dayjs(),
+ startTime: dayjs(),
+ duration: {
+ value: "60",
+ unit: "minutes",
+ },
+ friendlyName: "",
+ AddMonitors: "",
});
const handleChange = (event, name) => {
@@ -77,7 +98,13 @@ const CreateNewMaintenanceWindow = () => {
className="date-localization-provider"
dateAdapter={AdapterDayjs}
>
-
+
+ handleChange({ target: { value: date } }, "date")
+ }
+ />
),
},
@@ -89,10 +116,68 @@ const CreateNewMaintenanceWindow = () => {
className="time-localization-provider"
dateAdapter={AdapterDayjs}
>
-
+
+ handleChange({ target: { value: time } }, "startTime")
+ }
+ />
),
},
+ {
+ title: "Duration",
+ component: (
+
+ handleChange(e, "duration")}
+ value={values.duration.value}
+ />
+
+ ),
+ },
+ {
+ title: "Friendly name",
+ component: (
+ handleChange(e, "friendlyName")}
+ />
+ ),
+ },
+ {
+ title: "Add monitors",
+ component: (
+
+ handleChange(e, "AddMonitors")}
+ />
+
+ Add all monitors to this maintenance window
+
+
+ ),
+ },
];
return (
@@ -127,22 +212,27 @@ const CreateNewMaintenanceWindow = () => {
{configOptions.map((item, index) => (
- {configOptionTitle(item.title, item.description)}
+ {item.title && configOptionTitle(item.title, item.description)}
{item.component && item.component}
))}
+
+
+
+
);