Skip to content

Commit

Permalink
Merge pull request #5 from KelvinTegelaar/main
Browse files Browse the repository at this point in the history
[pull] main from KelvinTegelaar:main
  • Loading branch information
pull[bot] authored Jan 27, 2025
2 parents e847b29 + 517fc23 commit 576efe8
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 49 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/Check_for_Version_Update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ on:
jobs:
build:
if: github.repository_owner == 'KelvinTegelaar'
name: 'Check for Version Update'
name: "Check for Version Update"
runs-on: ubuntu-latest
steps:
- name: Check for Changed Files
uses: brettcannon/[email protected]
with:
file-pattern: version_latest.txt
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.'
file-pattern: public/version.json
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."
- name: Prevent changes to workflow files
uses: DovnarAlexander/[email protected]
with:
wildcard: '.github/workflows/*.yml'
wildcard: ".github/workflows/*.yml"
exit_code_found: 1
exit_code_not_found: 0
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"bugs": {
"url": "https://github.com/KelvinTegelaar/CIPP/issues"
},
"license": "AGPL-3.0",
"engines": {
"node": "^18.17.0"
},
Expand Down
2 changes: 1 addition & 1 deletion public/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "7.1.1"
"version": "7.1.2"
}
6 changes: 5 additions & 1 deletion src/api/ApiCall.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ export function ApiGetCallWithPagination({
return response.data;
},
getNextPageParam: (lastPage) => {
if (data?.noPagination || data?.manualPagination === false) {
if (
data?.noPagination ||
data?.manualPagination === false ||
data?.tenantFilter === "AllTenants"
) {
return undefined;
}
return lastPage?.Metadata?.nextLink ? { nextLink: lastPage.Metadata.nextLink } : undefined;
Expand Down
18 changes: 16 additions & 2 deletions src/components/CippTable/CippDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ import { ApiGetCallWithPagination } from "../../api/ApiCall";
import { utilTableMode } from "./util-tablemode";
import { utilColumnsFromAPI } from "./util-columnsFromAPI";
import { CIPPTableToptoolbar } from "./CIPPTableToptoolbar";
import { More, MoreHoriz } from "@mui/icons-material";
import { Info, More, MoreHoriz } from "@mui/icons-material";
import { CippOffCanvas } from "../CippComponents/CippOffCanvas";
import { useDialog } from "../../hooks/use-dialog";
import { CippApiDialog } from "../CippComponents/CippApiDialog";
import { getCippError } from "../../utils/get-cipp-error";
import { Box } from "@mui/system";
import { useSettings } from "../../hooks/use-settings";

export const CippDataTable = (props) => {
const {
Expand Down Expand Up @@ -61,6 +63,9 @@ export const CippDataTable = (props) => {
const [actionData, setActionData] = useState({ data: {}, action: {}, ready: false });
const [graphFilterData, setGraphFilterData] = useState({});
const waitingBool = api?.url ? true : false;

const settings = useSettings();

const getRequestData = ApiGetCallWithPagination({
url: api.url,
data: { ...api.data },
Expand Down Expand Up @@ -177,7 +182,11 @@ export const CippDataTable = (props) => {
},
renderEmptyRowsFallback: ({ table }) =>
getRequestData.data?.pages?.[0].Metadata?.QueueMessage ? (
<center>{getRequestData.data?.pages?.[0].Metadata?.QueueMessage}</center>
<Box sx={{ py: 4 }}>
<center>
<Info /> {getRequestData.data?.pages?.[0].Metadata?.QueueMessage}
</center>
</Box>
) : undefined,
onColumnVisibilityChange: setColumnVisibility,
...modeInfo,
Expand All @@ -188,6 +197,11 @@ export const CippDataTable = (props) => {
sx={{ color: action.color }}
key={`actions-list-row-${index}`}
onClick={() => {
if (settings.currentTenant === "AllTenants" && row.original?.Tenant) {
settings.handleUpdate({
currentTenant: row.original.Tenant,
});
}
setActionData({
data: row.original,
action: action,
Expand Down
2 changes: 1 addition & 1 deletion src/data/alerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"recommendedRunInterval": "30d"
},
{
"name": "AppCertificateExpiry ",
"name": "AppCertificateExpiry",
"label": "Alert on expiring application certificates",
"recommendedRunInterval": "1d"
},
Expand Down
81 changes: 46 additions & 35 deletions src/pages/cipp/integrations/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,51 +120,62 @@ const Page = () => {
{extension.alertText}
</Alert>
)}
<Stack direction="row" spacing={2} sx={{ mb: 2 }}>
<Stack
direction="row"
spacing={2}
sx={{ mb: 2, display: "flex", alignItems: "center" }}
>
{extension?.hideTestButton !== true && (
<Button
variant="contained"
color="primary"
onClick={() => handleIntegrationTest()}
disabled={actionTestResults?.isLoading}
>
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
<BeakerIcon />
</SvgIcon>
Test
</Button>
<Box>
<Button
variant="contained"
color="primary"
onClick={() => handleIntegrationTest()}
disabled={actionTestResults?.isLoading}
>
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
<BeakerIcon />
</SvgIcon>
Test
</Button>
</Box>
)}
{extension?.forceSyncButton && (
<Button
variant="contained"
color="primary"
onClick={() => handleIntegrationSync()}
disabled={actionSyncResults.isLoading}
>
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
<ArrowPathIcon />
</SvgIcon>
Force Sync
</Button>
<Box>
<Button
variant="contained"
color="primary"
onClick={() => handleIntegrationSync()}
disabled={actionSyncResults.isLoading}
>
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
<ArrowPathIcon />
</SvgIcon>
Force Sync
</Button>
</Box>
)}
{extension?.links && (
<>
{extension.links.map((link, index) => (
<Button
href={link.url}
target="_blank"
rel="noreferrer"
color="inherit"
key={index}
>
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
<ArrowTopRightOnSquareIcon />
</SvgIcon>
{link.name}
</Button>
<Box>
<Button
href={link.url}
target="_blank"
rel="noreferrer"
color="inherit"
key={index}
>
<SvgIcon fontSize="small" style={{ marginRight: "8" }}>
<ArrowTopRightOnSquareIcon />
</SvgIcon>
{link.name}
</Button>
</Box>
))}
</>
)}

<CippApiResults apiObject={actionTestResults} />
<CippApiResults apiObject={actionSyncResults} />
</Stack>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/tenant/gdap-management/invites/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ const Page = () => {

const createCippDefaults = ApiPostCall({
urlFromData: true,
relatedQueryKeys: ["ListGDAPRoleTemplatesAutocomplete"],
relatedQueryKeys: ["ListGDAPRoleTemplatesAutocomplete", "ListGDAPRoleTemplates"],
});

const templateList = ApiGetCall({
url: "/api/ExecGDAPRoleTemplate",
queryKey: "ListGDAPRoleTemplatesAutocomplete",
queryKey: "ListGDAPRoleTemplates",
});
const selectedTemplate = useWatch({ control: formControl.control, name: "roleMappings" });

Expand Down
6 changes: 3 additions & 3 deletions src/pages/tenant/gdap-management/offboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CippFormComponent } from "/src/components/CippComponents/CippFormCompon
import vendorTenantList from "/src/data/vendorTenantList";
import { Box, Grid, Stack } from "@mui/system";
import { Alert, Divider, Typography } from "@mui/material";
import { ApiGetCall } from "/src/api/ApiCall";
import { ApiGetCall, ApiGetCallWithPagination } from "/src/api/ApiCall";
import { CippInfoBar } from "../../../components/CippCards/CippInfoBar";
import { ShieldCheckIcon } from "@heroicons/react/24/outline";
import { Apps, Description, Widgets } from "@mui/icons-material";
Expand Down Expand Up @@ -60,7 +60,7 @@ const Page = () => {
queryKey: "ListMSPApps-" + tenantId?.value,
});

const vendorApps = ApiGetCall({
const vendorApps = ApiGetCallWithPagination({
url: "/api/ListGraphRequest",
data: {
Endpoint: "servicePrincipals",
Expand Down Expand Up @@ -193,7 +193,7 @@ const Page = () => {
},
valueField: "appId",
}}
disabled={vendorApps?.data?.Results?.length > 0 ? false : true}
disabled={vendorApps?.data?.pages?.[0]?.Results?.length > 0 ? false : true}
/>
<CippFormComponent
formControl={formControl}
Expand Down

0 comments on commit 576efe8

Please sign in to comment.