Skip to content

Dev to hotfix #3488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading