Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kris6673 authored Nov 16, 2023
2 parents 5e7e065 + f5494e1 commit 4876b8e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 53 deletions.
6 changes: 5 additions & 1 deletion src/store/api/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export const usersApi = baseApi.injectEndpoints({
queryFn: async (_args, _baseQueryApi, _options, baseQuery) => {
const startRequest = await baseQuery({
path: '/api/execBECCheck',
params: { userId: _args.userId, tenantFilter: _args.tenantFilter },
params: {
userId: _args.userId,
tenantFilter: _args.tenantFilter,
userName: _args.userName,
},
})
if (startRequest.error) {
return { error: startRequest.error }
Expand Down
98 changes: 46 additions & 52 deletions src/views/identity/administration/ViewBEC.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ViewBec = () => {
const [execBecView, results] = useLazyExecBecCheckQuery()
const { data: alerts = {}, isFetching, error, isSuccess } = results
useEffect(() => {
execBecView({ tenantFilter: tenantDomain, userId: userId })
execBecView({ tenantFilter: tenantDomain, userId: userId, userName: userName })
}, [execBecView, tenantDomain, userId])

const deviceColumns = [
Expand Down Expand Up @@ -104,72 +104,67 @@ const ViewBec = () => {
selector: (row) => row.Status,
sortable: true,
},
{
name: 'IP',
selector: (row) => row.IPAddress,
sortable: true,
},
]

const mailboxlogonColumns = [
{
name: 'IP',
selector: (row) => row['ClientIP'],
selector: (row) => row['IPAddress'],
sortable: true,
},
{
name: 'User',
selector: (row) => row['CreatedDateTime'],
selector: (row) => row['userPrincipalName'],
sortable: true,
},
{
name: 'User Agent',
selector: (row) => row['ClientInfoString'],
name: 'Application',
selector: (row) => row['AppDisplayName'],
sortable: true,
},
{
name: 'Result',
selector: (row) => row['ResultStatus'],
sortable: true,
},
{
name: 'Data',
selector: (row) => row['CreationTime'],
selector: (row) => row['Status'],
sortable: true,
},
]
const newUserColumns = [
{
name: 'Username',
selector: (row) => row['ObjectId'],
name: 'DisplayName',
selector: (row) => row['displayName'],
sortable: true,
},
{
name: 'Date',
selector: (row) => row['CreationTime'],
name: 'Username',
selector: (row) => row['userPrincipalName'],
sortable: true,
},
{
name: 'By',
selector: (row) => row['UserId'],
name: 'Date',
selector: (row) => row['CreatedDateTime'],
sortable: true,
},
]

const passwordColumns = [
{
name: 'Username',
selector: (row) => row['ObjectId'],
sortable: true,
},
{
name: 'Date',
selector: (row) => row['CreationTime'],
name: 'displayName',
selector: (row) => row['displayName'],
sortable: true,
},
{
name: 'Operation',
selector: (row) => row['Operation'],
name: 'Username',
selector: (row) => row['userPrincipalName'],
sortable: true,
},
{
name: 'By',
selector: (row) => row['UserId'],
name: 'Date',
selector: (row) => row['lastPasswordChangeDateTime'],
sortable: true,
},
]
Expand Down Expand Up @@ -224,7 +219,7 @@ const ViewBec = () => {
onConfirm: () => {
execBecRemediate({
path: '/api/execBecRemediate',
values: { userId: userId, tenantFilter: tenantDomain },
values: { userId: userId, tenantFilter: tenantDomain, userName: userName },
})
},
})
Expand Down Expand Up @@ -283,7 +278,11 @@ const ViewBec = () => {
</CCallout>
)}
{execRemediateResults.isSuccess && (
<CCallout color="info">{execRemediateResults.data?.Results}</CCallout>
<CCallout color="info">
{execRemediateResults.data?.Results.map((item) => {
return <li>{item}</li>
})}
</CCallout>
)}
</CippContentCard>
</CippMasonryItem>
Expand All @@ -305,7 +304,7 @@ const ViewBec = () => {
</CippContentCard>
</CippMasonryItem>
<CippMasonryItem size="half">
<CippContentCard title="Recently Added Email Forwarding Rules" icon={faForward}>
<CippContentCard title="Recently Added Rules (Tenant)" icon={faForward}>
{isFetching && <Skeleton count={5} />}

{isSuccess && (
Expand All @@ -316,7 +315,6 @@ const ViewBec = () => {
striped
responsive={true}
tableProps={{ subHeaderComponent: false }}
wrapperClasses="table-responsive"
reportName="none"
/>
)}
Expand All @@ -325,25 +323,21 @@ const ViewBec = () => {
<CippMasonryItem size="half">
<CippContentCard title="User Last Logon Details" icon={faKey}>
{isFetching && <Skeleton count={5} />}

<CCardBody>
{isSuccess && (
<CippTable
keyField="ID"
columns={logonColumns}
data={alerts.LastSuspectUserLogon}
striped
responsive={true}
tableProps={{ subHeaderComponent: false }}
wrapperClasses="table-responsive"
reportName="none"
/>
)}
</CCardBody>
{isSuccess && (
<CippTable
keyField="ID"
columns={logonColumns}
data={alerts.LastSuspectUserLogon}
striped
responsive={true}
tableProps={{ subHeaderComponent: false }}
reportName="none"
/>
)}
</CippContentCard>
</CippMasonryItem>
<CippMasonryItem size="half">
<CippContentCard title="Recently Added Users" icon={faUsers}>
<CippContentCard title="Recently Added Users (Tenant)" icon={faUsers}>
{isFetching && <Skeleton count={5} />}

{isSuccess && (
Expand All @@ -361,7 +355,7 @@ const ViewBec = () => {
</CippContentCard>
</CippMasonryItem>
<CippMasonryItem size="full">
<CippContentCard title="Recent Password Changes" icon={faAsterisk}>
<CippContentCard title="Recent Password Changes (Tenant)" icon={faAsterisk}>
{isFetching && <Skeleton count={5} />}

{isSuccess && (
Expand All @@ -379,7 +373,7 @@ const ViewBec = () => {
</CippContentCard>
</CippMasonryItem>
<CippMasonryItem size="full">
<CippContentCard title="Mailbox Permissions Changes" icon={faIdBadge}>
<CippContentCard title="Mailbox Permissions Changes (Tenant)" icon={faIdBadge}>
{isFetching && <Skeleton count={5} />}

{isSuccess && (
Expand All @@ -397,7 +391,7 @@ const ViewBec = () => {
</CippContentCard>
</CippMasonryItem>
<CippMasonryItem size="full">
<CippContentCard title="Application Changes" icon={faWindowRestore}>
<CippContentCard title="New Applications (Tenant)" icon={faWindowRestore}>
{isFetching && <Skeleton count={5} />}

{isSuccess && (
Expand All @@ -415,7 +409,7 @@ const ViewBec = () => {
</CippContentCard>
</CippMasonryItem>
<CippMasonryItem size="full">
<CippContentCard title="Mailbox Logons" icon={faSignInAlt}>
<CippContentCard title="Last 50 Logons (Tenant)" icon={faSignInAlt}>
{isFetching && <Skeleton count={5} />}

{isSuccess && (
Expand Down

0 comments on commit 4876b8e

Please sign in to comment.