From 4b12ee52753405687e448b64d11bc66cfe55da23 Mon Sep 17 00:00:00 2001 From: Esco Date: Fri, 19 Jul 2024 13:26:53 +0200 Subject: [PATCH 1/8] Added List Malware Filters --- src/_nav.jsx | 5 + src/importsMap.jsx | 1 + src/routes.json | 6 + .../email-exchange/reports/MalwareFilters.jsx | 207 ++++++++++++++++++ 4 files changed, 219 insertions(+) create mode 100644 src/views/email-exchange/reports/MalwareFilters.jsx diff --git a/src/_nav.jsx b/src/_nav.jsx index a3910a2f0018..aefc705355c0 100644 --- a/src/_nav.jsx +++ b/src/_nav.jsx @@ -793,6 +793,11 @@ const _nav = [ name: 'Phishing Policies', to: '/email/reports/phishing-policies', }, + { + component: CNavItem, + name: 'Malware Filters', + to: '/email/reports/malware-filters', + }, { component: CNavItem, name: 'Shared Mailbox with Enabled Account', diff --git a/src/importsMap.jsx b/src/importsMap.jsx index a8435a662dbd..6af8bac51461 100644 --- a/src/importsMap.jsx +++ b/src/importsMap.jsx @@ -134,6 +134,7 @@ import React from 'react' "/email/reports/message-trace": React.lazy(() => import('./views/email-exchange/reports/MessageTrace')), "/cipp/user-settings": React.lazy(() => import('./views/cipp/UserSettings')), "/email/reports/phishing-policies": React.lazy(() => import('./views/email-exchange/reports/PhishingPoliciesList')), + "/email/reports/malware-filters": React.lazy(() => import('./views/email-exchange/reports/MalwareFilters')), "/security/incidents/list-alerts": React.lazy(() => import('./views/security/incidents/ListAlerts')), "/security/incidents/list-incidents": React.lazy(() => import('./views/security/incidents/ListIncidents')), "/security/reports/list-device-compliance": React.lazy(() => import('./views/security/reports/ListDeviceComplianceReport')), diff --git a/src/routes.json b/src/routes.json index 9817ebc8aabd..5ae6152f0bd7 100644 --- a/src/routes.json +++ b/src/routes.json @@ -895,6 +895,12 @@ "component": "views/email-exchange/reports/PhishingPoliciesList", "allowedRoles": ["admin", "editor", "readonly"] }, + { + "path": "/email/reports/malware-filters", + "name": "Malware Filters", + "component": "views/email-exchange/reports/MalwareFilters", + "allowedRoles": ["admin", "editor", "readonly"] + }, { "name": "Security & Compliance", "path": "/security", diff --git a/src/views/email-exchange/reports/MalwareFilters.jsx b/src/views/email-exchange/reports/MalwareFilters.jsx new file mode 100644 index 000000000000..e77053c5be99 --- /dev/null +++ b/src/views/email-exchange/reports/MalwareFilters.jsx @@ -0,0 +1,207 @@ +import { useSelector } from 'react-redux' +import { CippPageList } from 'src/components/layout' +import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' +import { cellTableFormatter } from 'src/components/tables/CellTable' + +const ListMalwareFilters = () => { + const tenant = useSelector((state) => state.app.currentTenant) + + const Offcanvas = (row, rowIndex, formatExtraData) => { + const [ocVisible, setOCVisible] = useState(false) + + return ( + <> + setOCVisible(true)}> + + + , + modal: true, + modalUrl: `/api/EditMalwareFilter?State=Enable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to enable this rule?', + }, + { + label: 'Disable Rule', + color: 'info', + icon: , + modal: true, + modalUrl: `/api/EditMalwareFilter?State=Disable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to disable this rule?', + }, + /*{ + label: 'Delete Rule', + color: 'danger', + modal: true, + icon: , + modalUrl: `/api/RemoveMalwareFilter?TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to delete this rule?', + },*/ + ]} + placement="end" + visible={ocVisible} + id={row.id} + hideFunction={() => setOCVisible(false)} + /> + + ) + } + + const columns = [ + { + name: 'Rule Name', + selector: (row) => row['RuleName'], + sortable: true, + exportSelector: 'RuleName', + }, + { + name: 'Policy Name', + selector: (row) => row['Name'], + sortable: true, + exportSelector: 'Name', + }, + { + name: 'Enabled', + selector: (row) => row['State'], + exportSelector: 'State', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Priority', + selector: (row) => row['Priority'], + sortable: true, + exportSelector: 'Priority', + maxWidth: '40px', + }, + { + name: 'Recipient Domains', + selector: (row) => row['RecipientDomainIs'], + sortable: true, + exportSelector: 'RecipientDomainIs', + cell: cellTableFormatter('RecipientDomainIs'), + }, + { + name: 'File Filter', + selector: (row) => row['EnableFileFilter'], + exportSelector: 'EnableFileFilter', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'File Types', + selector: (row) => row['FileTypes'], + sortable: true, + exportSelector: 'FileTypes', + cell: cellTableFormatter('FileTypes'), + }, + { + name: 'File Type Action', + selector: (row) => row['FileTypeAction'], + sortable: true, + exportSelector: 'FileTypeAction', + maxWidth: '200px', + }, + { + name: 'Zap', + selector: (row) => row['ZapEnabled'], + exportSelector: 'ZapEnabled', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Quarantine Tag', + selector: (row) => row['QuarantineTag'], + sortable: true, + exportSelector: 'QuarantineTag', + maxWidth: '200px', + }, + { + name: 'Internal Admin Notifications', + selector: (row) => row['EnableInternalSenderAdminNotifications'], + exportSelector: 'EnableInternalSenderAdminNotifications', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Internal Sender Admin Address', + selector: (row) => row['InternalSenderAdminAddress'], + sortable: true, + exportSelector: 'InternalSenderAdminAddress', + }, + { + name: 'External Admin Notifications', + selector: (row) => row['EnableExternalSenderAdminNotifications'], + exportSelector: 'EnableExternalSenderAdminNotifications', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'External Sender Admin Address', + selector: (row) => row['ExternalSenderAdminAddress'], + sortable: true, + exportSelector: 'ExternalSenderAdminAddress', + }, + { + name: 'Creation Date', + selector: (row) => row['WhenCreated'], + sortable: true, + exportSelector: 'WhenCreated', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + { + name: 'Last Modified Date', + selector: (row) => row['WhenChanged'], + sortable: true, + exportSelector: 'WhenChanged', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + ] + + return ( + <> + + + ) +} + +export default ListMalwareFilters From 9b4206e32e6ddd6ae69388c2d7fc2bb0c3cdda75 Mon Sep 17 00:00:00 2001 From: Esco Date: Wed, 24 Jul 2024 14:54:16 +0200 Subject: [PATCH 2/8] Added List SafeLinks Filters --- src/_nav.jsx | 5 + src/importsMap.jsx | 1 + src/routes.json | 6 + .../reports/SafeLinksFilters.jsx | 216 ++++++++++++++++++ 4 files changed, 228 insertions(+) create mode 100644 src/views/email-exchange/reports/SafeLinksFilters.jsx diff --git a/src/_nav.jsx b/src/_nav.jsx index aefc705355c0..5b6e8cb0e6c5 100644 --- a/src/_nav.jsx +++ b/src/_nav.jsx @@ -798,6 +798,11 @@ const _nav = [ name: 'Malware Filters', to: '/email/reports/malware-filters', }, + { + component: CNavItem, + name: 'Safe Links Filters', + to: '/email/reports/safelinks-filters', + }, { component: CNavItem, name: 'Shared Mailbox with Enabled Account', diff --git a/src/importsMap.jsx b/src/importsMap.jsx index 6af8bac51461..3990a1551623 100644 --- a/src/importsMap.jsx +++ b/src/importsMap.jsx @@ -135,6 +135,7 @@ import React from 'react' "/cipp/user-settings": React.lazy(() => import('./views/cipp/UserSettings')), "/email/reports/phishing-policies": React.lazy(() => import('./views/email-exchange/reports/PhishingPoliciesList')), "/email/reports/malware-filters": React.lazy(() => import('./views/email-exchange/reports/MalwareFilters')), + "/email/reports/safelinks-filters": React.lazy(() => import('./views/email-exchange/reports/SafeLinksFilters')), "/security/incidents/list-alerts": React.lazy(() => import('./views/security/incidents/ListAlerts')), "/security/incidents/list-incidents": React.lazy(() => import('./views/security/incidents/ListIncidents')), "/security/reports/list-device-compliance": React.lazy(() => import('./views/security/reports/ListDeviceComplianceReport')), diff --git a/src/routes.json b/src/routes.json index 5ae6152f0bd7..16cfe3e8268c 100644 --- a/src/routes.json +++ b/src/routes.json @@ -901,6 +901,12 @@ "component": "views/email-exchange/reports/MalwareFilters", "allowedRoles": ["admin", "editor", "readonly"] }, + { + "path": "/email/reports/safelinks-filters", + "name": "Safe Links Filters", + "component": "views/email-exchange/reports/SafeLinksFilters", + "allowedRoles": ["admin", "editor", "readonly"] + }, { "name": "Security & Compliance", "path": "/security", diff --git a/src/views/email-exchange/reports/SafeLinksFilters.jsx b/src/views/email-exchange/reports/SafeLinksFilters.jsx new file mode 100644 index 000000000000..122526e52352 --- /dev/null +++ b/src/views/email-exchange/reports/SafeLinksFilters.jsx @@ -0,0 +1,216 @@ +import { useSelector } from 'react-redux' +import { CippPageList } from 'src/components/layout' +import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' +import { cellTableFormatter } from 'src/components/tables/CellTable' + +const ListSafeLinksFilters = () => { + const tenant = useSelector((state) => state.app.currentTenant) + + const Offcanvas = (row, rowIndex, formatExtraData) => { + const [ocVisible, setOCVisible] = useState(false) + + return ( + <> + setOCVisible(true)}> + + + , + modal: true, + modalUrl: `/api/EditSafeLinksFilter?State=Enable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to enable this rule?', + }, + { + label: 'Disable Rule', + color: 'info', + icon: , + modal: true, + modalUrl: `/api/EditSafeLinksFilter?State=Disable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to disable this rule?', + }, + /*{ + label: 'Delete Rule', + color: 'danger', + modal: true, + icon: , + modalUrl: `/api/RemoveSafeLinksFilter?TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to delete this rule?', + },*/ + ]} + placement="end" + visible={ocVisible} + id={row.id} + hideFunction={() => setOCVisible(false)} + /> + + ) + } + + const columns = [ + { + name: 'Rule Name', + selector: (row) => row['RuleName'], + sortable: true, + exportSelector: 'RuleName', + }, + { + name: 'Policy Name', + selector: (row) => row['Name'], + sortable: true, + exportSelector: 'Name', + }, + { + name: 'Enabled', + selector: (row) => row['State'], + exportSelector: 'State', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Priority', + selector: (row) => row['Priority'], + sortable: true, + exportSelector: 'Priority', + maxWidth: '40px', + }, + { + name: 'Recipient Domains', + selector: (row) => row['RecipientDomainIs'], + sortable: true, + exportSelector: 'RecipientDomainIs', + cell: cellTableFormatter('RecipientDomainIs'), + }, + { + name: 'SafeLinks For Email', + selector: (row) => row['EnableSafeLinksForEmail'], + exportSelector: 'EnableSafeLinksForEmail', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'SafeLinks For Teams', + selector: (row) => row['EnableSafeLinksForTeams'], + exportSelector: 'EnableSafeLinksForTeams', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'SafeLinks For Office', + selector: (row) => row['EnableSafeLinksForOffice'], + exportSelector: 'EnableSafeLinksForOffice', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Track Clicks', + selector: (row) => row['TrackClicks'], + exportSelector: 'TrackClicks', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Scan Urls', + selector: (row) => row['ScanUrls'], + exportSelector: 'ScanUrls', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Enable For Internal Senders', + selector: (row) => row['EnableForInternalSenders'], + exportSelector: 'EnableForInternalSenders', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Deliver Message After Scan', + selector: (row) => row['DeliverMessageAfterScan'], + exportSelector: 'DeliverMessageAfterScan', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Allow Click Through', + selector: (row) => row['AllowClickThrough'], + exportSelector: 'AllowClickThrough', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Disable Url Rewrite', + selector: (row) => row['DisableUrlRewrite'], + exportSelector: 'DisableUrlRewrite', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Organization Branding', + selector: (row) => row['EnableOrganizationBranding'], + exportSelector: 'EnableOrganizationBranding', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Creation Date', + selector: (row) => row['WhenCreated'], + sortable: true, + exportSelector: 'WhenCreated', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + { + name: 'Last Modified Date', + selector: (row) => row['WhenChanged'], + sortable: true, + exportSelector: 'WhenChanged', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + ] + + return ( + <> + + + ) +} + +export default ListSafeLinksFilters From 516cc8cb9ce2ad5de103900d4d1269d8ca4f3f2d Mon Sep 17 00:00:00 2001 From: Esco Date: Thu, 25 Jul 2024 09:25:29 +0200 Subject: [PATCH 3/8] Added List SafeAttachment Filters --- src/_nav.jsx | 5 + src/importsMap.jsx | 1 + src/routes.json | 6 + .../reports/SafeAttachmentsFilters.jsx | 171 ++++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 src/views/email-exchange/reports/SafeAttachmentsFilters.jsx diff --git a/src/_nav.jsx b/src/_nav.jsx index 5b6e8cb0e6c5..08a5f65d3e7f 100644 --- a/src/_nav.jsx +++ b/src/_nav.jsx @@ -803,6 +803,11 @@ const _nav = [ name: 'Safe Links Filters', to: '/email/reports/safelinks-filters', }, + { + component: CNavItem, + name: 'Safe Attachments Filters', + to: '/email/reports/safeattachments-filters', + }, { component: CNavItem, name: 'Shared Mailbox with Enabled Account', diff --git a/src/importsMap.jsx b/src/importsMap.jsx index 3990a1551623..af1f13be9479 100644 --- a/src/importsMap.jsx +++ b/src/importsMap.jsx @@ -136,6 +136,7 @@ import React from 'react' "/email/reports/phishing-policies": React.lazy(() => import('./views/email-exchange/reports/PhishingPoliciesList')), "/email/reports/malware-filters": React.lazy(() => import('./views/email-exchange/reports/MalwareFilters')), "/email/reports/safelinks-filters": React.lazy(() => import('./views/email-exchange/reports/SafeLinksFilters')), + "/email/reports/safeattachments-filters": React.lazy(() => import('./views/email-exchange/reports/SafeAttachmentsFilters')), "/security/incidents/list-alerts": React.lazy(() => import('./views/security/incidents/ListAlerts')), "/security/incidents/list-incidents": React.lazy(() => import('./views/security/incidents/ListIncidents')), "/security/reports/list-device-compliance": React.lazy(() => import('./views/security/reports/ListDeviceComplianceReport')), diff --git a/src/routes.json b/src/routes.json index 16cfe3e8268c..c814a8bff979 100644 --- a/src/routes.json +++ b/src/routes.json @@ -907,6 +907,12 @@ "component": "views/email-exchange/reports/SafeLinksFilters", "allowedRoles": ["admin", "editor", "readonly"] }, + { + "path": "/email/reports/safeattachments-filters", + "name": "Safe Attachment Filters", + "component": "views/email-exchange/reports/SafeAttachmentsFilters", + "allowedRoles": ["admin", "editor", "readonly"] + }, { "name": "Security & Compliance", "path": "/security", diff --git a/src/views/email-exchange/reports/SafeAttachmentsFilters.jsx b/src/views/email-exchange/reports/SafeAttachmentsFilters.jsx new file mode 100644 index 000000000000..43248aefdf32 --- /dev/null +++ b/src/views/email-exchange/reports/SafeAttachmentsFilters.jsx @@ -0,0 +1,171 @@ +import { useSelector } from 'react-redux' +import { CippPageList } from 'src/components/layout' +import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' +import { cellTableFormatter } from 'src/components/tables/CellTable' + +const ListSafeAttachmentsFilters = () => { + const tenant = useSelector((state) => state.app.currentTenant) + + const Offcanvas = (row, rowIndex, formatExtraData) => { + const [ocVisible, setOCVisible] = useState(false) + + return ( + <> + setOCVisible(true)}> + + + , + modal: true, + modalUrl: `/api/EditSafeAttachmentsFilter?State=Enable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to enable this rule?', + }, + { + label: 'Disable Rule', + color: 'info', + icon: , + modal: true, + modalUrl: `/api/EditSafeAttachmentsFilter?State=Disable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to disable this rule?', + }, + /*{ + label: 'Delete Rule', + color: 'danger', + modal: true, + icon: , + modalUrl: `/api/RemoveSafeAttachmentsFilter?TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to delete this rule?', + },*/ + ]} + placement="end" + visible={ocVisible} + id={row.id} + hideFunction={() => setOCVisible(false)} + /> + + ) + } + + const columns = [ + { + name: 'Rule Name', + selector: (row) => row['RuleName'], + sortable: true, + exportSelector: 'RuleName', + }, + { + name: 'Policy Name', + selector: (row) => row['Name'], + sortable: true, + exportSelector: 'Name', + }, + { + name: 'Enabled', + selector: (row) => row['State'], + exportSelector: 'State', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Priority', + selector: (row) => row['Priority'], + sortable: true, + exportSelector: 'Priority', + maxWidth: '40px', + }, + { + name: 'Recipient Domains', + selector: (row) => row['RecipientDomainIs'], + sortable: true, + exportSelector: 'RecipientDomainIs', + cell: cellTableFormatter('RecipientDomainIs'), + }, + { + name: 'Action', + selector: (row) => row['Action'], + sortable: true, + exportSelector: 'Action', + }, + { + name: 'QuarantineTag', + selector: (row) => row['QuarantineTag'], + sortable: true, + exportSelector: 'QuarantineTag', + }, + { + name: 'Redirect', + selector: (row) => row['Redirect'], + exportSelector: 'Redirect', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Redirect Address', + selector: (row) => row['RedirectAddress'], + sortable: true, + exportSelector: 'RedirectAddress', + }, + { + name: 'Creation Date', + selector: (row) => row['WhenCreated'], + sortable: true, + exportSelector: 'WhenCreated', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + { + name: 'Last Modified Date', + selector: (row) => row['WhenChanged'], + sortable: true, + exportSelector: 'WhenChanged', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + ] + + return ( + <> + + + ) +} + +export default ListSafeAttachmentsFilters From 5d0916931bbddcb80f23fcd34f140e285600725f Mon Sep 17 00:00:00 2001 From: Esco Date: Thu, 25 Jul 2024 10:08:57 +0200 Subject: [PATCH 4/8] Updated List AntiPhishing Filters --- src/_nav.jsx | 4 +- src/importsMap.jsx | 2 +- src/routes.json | 6 +- .../reports/AntiPhishingFilters.jsx | 283 ++++++++++++++++++ .../reports/PhishingPoliciesList.jsx | 73 ----- 5 files changed, 289 insertions(+), 79 deletions(-) create mode 100644 src/views/email-exchange/reports/AntiPhishingFilters.jsx delete mode 100644 src/views/email-exchange/reports/PhishingPoliciesList.jsx diff --git a/src/_nav.jsx b/src/_nav.jsx index 08a5f65d3e7f..c0faa91279c0 100644 --- a/src/_nav.jsx +++ b/src/_nav.jsx @@ -790,8 +790,8 @@ const _nav = [ }, { component: CNavItem, - name: 'Phishing Policies', - to: '/email/reports/phishing-policies', + name: 'Anti-Phishing Filters', + to: '/email/reports/antiphishing-filters', }, { component: CNavItem, diff --git a/src/importsMap.jsx b/src/importsMap.jsx index af1f13be9479..eaa260ad4dbd 100644 --- a/src/importsMap.jsx +++ b/src/importsMap.jsx @@ -133,7 +133,7 @@ import React from 'react' "/email/reports/mailbox-cas-settings": React.lazy(() => import('./views/email-exchange/reports/MailboxClientAccessSettingsList')), "/email/reports/message-trace": React.lazy(() => import('./views/email-exchange/reports/MessageTrace')), "/cipp/user-settings": React.lazy(() => import('./views/cipp/UserSettings')), - "/email/reports/phishing-policies": React.lazy(() => import('./views/email-exchange/reports/PhishingPoliciesList')), + "/email/reports/antiphishing-filters": React.lazy(() => import('./views/email-exchange/reports/AntiPhishingFilters')), "/email/reports/malware-filters": React.lazy(() => import('./views/email-exchange/reports/MalwareFilters')), "/email/reports/safelinks-filters": React.lazy(() => import('./views/email-exchange/reports/SafeLinksFilters')), "/email/reports/safeattachments-filters": React.lazy(() => import('./views/email-exchange/reports/SafeAttachmentsFilters')), diff --git a/src/routes.json b/src/routes.json index c814a8bff979..f5b6053359a7 100644 --- a/src/routes.json +++ b/src/routes.json @@ -890,9 +890,9 @@ "allowedRoles": ["admin", "editor", "readonly"] }, { - "name": "Phishing Policies", - "path": "/email/reports/phishing-policies", - "component": "views/email-exchange/reports/PhishingPoliciesList", + "path": "/email/reports/antiphishing-filters", + "name": "Anti Phishing Filters", + "component": "views/email-exchange/reports/AntiPhishingFilters", "allowedRoles": ["admin", "editor", "readonly"] }, { diff --git a/src/views/email-exchange/reports/AntiPhishingFilters.jsx b/src/views/email-exchange/reports/AntiPhishingFilters.jsx new file mode 100644 index 000000000000..b9be79b8d074 --- /dev/null +++ b/src/views/email-exchange/reports/AntiPhishingFilters.jsx @@ -0,0 +1,283 @@ +import { useSelector } from 'react-redux' +import { CippPageList } from 'src/components/layout' +import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' +import { cellTableFormatter } from 'src/components/tables/CellTable' + +const ListAntiPhishingFilters = () => { + const tenant = useSelector((state) => state.app.currentTenant) + + const Offcanvas = (row, rowIndex, formatExtraData) => { + const [ocVisible, setOCVisible] = useState(false) + + return ( + <> + setOCVisible(true)}> + + + , + modal: true, + modalUrl: `/api/EditAntiPhishingFilter?State=Enable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to enable this rule?', + }, + { + label: 'Disable Rule', + color: 'info', + icon: , + modal: true, + modalUrl: `/api/EditAntiPhishingFilter?State=Disable&TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to disable this rule?', + }, + /*{ + label: 'Delete Rule', + color: 'danger', + modal: true, + icon: , + modalUrl: `/api/RemoveAntiPhishingFilter?TenantFilter=${tenant.defaultDomainName}&RuleName=${row.RuleName}`, + modalMessage: 'Are you sure you want to delete this rule?', + },*/ + ]} + placement="end" + visible={ocVisible} + id={row.id} + hideFunction={() => setOCVisible(false)} + /> + + ) + } + + const columns = [ + { + name: 'Rule Name', + selector: (row) => row['RuleName'], + sortable: true, + exportSelector: 'RuleName', + }, + { + name: 'Policy Name', + selector: (row) => row['Name'], + sortable: true, + exportSelector: 'Name', + }, + { + name: 'Enabled', + selector: (row) => row['State'], + exportSelector: 'State', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Priority', + selector: (row) => row['Priority'], + sortable: true, + exportSelector: 'Priority', + maxWidth: '40px', + }, + { + name: 'Recipient Domains', + selector: (row) => row['RecipientDomainIs'], + sortable: true, + exportSelector: 'RecipientDomainIs', + cell: cellTableFormatter('RecipientDomainIs'), + }, + { + name: 'Excluded Domains', + selector: (row) => row['ExcludedDomains'], + sortable: true, + exportSelector: 'ExcludedDomains', + cell: cellTableFormatter('ExcludedDomains'), + }, + { + name: 'Excluded Senders', + selector: (row) => row['ExcludedSenders'], + sortable: true, + exportSelector: 'ExcludedSenders', + cell: cellTableFormatter('ExcludedSenders'), + }, + { + name: 'PhishThresholdLevel', + selector: (row) => row['PhishThresholdLevel'], + sortable: true, + exportSelector: 'PhishThresholdLevel', + }, + { + name: 'Mailbox Intelligence', + selector: (row) => row['EnableMailboxIntelligence'], + exportSelector: 'EnableMailboxIntelligence', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Mailbox Intelligence Protection', + selector: (row) => row['EnableMailboxIntelligenceProtection'], + exportSelector: 'EnableMailboxIntelligenceProtection', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Spoof Intelligence', + selector: (row) => row['EnableSpoofIntelligence'], + exportSelector: 'EnableSpoofIntelligence', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'First Contact Safety Tips', + selector: (row) => row['EnableFirstContactSafetyTips'], + exportSelector: 'EnableFirstContactSafetyTips', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Similar Users Safety Tips', + selector: (row) => row['EnableSimilarUsersSafetyTips'], + exportSelector: 'EnableSimilarUsersSafetyTips', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Similar Domain Safety Tips', + selector: (row) => row['EnableSimilarDomainsSafetyTips'], + exportSelector: 'EnableSimilarDomainsSafetyTips', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Unusual Characters Safety Tips', + selector: (row) => row['EnableUnusualCharactersSafetyTips'], + exportSelector: 'EnableUnusualCharactersSafetyTips', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Unauthenticated Sender', + selector: (row) => row['EnableUnauthenticatedSender'], + exportSelector: 'EnableUnauthenticatedSender', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'ViaTag', + selector: (row) => row['EnableViaTag'], + exportSelector: 'EnableViaTag', + cell: cellBooleanFormatter(), + maxWidth: '40px', + }, + { + name: 'Organization Domains Protection', + selector: (row) => row['EnableOrganizationDomainsProtection'], + exportSelector: 'EnableOrganizationDomainsProtection', + cell: cellBooleanFormatter(), + }, + { + name: 'Authentication Fail Action', + selector: (row) => row['AuthenticationFailAction'], + exportSelector: 'AuthenticationFailAction', + maxWidt: '100px', + }, + { + name: 'Spoof Quarantine Tag', + selector: (row) => row['SpoofQuarantineTag'], + exportSelector: 'SpoofQuarantineTag', + maxWidth: '100px', + }, + { + name: 'MailboxIntelligence Protection Action', + selector: (row) => row['MailboxIntelligenceProtectionAction'], + exportSelector: 'MailboxIntelligenceProtectionAction', + maxWidth: '100px', + }, + { + name: 'Mailbox Intelligence Quarantine Tag', + selector: (row) => row['MailboxIntelligenceQuarantineTag'], + exportSelector: 'MailboxIntelligenceQuarantineTag', + maxWidth: '100px', + }, + { + name: 'Targeted UserProtection Action', + selector: (row) => row['TargetedUserProtectionAction'], + exportSelector: 'TargetedUserProtectionAction', + maxWidth: '100px', + }, + { + name: 'Targeted UserQuarantine Tag', + selector: (row) => row['TargetedUserQuarantineTag'], + exportSelector: 'TargetedUserQuarantineTag', + maxWidth: '100px', + }, + { + name: 'Targeted Domain Protection Action', + selector: (row) => row['TargetedDomainProtectionAction'], + exportSelector: 'TargetedDomainProtectionAction', + maxWidth: '100px', + }, + { + name: 'Targeted Domain Quarantine Tag', + selector: (row) => row['TargetedDomainQuarantineTag'], + exportSelector: 'TargetedDomainQuarantineTag', + maxWidth: '100px', + }, + { + name: 'Creation Date', + selector: (row) => row['WhenCreated'], + sortable: true, + exportSelector: 'WhenCreated', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + { + name: 'Last Modified Date', + selector: (row) => row['WhenChanged'], + sortable: true, + exportSelector: 'WhenChanged', + cell: cellDateFormatter(), + maxWidth: '150px', + }, + ] + + return ( + <> + + + ) +} + +export default ListAntiPhishingFilters diff --git a/src/views/email-exchange/reports/PhishingPoliciesList.jsx b/src/views/email-exchange/reports/PhishingPoliciesList.jsx deleted file mode 100644 index b4cd5ba23a01..000000000000 --- a/src/views/email-exchange/reports/PhishingPoliciesList.jsx +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react' -import { useSelector } from 'react-redux' -import { CippPageList } from 'src/components/layout/CippPage' -import { cellBooleanFormatter, cellDateFormatter } from 'src/components/tables' - -//TODO: Add CellBoolean -const columns = [ - { - selector: (row) => row['Name'], - name: 'Name', - sortable: true, - exportSelector: 'Name', - }, - { - selector: (row) => row['PhishThresholdLevel'], - name: 'Phish Threshold Level', - sortable: true, - exportSelector: 'PhishThresholdLevel', - }, - { - selector: (row) => row['Enabled'], - name: 'Enabled', - sortable: true, - cell: cellBooleanFormatter({ warning: true, colourless: true }), - exportSelector: 'Enabled', - }, - { - selector: (row) => row['ExcludedSenders'], - name: 'Excluded Senders', - sortable: true, - cell: cellBooleanFormatter({ warning: true, colourless: true, noDataIsFalse: true }), - exportSelector: 'ExcludedSenders', - }, - { - selector: (row) => row['ExcludedDomains'], - name: 'Excluded Domains', - sortable: true, - cell: cellBooleanFormatter(), - exportSelector: 'ExcludedDomains', - }, - { - selector: (row) => row['WhenChangedUTC'], - name: 'Last Change Date (Local)', - sortable: true, - cell: cellDateFormatter(), - exportSelector: 'WhenChangedUTC', - }, - { - selector: (row) => row['Priority'], - name: 'Priority', - sortable: true, - exportSelector: 'Priority', - }, -] - -const MailboxList = () => { - const tenant = useSelector((state) => state.app.currentTenant) - - return ( - - ) -} - -export default MailboxList From d4e642c315c39959391367dffc7a71404a627386 Mon Sep 17 00:00:00 2001 From: Esco Date: Thu, 25 Jul 2024 11:17:38 +0200 Subject: [PATCH 5/8] Added Edit Safe AttachmentsFilter --- .../email-exchange/reports/SafeAttachmentsFilters.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/email-exchange/reports/SafeAttachmentsFilters.jsx b/src/views/email-exchange/reports/SafeAttachmentsFilters.jsx index 43248aefdf32..a9257edfd7e4 100644 --- a/src/views/email-exchange/reports/SafeAttachmentsFilters.jsx +++ b/src/views/email-exchange/reports/SafeAttachmentsFilters.jsx @@ -1,3 +1,8 @@ +import { CButton } from '@coreui/react' +import { faBan, faBook, faCheck, faEllipsisV, faTrash } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import React, { useState } from 'react' +import { CippActionsOffcanvas } from 'src/components/utilities' import { useSelector } from 'react-redux' import { CippPageList } from 'src/components/layout' import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' @@ -148,6 +153,11 @@ const ListSafeAttachmentsFilters = () => { cell: cellDateFormatter(), maxWidth: '150px', }, + { + name: 'Actions', + cell: Offcanvas, + maxWidth: '80px', + }, ] return ( From 6f70b2cf8f0617f17cccbed612d86f71ceabe5c1 Mon Sep 17 00:00:00 2001 From: Esco Date: Thu, 25 Jul 2024 12:30:32 +0200 Subject: [PATCH 6/8] Added Edit Anti-Phishing Filter --- .../email-exchange/reports/AntiPhishingFilters.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/email-exchange/reports/AntiPhishingFilters.jsx b/src/views/email-exchange/reports/AntiPhishingFilters.jsx index b9be79b8d074..ed68929c2005 100644 --- a/src/views/email-exchange/reports/AntiPhishingFilters.jsx +++ b/src/views/email-exchange/reports/AntiPhishingFilters.jsx @@ -1,3 +1,8 @@ +import { CButton } from '@coreui/react' +import { faBan, faBook, faCheck, faEllipsisV, faTrash } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import React, { useState } from 'react' +import { CippActionsOffcanvas } from 'src/components/utilities' import { useSelector } from 'react-redux' import { CippPageList } from 'src/components/layout' import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' @@ -260,6 +265,11 @@ const ListAntiPhishingFilters = () => { cell: cellDateFormatter(), maxWidth: '150px', }, + { + name: 'Actions', + cell: Offcanvas, + maxWidth: '80px', + }, ] return ( From b4aa3dddc4b8c8a5cc94622e4d77540c0c13bb5c Mon Sep 17 00:00:00 2001 From: Esco Date: Thu, 25 Jul 2024 12:30:44 +0200 Subject: [PATCH 7/8] Added Edit Malware Filter Update SafeLinksFilters.jsx --- src/views/email-exchange/reports/MalwareFilters.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/email-exchange/reports/MalwareFilters.jsx b/src/views/email-exchange/reports/MalwareFilters.jsx index e77053c5be99..ebd9d5ad354c 100644 --- a/src/views/email-exchange/reports/MalwareFilters.jsx +++ b/src/views/email-exchange/reports/MalwareFilters.jsx @@ -1,3 +1,8 @@ +import { CButton } from '@coreui/react' +import { faBan, faBook, faCheck, faEllipsisV, faTrash } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import React, { useState } from 'react' +import { CippActionsOffcanvas } from 'src/components/utilities' import { useSelector } from 'react-redux' import { CippPageList } from 'src/components/layout' import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' @@ -184,6 +189,11 @@ const ListMalwareFilters = () => { cell: cellDateFormatter(), maxWidth: '150px', }, + { + name: 'Actions', + cell: Offcanvas, + maxWidth: '80px', + }, ] return ( From 9213b34c7fd92c865af801973c092527ecd1f57d Mon Sep 17 00:00:00 2001 From: Esco Date: Thu, 25 Jul 2024 12:30:54 +0200 Subject: [PATCH 8/8] Added Edit SafeLinks Filter --- src/views/email-exchange/reports/SafeLinksFilters.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/email-exchange/reports/SafeLinksFilters.jsx b/src/views/email-exchange/reports/SafeLinksFilters.jsx index 122526e52352..68c9d07305ff 100644 --- a/src/views/email-exchange/reports/SafeLinksFilters.jsx +++ b/src/views/email-exchange/reports/SafeLinksFilters.jsx @@ -1,3 +1,8 @@ +import { CButton } from '@coreui/react' +import { faBan, faBook, faCheck, faEllipsisV, faTrash } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import React, { useState } from 'react' +import { CippActionsOffcanvas } from 'src/components/utilities' import { useSelector } from 'react-redux' import { CippPageList } from 'src/components/layout' import { cellDateFormatter, cellBooleanFormatter, CellTip } from 'src/components/tables' @@ -193,6 +198,11 @@ const ListSafeLinksFilters = () => { cell: cellDateFormatter(), maxWidth: '150px', }, + { + name: 'Actions', + cell: Offcanvas, + maxWidth: '80px', + }, ] return (