Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#3416 from Ren-Roros-Digital/ViewInI…
Browse files Browse the repository at this point in the history
…ntune

feat: added filters and links to different pages
  • Loading branch information
KelvinTegelaar authored Jan 22, 2025
2 parents eba490b + 4ed7e24 commit e72a45d
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 40 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
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 e72a45d

Please sign in to comment.