diff --git a/src/views/identity/administration/RiskyUsers.jsx b/src/views/identity/administration/RiskyUsers.jsx
index 03f58eaf241f..727ee8dd896d 100644
--- a/src/views/identity/administration/RiskyUsers.jsx
+++ b/src/views/identity/administration/RiskyUsers.jsx
@@ -1,54 +1,151 @@
+import React, { useState } from 'react'
import { useSelector } from 'react-redux'
import { CippPageList } from 'src/components/layout'
-
-const columns = [
- {
- name: 'Risk Last Updated Date',
- selector: (row) => row['riskLastUpdatedDateTime'],
- sortable: true,
- exportSelector: 'riskLastUpdatedDateTime',
- },
- {
- name: 'User Principal Name',
- selector: (row) => row['userPrincipalName'],
- sortable: true,
- exportSelector: 'userPrincipalName',
- },
- {
- name: 'Risk Level',
- selector: (row) => row['riskLevel'],
- sortable: true,
- exportSelector: 'riskLevel',
- },
- {
- name: 'Risk State',
- selector: (row) => row['riskState'],
- sortable: true,
- exportSelector: 'riskState',
- },
- {
- name: 'Risk Detail',
- selector: (row) => row['riskDetail'],
- sortable: true,
- exportSelector: 'riskDetail',
- },
- {
- name: 'isProcessing',
- selector: (row) => row['isProcessing'],
- sortable: true,
- exportSelector: 'isProcessing',
- },
- {
- name: 'isDeleted',
- selector: (row) => row['isDeleted'],
- sortable: true,
- exportSelector: 'isDeleted',
- },
-]
+import { CButton } from '@coreui/react'
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { faEllipsisV, faMinusCircle, faPaperPlane, faEye } from '@fortawesome/free-solid-svg-icons'
+import { CippActionsOffcanvas } from 'src/components/utilities'
+import { Link, useSearchParams } from 'react-router-dom'
const RiskyUsers = () => {
const tenant = useSelector((state) => state.app.currentTenant)
+ const Offcanvas = (row, rowIndex, formatExtraData) => {
+ const [ocVisible, setOCVisible] = useState(false)
+ const viewLink = `/identity/administration/ViewBec?userId=${row.id}&tenantDomain=${tenant.defaultDomainName}&ID=${row.userPrincipalName}`
+ return (
+ <>
+
+
+
+
+
+ setOCVisible(true)}>
+
+
+ ,
+ },
+ /* TODO Add action for Compromised
+ {
+ label: 'Confirm Compromised',
+ color: 'info',
+ modal: true,
+ modalUrl: `/api/ExecBECRemediate?TenantFilter=${tenant.defaultDomainName}&userid=${row.id}`,
+ modalMessage: 'Are you sure you want to confirm this user as compromised?',
+ icon: ,
+ },*/
+ ]}
+ placement="end"
+ visible={ocVisible}
+ id={row.id}
+ hideFunction={() => setOCVisible(false)}
+ />
+ >
+ )
+ }
+
+ const columns = [
+ {
+ name: 'Risk Last Updated Date',
+ selector: (row) => row['riskLastUpdatedDateTime'],
+ sortable: true,
+ exportSelector: 'riskLastUpdatedDateTime',
+ },
+ {
+ name: 'User Principal Name',
+ selector: (row) => row['userPrincipalName'],
+ sortable: true,
+ exportSelector: 'userPrincipalName',
+ },
+ {
+ name: 'Risk Level',
+ selector: (row) => row['riskLevel'],
+ sortable: true,
+ exportSelector: 'riskLevel',
+ },
+ {
+ name: 'Risk State',
+ selector: (row) => row['riskState'],
+ sortable: true,
+ exportSelector: 'riskState',
+ },
+ {
+ name: 'Risk Detail',
+ selector: (row) => row['riskDetail'],
+ sortable: true,
+ exportSelector: 'riskDetail',
+ },
+ {
+ name: 'isProcessing',
+ selector: (row) => row['isProcessing'],
+ sortable: true,
+ exportSelector: 'isProcessing',
+ },
+ {
+ name: 'isDeleted',
+ selector: (row) => row['isDeleted'],
+ sortable: true,
+ exportSelector: 'isDeleted',
+ },
+ {
+ name: 'Actions',
+ cell: Offcanvas,
+ maxWidth: '100px',
+ },
+ ]
+
return (
<>
{
$count: true,
$orderby: 'riskLastUpdatedDateTime desc',
},
+ tableProps: {
+ selectableRows: true,
+ actionsList: [
+ {
+ label: 'Dismiss Risk',
+ color: 'info',
+ model: true,
+ modalUrl: `/api/ExecDismissRiskyUser?TenantFilter=${tenant.defaultDomainName}&userid=!id&userDisplayName=!userDisplayName`,
+ },
+ /* TODO Add action for Compromised
+ {
+ label: 'Confirm Compromised',
+ color: 'danger',
+ model: true,
+ modalUrl: `/api/ExecBECRemediate?TenantFilter=${tenant.defaultDomainName}&userid=!id`,
+ },*/
+ ],
+ },
}}
/>
>
diff --git a/src/views/identity/reports/RiskDetections.jsx b/src/views/identity/reports/RiskDetections.jsx
index 02b84a9b1086..b139fa058161 100644
--- a/src/views/identity/reports/RiskDetections.jsx
+++ b/src/views/identity/reports/RiskDetections.jsx
@@ -1,80 +1,183 @@
+import React, { useState } from 'react'
import { useSelector } from 'react-redux'
import { CippPageList } from 'src/components/layout'
import { CellTip } from 'src/components/tables'
-
-const columns = [
- {
- name: 'Detected Date',
- selector: (row) => row['detectedDateTime'],
- sortable: true,
- exportSelector: 'detectedDateTime',
- },
- {
- name: 'User Principal Name',
- selector: (row) => row['userPrincipalName'],
- sortable: true,
- exportSelector: 'userPrincipalName',
- },
- {
- name: 'Location',
- selector: (row) => `${row.location?.city} - ${row.location?.countryOrRegion}`,
- sortable: true,
- exportSelector: 'Location',
- cell: (row) => CellTip(`${row.location?.city} - ${row.location?.countryOrRegion}`),
- },
- {
- name: 'IP Address',
- selector: (row) => row['ipAddress'],
- sortable: true,
- exportSelector: 'ipAddress',
- },
- {
- name: 'Risk State',
- selector: (row) => row['riskState'],
- sortable: true,
- exportSelector: 'riskState',
- },
- {
- name: 'Risk Detail',
- selector: (row) => row['riskDetail'],
- sortable: true,
- exportSelector: 'riskDetail',
- },
- {
- name: 'Risk Level',
- selector: (row) => row['riskLevel'],
- sortable: true,
- exportSelector: 'riskLevel',
- },
- {
- name: 'Risk Type',
- selector: (row) => row['riskType'],
- sortable: true,
- exportSelector: 'riskType',
- },
- {
- name: 'Risk Event Type',
- selector: (row) => row['riskEventType'],
- sortable: true,
- exportSelector: 'riskEventType',
- },
- {
- name: 'Detection Type',
- selector: (row) => row['detectionTimingType'],
- sortable: true,
- exportSelector: 'detectionTimingType',
- },
- {
- name: 'Activity',
- selector: (row) => row['activity'],
- sortable: true,
- exportSelector: 'activity',
- },
-]
+import { CButton } from '@coreui/react'
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { faEllipsisV, faMinusCircle, faPaperPlane, faEye } from '@fortawesome/free-solid-svg-icons'
+import { CippActionsOffcanvas } from 'src/components/utilities'
+import { Link, useSearchParams } from 'react-router-dom'
const RiskDetections = () => {
const tenant = useSelector((state) => state.app.currentTenant)
+ const Offcanvas = (row, rowIndex, formatExtraData) => {
+ const [ocVisible, setOCVisible] = useState(false)
+ const viewLink = `/identity/administration/ViewBec?userId=${row.userId}&tenantDomain=${tenant.defaultDomainName}&ID=${row.userPrincipalName}`
+ return (
+ <>
+
+
+
+
+
+ setOCVisible(true)}>
+
+
+ setOCVisible(false)}
+ />
+ >
+ )
+ }
+
+ const columns = [
+ {
+ name: 'Detected Date',
+ selector: (row) => row['detectedDateTime'],
+ sortable: true,
+ exportSelector: 'detectedDateTime',
+ minWidth: '150px',
+ },
+ {
+ name: 'User Principal Name',
+ selector: (row) => row['userPrincipalName'],
+ sortable: true,
+ exportSelector: 'userPrincipalName',
+ minWidth: '200px',
+ },
+ {
+ name: 'Location',
+ selector: (row) => `${row.location?.city} - ${row.location?.countryOrRegion}`,
+ sortable: true,
+ exportSelector: 'Location',
+ cell: (row) => CellTip(`${row.location?.city} - ${row.location?.countryOrRegion}`),
+ minWidth: '40px',
+ },
+ {
+ name: 'IP Address',
+ selector: (row) => row['ipAddress'],
+ sortable: true,
+ exportSelector: 'ipAddress',
+ minWidth: '40px',
+ },
+ {
+ name: 'Risk State',
+ selector: (row) => row['riskState'],
+ sortable: true,
+ exportSelector: 'riskState',
+ minWidth: '40px',
+ },
+ {
+ name: 'Risk Detail',
+ selector: (row) => row['riskDetail'],
+ sortable: true,
+ exportSelector: 'riskDetail',
+ minWidth: '200px',
+ },
+ {
+ name: 'Risk Level',
+ selector: (row) => row['riskLevel'],
+ sortable: true,
+ exportSelector: 'riskLevel',
+ minWidth: '30px',
+ },
+ {
+ name: 'Risk Type',
+ selector: (row) => row['riskType'],
+ sortable: true,
+ exportSelector: 'riskType',
+ minWidth: '150px',
+ },
+ {
+ name: 'Risk Event Type',
+ selector: (row) => row['riskEventType'],
+ sortable: true,
+ exportSelector: 'riskEventType',
+ minWidth: '150px',
+ },
+ {
+ name: 'Detection Type',
+ selector: (row) => row['detectionTimingType'],
+ sortable: true,
+ exportSelector: 'detectionTimingType',
+ minWidth: '50px',
+ },
+ {
+ name: 'Activity',
+ selector: (row) => row['activity'],
+ sortable: true,
+ exportSelector: 'activity',
+ minWidth: '40px',
+ },
+ {
+ name: 'Actions',
+ cell: Offcanvas,
+ maxWidth: '100px',
+ },
+ ]
+
return (
<>