Skip to content

Commit 6c4ff8d

Browse files
authored
Merge pull request #55 from KelvinTegelaar/main
[pull] main from KelvinTegelaar:main
2 parents 94653b0 + 4a3d98a commit 6c4ff8d

File tree

131 files changed

+10476
-4069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+10476
-4069
lines changed

.github/workflows/dev_deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
2626
app_location: '/' # App source code path
2727
api_location: '' # Api source code path - optional
28-
output_location: 'out' # Built app content directory - optional
28+
output_location: '/out' # Built app content directory - optional
2929
###### End of Repository/Build Configurations ######
3030

3131
close_pull_request_job:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ yarn-debug.log*
2626
yarn-error.log*
2727

2828
# vscode debug logs
29-
debug.log
29+
debug.log
30+
app.log

Tools/Start-CippDevEmulators.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Get-Command wt -ErrorAction Stop | Out-Null
22
Get-Process node -ErrorAction SilentlyContinue | Stop-Process -ErrorAction SilentlyContinue
33
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName
4+
Write-Host "CIPP Dev Emulators starting in $Path" -ForegroundColor Green
45

56
pwsh -file (Join-Path $PSScriptRoot 'Start-CippDevInstallation.ps1')
67

@@ -11,8 +12,7 @@ if (Test-Path (Join-Path $Path 'CIPP-API-Processor')) {
1112
}
1213

1314
if ($Process -eq 'y') {
14-
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run dev`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa`; new-tab --title 'CIPP-API-Processor' -d $Path\CIPP-API-Processor pwsh -c func start --port 7072
15+
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run dev`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa`; new-tab --title 'CIPP-API-Processor' -d $Path\CIPP-API-Processor pwsh -c func start --port 7072
1516
} else {
16-
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run dev`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa
17+
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run dev`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa
1718
}
18-

next.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const config = {
1414
async redirects() {
1515
return [];
1616
},
17+
output: "export",
18+
distDir: "./out",
1719
};
1820

1921
module.exports = config;

package.json

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,36 @@
88
},
99
"license": "AGPL-3.0",
1010
"engines": {
11-
"node": "^22.13.0"
11+
"node": "^20.18.3"
1212
},
1313
"repository": {
1414
"type": "git",
1515
"url": "git@github.com:KelvinTegelaar/CIPP.git"
1616
},
1717
"scripts": {
1818
"dev": "next -H 127.0.0.1",
19-
"build": "next build && next export",
19+
"build": "next build && rm -rf package.json yarn.lock",
2020
"start": "next start",
2121
"export": "next export",
2222
"lint": "next lint",
2323
"lint-fix": "next lint --fix",
2424
"start-swa": "swa start --swa-config-location .vscode http://127.0.0.1:3000 --api-location http://127.0.0.1:7071 --verbose=silly"
2525
},
2626
"dependencies": {
27-
"@emotion/cache": "11.10.5",
28-
"@emotion/react": "11.13.3",
29-
"@emotion/server": "11.10.0",
30-
"@emotion/styled": "11.13.0",
31-
"@heroicons/react": "2.0.15",
27+
"@emotion/cache": "11.14.0",
28+
"@emotion/react": "11.14.0",
29+
"@emotion/server": "11.11.0",
30+
"@emotion/styled": "11.14.0",
31+
"@heroicons/react": "2.2.0",
3232
"@monaco-editor/react": "^4.6.0",
33-
"@mui/icons-material": "6.1.6",
34-
"@mui/lab": "6.0.0-beta.14",
35-
"@mui/material": "6.1.6",
36-
"@mui/system": "6.1.6",
37-
"@mui/x-date-pickers": "7.22.1",
33+
"@mui/icons-material": "6.4.7",
34+
"@mui/lab": "6.0.0-beta.30",
35+
"@mui/material": "6.4.7",
36+
"@mui/system": "6.4.7",
37+
"@mui/x-date-pickers": "7.27.3",
3838
"@musement/iso-duration": "^1.0.0",
39-
"@react-pdf/renderer": "3.1.2",
40-
"@reduxjs/toolkit": "1.9.2",
39+
"@react-pdf/renderer": "4.3.0",
40+
"@reduxjs/toolkit": "2.6.1",
4141
"@tanstack/react-query": "^5.51.11",
4242
"@tanstack/react-query-devtools": "^5.51.11",
4343
"@tanstack/react-table": "^8.19.2",
@@ -49,63 +49,63 @@
4949
"@tiptap/react": "^2.9.1",
5050
"@tiptap/starter-kit": "^2.9.1",
5151
"@uiw/react-json-view": "^2.0.0-alpha.30",
52-
"apexcharts": "3.36.3",
52+
"apexcharts": "4.5.0",
5353
"axios": "^1.7.2",
54-
"date-fns": "2.29.3",
55-
"eml-parse-js": "^1.1.15",
54+
"date-fns": "4.1.0",
55+
"eml-parse-js": "^1.2.0-beta.0",
5656
"export-to-csv": "^1.3.0",
57-
"formik": "2.2.9",
57+
"formik": "2.4.6",
5858
"gray-matter": "4.0.3",
59-
"i18next": "22.4.9",
59+
"i18next": "24.2.3",
6060
"javascript-time-ago": "^2.5.11",
61-
"jspdf": "^2.5.1",
62-
"jspdf-autotable": "^3.8.2",
61+
"jspdf": "^3.0.0",
62+
"jspdf-autotable": "^5.0.2",
6363
"leaflet": "^1.9.4",
6464
"leaflet-defaulticon-compatibility": "^0.1.2",
6565
"leaflet.markercluster": "^1.5.3",
6666
"lodash.isequal": "4.5.0",
6767
"material-react-table": "^3.0.1",
6868
"monaco-editor": "^0.52.0",
6969
"mui-tiptap": "^1.14.0",
70-
"next": "^13.5.6",
70+
"next": "^15.2.2",
7171
"nprogress": "0.2.0",
7272
"numeral": "2.0.6",
7373
"prop-types": "15.8.1",
74-
"react": "18.2.0",
75-
"react-apexcharts": "1.4.0",
74+
"react": "19.0.0",
75+
"react-apexcharts": "1.7.0",
7676
"react-beautiful-dnd": "13.1.1",
7777
"react-copy-to-clipboard": "^5.1.0",
78-
"react-dom": "18.2.0",
79-
"react-dropzone": "14.2.3",
80-
"react-error-boundary": "^4.0.13",
78+
"react-dom": "19.0.0",
79+
"react-dropzone": "14.3.8",
80+
"react-error-boundary": "^5.0.0",
8181
"react-grid-layout": "^1.5.0",
8282
"react-hook-form": "^7.53.0",
83-
"react-hot-toast": "2.4.0",
83+
"react-hot-toast": "2.5.2",
8484
"react-html-parser": "^2.0.2",
85-
"react-i18next": "12.1.4",
86-
"react-leaflet": "4.2.1",
87-
"react-leaflet-markercluster": "^4.2.1",
88-
"react-markdown": "8.0.5",
85+
"react-i18next": "15.4.1",
86+
"react-leaflet": "5.0.0",
87+
"react-leaflet-markercluster": "^5.0.0-rc.0",
88+
"react-markdown": "10.1.0",
8989
"react-media-hook": "^0.5.0",
9090
"react-papaparse": "^4.4.0",
91-
"react-quill": "^0.0.2",
92-
"react-redux": "8.0.5",
91+
"react-quill": "^2.0.0",
92+
"react-redux": "9.2.0",
9393
"react-syntax-highlighter": "^15.6.1",
9494
"react-time-ago": "^7.3.3",
9595
"react-window": "^1.8.10",
96-
"redux": "4.2.1",
96+
"redux": "5.0.1",
9797
"redux-devtools-extension": "2.13.9",
9898
"redux-persist": "^6.0.0",
99-
"redux-thunk": "2.4.2",
100-
"simplebar": "6.2.0",
101-
"simplebar-react": "3.2.0",
99+
"redux-thunk": "3.1.0",
100+
"simplebar": "6.3.0",
101+
"simplebar-react": "3.3.0",
102102
"stylis-plugin-rtl": "2.1.1",
103-
"typescript": "4.9.4",
104-
"yup": "0.32.11"
103+
"typescript": "5.8.2",
104+
"yup": "1.6.1"
105105
},
106106
"devDependencies": {
107-
"@svgr/webpack": "6.5.1",
108-
"eslint": "8.32.0",
109-
"eslint-config-next": "13.1.6"
107+
"@svgr/webpack": "8.1.0",
108+
"eslint": "9.22.0",
109+
"eslint-config-next": "15.2.2"
110110
}
111111
}

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.1"
33
}

src/api/ApiCall.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
1+
import { keepPreviousData, useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
22
import axios, { isAxiosError } from "axios";
33
import { useDispatch } from "react-redux";
44
import { showToast } from "../store/toasts";
@@ -17,6 +17,9 @@ export function ApiGetCall(props) {
1717
onResult,
1818
staleTime = 600000, // 10 minutes
1919
refetchOnWindowFocus = false,
20+
refetchOnMount = true,
21+
refetchOnReconnect = true,
22+
keepPreviousData = false,
2023
} = props;
2124
const queryClient = useQueryClient();
2225
const dispatch = useDispatch();
@@ -102,6 +105,9 @@ export function ApiGetCall(props) {
102105
},
103106
staleTime: staleTime,
104107
refetchOnWindowFocus: refetchOnWindowFocus,
108+
refetchOnMount: refetchOnMount,
109+
refetchOnReconnect: refetchOnReconnect,
110+
keepPreviousData: keepPreviousData,
105111
retry: retryFn,
106112
});
107113
return queryInfo;

src/components/CippCards/CippExchangeInfoCard.jsx

Lines changed: 47 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,12 +65,15 @@ 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
4672
sx={{ width: "100%" }}
4773
variant="determinate"
74+
addedLabel={`(${Math.round(exchangeData.TotalItemSize)}/${Math.round(
75+
exchangeData?.ProhibitSendReceiveQuota
76+
)}GB)`}
4877
value={
4978
Math.round(
5079
(exchangeData?.TotalItemSize / exchangeData?.ProhibitSendReceiveQuota) *
@@ -62,7 +91,7 @@ export const CippExchangeInfoCard = (props) => {
6291
divider
6392
label="Hidden From Address Lists"
6493
value={
65-
isFetching ? (
94+
isLoading ? (
6695
<Skeleton variant="text" width={60} />
6796
) : (
6897
getCippFormatting(exchangeData?.HiddenFromAddressLists, "HiddenFromAddressLists")
@@ -72,7 +101,7 @@ export const CippExchangeInfoCard = (props) => {
72101
<PropertyListItem
73102
label="Forward and Deliver"
74103
value={
75-
isFetching ? (
104+
isLoading ? (
76105
<Skeleton variant="text" width={60} />
77106
) : (
78107
getCippFormatting(exchangeData?.ForwardAndDeliver, "ForwardAndDeliver")
@@ -83,7 +112,7 @@ export const CippExchangeInfoCard = (props) => {
83112
divider
84113
label="Forwarding Address"
85114
value={
86-
isFetching ? (
115+
isLoading ? (
87116
<Skeleton variant="text" width={180} />
88117
) : (
89118
exchangeData?.ForwardingAddress || "N/A"
@@ -93,7 +122,7 @@ export const CippExchangeInfoCard = (props) => {
93122
<PropertyListItem
94123
label="Archive Mailbox Enabled"
95124
value={
96-
isFetching ? (
125+
isLoading ? (
97126
<Skeleton variant="text" width={60} />
98127
) : (
99128
getCippFormatting(exchangeData?.ArchiveMailBox, "ArchiveMailBox")
@@ -103,7 +132,7 @@ export const CippExchangeInfoCard = (props) => {
103132
<PropertyListItem
104133
label="Auto Expanding Archive"
105134
value={
106-
isFetching ? (
135+
isLoading ? (
107136
<Skeleton variant="text" width={80} />
108137
) : (
109138
getCippFormatting(exchangeData?.AutoExpandingArchive, "AutoExpandingArchive")
@@ -113,7 +142,7 @@ export const CippExchangeInfoCard = (props) => {
113142
<PropertyListItem
114143
label="Total Archive Item Size"
115144
value={
116-
isFetching ? (
145+
isLoading ? (
117146
<Skeleton variant="text" width={80} />
118147
) : exchangeData?.TotalArchiveItemSize != null ? (
119148
`${exchangeData.TotalArchiveItemSize} GB`
@@ -126,7 +155,7 @@ export const CippExchangeInfoCard = (props) => {
126155
divider
127156
label="Total Archive Item Count"
128157
value={
129-
isFetching ? (
158+
isLoading ? (
130159
<Skeleton variant="text" width={80} />
131160
) : exchangeData?.TotalArchiveItemCount != null ? (
132161
exchangeData.TotalArchiveItemCount
@@ -139,7 +168,7 @@ export const CippExchangeInfoCard = (props) => {
139168
divider
140169
label="Litigation Hold"
141170
value={
142-
isFetching ? (
171+
isLoading ? (
143172
<Skeleton variant="text" width={60} />
144173
) : (
145174
getCippFormatting(exchangeData?.LitigationHold, "LitigationHold")
@@ -151,7 +180,7 @@ export const CippExchangeInfoCard = (props) => {
151180
divider
152181
label="Mailbox Protocols"
153182
value={
154-
isFetching ? (
183+
isLoading ? (
155184
<Skeleton variant="text" width={200} />
156185
) : (
157186
<div>
@@ -174,7 +203,7 @@ export const CippExchangeInfoCard = (props) => {
174203
divider
175204
label="Blocked For Spam"
176205
value={
177-
isFetching ? (
206+
isLoading ? (
178207
<Skeleton variant="text" width={60} />
179208
) : (
180209
getCippFormatting(exchangeData?.BlockedForSpam, "BlockedForSpam")
@@ -188,5 +217,7 @@ export const CippExchangeInfoCard = (props) => {
188217

189218
CippExchangeInfoCard.propTypes = {
190219
exchangeData: PropTypes.object,
220+
isLoading: PropTypes.bool,
191221
isFetching: PropTypes.bool,
222+
handleRefresh: PropTypes.func,
192223
};

0 commit comments

Comments
 (0)