Skip to content

Commit

Permalink
Merge pull request #78 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 Feb 13, 2025
2 parents ae896bd + 6135d24 commit 8ca7cb7
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/components/CippWizard/CIPPDeploymentStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { CippWizardStepButtons } from "./CippWizardStepButtons";
import { ApiGetCall } from "../../api/ApiCall";
import CippButtonCard from "../CippCards/CippButtonCard";
import { CippCopyToClipBoard } from "../CippComponents/CippCopyToClipboard";
import { CheckCircle } from "@mui/icons-material";
import { CheckCircle, Sync } from "@mui/icons-material";
import CippPermissionCheck from "../CippSettings/CippPermissionCheck";
import { useQueryClient } from "@tanstack/react-query";
import { CippApiResults } from "../CippComponents/CippApiResults";
Expand All @@ -43,7 +43,7 @@ export const CippDeploymentStep = (props) => {
const appId = ApiGetCall({
url: `/api/ExecListAppId`,
queryKey: `ExecListAppId`,
waiting: values.selectedOption !== "UpdateTokens" ? false : true,
waiting: true,
});
useEffect(() => {
if (
Expand Down Expand Up @@ -260,19 +260,29 @@ export const CippDeploymentStep = (props) => {
disabled={
appId.isLoading ||
!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
appId.data.applicationId
appId?.data?.applicationId
)
}
onClick={() => openPopup(appId.data.refreshUrl)}
onClick={() => openPopup(appId?.data?.refreshUrl)}
color="primary"
>
Refresh Graph Token
</Button>
<Button
onClick={() => appId.refetch()}
variant="contained"
color="primary"
startIcon={<Sync />}
disabled={appId.isFetching}
>
Check Application ID
</Button>
{!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
appId.data.applicationId
appId?.data?.applicationId
) && (
<Alert severity="warning">
The Application ID is not valid. Please return to the first page of the SAM wizard and use the Manual .
The Application ID is not valid. Please return to the first page of the SAM
wizard and use the Manual .
</Alert>
)}
</>
Expand Down

0 comments on commit 8ca7cb7

Please sign in to comment.