Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
screwlooseit authored Jan 13, 2025
2 parents a9018b3 + 50d1b09 commit 2266c41
Show file tree
Hide file tree
Showing 13 changed files with 95 additions and 32 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
#Replace with CIPPREadMe
![CyberDrain Light](github_assets/img/CIPP.png#gh-dark-mode-only)
![CyberDrain Dark](github_assets/img/CIPP-Light.png#gh-light-mode-only)

# What is this?

The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners. The current Microsoft partner landscape makes it fairly hard to manage multi tenant situations, with loads of manual work. Microsoft Lighthouse might resolve this in the future but development of this is lagging far behind development of the current market for Microsoft Partners.
This project is a way to help you with administration, with user management, and deploying your own preferred standards. It's not a replacement for security tools, or a way to cut costs on specific subscriptions. The tool should assist you in removing the gripes with standard partner management and save you several hours per engineer per month.
For more information, we recommend checking out our website [here](https://cipp.app)
For detailed documentation about features of CIPP, please check out our [documentation.](https://docs.cipp.app)

# Our sponsors

You can find our sponsors [here.](https://docs.cipp.app/#our-sponsors)
2 changes: 2 additions & 0 deletions deployment/DevAzureDeploymentTemplate_regionoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@
"buildProperties": {
"appLocation": "/",
"apiLocation": "",

"appArtifactLocation": ""
"outputLocation": "/out"
}
},
Expand Down
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.0.1"
"version": "7.0.2"
}
20 changes: 14 additions & 6 deletions src/components/CippCards/CippInfoBar.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card, Stack, SvgIcon, Typography, Skeleton } from "@mui/material";
import { Box, Card, Stack, SvgIcon, Typography, Skeleton } from "@mui/material";
import Grid from "@mui/material/Grid";

export const CippInfoBar = ({ data, isFetching }) => (
Expand Down Expand Up @@ -31,17 +31,25 @@ export const CippInfoBar = ({ data, isFetching }) => (
}}
>
<Stack alignItems="center" direction="row" spacing={2} sx={{ p: 2 }}>
<SvgIcon color={item.color ? item.color : "primary"} fontSize="small">
{item.icon}
</SvgIcon>
<div>
{item?.icon && (
<SvgIcon color={item.color ? item.color : "primary"} fontSize="small">
{item.icon}
</SvgIcon>
)}
<Box
sx={() => {
if (!item?.icon) {
return { pl: 2 };
}
}}
>
<Typography color="text.secondary" variant="overline">
{item.name}
</Typography>
<Typography variant="h6">
{isFetching ? <Skeleton width={"100%"} /> : item.data}
</Typography>
</div>
</Box>
</Stack>
</Grid>
))}
Expand Down
8 changes: 8 additions & 0 deletions src/components/CippCards/CippPropertyListCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export const CippPropertyListCard = (props) => {
const firstHalf = propertyItems.slice(0, half);
const secondHalf = propertyItems.slice(half, propertyItems.length);

const isLabelPresent = (item) => {
return item?.label === "" || item?.label === undefined || item?.label === null;
};

const setPadding = isLabelPresent ? { py: 0.5, px: 3 } : { py: 1.5, px: 3 };

return (
<>
<Card sx={cardSx} {...other}>
Expand All @@ -56,6 +62,7 @@ export const CippPropertyListCard = (props) => {
align={align}
label={item.label}
value={<Skeleton width={280} />}
sx={setPadding}
/>
))}
</>
Expand All @@ -66,6 +73,7 @@ export const CippPropertyListCard = (props) => {
divider={showDivider}
copyItems={copyItems}
key={`${index}-index-PropertyListOffCanvas`}
sx={setPadding}
{...item}
/>
))
Expand Down
15 changes: 15 additions & 0 deletions src/components/CippComponents/CippPropertyList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export const CippPropertyList = (props) => {
const firstHalf = propertyItems.slice(0, half);
const secondHalf = propertyItems.slice(half, propertyItems.length);

const isLabelPresent = (item) => {
return item?.label === "" || item?.label === undefined || item?.label === null;
};

const setPadding = isLabelPresent ? { py: 0.5, px: 3 } : { py: 1.5, px: 3 };
return (
<>
{layout === "single" ? (
Expand All @@ -28,6 +33,7 @@ export const CippPropertyList = (props) => {
align={align}
label={item.label}
value={<Skeleton width={280} />}
sx={setPadding}
{...item}
/>
))}
Expand All @@ -39,6 +45,7 @@ export const CippPropertyList = (props) => {
divider={showDivider}
copyItems={copyItems}
key={`${index}-index-PropertyListOffCanvas`}
sx={setPadding}
{...item}
/>
))
Expand Down Expand Up @@ -69,6 +76,7 @@ export const CippPropertyList = (props) => {
align={align}
label={item.label}
value={<Skeleton width={280} />}
sx={setPadding}
/>
))}
</>
Expand All @@ -79,6 +87,7 @@ export const CippPropertyList = (props) => {
divider={showDivider}
copyItems={copyItems}
key={`${index}-index-PropertyListOffCanvas`}
sx={setPadding}
{...item}
/>
))
Expand All @@ -93,6 +102,11 @@ export const CippPropertyList = (props) => {
align={align}
label={item.label}
value={<Skeleton width={280} />}
sx={() => {
if (item?.label === "" || item?.label === undefined || item?.label === null) {
return { py: 0 };
}
}}
/>
))}
</>
Expand All @@ -103,6 +117,7 @@ export const CippPropertyList = (props) => {
divider={showDivider}
copyItems={copyItems}
key={`${index}-index-PropertyListOffCanvas`}
sx={setPadding}
{...item}
/>
))
Expand Down
13 changes: 9 additions & 4 deletions src/components/CippComponents/CippTenantSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ export const CippTenantSelector = (props) => {
? {
value: tenant,
label: `${matchingTenant.displayName} (${tenant})`,
addedFields: {
defaultDomainName: matchingTenant.defaultDomainName,
displayName: matchingTenant.displayName,
customerId: matchingTenant.customerId,
},
}
: {
value: null,
Expand Down Expand Up @@ -183,7 +188,7 @@ export const CippTenantSelector = (props) => {
actions={[
{
label: "M365 Admin Portal",
link: `https://admin.microsoft.com/Partner/BeginClientSession.aspx?CTID=${currentTenant?.value}&CSDEST=o365admincenter`,
link: `https://admin.microsoft.com/Partner/BeginClientSession.aspx?CTID=${currentTenant?.addedFields?.customerId}&CSDEST=o365admincenter`,
icon: <GlobeAltIcon />,
},
{
Expand Down Expand Up @@ -213,17 +218,17 @@ export const CippTenantSelector = (props) => {
},
{
label: "Sharepoint Portal",
link: `https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=${currentTenant?.value}&CSDEST=SharePoint`,
link: `https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=${currentTenant?.addedFields?.customerId}&CSDEST=SharePoint`,
icon: <Share />,
},
{
label: "Security Portal",
link: `https://security.microsoft.com/?tid=${currentTenant?.value}`,
link: `https://security.microsoft.com/?tid=${currentTenant?.addedFields?.customerId}`,
icon: <Shield />,
},
{
label: "Compliance Portal",
link: `https://compliance.microsoft.com/?tid=${currentTenant?.value}`,
link: `https://compliance.microsoft.com/?tid=${currentTenant?.addedFields?.customerId}`,
icon: <ShieldMoon />,
},
]}
Expand Down
4 changes: 2 additions & 2 deletions src/components/CippSettings/CippCustomRoles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const CippCustomRoles = () => {
alltenant = true;
}
});
if (alltenant && (blockedTenants?.length === 0 || !blockedTenants)) {
if (alltenant) {
setAllTenantSelected(true);
} else {
setAllTenantSelected(false);
Expand Down Expand Up @@ -299,7 +299,7 @@ export const CippCustomRoles = () => {
name="allowedTenants"
fullWidth={true}
/>
{allTenantSelected && (
{allTenantSelected && blockedTenants?.length == 0 && (
<Alert color="warning">
All tenants selected, no tenant restrictions will be applied unless blocked tenants
are specified.
Expand Down
14 changes: 5 additions & 9 deletions src/components/property-list-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,15 @@ export const PropertyListItem = (props) => {
value = "",
type,
copyItems,
sx = {
px: 3,
py: 1.5,
},
...other
} = props;
const [showPassword, setShowPassword] = useState(false);
return (
<ListItem
component={component}
disableGutters
sx={{
px: 3,
py: 1.5,
}}
{...other}
>
<ListItem component={component} disableGutters sx={sx} {...other}>
<ListItemText
disableTypography
primary={
Expand Down
1 change: 0 additions & 1 deletion src/data/Extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"logoDark": "/assets/integrations/sherweb_dark.png",
"description": "Enable the Sherweb integration to manage your CSP licensing from CIPP.",
"helpText": "This integration allows you to manage your CSP licensing from CIPP. Purchase new licenses while adding or editing users in CIPP. Not a Sherweb partner? Sign up for the Sherweb Cloud Services for MSPs program.",
"alertText": "This integration is in a closed beta. To register for interest please visit the registration page. Filling in information while not in the beta is possible, but will not enable the functionality.",
"mappingRequired": true,
"links": [
{
Expand Down
11 changes: 10 additions & 1 deletion src/pages/cipp/advanced/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Page = () => {
"LastOccurrence",
"Status",
"PreferredProcessor",
"ErrorMsg",
];

const offCanvas = {
Expand Down Expand Up @@ -72,7 +73,15 @@ const Page = () => {
isFetching={fetchData.isPending}
cardButton={<ResetToDefaultButton />}
offCanvas={offCanvas}
actions={[]}
actions={[
{
label: "Run Now",
type: "POST",
url: apiUrl,
data: { FunctionName: "Command", Parameters: "Parameters" },
confirmText: "Do you want to run this task now?",
},
]}
/>
<CippApiDialog
title="Reset to Default"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/cipp/settings/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const Page = () => {
<Typography variant="body2" sx={{ mt: 3, px: 3 }}>
Backups are stored in the storage account associated with your CIPP instance. You can
download or restore specific points in time from the list below. Enable automatic
updates to have CIPP create daily backups.
backups to have CIPP create daily backups using the scheduler.
</Typography>
{backupList.isSuccess ? (
<Box sx={{ mt: 3 }}>
Expand Down
21 changes: 15 additions & 6 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,15 @@ const Page = () => {

// Identify which templates apply:
const applicableTemplates = standardsData.filter((template) => {
const tenantInFilter = template?.tenantFilter?.some((tf) => tf.value === currentTenant);
const tenantInFilter =
template?.tenantFilter?.length > 0 &&
template.tenantFilter.some((tf) => tf.value === currentTenant);
const allTenantsTemplate =
template.tenantFilter?.some((tf) => tf.value === "AllTenants") &&
!template.excludedTenants?.some((et) => et.value === currentTenant);
template?.tenantFilter?.length > 0 &&
template.tenantFilter.some((tf) => tf.value === "AllTenants") &&
(!template?.excludedTenants ||
(Array.isArray(template?.excludedTenants) && template?.excludedTenants?.length === 0) ||
!template?.excludedTenants?.some((et) => et.value === currentTenant));
return tenantInFilter || allTenantsTemplate;
});

Expand All @@ -117,7 +122,11 @@ const Page = () => {
let reportCount = 0;

for (const [, standard] of Object.entries(combinedStandards)) {
const actions = standard.action || [];
let actions = standard.action || [];
if (!Array.isArray(actions)) {
actions = [actions];
}

actions?.forEach((actionObj) => {
if (actionObj?.value === "Remediate") {
remediateCount++;
Expand Down Expand Up @@ -238,10 +247,10 @@ const Page = () => {
propertyItems={organization.data?.verifiedDomains
?.slice(0, domainVisible ? undefined : 3)
.map((domain, idx) => ({
label: `Domain`,
label: "",
value: domain.name,
}))}
actions={
actionItems={
organization.data?.verifiedDomains?.length > 3 && (
<Button onClick={() => setDomainVisible(!domainVisible)}>
{domainVisible ? "See less" : "See more..."}
Expand Down

0 comments on commit 2266c41

Please sign in to comment.