From dfaef33954b38e3c000d96e9b3bd542297146b89 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 16 Nov 2023 13:22:00 +0100 Subject: [PATCH 1/2] Improved bec checks --- src/store/api/users.js | 6 +- src/views/identity/administration/ViewBEC.js | 71 ++++++++++---------- 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/src/store/api/users.js b/src/store/api/users.js index 66cfd9bd48c6..8dc443ce1dc1 100644 --- a/src/store/api/users.js +++ b/src/store/api/users.js @@ -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 } diff --git a/src/views/identity/administration/ViewBEC.js b/src/views/identity/administration/ViewBEC.js index bfe147e850cb..142cc2f47399 100644 --- a/src/views/identity/administration/ViewBEC.js +++ b/src/views/identity/administration/ViewBEC.js @@ -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 = [ @@ -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'], + name: 'displayName', + selector: (row) => row['displayName'], sortable: true, }, { - name: 'Date', - selector: (row) => row['CreationTime'], - 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, }, ] @@ -224,7 +219,7 @@ const ViewBec = () => { onConfirm: () => { execBecRemediate({ path: '/api/execBecRemediate', - values: { userId: userId, tenantFilter: tenantDomain }, + values: { userId: userId, tenantFilter: tenantDomain, userName: userName }, }) }, }) @@ -283,7 +278,11 @@ const ViewBec = () => { )} {execRemediateResults.isSuccess && ( - {execRemediateResults.data?.Results} + + {execRemediateResults.data?.Results.map((item) => { + return
  • {item}
  • + })} +
    )} @@ -305,7 +304,7 @@ const ViewBec = () => { - + {isFetching && } {isSuccess && ( @@ -343,7 +342,7 @@ const ViewBec = () => { - + {isFetching && } {isSuccess && ( @@ -361,7 +360,7 @@ const ViewBec = () => { - + {isFetching && } {isSuccess && ( @@ -379,7 +378,7 @@ const ViewBec = () => { - + {isFetching && } {isSuccess && ( @@ -397,7 +396,7 @@ const ViewBec = () => { - + {isFetching && } {isSuccess && ( @@ -415,7 +414,7 @@ const ViewBec = () => { - + {isFetching && } {isSuccess && ( From f5494e1da329b05a68c997a8e4474e45cbc91cbe Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 16 Nov 2023 13:24:45 +0100 Subject: [PATCH 2/2] text changes --- src/views/identity/administration/ViewBEC.js | 27 ++++++++------------ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/views/identity/administration/ViewBEC.js b/src/views/identity/administration/ViewBEC.js index 142cc2f47399..ac0c8f7efaaa 100644 --- a/src/views/identity/administration/ViewBEC.js +++ b/src/views/identity/administration/ViewBEC.js @@ -315,7 +315,6 @@ const ViewBec = () => { striped responsive={true} tableProps={{ subHeaderComponent: false }} - wrapperClasses="table-responsive" reportName="none" /> )} @@ -324,21 +323,17 @@ const ViewBec = () => { {isFetching && } - - - {isSuccess && ( - - )} - + {isSuccess && ( + + )}