From 97afe05be71926dfe980f141814589ab80e1b190 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Thu, 6 Feb 2025 23:05:53 +0100 Subject: [PATCH 1/3] template repo --- src/pages/tools/templatelib/index.jsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pages/tools/templatelib/index.jsx b/src/pages/tools/templatelib/index.jsx index 2b46fde8cb9e..060ad05d7630 100644 --- a/src/pages/tools/templatelib/index.jsx +++ b/src/pages/tools/templatelib/index.jsx @@ -35,7 +35,7 @@ const TemplateLibrary = () => { Command: { value: `New-CIPPTemplateRun` }, Parameters: { TemplateSettings: { ...values } }, ScheduledTime: unixTime, - Recurrence: { value: "4h" }, + Recurrence: { value: values.tenantFilter?.value ? "4h" : "7d" }, }; }; @@ -160,6 +160,18 @@ const TemplateLibrary = () => { label="Create Group Templates" formControl={formControl} /> + + From 782fa768eccdc307c9725dbf98ee5988feb4f17f Mon Sep 17 00:00:00 2001 From: John Duprey Date: Thu, 6 Feb 2025 17:09:41 -0500 Subject: [PATCH 2/3] Update CippApiClientManagement.jsx --- .../CippApiClientManagement.jsx | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/components/CippIntegrations/CippApiClientManagement.jsx b/src/components/CippIntegrations/CippApiClientManagement.jsx index 01e174c64e46..067cae539a05 100644 --- a/src/components/CippIntegrations/CippApiClientManagement.jsx +++ b/src/components/CippIntegrations/CippApiClientManagement.jsx @@ -1,7 +1,8 @@ -import { Button, Stack, SvgIcon, Menu, MenuItem, ListItemText } from "@mui/material"; +import { Button, Stack, SvgIcon, Menu, MenuItem, ListItemText, Alert } from "@mui/material"; import { useState } from "react"; +import isEqual from "lodash/isEqual"; import { useForm } from "react-hook-form"; -import { ApiGetCall, ApiPostCall } from "/src/api/ApiCall"; +import { ApiGetCall, ApiGetCallWithPagination, ApiPostCall } from "/src/api/ApiCall"; import { CippDataTable } from "../CippTable/CippDataTable"; import { ChevronDownIcon, @@ -15,6 +16,7 @@ import { CippApiDialog } from "../CippComponents/CippApiDialog"; import { Create, Key, Save, Sync } from "@mui/icons-material"; import { CippPropertyListCard } from "../CippCards/CippPropertyListCard"; import { CippCopyToClipBoard } from "../CippComponents/CippCopyToClipboard"; +import { Box } from "@mui/system"; const CippApiClientManagement = () => { const [openAddClientDialog, setOpenAddClientDialog] = useState(false); @@ -36,6 +38,12 @@ const CippApiClientManagement = () => { queryKey: "AzureConfiguration", }); + const apiClients = ApiGetCallWithPagination({ + url: "/api/ExecApiClient", + data: { Action: "List" }, + queryKey: "ApiClients", + }); + const handleMenuOpen = (event) => { setMenuAnchorEl(event.currentTarget); }; @@ -223,7 +231,27 @@ const CippApiClientManagement = () => { showDivider={false} isFetching={azureConfig.isFetching} /> - + {azureConfig.isSuccess && Array.isArray(azureConfig.data?.Results?.ClientIDs) && ( + <> + {!isEqual( + apiClients.data?.pages?.[0]?.Results?.filter((c) => c.Enabled) + .map((c) => c.ClientId) + .sort(), + azureConfig.data?.Results?.ClientIDs?.sort() + ) && ( + + + You have unsaved changes. Click Actions > Save Azure Configuration to update + the allowed API Clients. + + + )} + + )} + {} + + + { simpleColumns={["Enabled", "AppName", "ClientId", "Role", "IPRange"]} queryKey={`ApiClients`} /> - Date: Fri, 7 Feb 2025 00:44:10 +0100 Subject: [PATCH 3/3] minor updates --- src/pages/tools/templatelib/index.jsx | 68 +++++++++++++++------------ 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/src/pages/tools/templatelib/index.jsx b/src/pages/tools/templatelib/index.jsx index 060ad05d7630..85c50646bc50 100644 --- a/src/pages/tools/templatelib/index.jsx +++ b/src/pages/tools/templatelib/index.jsx @@ -108,38 +108,44 @@ const TemplateLibrary = () => { + + + Conditional Access + + - - Conditional Access - - - - - Intune - - - - + + Intune + + + + +