Skip to content

Commit 48bf172

Browse files
authored
Merge pull request #198 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 759ac1c + 4f38eb0 commit 48bf172

File tree

7 files changed

+400
-358
lines changed

7 files changed

+400
-358
lines changed

public/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "7.3.2"
2+
"version": "7.4.0"
33
}

src/components/CippCards/CippExchangeInfoCard.jsx

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
import PropTypes from "prop-types";
2-
import { Card, CardHeader, Divider, Skeleton, Chip } from "@mui/material";
2+
import {
3+
Card,
4+
CardHeader,
5+
Divider,
6+
Skeleton,
7+
Chip,
8+
IconButton,
9+
Typography,
10+
CircularProgress,
11+
} from "@mui/material";
312
import { PropertyList } from "/src/components/property-list";
413
import { PropertyListItem } from "/src/components/property-list-item";
514
import { getCippFormatting } from "../../utils/get-cipp-formatting";
6-
import { Check as CheckIcon, Close as CloseIcon } from "@mui/icons-material";
15+
import { Check as CheckIcon, Close as CloseIcon, Sync } from "@mui/icons-material";
716
import { LinearProgressWithLabel } from "../linearProgressWithLabel";
17+
import { Stack } from "@mui/system";
818

919
export const CippExchangeInfoCard = (props) => {
10-
const { exchangeData, isFetching = false, ...other } = props;
20+
const { exchangeData, isLoading = false, isFetching = false, handleRefresh, ...other } = props;
1121

1222
// Define the protocols array
1323
const protocols = [
@@ -21,14 +31,30 @@ export const CippExchangeInfoCard = (props) => {
2131

2232
return (
2333
<Card {...other}>
24-
<CardHeader title="Exchange Details" />
34+
<CardHeader
35+
title={
36+
<Stack
37+
direction="row"
38+
sx={{ alignItems: "center", display: "flex", justifyContent: "space-between" }}
39+
>
40+
<Typography variant="h6">Exchange Information</Typography>
41+
{isFetching ? (
42+
<CircularProgress size={20} />
43+
) : (
44+
<IconButton onClick={handleRefresh} size="small">
45+
<Sync />
46+
</IconButton>
47+
)}
48+
</Stack>
49+
}
50+
/>
2551
<Divider />
2652
<PropertyList>
2753
<PropertyListItem
2854
divider
2955
label="Mailbox Type"
3056
value={
31-
isFetching ? (
57+
isLoading ? (
3258
<Skeleton variant="text" width={120} />
3359
) : (
3460
exchangeData?.RecipientTypeDetails || "N/A"
@@ -39,7 +65,7 @@ export const CippExchangeInfoCard = (props) => {
3965
divider
4066
label="Mailbox Usage"
4167
value={
42-
isFetching ? (
68+
isLoading ? (
4369
<Skeleton variant="text" width={80} />
4470
) : exchangeData?.TotalItemSize != null ? (
4571
<LinearProgressWithLabel
@@ -65,7 +91,7 @@ export const CippExchangeInfoCard = (props) => {
6591
divider
6692
label="Hidden From Address Lists"
6793
value={
68-
isFetching ? (
94+
isLoading ? (
6995
<Skeleton variant="text" width={60} />
7096
) : (
7197
getCippFormatting(exchangeData?.HiddenFromAddressLists, "HiddenFromAddressLists")
@@ -75,7 +101,7 @@ export const CippExchangeInfoCard = (props) => {
75101
<PropertyListItem
76102
label="Forward and Deliver"
77103
value={
78-
isFetching ? (
104+
isLoading ? (
79105
<Skeleton variant="text" width={60} />
80106
) : (
81107
getCippFormatting(exchangeData?.ForwardAndDeliver, "ForwardAndDeliver")
@@ -86,7 +112,7 @@ export const CippExchangeInfoCard = (props) => {
86112
divider
87113
label="Forwarding Address"
88114
value={
89-
isFetching ? (
115+
isLoading ? (
90116
<Skeleton variant="text" width={180} />
91117
) : (
92118
exchangeData?.ForwardingAddress || "N/A"
@@ -96,7 +122,7 @@ export const CippExchangeInfoCard = (props) => {
96122
<PropertyListItem
97123
label="Archive Mailbox Enabled"
98124
value={
99-
isFetching ? (
125+
isLoading ? (
100126
<Skeleton variant="text" width={60} />
101127
) : (
102128
getCippFormatting(exchangeData?.ArchiveMailBox, "ArchiveMailBox")
@@ -106,7 +132,7 @@ export const CippExchangeInfoCard = (props) => {
106132
<PropertyListItem
107133
label="Auto Expanding Archive"
108134
value={
109-
isFetching ? (
135+
isLoading ? (
110136
<Skeleton variant="text" width={80} />
111137
) : (
112138
getCippFormatting(exchangeData?.AutoExpandingArchive, "AutoExpandingArchive")
@@ -116,7 +142,7 @@ export const CippExchangeInfoCard = (props) => {
116142
<PropertyListItem
117143
label="Total Archive Item Size"
118144
value={
119-
isFetching ? (
145+
isLoading ? (
120146
<Skeleton variant="text" width={80} />
121147
) : exchangeData?.TotalArchiveItemSize != null ? (
122148
`${exchangeData.TotalArchiveItemSize} GB`
@@ -129,7 +155,7 @@ export const CippExchangeInfoCard = (props) => {
129155
divider
130156
label="Total Archive Item Count"
131157
value={
132-
isFetching ? (
158+
isLoading ? (
133159
<Skeleton variant="text" width={80} />
134160
) : exchangeData?.TotalArchiveItemCount != null ? (
135161
exchangeData.TotalArchiveItemCount
@@ -142,7 +168,7 @@ export const CippExchangeInfoCard = (props) => {
142168
divider
143169
label="Litigation Hold"
144170
value={
145-
isFetching ? (
171+
isLoading ? (
146172
<Skeleton variant="text" width={60} />
147173
) : (
148174
getCippFormatting(exchangeData?.LitigationHold, "LitigationHold")
@@ -154,7 +180,7 @@ export const CippExchangeInfoCard = (props) => {
154180
divider
155181
label="Mailbox Protocols"
156182
value={
157-
isFetching ? (
183+
isLoading ? (
158184
<Skeleton variant="text" width={200} />
159185
) : (
160186
<div>
@@ -177,7 +203,7 @@ export const CippExchangeInfoCard = (props) => {
177203
divider
178204
label="Blocked For Spam"
179205
value={
180-
isFetching ? (
206+
isLoading ? (
181207
<Skeleton variant="text" width={60} />
182208
) : (
183209
getCippFormatting(exchangeData?.BlockedForSpam, "BlockedForSpam")
@@ -191,5 +217,7 @@ export const CippExchangeInfoCard = (props) => {
191217

192218
CippExchangeInfoCard.propTypes = {
193219
exchangeData: PropTypes.object,
220+
isLoading: PropTypes.bool,
194221
isFetching: PropTypes.bool,
222+
handleRefresh: PropTypes.func,
195223
};

src/components/CippCards/CippRemediationCard.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export default function CippRemediationCard(props) {
5959
<ListItem>Block user sign-in</ListItem>
6060
<ListItem>Reset user password</ListItem>
6161
<ListItem>Disconnect all current sessions</ListItem>
62+
<ListItem>Remove all MFA methods for the user</ListItem>
6263
<ListItem>Disable all inbox rules for the user</ListItem>
6364
</List>
6465
<CippApiDialog

src/pages/identity/administration/users/user/exchange.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,12 @@ const Page = () => {
306306
) && (
307307
<>
308308
<Grid item size={4}>
309-
<CippExchangeInfoCard exchangeData={data} isFetching={userRequest.isLoading} />
309+
<CippExchangeInfoCard
310+
exchangeData={data}
311+
isLoading={userRequest.isLoading}
312+
isFetching={userRequest.isFetching}
313+
handleRefresh={() => userRequest.refetch()}
314+
/>
310315
</Grid>
311316
<Grid item size={8}>
312317
<Stack spacing={3}>

src/pages/tenant/administration/tenants/edit.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@ import { ApiGetCall } from "../../../../api/ApiCall";
44
import { useEffect, useState } from "react";
55
import { useRouter } from "next/router";
66
import CippFormComponent from "/src/components/CippComponents/CippFormComponent";
7-
import {
8-
Stack,
9-
Box,
10-
Tab,
11-
Tabs,
12-
Grid,
13-
Typography,
14-
} from "@mui/material";
7+
import { Stack, Box, Tab, Tabs, Grid, Typography } from "@mui/material";
158
import { CippCardTabPanel } from "/src/components/CippComponents/CippCardTabPanel";
169
import CippFormSection from "/src/components/CippFormPages/CippFormSection";
1710
import CippPageCard from "../../../../components/CippCards/CippPageCard";
@@ -128,6 +121,7 @@ const Page = () => {
128121
disabled={tenantDetails.isFetching}
129122
/>
130123
<CippFormComponent
124+
creatable={false}
131125
type="autoComplete"
132126
name="Groups"
133127
label="Tenant Groups"

src/pages/tenant/standards/compare/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const Page = () => {
144144

145145
allStandards.push({
146146
standardId,
147-
standardName: `IntuneTemplate: ${
147+
standardName: `Intune Template: ${
148148
templateItem.TemplateList?.label || templateId
149149
}`,
150150
currentTenantValue:
@@ -168,7 +168,7 @@ const Page = () => {
168168
const standardId = `standards.${standardKey}`;
169169
const standardInfo = standards.find((s) => s.name === standardId);
170170
const standardSettings = standardConfig.standards?.[standardKey] || {};
171-
171+
console.log(standardInfo);
172172
// Find the tenant's value for this standard
173173
const currentTenantStandard = currentTenantData.find(
174174
(s) => s.standardId === standardId
@@ -203,7 +203,7 @@ const Page = () => {
203203
// Use the direct standard value from the tenant object if it exists
204204
allStandards.push({
205205
standardId,
206-
standardName: standardId || standardKey,
206+
standardName: standardInfo.label || standardKey,
207207
currentTenantValue:
208208
directStandardValue !== undefined
209209
? directStandardValue

0 commit comments

Comments
 (0)