Skip to content

Commit 6753ac6

Browse files
authored
Merge pull request #1 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 6d1db8c + 6d1fef2 commit 6753ac6

35 files changed

Lines changed: 2733 additions & 732 deletions

.github/workflows/cipp_dev_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
# Upload to Azure Blob Storage
5656
- name: Azure Blob Upload
57-
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.8.0
57+
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.9.0
5858
with:
5959
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
6060
container_name: cipp

.github/workflows/cipp_frontend_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
4848
# Upload to Azure Blob Storage
4949
- name: Azure Blob Upload
50-
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.8.0
50+
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.9.0
5151
with:
5252
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
5353
container_name: cipp

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@tiptap/extension-table": "^3.19.0",
5252
"@tiptap/pm": "^3.4.1",
5353
"@tiptap/react": "^3.4.1",
54-
"@tiptap/starter-kit": "^3.20.0",
54+
"@tiptap/starter-kit": "^3.20.1",
5555
"@uiw/react-json-view": "^2.0.0-alpha.41",
5656
"@vvo/tzdb": "^6.198.0",
5757
"apexcharts": "5.3.5",
@@ -61,7 +61,7 @@
6161
"export-to-csv": "^1.3.0",
6262
"formik": "2.4.9",
6363
"gray-matter": "4.0.3",
64-
"i18next": "25.8.13",
64+
"i18next": "25.8.18",
6565
"javascript-time-ago": "^2.6.2",
6666
"jspdf": "^4.2.0",
6767
"jspdf-autotable": "^5.0.7",
@@ -98,7 +98,7 @@
9898
"react-redux": "9.2.0",
9999
"react-syntax-highlighter": "^16.1.0",
100100
"react-time-ago": "^7.3.3",
101-
"react-virtuoso": "^4.18.1",
101+
"react-virtuoso": "^4.18.3",
102102
"react-window": "^2.2.5",
103103
"recharts": "^3.7.0",
104104
"redux": "5.0.1",
@@ -110,7 +110,7 @@
110110
"simplebar": "6.3.3",
111111
"simplebar-react": "3.3.2",
112112
"stylis-plugin-rtl": "2.1.1",
113-
"typescript": "5.9.2",
113+
"typescript": "5.9.3",
114114
"yup": "1.7.1"
115115
},
116116
"devDependencies": {

src/components/CippComponents/CippApiDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const CippApiDialog = (props) => {
5252
useEffect(() => {
5353
if (createDialog.open) {
5454
setIsFormSubmitted(false);
55-
formHook.reset(defaultvalues || {});
55+
formHook.reset(typeof defaultvalues === "function" ? defaultvalues(row) : defaultvalues || {});
5656
}
5757
}, [createDialog.open, defaultvalues]);
5858

src/components/CippComponents/CippAutopilotProfileDrawer.jsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ export const CippAutopilotProfileDrawer = ({
109109
{createProfile.isLoading
110110
? "Creating..."
111111
: createProfile.isSuccess
112-
? "Create Another"
113-
: "Create Profile"}
112+
? "Create Another"
113+
: "Create Profile"}
114114
</Button>
115115
<Button variant="outlined" onClick={handleCloseDrawer}>
116116
Close
@@ -154,10 +154,14 @@ export const CippAutopilotProfileDrawer = ({
154154
type="autoComplete"
155155
label="Language"
156156
name="languages"
157-
options={languageList.map(({ language, tag, "Geographic area": geographicArea }) => ({
158-
value: tag,
159-
label: `${language} - ${geographicArea}`, // Format as "language - geographic area" for display
160-
}))}
157+
options={[
158+
{ value: "os-default", label: "Operating system default" },
159+
{ value: "user-select", label: "User Select" },
160+
...languageList.map(({ language, tag, "Geographic area": geographicArea }) => ({
161+
value: tag,
162+
label: `${language} - ${geographicArea}`, // Format as "language - geographic area" for display
163+
})),
164+
]}
161165
formControl={formControl}
162166
multiple={false}
163167
/>

src/components/CippComponents/CippInviteGuestDrawer.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,23 @@ export const CippInviteGuestDrawer = ({
7070
});
7171
};
7272

73+
const handleOpenDrawer = () => {
74+
formControl.reset({
75+
tenantFilter: userSettingsDefaults.currentTenant,
76+
displayName: "",
77+
mail: "",
78+
redirectUri: "",
79+
message: "",
80+
sendInvite: true,
81+
});
82+
setDrawerVisible(true);
83+
};
84+
7385
return (
7486
<>
7587
<PermissionButton
7688
requiredPermissions={requiredPermissions}
77-
onClick={() => setDrawerVisible(true)}
89+
onClick={handleOpenDrawer}
7890
startIcon={<Send />}
7991
>
8092
{buttonText}
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
import React from "react";
2+
import { Box, Typography, Chip, Paper, Grid, Tooltip } from "@mui/material";
3+
import {
4+
CheckCircle,
5+
Cancel,
6+
Warning,
7+
Security,
8+
Info,
9+
} from "@mui/icons-material";
10+
11+
/**
12+
* Visual Role Overview Component
13+
* Displays all roles in a grid with visual status indicators
14+
*/
15+
export const CippRoleOverview = ({ roles = [], onRoleClick }) => {
16+
if (!roles || roles.length === 0) return null;
17+
18+
const getRoleStatus = (role) => {
19+
if (role.isUserHasAccess) {
20+
return {
21+
icon: <CheckCircle />,
22+
color: "success",
23+
label: "Has Access",
24+
bgColor: "success.light",
25+
};
26+
} else if (role.isAssigned) {
27+
return {
28+
icon: <Warning />,
29+
color: "warning",
30+
label: "Assigned but No Access",
31+
bgColor: "warning.light",
32+
};
33+
} else if (role.roleExistsInRelationship) {
34+
return {
35+
icon: <Info />,
36+
color: "info",
37+
label: "In Relationship but Not Assigned",
38+
bgColor: "info.light",
39+
};
40+
} else {
41+
return {
42+
icon: <Cancel />,
43+
color: "default",
44+
label: "Not In Any Relationship",
45+
bgColor: "grey.200",
46+
};
47+
}
48+
};
49+
50+
return (
51+
<Grid container spacing={2}>
52+
{roles.map((role) => {
53+
const status = getRoleStatus(role);
54+
return (
55+
<Grid item xs={12} sm={6} md={4} key={role.roleId}>
56+
<Tooltip title={role.roleDescription || role.roleName} arrow>
57+
<Paper
58+
elevation={2}
59+
sx={{
60+
p: 2,
61+
height: "100%",
62+
cursor: onRoleClick ? "pointer" : "default",
63+
backgroundColor: status.bgColor,
64+
border: 2,
65+
borderColor: `${status.color}.main`,
66+
transition: "all 0.2s",
67+
"&:hover": onRoleClick
68+
? {
69+
elevation: 4,
70+
transform: "translateY(-2px)",
71+
}
72+
: {},
73+
}}
74+
onClick={() => onRoleClick && onRoleClick(role)}
75+
>
76+
<Box sx={{ display: "flex", alignItems: "flex-start", gap: 1 }}>
77+
<Box
78+
sx={{
79+
color: `${status.color}.main`,
80+
display: "flex",
81+
alignItems: "center",
82+
}}
83+
>
84+
<Security />
85+
</Box>
86+
<Box sx={{ flex: 1, minWidth: 0 }}>
87+
<Typography
88+
variant="subtitle2"
89+
sx={{
90+
fontWeight: "bold",
91+
mb: 0.5,
92+
overflow: "hidden",
93+
textOverflow: "ellipsis",
94+
whiteSpace: "nowrap",
95+
}}
96+
>
97+
{role.roleName}
98+
</Typography>
99+
<Chip
100+
icon={status.icon}
101+
label={status.label}
102+
color={status.color}
103+
size="small"
104+
sx={{ fontSize: "0.7rem" }}
105+
/>
106+
{role.accessPaths && role.accessPaths.length > 0 && (
107+
<Typography variant="caption" color="text.secondary" sx={{ display: "block", mt: 0.5 }}>
108+
{role.accessPaths.length} access path{role.accessPaths.length !== 1 ? "s" : ""}
109+
</Typography>
110+
)}
111+
{role.relationshipsWithRole && role.relationshipsWithRole.length > 0 && (
112+
<Typography variant="caption" color="text.secondary" sx={{ display: "block", mt: 0.5 }}>
113+
{role.relationshipsWithRole.length} group{role.relationshipsWithRole.length !== 1 ? "s" : ""}
114+
</Typography>
115+
)}
116+
</Box>
117+
</Box>
118+
</Paper>
119+
</Tooltip>
120+
</Grid>
121+
);
122+
})}
123+
</Grid>
124+
);
125+
};

src/components/CippComponents/CippSettingsSideBar.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ export const CippSettingsSideBar = (props) => {
6565
// Table Filter Preferences
6666
persistFilters: formValues.persistFilters,
6767

68+
// Navigation Settings
69+
bookmarkSidebar: formValues.bookmarkSidebar,
70+
bookmarkPopover: formValues.bookmarkPopover,
71+
bookmarkReorderMode: formValues.bookmarkReorderMode,
72+
compactNav: formValues.compactNav,
73+
6874
// Portal Links Configuration
6975
portalLinks: {
7076
M365_Portal: formValues.portalLinks?.M365_Portal,
@@ -137,9 +143,6 @@ export const CippSettingsSideBar = (props) => {
137143
Settings on this page can be saved for the current user, or all users. Select the
138144
desired option below.
139145
</Typography>
140-
<Alert severity="info" variant="outlined" icon={false} sx={{ py: 0.5, px: 2 }}>
141-
Navigation settings are per-device and stored locally, regardless of the user selector.
142-
</Alert>
143146
<CippFormComponent
144147
type="autoComplete"
145148
disableClearable={true}

src/components/CippSettings/CippBackupRetentionSettings.jsx

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { Button, ButtonGroup, SvgIcon, Typography, TextField, Box } from "@mui/material";
1+
import { Button, Typography, TextField, Box } from "@mui/material";
22
import CippButtonCard from "../CippCards/CippButtonCard";
33
import { ApiGetCall, ApiPostCall } from "../../api/ApiCall";
44
import { CippApiResults } from "../CippComponents/CippApiResults";
5-
import { History } from "@mui/icons-material";
65
import { useState, useEffect } from "react";
76

87
const CippBackupRetentionSettings = () => {
@@ -55,40 +54,36 @@ const CippBackupRetentionSettings = () => {
5554
}
5655
};
5756

58-
const RetentionControls = () => {
59-
return (
60-
<Box sx={{ display: "flex", gap: 1, alignItems: "flex-start" }}>
61-
<TextField
62-
size="small"
63-
type="number"
64-
value={retentionDays}
65-
onChange={handleInputChange}
66-
disabled={retentionChange.isPending || retentionSetting.isLoading}
67-
inputProps={{ min: 7 }}
68-
error={!!error}
69-
helperText={error}
70-
sx={{ width: "120px" }}
71-
label="Days"
72-
/>
73-
<Button
74-
variant="contained"
75-
color="primary"
76-
size="small"
77-
disabled={retentionChange.isPending || retentionSetting.isLoading || !!error}
78-
onClick={handleRetentionChange}
79-
sx={{ mt: 0.5 }}
80-
>
81-
Save
82-
</Button>
83-
</Box>
84-
);
85-
};
86-
8757
return (
8858
<CippButtonCard
8959
title="Backup Retention"
9060
cardSx={{ display: "flex", flexDirection: "column", height: "100%" }}
91-
CardButton={<RetentionControls />}
61+
CardButton={
62+
<Box sx={{ display: "flex", gap: 1, alignItems: "flex-start" }}>
63+
<TextField
64+
size="small"
65+
type="number"
66+
value={retentionDays}
67+
onChange={handleInputChange}
68+
disabled={retentionChange.isPending || retentionSetting.isLoading}
69+
inputProps={{ min: 7 }}
70+
error={!!error}
71+
helperText={error}
72+
sx={{ width: "120px" }}
73+
label="Days"
74+
/>
75+
<Button
76+
variant="contained"
77+
color="primary"
78+
size="small"
79+
disabled={retentionChange.isPending || retentionSetting.isLoading || !!error}
80+
onClick={handleRetentionChange}
81+
sx={{ mt: 0.5 }}
82+
>
83+
Save
84+
</Button>
85+
</Box>
86+
}
9287
>
9388
<Typography variant="body2">
9489
Configure how long to keep backup files. Both CIPP system backups and tenant backups will be

0 commit comments

Comments
 (0)