Skip to content

Commit 94f5d68

Browse files
authoredJan 27, 2025··
Merge pull request #80 from KelvinTegelaar/main
[pull] main from KelvinTegelaar:main
2 parents 9dfbc7b + 517fc23 commit 94f5d68

File tree

9 files changed

+79
-49
lines changed

9 files changed

+79
-49
lines changed
 

‎.github/workflows/Check_for_Version_Update.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ on:
77
jobs:
88
build:
99
if: github.repository_owner == 'KelvinTegelaar'
10-
name: 'Check for Version Update'
10+
name: "Check for Version Update"
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check for Changed Files
1414
uses: brettcannon/check-for-changed-files@v1.1.0
1515
with:
16-
file-pattern: version_latest.txt
17-
failure-message: 'You have not updated version_latest.txt. This is a required file to update at each PR. Please sync your latest changes and update the version number.'
16+
file-pattern: public/version.json
17+
failure-message: "You have not updated version.json. This is a required file to update at each PR. Please sync your latest changes and update the version number."
1818
- name: Prevent changes to workflow files
1919
uses: DovnarAlexander/github-action-file-detection@v0.3.0
2020
with:
21-
wildcard: '.github/workflows/*.yml'
21+
wildcard: ".github/workflows/*.yml"
2222
exit_code_found: 1
2323
exit_code_not_found: 0

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"bugs": {
77
"url": "https://github.com/KelvinTegelaar/CIPP/issues"
88
},
9+
"license": "AGPL-3.0",
910
"engines": {
1011
"node": "^18.17.0"
1112
},

‎public/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "7.1.1"
2+
"version": "7.1.2"
33
}

‎src/api/ApiCall.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ export function ApiGetCallWithPagination({
190190
return response.data;
191191
},
192192
getNextPageParam: (lastPage) => {
193-
if (data?.noPagination || data?.manualPagination === false) {
193+
if (
194+
data?.noPagination ||
195+
data?.manualPagination === false ||
196+
data?.tenantFilter === "AllTenants"
197+
) {
194198
return undefined;
195199
}
196200
return lastPage?.Metadata?.nextLink ? { nextLink: lastPage.Metadata.nextLink } : undefined;

‎src/components/CippTable/CippDataTable.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ import { ApiGetCallWithPagination } from "../../api/ApiCall";
1717
import { utilTableMode } from "./util-tablemode";
1818
import { utilColumnsFromAPI } from "./util-columnsFromAPI";
1919
import { CIPPTableToptoolbar } from "./CIPPTableToptoolbar";
20-
import { More, MoreHoriz } from "@mui/icons-material";
20+
import { Info, More, MoreHoriz } from "@mui/icons-material";
2121
import { CippOffCanvas } from "../CippComponents/CippOffCanvas";
2222
import { useDialog } from "../../hooks/use-dialog";
2323
import { CippApiDialog } from "../CippComponents/CippApiDialog";
2424
import { getCippError } from "../../utils/get-cipp-error";
25+
import { Box } from "@mui/system";
26+
import { useSettings } from "../../hooks/use-settings";
2527

2628
export const CippDataTable = (props) => {
2729
const {
@@ -61,6 +63,9 @@ export const CippDataTable = (props) => {
6163
const [actionData, setActionData] = useState({ data: {}, action: {}, ready: false });
6264
const [graphFilterData, setGraphFilterData] = useState({});
6365
const waitingBool = api?.url ? true : false;
66+
67+
const settings = useSettings();
68+
6469
const getRequestData = ApiGetCallWithPagination({
6570
url: api.url,
6671
data: { ...api.data },
@@ -177,7 +182,11 @@ export const CippDataTable = (props) => {
177182
},
178183
renderEmptyRowsFallback: ({ table }) =>
179184
getRequestData.data?.pages?.[0].Metadata?.QueueMessage ? (
180-
<center>{getRequestData.data?.pages?.[0].Metadata?.QueueMessage}</center>
185+
<Box sx={{ py: 4 }}>
186+
<center>
187+
<Info /> {getRequestData.data?.pages?.[0].Metadata?.QueueMessage}
188+
</center>
189+
</Box>
181190
) : undefined,
182191
onColumnVisibilityChange: setColumnVisibility,
183192
...modeInfo,
@@ -188,6 +197,11 @@ export const CippDataTable = (props) => {
188197
sx={{ color: action.color }}
189198
key={`actions-list-row-${index}`}
190199
onClick={() => {
200+
if (settings.currentTenant === "AllTenants" && row.original?.Tenant) {
201+
settings.handleUpdate({
202+
currentTenant: row.original.Tenant,
203+
});
204+
}
191205
setActionData({
192206
data: row.original,
193207
action: action,

‎src/data/alerts.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"recommendedRunInterval": "30d"
9393
},
9494
{
95-
"name": "AppCertificateExpiry ",
95+
"name": "AppCertificateExpiry",
9696
"label": "Alert on expiring application certificates",
9797
"recommendedRunInterval": "1d"
9898
},

‎src/pages/cipp/integrations/configure.js

+46-35
Original file line numberDiff line numberDiff line change
@@ -120,51 +120,62 @@ const Page = () => {
120120
{extension.alertText}
121121
</Alert>
122122
)}
123-
<Stack direction="row" spacing={2} sx={{ mb: 2 }}>
123+
<Stack
124+
direction="row"
125+
spacing={2}
126+
sx={{ mb: 2, display: "flex", alignItems: "center" }}
127+
>
124128
{extension?.hideTestButton !== true && (
125-
<Button
126-
variant="contained"
127-
color="primary"
128-
onClick={() => handleIntegrationTest()}
129-
disabled={actionTestResults?.isLoading}
130-
>
131-
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
132-
<BeakerIcon />
133-
</SvgIcon>
134-
Test
135-
</Button>
129+
<Box>
130+
<Button
131+
variant="contained"
132+
color="primary"
133+
onClick={() => handleIntegrationTest()}
134+
disabled={actionTestResults?.isLoading}
135+
>
136+
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
137+
<BeakerIcon />
138+
</SvgIcon>
139+
Test
140+
</Button>
141+
</Box>
136142
)}
137143
{extension?.forceSyncButton && (
138-
<Button
139-
variant="contained"
140-
color="primary"
141-
onClick={() => handleIntegrationSync()}
142-
disabled={actionSyncResults.isLoading}
143-
>
144-
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
145-
<ArrowPathIcon />
146-
</SvgIcon>
147-
Force Sync
148-
</Button>
144+
<Box>
145+
<Button
146+
variant="contained"
147+
color="primary"
148+
onClick={() => handleIntegrationSync()}
149+
disabled={actionSyncResults.isLoading}
150+
>
151+
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
152+
<ArrowPathIcon />
153+
</SvgIcon>
154+
Force Sync
155+
</Button>
156+
</Box>
149157
)}
150158
{extension?.links && (
151159
<>
152160
{extension.links.map((link, index) => (
153-
<Button
154-
href={link.url}
155-
target="_blank"
156-
rel="noreferrer"
157-
color="inherit"
158-
key={index}
159-
>
160-
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
161-
<ArrowTopRightOnSquareIcon />
162-
</SvgIcon>
163-
{link.name}
164-
</Button>
161+
<Box>
162+
<Button
163+
href={link.url}
164+
target="_blank"
165+
rel="noreferrer"
166+
color="inherit"
167+
key={index}
168+
>
169+
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
170+
<ArrowTopRightOnSquareIcon />
171+
</SvgIcon>
172+
{link.name}
173+
</Button>
174+
</Box>
165175
))}
166176
</>
167177
)}
178+
168179
<CippApiResults apiObject={actionTestResults} />
169180
<CippApiResults apiObject={actionSyncResults} />
170181
</Stack>

‎src/pages/tenant/gdap-management/invites/add.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ const Page = () => {
4040

4141
const createCippDefaults = ApiPostCall({
4242
urlFromData: true,
43-
relatedQueryKeys: ["ListGDAPRoleTemplatesAutocomplete"],
43+
relatedQueryKeys: ["ListGDAPRoleTemplatesAutocomplete", "ListGDAPRoleTemplates"],
4444
});
4545

4646
const templateList = ApiGetCall({
4747
url: "/api/ExecGDAPRoleTemplate",
48-
queryKey: "ListGDAPRoleTemplatesAutocomplete",
48+
queryKey: "ListGDAPRoleTemplates",
4949
});
5050
const selectedTemplate = useWatch({ control: formControl.control, name: "roleMappings" });
5151

‎src/pages/tenant/gdap-management/offboarding.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CippFormComponent } from "/src/components/CippComponents/CippFormCompon
77
import vendorTenantList from "/src/data/vendorTenantList";
88
import { Box, Grid, Stack } from "@mui/system";
99
import { Alert, Divider, Typography } from "@mui/material";
10-
import { ApiGetCall } from "/src/api/ApiCall";
10+
import { ApiGetCall, ApiGetCallWithPagination } from "/src/api/ApiCall";
1111
import { CippInfoBar } from "../../../components/CippCards/CippInfoBar";
1212
import { ShieldCheckIcon } from "@heroicons/react/24/outline";
1313
import { Apps, Description, Widgets } from "@mui/icons-material";
@@ -60,7 +60,7 @@ const Page = () => {
6060
queryKey: "ListMSPApps-" + tenantId?.value,
6161
});
6262

63-
const vendorApps = ApiGetCall({
63+
const vendorApps = ApiGetCallWithPagination({
6464
url: "/api/ListGraphRequest",
6565
data: {
6666
Endpoint: "servicePrincipals",
@@ -193,7 +193,7 @@ const Page = () => {
193193
},
194194
valueField: "appId",
195195
}}
196-
disabled={vendorApps?.data?.Results?.length > 0 ? false : true}
196+
disabled={vendorApps?.data?.pages?.[0]?.Results?.length > 0 ? false : true}
197197
/>
198198
<CippFormComponent
199199
formControl={formControl}

0 commit comments

Comments
 (0)