Skip to content

Commit

Permalink
Merge pull request #27 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
[pull] dev from KelvinTegelaar:dev
  • Loading branch information
pull[bot] authored Jan 22, 2025
2 parents f8e83d0 + 0d2d116 commit 398774a
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 54 deletions.
24 changes: 24 additions & 0 deletions src/pages/email/administration/mailboxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,29 @@ const Page = () => {
actions: actions,
};

const filterList = [
{
filterName: "View User Mailboxes",
value: [{ id: "recipientTypeDetails", value: "UserMailbox" }],
type: "column",
},
{
filterName: "View Shared Mailboxes",
value: [{ id: "recipientTypeDetails", value: "SharedMailbox" }],
type: "column",
},
{
filterName: "View Room Mailboxes",
value: [{ id: "recipientTypeDetails", value: "RoomMailbox" }],
type: "column",
},
{
filterName: "View Equipment Mailboxes",
value: [{ id: "recipientTypeDetails", value: "EquipmentMailbox" }],
type: "column",
},
];

// Simplified columns for the table
const simpleColumns = [
"UPN", // User Principal Name
Expand All @@ -100,6 +123,7 @@ const Page = () => {
actions={actions}
offCanvas={offCanvas}
simpleColumns={simpleColumns}
filters={filterList}
cardButton={
<>
<Button component={Link} href="/email/administration/mailboxes/addshared">
Expand Down
14 changes: 14 additions & 0 deletions src/pages/email/administration/quarantine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ const Page = () => {
actions: actions,
};

const filterList = [
{
filterName: "Not Released",
value: [{ id: "ReleaseStatus", value: "NOTRELEASED" }],
type: "column",
},
{
filterName: "Released",
value: [{ id: "ReleaseStatus", value: "RELEASED" }],
type: "column",
},
];

return (
<>
<CippTablePage
Expand All @@ -141,6 +154,7 @@ const Page = () => {
actions={actions}
offCanvas={offCanvas}
simpleColumns={simpleColumns}
filters={filterList}
/>
<Dialog open={dialogOpen} onClose={() => setDialogOpen(false)} maxWidth="lg" fullWidth>
<DialogTitle sx={{ py: 2 }}>
Expand Down
30 changes: 16 additions & 14 deletions src/pages/endpoint/applications/list/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const ApplicationDeploymentForm = () => {
const formattedData = { ...data };
formattedData.selectedTenants = selectedTenants.map((tenant) => ({
defaultDomainName: tenant.value,
customerId: tenant.addedFields.customerId,
}));
return formattedData;
}}
Expand Down Expand Up @@ -174,11 +175,12 @@ const ApplicationDeploymentForm = () => {
/>
</Grid>
{selectedTenants?.map((tenant, index) => (
<Grid item xs={12} md={6} key={tenant.value || index}>
<Grid item xs={12} md={6} key={tenant.addedFields.customerId || index}>
{console.log(tenant)}
<CippFormComponent
type="textField"
label={`Datto ID for ${tenant.label}`}
name={`params.dattoGuid.${tenant.value}`}
name={`params.dattoGuid.${tenant.addedFields.customerId}`}
formControl={formControl}
validators={{ required: `Datto ID for ${tenant.label} is required` }}
/>
Expand All @@ -194,11 +196,11 @@ const ApplicationDeploymentForm = () => {
compareValue="syncro"
>
{selectedTenants?.map((tenant, index) => (
<Grid item xs={12} md={6} key={tenant.value || index}>
<Grid item xs={12} md={6} key={tenant.addedFields.customerId || index}>
<CippFormComponent
type="textField"
label={`Client URL for ${tenant.label}`}
name={`params.ClientURL.${tenant.value}`}
name={`params.ClientURL.${tenant.addedFields.customerId}`}
formControl={formControl}
validators={{ required: `Client URL for ${tenant.label} is required` }}
/>
Expand All @@ -215,11 +217,11 @@ const ApplicationDeploymentForm = () => {
compareValue="immy"
>
{selectedTenants?.map((tenant, index) => (
<Grid item xs={12} md={6} key={tenant.value || index}>
<Grid item xs={12} md={6} key={tenant.addedFields.customerId || index}>
<CippFormComponent
type="textField"
label={`Client URL for ${tenant.label}`}
name={`params.ClientURL.${tenant.value}`}
name={`params.ClientURL.${tenant.addedFields.customerId}`}
formControl={formControl}
validators={{ required: `Client URL for ${tenant.label} is required` }}
/>
Expand All @@ -244,11 +246,11 @@ const ApplicationDeploymentForm = () => {
/>
</Grid>
{selectedTenants?.map((tenant, index) => (
<Grid item xs={12} md={6} key={tenant.value || index}>
<Grid item xs={12} md={6} key={tenant.addedFields.customerId || index}>
<CippFormComponent
type="textField"
label={`Organization Key for ${tenant.label}`}
name={`params.Orgkey.${tenant.value}`}
name={`params.Orgkey.${tenant.addedFields.customerId}`}
formControl={formControl}
validators={{ required: `Organization Key for ${tenant.label} is required` }}
/>
Expand All @@ -273,22 +275,22 @@ const ApplicationDeploymentForm = () => {
/>
</Grid>
{selectedTenants?.map((tenant, index) => (
<Grid item xs={12} md={6} key={tenant.value || index}>
<Grid item xs={12} md={6} key={tenant.addedFields.customerId || index}>
<CippFormComponent
type="textField"
label={`Installer Token for ${tenant.label}`}
name={`params.InstallerToken.${tenant.value}`}
name={`params.InstallerToken.${tenant.addedFields.customerId}`}
formControl={formControl}
validators={{ required: `Installer Token for ${tenant.label} is required` }}
/>
</Grid>
))}
{selectedTenants?.map((tenant, index) => (
<Grid item xs={12} md={6} key={`${tenant.value}_location_${index}`}>
<Grid item xs={12} md={6} key={`${tenant.addedFields.customerId}_location_${index}`}>
<CippFormComponent
type="textField"
label={`Location ID for ${tenant.label}`}
name={`params.LocationID.${tenant.value}`}
name={`params.LocationID.${tenant.addedFields.customerId}`}
formControl={formControl}
validators={{ required: `Location ID for ${tenant.label} is required` }}
/>
Expand All @@ -304,11 +306,11 @@ const ApplicationDeploymentForm = () => {
compareValue="cwcommand"
>
{selectedTenants?.map((tenant, index) => (
<Grid item xs={12} md={6} key={tenant.value || index}>
<Grid item xs={12} md={6} key={tenant.addedFields.customerId || index}>
<CippFormComponent
type="textField"
label={`Client URL for ${tenant.label}`}
name={`params.ClientURL.${tenant.value}`}
name={`params.ClientURL.${tenant.addedFields.customerId}`}
formControl={formControl}
validators={{ required: `Client URL for ${tenant.label} is required` }}
/>
Expand Down
18 changes: 9 additions & 9 deletions src/pages/endpoint/reports/analyticsdevicescore/index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { EyeIcon } from "@heroicons/react/24/outline";
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { useSettings } from "/src/hooks/use-settings";

const Page = () => {
const pageTitle = "Analytics Device Score Report";
const tenantFilter = useSettings().currentTenant;

// Actions from the source file
const actions = [
/* TODO: Add direct link to InTune Device
{
label: "View Device",
type: "LINK",
link: "https://intune.microsoft.com/[tenant]/#view/Microsoft_Intune_Devices/DeviceSettingsMenuBlade/~/overview/mdmDeviceId/[id]",
linkParams: {
tenant: "TenantFilter",
id: "id",
},
label: "View in InTune",
link: `https://intune.microsoft.com/${tenantFilter}/#view/Microsoft_Intune_Devices/DeviceSettingsMenuBlade/~/overview/mdmDeviceId/[id]`,
color: "info",
icon: <EyeIcon />,
},*/
target: "_blank",
multiPost: false,
external: true,
},
];

// OffCanvas details based on the source file
Expand Down
12 changes: 12 additions & 0 deletions src/pages/endpoint/reports/devices/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { useSettings } from "/src/hooks/use-settings";
import { EyeIcon } from "@heroicons/react/24/outline";

const Page = () => {
const pageTitle = "Devices";
const tenantFilter = useSettings().currentTenant;

const actions = [
{
Expand Down Expand Up @@ -96,6 +99,15 @@ const Page = () => {
confirmText:
"Are you sure you want to update the Windows Defender signatures for this device?",
},
{
label: "View in InTune",
link: `https://intune.microsoft.com/${tenantFilter}/#view/Microsoft_Intune_Devices/DeviceSettingsMenuBlade/~/overview/mdmDeviceId/[id]`,
color: "info",
icon: <EyeIcon />,
target: "_blank",
multiPost: false,
external: true,
},
];

const offCanvas = {
Expand Down
13 changes: 13 additions & 0 deletions src/pages/identity/administration/devices/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Layout as DashboardLayout } from "/src/layouts/index.js"; // had to add an extra path here because I added an extra folder structure. We should switch to absolute pathing so we dont have to deal with relative.
import { useSettings } from "/src/hooks/use-settings";
import { EyeIcon } from "@heroicons/react/24/outline";

const Page = () => {
const pageTitle = "Devices";
const tenantFilter = useSettings().currentTenant;

const actions = [
{
label: "View in Entra",
link: `https://entra.microsoft.com/${tenantFilter}/#view/Microsoft_AAD_Devices/DeviceDetailsMenuBlade/~/Properties/objectId/[id]/deviceId/`,
color: "info",
icon: <EyeIcon />,
target: "_blank",
multiPost: false,
external: true,
},
{
label: "Enable Device",
type: "POST",
Expand Down
55 changes: 36 additions & 19 deletions src/pages/identity/administration/risky-users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { MagnifyingGlassIcon } from "@heroicons/react/24/outline";
const Page = () => {
const pageTitle = "Risky Users";

// Actions from the source file
const actions = [
{
label: "Dismiss Risk",
Expand All @@ -27,44 +26,62 @@ const Page = () => {
},
];

// OffCanvas details based on the source file
const offCanvas = {
extendedInfoFields: [
"id", // User ID
"userDisplayName", // Display Name
"userPrincipalName", // User Principal
"riskLastUpdatedDateTime", // Risk Last Updated
"riskLevel", // Risk Level
"riskState", // Risk State
"riskDetail", // Risk Detail
"id",
"userDisplayName",
"userPrincipalName",
"riskLastUpdatedDateTime",
"riskLevel",
"riskState",
"riskDetail",
],
actions: actions,
};

const simpleColumns = [
"userDisplayName",
"userPrincipalName",
"riskLevel",
"riskState",
"riskDetail",
"riskLastUpdatedDateTime",
];

const filterList = [
{
filterName: "Users at Risk",
value: [{ id: "riskState", value: "atRisk" }],
type: "column",
},
{
filterName: "Dismissed Users",
value: [{ id: "riskState", value: "dismissed" }],
type: "column",
},
{
filterName: "Remediated Users",
value: [{ id: "riskState", value: "remediated" }],
type: "column",
},
];

return (
<CippTablePage
title={pageTitle}
apiUrl="/api/ListGraphRequest"
apiData={{
Endpoint: "identityProtection/riskyUsers",
manualPagination: true,
$select:
"id,userDisplayName,userPrincipalName,riskLevel,riskState,riskDetail,riskLastUpdatedDateTime",
$count: true,
$orderby: "riskLastUpdatedDateTime desc",
$top: 500,
}}
apiDataKey="Results"
actions={actions}
offCanvas={offCanvas}
simpleColumns={[
"userDisplayName",
"userPrincipalName",
"riskLevel",
"riskState",
"riskDetail",
"riskLastUpdatedDateTime",
]}
simpleColumns={simpleColumns}
filters={filterList}
/>
);
};
Expand Down
35 changes: 23 additions & 12 deletions src/pages/identity/reports/risk-detections/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,28 @@ const Page = () => {
"activity",
];

// Note to Developer: Add necessary filter logic here
// Filters previously defined:
/*
filterlist: [
{ filterName: 'State: atRisk', filter: 'Complex: riskState eq atRisk' },
{ filterName: 'State: confirmedCompromised', filter: 'Complex: riskState eq confirmedCompromised' },
{ filterName: 'State: confirmedSafe', filter: 'Complex: riskState eq confirmedSafe' },
{ filterName: 'State: dismissed', filter: 'Complex: riskState eq dismissed' },
{ filterName: 'State: remediated', filter: 'Complex: riskState eq remediated' },
{ filterName: 'State: unknownFutureValue', filter: 'Complex: riskState eq unknownFutureValue' },
]
*/
const filterList = [
{
filterName: "Users at Risk",
value: [{ id: "riskState", value: "atRisk" }],
type: "column",
},
{
filterName: "Confirmed Compromised",
value: [{ id: "riskState", value: "confirmedCompromised" }],
type: "column",
},
{
filterName: "Confirmed Safe",
value: [{ id: "riskState", value: "confirmedSafe" }],
type: "column",
},
{
filterName: "Remediated",
value: [{ id: "riskState", value: "remediated" }],
type: "column",
},
];

return (
<CippTablePage
Expand All @@ -79,6 +89,7 @@ const Page = () => {
actions={actions}
offCanvas={offCanvas}
simpleColumns={simpleColumns}
filters={filterList}
/>
);
};
Expand Down

0 comments on commit 398774a

Please sign in to comment.