Skip to content

Commit e53fe8c

Browse files
authored
Merge branch 'KelvinTegelaar:dev' into dev
2 parents 45fa375 + bb28245 commit e53fe8c

File tree

43 files changed

+461
-407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+461
-407
lines changed

generate-placeholders.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ const pages = [
3535
{ title: "Backup Wizard", path: "/tenant/backup/backup-wizard" },
3636
{ title: "Restore Wizard", path: "/tenant/backup/restore-wizard" },
3737
{ title: "Tools", path: "/tenant/administration" },
38-
{ title: "Graph Explorer", path: "/tenant/administration/graph-explorer" },
39-
{ title: "Application Approval", path: "/tenant/administration/appapproval" },
38+
{ title: "Graph Explorer", path: "/tenant/tools/graph-explorer" },
39+
{ title: "Application Approval", path: "/tenant/tools/appapproval" },
4040
{ title: "IP Database", path: "/tenant/tools/geoiplookup" },
4141
{ title: "Tenant Lookup", path: "/tenant/administration/tenantlookup" },
42-
{ title: "Individual Domain Check", path: "/tenant/standards/individual-domains" },
42+
{ title: "Individual Domain Check", path: "/tenant/tools/individual-domains" },
4343
{ title: "BPA Report Builder", path: "/tenant/tools/bpa-report-builder" },
4444
{ title: "Standards", path: "/tenant/standards" },
4545
{ title: "Edit Standards", path: "/tenant/standards/list-applied-standards" },
@@ -82,7 +82,7 @@ const pages = [
8282
{ title: "Add Profile", path: "/endpoint/autopilot/add-profile" },
8383
{ title: "Status Pages", path: "/endpoint/autopilot/list-status-pages" },
8484
{ title: "Add Status Page", path: "/endpoint/autopilot/add-status-page" },
85-
{ title: "Devices", path: "/endpoint/reports/devices" },
85+
{ title: "Devices", path: "/endpoint/MEM/devices" },
8686
{ title: "Configuration Policies", path: "/endpoint/MEM/list-policies" },
8787
{ title: "Compliance Policies", path: "/endpoint/MEM/list-compliance-policies" },
8888
{ title: "Protection Policies", path: "/endpoint/MEM/list-appprotection-policies" },
@@ -108,9 +108,9 @@ const pages = [
108108
{ title: "Transport rules", path: "/email/transport/list-rules" },
109109
{ title: "Deploy Transport rule", path: "/email/transport/deploy-rules" },
110110
{ title: "Transport Templates", path: "/email/transport/list-templates" },
111-
{ title: "Connectors", path: "/email/connectors/list-connectors" },
111+
{ title: "Connectors", path: "/email/transport/list-connectors" },
112112
{ title: "Deploy Connector Templates", path: "/email/connectors/deploy-connector" },
113-
{ title: "Connector Templates", path: "/email/connectors/list-connector-templates" },
113+
{ title: "Connector Templates", path: "/email/transport/list-connector-templates" },
114114
{ title: "Spamfilter", path: "/email/spamfilter/list-spamfilter" },
115115
{ title: "Apply Spamfilter Template", path: "/email/spamfilter/deploy" },
116116
{ title: "Templates", path: "/email/spamfilter/list-templates" },

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"license": "AGPL-3.0",
1010
"engines": {
11-
"node": "^18.17.0"
11+
"node": "^20.18.2"
1212
},
1313
"repository": {
1414
"type": "git",

src/components/CippCards/CippUserInfoCard.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export const CippUserInfoCard = (props) => {
9191
)
9292
}
9393
/>
94+
<PropertyListItem
95+
divider
96+
label="User ID"
97+
value={isFetching ? <Skeleton variant="text" width={120} /> : user?.id || "N/A"}
98+
/>
9499
<PropertyListItem
95100
divider
96101
label="Email Address"

src/components/CippComponents/CippUserActions.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export const CippUserActions = () => {
9898
{ label: "Disabled", value: "Disabled" },
9999
],
100100
multiple: false,
101+
creatable: false,
101102
},
102103
],
103104
confirmText: "Are you sure you want to set per-user MFA for these users?",

src/components/CippStandards/CippStandardDialog.jsx

Lines changed: 126 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,18 @@ const CippStandardDialog = ({
4242

4343
const handleSearchQueryChange = useCallback(
4444
debounce((query) => {
45-
setSearchQuery(query);
45+
setSearchQuery(query.trim());
4646
}, 50),
4747
[]
4848
);
4949

5050
return (
51-
<Dialog open={dialogOpen} onClose={handleCloseDialog} maxWidth="xxl">
51+
<Dialog open={dialogOpen} onClose={handleCloseDialog} maxWidth="xxl"
52+
PaperProps={{
53+
sx: {
54+
minWidth: "720px",
55+
},
56+
}}>
5257
<DialogTitle>Select a Standard to Add</DialogTitle>
5358
<DialogContent sx={{ backgroundColor: "background.default" }}>
5459
<TextField
@@ -58,105 +63,128 @@ const CippStandardDialog = ({
5863
onChange={(e) => handleSearchQueryChange(e.target.value.toLowerCase())}
5964
/>
6065
<Grid container spacing={3}>
61-
{Object.keys(categories).map((category) =>
62-
filterStandards(categories[category]).map((standard) => (
63-
<Grid item xs={12} md={3} key={standard.name}>
64-
<Card
65-
sx={{
66-
display: "flex",
67-
flexDirection: "column",
68-
height: "100%",
69-
}}
70-
>
71-
<CardContent sx={{ flexGrow: 1 }}>
72-
<Typography variant="h6" gutterBottom>
73-
{standard.label}
74-
</Typography>
75-
{standard.helpText && (
76-
<>
77-
<Typography variant="subtitle2" sx={{ mt: 2 }}>
78-
Description:
79-
</Typography>
80-
<Typography variant="body2" color="textSecondary" paragraph>
81-
{standard.helpText}
82-
</Typography>
83-
</>
84-
)}
85-
<Typography variant="subtitle2" sx={{ mt: 2 }}>
86-
Category:
87-
</Typography>
88-
<Chip label={category} size="small" color="primary" sx={{ mt: 1, mb: 2 }} />
89-
{standard.tag?.filter((tag) => !tag.toLowerCase().includes("impact")).length >
90-
0 && (
91-
<>
92-
<Typography variant="subtitle2" sx={{ mt: 2 }}>
93-
Tags:
94-
</Typography>
95-
<Box sx={{ display: "flex", flexWrap: "wrap", mb: 2 }}>
96-
{standard.tag
97-
.filter((tag) => !tag.toLowerCase().includes("impact"))
98-
.map((tag, idx) => (
99-
<Chip
100-
key={idx}
101-
label={tag}
102-
size="small"
103-
color="info"
104-
sx={{ mr: 1, mt: 1 }}
105-
/>
106-
))}
107-
</Box>
108-
</>
109-
)}
110-
<Typography variant="subtitle2" sx={{ mt: 2 }}>
111-
Impact:
112-
</Typography>
113-
<Chip
114-
label={standard.impact}
115-
size="small"
116-
color={
117-
standard.impact === "High Impact"
118-
? "error"
119-
: standard.impact === "Medium Impact"
120-
? "warning"
121-
: "info"
122-
}
123-
/>
124-
{standard.recommendedBy?.length > 0 && (
125-
<>
126-
<Typography variant="subtitle2" sx={{ mt: 2 }}>
127-
Recommended By:
128-
</Typography>
129-
<Typography variant="body2" color="textSecondary" paragraph>
130-
{standard.recommendedBy.join(", ")}
131-
</Typography>
132-
</>
133-
)}
134-
</CardContent>
135-
136-
<CardContent>
137-
{standard.multiple ? (
138-
<IconButton
66+
{Object.keys(categories).every(
67+
(category) => filterStandards(categories[category]).length === 0
68+
) ? (
69+
<Typography
70+
variant="h6"
71+
color="textSecondary"
72+
sx={{ mt: 4, textAlign: "center", width: "100%" }}
73+
>
74+
Search returned no results
75+
</Typography>
76+
) : (
77+
Object.keys(categories).map((category) =>
78+
filterStandards(categories[category]).map((standard) => (
79+
<Grid item xs={12} md={3} key={standard.name}>
80+
<Card
81+
sx={{
82+
display: "flex",
83+
flexDirection: "column",
84+
height: "100%",
85+
}}
86+
>
87+
<CardContent sx={{ flexGrow: 1 }}>
88+
<Typography variant="h6" gutterBottom>
89+
{standard.label}
90+
</Typography>
91+
{standard.helpText && (
92+
<>
93+
<Typography variant="subtitle2" sx={{ mt: 2 }}>
94+
Description:
95+
</Typography>
96+
<Typography variant="body2" color="textSecondary" paragraph>
97+
{standard.helpText}
98+
</Typography>
99+
</>
100+
)}
101+
<Typography variant="subtitle2" sx={{ mt: 2 }}>
102+
Category:
103+
</Typography>
104+
<Chip
105+
label={category}
106+
size="small"
139107
color="primary"
140-
disabled={isButtonDisabled}
141-
onClick={() => handleAddClick(standard.name)}
142-
>
143-
<Add />
144-
</IconButton>
145-
) : (
146-
<FormControlLabel
147-
control={
148-
<Switch
149-
checked={!!selectedStandards[standard.name]}
150-
onChange={() => handleToggleSingleStandard(standard.name)}
151-
/>
108+
sx={{ mt: 1, mb: 2 }}
109+
/>
110+
{standard.tag?.filter((tag) => !tag.toLowerCase().includes("impact")).length >
111+
0 && (
112+
<>
113+
<Typography variant="subtitle2" sx={{ mt: 2 }}>
114+
Tags:
115+
</Typography>
116+
<Box sx={{ display: "flex", flexWrap: "wrap", mb: 2 }}>
117+
{standard.tag
118+
.filter((tag) => !tag.toLowerCase().includes("impact"))
119+
.map((tag, idx) => (
120+
<Chip
121+
key={idx}
122+
label={tag}
123+
size="small"
124+
color="info"
125+
sx={{ mr: 1, mt: 1 }}
126+
/>
127+
))}
128+
</Box>
129+
</>
130+
)}
131+
<Typography variant="subtitle2" sx={{ mt: 2 }}>
132+
Impact:
133+
</Typography>
134+
<Chip
135+
label={standard.impact}
136+
size="small"
137+
color={
138+
standard.impact === "High Impact"
139+
? "error"
140+
: standard.impact === "Medium Impact"
141+
? "warning"
142+
: "info"
152143
}
153-
label="Add this standard to the template"
154144
/>
155-
)}
156-
</CardContent>
157-
</Card>
158-
</Grid>
159-
))
145+
{standard.recommendedBy?.length > 0 && (
146+
<>
147+
<Typography variant="subtitle2" sx={{ mt: 2 }}>
148+
Recommended By:
149+
</Typography>
150+
<Typography
151+
variant="body2"
152+
color="textSecondary"
153+
paragraph
154+
>
155+
{standard.recommendedBy.join(", ")}
156+
</Typography>
157+
</>
158+
)}
159+
</CardContent>
160+
161+
<CardContent>
162+
{standard.multiple ? (
163+
<IconButton
164+
color="primary"
165+
disabled={isButtonDisabled}
166+
onClick={() => handleAddClick(standard.name)}
167+
>
168+
<Add />
169+
</IconButton>
170+
) : (
171+
<FormControlLabel
172+
control={
173+
<Switch
174+
checked={!!selectedStandards[standard.name]}
175+
onChange={() =>
176+
handleToggleSingleStandard(standard.name)
177+
}
178+
/>
179+
}
180+
label="Add this standard to the template"
181+
/>
182+
)}
183+
</CardContent>
184+
</Card>
185+
</Grid>
186+
))
187+
)
160188
)}
161189
</Grid>
162190
</DialogContent>

src/components/CippWizard/CippWizardOffboarding.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import { CippFormCondition } from "../CippComponents/CippFormCondition";
55
import { useWatch } from "react-hook-form";
66
import { useEffect, useState } from "react";
77
import { Grid } from "@mui/system";
8+
import { useSettings } from "../../hooks/use-settings";
89

910
export const CippWizardOffboarding = (props) => {
1011
const { postUrl, formControl, onPreviousStep, onNextStep, currentStep } = props;
1112
const currentTenant = formControl.watch("tenantFilter");
1213
const selectedUsers = useWatch({ control: formControl.control, name: "user" });
1314
const [showAlert, setShowAlert] = useState(false);
15+
const userSettingsDefaults = useSettings().userSettingsDefaults;
1416

1517
useEffect(() => {
1618
if (selectedUsers.length >= 4) {
@@ -19,6 +21,14 @@ export const CippWizardOffboarding = (props) => {
1921
}
2022
}, [selectedUsers]);
2123

24+
useEffect(() => {
25+
if (userSettingsDefaults?.offboardingDefaults) {
26+
userSettingsDefaults.offboardingDefaults.forEach((setting) => {
27+
formControl.setValue(setting.name, setting.value);
28+
});
29+
}
30+
}, [userSettingsDefaults]);
31+
2232
return (
2333
<Stack spacing={4}>
2434
<Grid container spacing={4}>

0 commit comments

Comments
 (0)