Skip to content

Commit

Permalink
Merge pull request #81 from KelvinTegelaar/main
Browse files Browse the repository at this point in the history
[pull] main from KelvinTegelaar:main
  • Loading branch information
ADVTECH-AU authored Feb 3, 2025
2 parents 94f5d68 + cf56721 commit 5a1e607
Show file tree
Hide file tree
Showing 102 changed files with 1,363 additions and 827 deletions.
12 changes: 6 additions & 6 deletions generate-placeholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ const pages = [
{ title: "Backup Wizard", path: "/tenant/backup/backup-wizard" },
{ title: "Restore Wizard", path: "/tenant/backup/restore-wizard" },
{ title: "Tools", path: "/tenant/administration" },
{ title: "Graph Explorer", path: "/tenant/administration/graph-explorer" },
{ title: "Application Approval", path: "/tenant/administration/appapproval" },
{ title: "Graph Explorer", path: "/tenant/tools/graph-explorer" },
{ title: "Application Approval", path: "/tenant/tools/appapproval" },
{ title: "IP Database", path: "/tenant/tools/geoiplookup" },
{ title: "Tenant Lookup", path: "/tenant/administration/tenantlookup" },
{ title: "Individual Domain Check", path: "/tenant/standards/individual-domains" },
{ title: "Individual Domain Check", path: "/tenant/tools/individual-domains" },
{ title: "BPA Report Builder", path: "/tenant/tools/bpa-report-builder" },
{ title: "Standards", path: "/tenant/standards" },
{ title: "Edit Standards", path: "/tenant/standards/list-applied-standards" },
Expand Down Expand Up @@ -82,7 +82,7 @@ const pages = [
{ title: "Add Profile", path: "/endpoint/autopilot/add-profile" },
{ title: "Status Pages", path: "/endpoint/autopilot/list-status-pages" },
{ title: "Add Status Page", path: "/endpoint/autopilot/add-status-page" },
{ title: "Devices", path: "/endpoint/reports/devices" },
{ title: "Devices", path: "/endpoint/MEM/devices" },
{ title: "Configuration Policies", path: "/endpoint/MEM/list-policies" },
{ title: "Compliance Policies", path: "/endpoint/MEM/list-compliance-policies" },
{ title: "Protection Policies", path: "/endpoint/MEM/list-appprotection-policies" },
Expand All @@ -108,9 +108,9 @@ const pages = [
{ title: "Transport rules", path: "/email/transport/list-rules" },
{ title: "Deploy Transport rule", path: "/email/transport/deploy-rules" },
{ title: "Transport Templates", path: "/email/transport/list-templates" },
{ title: "Connectors", path: "/email/connectors/list-connectors" },
{ title: "Connectors", path: "/email/transport/list-connectors" },
{ title: "Deploy Connector Templates", path: "/email/connectors/deploy-connector" },
{ title: "Connector Templates", path: "/email/connectors/list-connector-templates" },
{ title: "Connector Templates", path: "/email/transport/list-connector-templates" },
{ title: "Spamfilter", path: "/email/spamfilter/list-spamfilter" },
{ title: "Apply Spamfilter Template", path: "/email/spamfilter/deploy" },
{ title: "Templates", path: "/email/spamfilter/list-templates" },
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "cipp",
"version": "7.0.0",
"version": "7.1.3",
"author": "CIPP Contributors",
"homepage": "https://cipp.app/",
"bugs": {
"url": "https://github.com/KelvinTegelaar/CIPP/issues"
},
"license": "AGPL-3.0",
"engines": {
"node": "^18.17.0"
"node": "^20.18.1"
},
"repository": {
"type": "git",
Expand Down
Binary file added public/assets/integrations/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/integrations/github_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "7.1.2"
"version": "7.1.3"
}
5 changes: 5 additions & 0 deletions src/components/CippCards/CippUserInfoCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export const CippUserInfoCard = (props) => {
)
}
/>
<PropertyListItem
divider
label="User ID"
value={isFetching ? <Skeleton variant="text" width={120} /> : user?.id || "N/A"}
/>
<PropertyListItem
divider
label="Email Address"
Expand Down
1 change: 0 additions & 1 deletion src/components/CippComponents/CippApiDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export const CippApiDialog = (props) => {
} else {
Object.keys(dataObject).forEach((key) => {
const value = dataObject[key];

if (typeof value === "string" && value.startsWith("!")) {
newData[key] = value.slice(1);
} else if (typeof value === "string") {
Expand Down
1 change: 1 addition & 0 deletions src/components/CippComponents/CippUserActions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const CippUserActions = () => {
{ label: "Disabled", value: "Disabled" },
],
multiple: false,
creatable: false,
},
],
confirmText: "Are you sure you want to set per-user MFA for these users?",
Expand Down
4 changes: 2 additions & 2 deletions src/components/CippFormPages/CippAddGroupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const CippAddGroupForm = (props) => {
formControl={formControl}
name="owners"
label="Owners"
multiple={false}
multiple={true}
select={"id,userPrincipalName,displayName"}
/>
</Grid>
Expand All @@ -62,7 +62,7 @@ const CippAddGroupForm = (props) => {
formControl={formControl}
name="members"
label="Members"
multiple={false}
multiple={true}
select={"id,userPrincipalName,displayName"}
/>
</Grid>
Expand Down
3 changes: 1 addition & 2 deletions src/components/CippFormPages/CippFormPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const CippFormPage = (props) => {
formControl,
postUrl,
customDataformatter,
resetForm = true,
resetForm = false,
hideBackButton = false,
hidePageType = false,
hideTitle = false,
Expand All @@ -36,7 +36,6 @@ const CippFormPage = (props) => {
...other
} = props;
const router = useRouter();

//check if there are
const postCall = ApiPostCall({
datafromUrl: true,
Expand Down
3 changes: 2 additions & 1 deletion src/components/CippFormPages/CippSchedulerForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ const CippSchedulerForm = (props) => {
formControl={formControl}
>
<Grid item xs={12} md={gridSize} key={idx}>
{param.Type === "System.Boolean" ? (
{param.Type === "System.Boolean" ||
param.Type === "System.Management.Automation.SwitchParameter" ? (
<CippFormComponent
type="switch"
name={`parameters.${param.Name}`}
Expand Down
224 changes: 126 additions & 98 deletions src/components/CippStandards/CippStandardDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ const CippStandardDialog = ({

const handleSearchQueryChange = useCallback(
debounce((query) => {
setSearchQuery(query);
setSearchQuery(query.trim());
}, 50),
[]
);

return (
<Dialog open={dialogOpen} onClose={handleCloseDialog} maxWidth="xxl">
<Dialog open={dialogOpen} onClose={handleCloseDialog} maxWidth="xxl"
PaperProps={{
sx: {
minWidth: "720px",
},
}}>
<DialogTitle>Select a Standard to Add</DialogTitle>
<DialogContent sx={{ backgroundColor: "background.default" }}>
<TextField
Expand All @@ -58,105 +63,128 @@ const CippStandardDialog = ({
onChange={(e) => handleSearchQueryChange(e.target.value.toLowerCase())}
/>
<Grid container spacing={3}>
{Object.keys(categories).map((category) =>
filterStandards(categories[category]).map((standard) => (
<Grid item xs={12} md={3} key={standard.name}>
<Card
sx={{
display: "flex",
flexDirection: "column",
height: "100%",
}}
>
<CardContent sx={{ flexGrow: 1 }}>
<Typography variant="h6" gutterBottom>
{standard.label}
</Typography>
{standard.helpText && (
<>
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Description:
</Typography>
<Typography variant="body2" color="textSecondary" paragraph>
{standard.helpText}
</Typography>
</>
)}
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Category:
</Typography>
<Chip label={category} size="small" color="primary" sx={{ mt: 1, mb: 2 }} />
{standard.tag?.filter((tag) => !tag.toLowerCase().includes("impact")).length >
0 && (
<>
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Tags:
</Typography>
<Box sx={{ display: "flex", flexWrap: "wrap", mb: 2 }}>
{standard.tag
.filter((tag) => !tag.toLowerCase().includes("impact"))
.map((tag, idx) => (
<Chip
key={idx}
label={tag}
size="small"
color="info"
sx={{ mr: 1, mt: 1 }}
/>
))}
</Box>
</>
)}
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Impact:
</Typography>
<Chip
label={standard.impact}
size="small"
color={
standard.impact === "High Impact"
? "error"
: standard.impact === "Medium Impact"
? "warning"
: "info"
}
/>
{standard.recommendedBy?.length > 0 && (
<>
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Recommended By:
</Typography>
<Typography variant="body2" color="textSecondary" paragraph>
{standard.recommendedBy.join(", ")}
</Typography>
</>
)}
</CardContent>

<CardContent>
{standard.multiple ? (
<IconButton
{Object.keys(categories).every(
(category) => filterStandards(categories[category]).length === 0
) ? (
<Typography
variant="h6"
color="textSecondary"
sx={{ mt: 4, textAlign: "center", width: "100%" }}
>
Search returned no results
</Typography>
) : (
Object.keys(categories).map((category) =>
filterStandards(categories[category]).map((standard) => (
<Grid item xs={12} md={3} key={standard.name}>
<Card
sx={{
display: "flex",
flexDirection: "column",
height: "100%",
}}
>
<CardContent sx={{ flexGrow: 1 }}>
<Typography variant="h6" gutterBottom>
{standard.label}
</Typography>
{standard.helpText && (
<>
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Description:
</Typography>
<Typography variant="body2" color="textSecondary" paragraph>
{standard.helpText}
</Typography>
</>
)}
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Category:
</Typography>
<Chip
label={category}
size="small"
color="primary"
disabled={isButtonDisabled}
onClick={() => handleAddClick(standard.name)}
>
<Add />
</IconButton>
) : (
<FormControlLabel
control={
<Switch
checked={!!selectedStandards[standard.name]}
onChange={() => handleToggleSingleStandard(standard.name)}
/>
sx={{ mt: 1, mb: 2 }}
/>
{standard.tag?.filter((tag) => !tag.toLowerCase().includes("impact")).length >
0 && (
<>
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Tags:
</Typography>
<Box sx={{ display: "flex", flexWrap: "wrap", mb: 2 }}>
{standard.tag
.filter((tag) => !tag.toLowerCase().includes("impact"))
.map((tag, idx) => (
<Chip
key={idx}
label={tag}
size="small"
color="info"
sx={{ mr: 1, mt: 1 }}
/>
))}
</Box>
</>
)}
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Impact:
</Typography>
<Chip
label={standard.impact}
size="small"
color={
standard.impact === "High Impact"
? "error"
: standard.impact === "Medium Impact"
? "warning"
: "info"
}
label="Add this standard to the template"
/>
)}
</CardContent>
</Card>
</Grid>
))
{standard.recommendedBy?.length > 0 && (
<>
<Typography variant="subtitle2" sx={{ mt: 2 }}>
Recommended By:
</Typography>
<Typography
variant="body2"
color="textSecondary"
paragraph
>
{standard.recommendedBy.join(", ")}
</Typography>
</>
)}
</CardContent>

<CardContent>
{standard.multiple ? (
<IconButton
color="primary"
disabled={isButtonDisabled}
onClick={() => handleAddClick(standard.name)}
>
<Add />
</IconButton>
) : (
<FormControlLabel
control={
<Switch
checked={!!selectedStandards[standard.name]}
onChange={() =>
handleToggleSingleStandard(standard.name)
}
/>
}
label="Add this standard to the template"
/>
)}
</CardContent>
</Card>
</Grid>
))
)
)}
</Grid>
</DialogContent>
Expand Down
Loading

0 comments on commit 5a1e607

Please sign in to comment.