This commit is contained in:
Mohammad Khalilzadeh committed 2024-08-06 18:22:54 +03:30
1 parent 1a796ded25
commit 0664acd50a
2 files changed
+45 -41

No files matched your search

@@ -1,18 +1,13 @@
.maintenance-options { .maintenance-options .MuiStack-root .MuiStack-root.select-wrapper,
> .MuiStack-root { .maintenance-options .MuiStack-root .field {
> .MuiStack-root.select-wrapper, width: 60%;
.field { max-width: 380px;
width: 380px;
}
}
} }
.date-picker, .date-picker .MuiOutlinedInput-root,
.time-picker { .time-picker .MuiOutlinedInput-root {
.MuiOutlinedInput-root { height: 34px;
height: 34px; font-size: var(--env-var-font-size-medium);
font-size: var(--env-var-font-size-medium);
}
} }
.date-picker .MuiOutlinedInput-root { .date-picker .MuiOutlinedInput-root {
@@ -27,23 +22,28 @@
width: 20px; width: 20px;
} }
.duration-config { .duration-config .field-text .MuiTextField-root,
.field-text .MuiTextField-root, .duration-config .field {
.field { width: 70px;
width: 70px; min-width: 70px;
min-width: 70px; max-width: 70px;
max-width: 70px; }
}
.duration-config > .MuiStack-root.select-wrapper {
> .MuiStack-root.select-wrapper { width: 100px;
width: 100px; }
> .MuiInputBase-root:has(> .MuiSelect-select) { .duration-config
min-width: 100px; > .MuiStack-root.select-wrapper
} > .MuiInputBase-root:has(> .MuiSelect-select) {
} width: 100px;
min-width: 100px;
.select-wrapper .select-component > .MuiSelect-select { }
text-transform: none;
} .duration-config > .select-wrapper .select-component > .MuiSelect-select {
text-transform: none;
}
.maintenance-options .add-monitors-fields .field.field-text {
width: 100%;
} }
@@ -47,10 +47,10 @@ const configOptionTitle = (title, description) => {
}; };
const timeFrames = [ const timeFrames = [
{ _id: "seconds", name: "seconds" }, { _id: 1, name: "seconds" },
{ _id: "minutes", name: "minutes" }, { _id: 2, name: "minutes" },
{ _id: "hours", name: "hours" }, { _id: 3, name: "hours" },
{ _id: "days", name: "days" }, { _id: 4, name: "days" },
]; ];
const sxButtons = { const sxButtons = {
@@ -64,8 +64,8 @@ const CreateNewMaintenanceWindow = () => {
date: dayjs(), date: dayjs(),
startTime: dayjs(), startTime: dayjs(),
duration: { duration: {
value: "60", magnitude: "",
unit: "minutes", unit: 1,
}, },
friendlyName: "", friendlyName: "",
AddMonitors: "", AddMonitors: "",
@@ -133,8 +133,8 @@ const CreateNewMaintenanceWindow = () => {
<Field <Field
id="duration-value" id="duration-value"
placeholder="60" placeholder="60"
onChange={(e) => handleChange(e, "duration")} onChange={(e) => handleChange(e, "duration.magnitude")}
value={values.duration.value} value={values["duration.unit"]}
/> />
<Select <Select
onChange={(e) => handleChange(e, "duration.unit")} onChange={(e) => handleChange(e, "duration.unit")}
@@ -159,7 +159,11 @@ const CreateNewMaintenanceWindow = () => {
{ {
title: "Add monitors", title: "Add monitors",
component: ( component: (
<Stack gap={2}> <Stack
className="add-monitors-fields"
sx={{ width: "60%", maxWidth: "380px" }}
gap={2}
>
<Field <Field
id="add-monitors" id="add-monitors"
placeholder="Start typing to search for current monitors" placeholder="Start typing to search for current monitors"