diff --git a/Client/src/Layouts/HomeLayout/index.css b/Client/src/Layouts/HomeLayout/index.css
index d30ed9462..595c2b67a 100644
--- a/Client/src/Layouts/HomeLayout/index.css
+++ b/Client/src/Layouts/HomeLayout/index.css
@@ -10,7 +10,7 @@
grid-template-columns: var(--env-var-side-bar-width) auto;
grid-template-rows: var(--env-var-nav-bar-height) auto;
background-color: var(--env-var-color-30);
- height: 100vh;
+ min-height: 100vh;
}
.home-layout aside {
diff --git a/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css b/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css
index a799bf0af..0d3026c78 100644
--- a/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css
+++ b/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.css
@@ -1,5 +1,7 @@
-.maintenance-options > .MuiStack-root > .MuiStack-root.select-wrapper {
- width: 380px;
+.maintenance-options .MuiStack-root .MuiStack-root.select-wrapper,
+.maintenance-options .MuiStack-root .field {
+ width: 60%;
+ max-width: 380px;
}
.date-picker .MuiOutlinedInput-root,
@@ -19,3 +21,51 @@
.MuiInputAdornment-outlined .MuiIconButton-root svg {
width: 20px;
}
+
+.duration-config .field-text .MuiTextField-root,
+.duration-config .field {
+ width: 70px;
+ min-width: 70px;
+ max-width: 70px;
+}
+
+.duration-config > .MuiStack-root.select-wrapper {
+ width: 100px;
+}
+
+.duration-config
+ > .MuiStack-root.select-wrapper
+ > .MuiInputBase-root:has(> .MuiSelect-select) {
+ width: 100px;
+ min-width: 100px;
+}
+
+.duration-config > .select-wrapper .select-component > .MuiSelect-select {
+ text-transform: none;
+}
+
+.maintenance-options .add-monitors-fields .field.field-text {
+ width: 100%;
+}
+
+.MuiPopover-paper.MuiMenu-paper.select-dropdown
+ .MuiMenu-list
+ .MuiButtonBase-root {
+ text-transform: none;
+}
+
+.date-picker
+ .MuiOutlinedInput-root
+ .MuiInputAdornment-outlined
+ .MuiIconButton-root {
+ outline: none;
+
+ &:hover {
+ background-color: transparent;
+ }
+}
+
+.create-maintenance-window .MuiStack-root .MuiStack-root > button {
+ width: 110px;
+ height: 34px;
+}
diff --git a/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.jsx b/Client/src/Pages/Maintenance/CreateMaintenanceWindow/index.jsx
index aea012e2c..187d9c63d 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,21 @@ const configOptionTitle = (title, description) => {
);
};
+const durationOptions = [
+ { _id: "minutes", name: "minutes" },
+ { _id: "hours", name: "hours" },
+ { _id: "days", name: "days" },
+];
+
const CreateNewMaintenanceWindow = () => {
const [values, setValues] = useState({
repeat: 1,
+ date: dayjs(),
+ startTime: dayjs(),
+ duration: "60",
+ unit: "minutes",
+ friendlyName: "",
+ AddMonitors: "",
});
const handleChange = (event, name) => {
@@ -77,22 +90,90 @@ const CreateNewMaintenanceWindow = () => {
className="date-localization-provider"
dateAdapter={AdapterDayjs}
>
-
+
+ handleChange({ target: { value: date } }, "date")
+ }
+ />
),
},
{
title: "Start time",
- description: "Your pings won’t be sent in this time frame.",
component: (
-
+
+ handleChange({ target: { value: time } }, "startTime")
+ }
+ />
),
},
+ {
+ title: "Duration",
+ component: (
+
+ handleChange(e, "duration")}
+ value={values.duration}
+ />
+
+ ),
+ },
+ {
+ title: "Friendly name",
+ component: (
+ handleChange(e, "friendlyName")}
+ />
+ ),
+ },
+ {
+ title: "Add monitors",
+ component: (
+
+ handleChange(e, "AddMonitors")}
+ />
+
+ Add all monitors to this maintenance window
+
+
+ ),
+ },
];
return (
@@ -127,22 +208,46 @@ const CreateNewMaintenanceWindow = () => {
{configOptions.map((item, index) => (
- {configOptionTitle(item.title, item.description)}
+ {item.title && configOptionTitle(item.title, item.description)}
{item.component && item.component}
))}
+
+
+
+
);
diff --git a/Client/src/index.css b/Client/src/index.css
index 8dc4222f5..e6b23d257 100644
--- a/Client/src/index.css
+++ b/Client/src/index.css
@@ -17,6 +17,7 @@
--env-var-font-familt-1: "Roboto", "Helvetica", "Arial", sans-serif;
+ --env-var-color-0: #fff;
--env-var-color-1: #101828;
--env-var-color-2: #475467;
--env-var-color-3: #1570ef;