Skip to content

Commit

Permalink
Merge pull request #14 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 14, 2025
2 parents 5a4f263 + d8560f8 commit c581bb0
Show file tree
Hide file tree
Showing 16 changed files with 124 additions and 38 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/cipp_frontend_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CIPP Frontend Build

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
build:
if: github.event.repository.fork == false
name: Build and Upload CIPP Frontend
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3

# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.18.1'

# Install dependencies
- name: Install Dependencies
run: yarn install

# Build the project
- name: Build Project
run: npm run build

# Create ZIP File in a New Source Directory
- name: Prepare and Zip Build Files
run: |
mkdir -p build
cp staticwebapp.config.json out/
zip -r build/latest.zip out
# Upload to Azure Blob Storage
- name: Azure Blob Upload
uses: LanceMcCarthy/[email protected]
with:
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
container_name: cipp
source_folder: build/
destination_folder: /
delete_if_exists: true

4 changes: 2 additions & 2 deletions Tools/Start-CippDevEmulatorsWithKitty.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ if ($Process -eq 'y') {
kitty @new-window --new-tab --tab-title `"Azurite`" --cwd $Path -- azurite ;
kitty @new-window --new-tab --tab-title `"FunctionApp`" --cwd (Join-Path $Path `"CIPP-API`") -- func start;
kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- yarn run dev ;
kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- npm run start-swa;
kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- yarn run start-swa;
kitty @new-window --new-tab --tab-title `"CIPP-API-Processor`" --cwd (Join-Path $Path `"CIPP-API-Processor`") -- func start --port 7072"

} else {
kitty --detach --title 'CIPP' -o allow_remote_control=yes -- pwsh -c "
kitty @new-window --new-tab --tab-title `"Azurite`" --cwd $Path -- azurite ;
kitty @new-window --new-tab --tab-title `"FunctionApp`" --cwd (Join-Path $Path `"CIPP-API`") -- func start;
kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- yarn run dev ;
kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- npm run start-swa"
kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- yarn run start-swa"
}
13 changes: 13 additions & 0 deletions deployment/AzureDeploymentTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,19 @@
"functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]",
"functionAppRegion": "[resourceGroup().location]"
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"name": "[guid(resourceGroup().id, variables('funcAppName'), 'Contributor')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
],
"properties": {
"roleDefinitionId": "[concat(subscription().id, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]",
"principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
"scope": "[resourceGroup().id]"
}
}
],
"outputs": {}
Expand Down
13 changes: 13 additions & 0 deletions deployment/AzureDeploymentTemplate_regionoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,19 @@
"functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]",
"functionAppRegion": "[resourceGroup().location]"
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"name": "[guid(resourceGroup().id, variables('funcAppName'), 'Contributor')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
],
"properties": {
"roleDefinitionId": "[concat(subscription().id, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]",
"principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
"scope": "[resourceGroup().id]"
}
}
],
"outputs": {}
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.2.1"
"version": "7.2.2"
}
28 changes: 12 additions & 16 deletions src/components/CippCards/CippPropertyListCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,18 @@ export const CippPropertyListCard = (props) => {
key={`${item.label}-${index}-ActionList-OffCanvas`}
icon={<SvgIcon fontSize="small">{item.icon}</SvgIcon>}
label={item.label}
onClick={
item.link
? () => window.open(item.link, "_blank")
: () => {
setActionData({
data: data,
action: item,
ready: true,
});
if (item?.noConfirm) {
item.customFunction(item, data, {});
} else {
createDialog.handleOpen();
}
}
}
onClick={() => {
setActionData({
data: data,
action: item,
ready: true,
});
if (item?.noConfirm) {
item.customFunction(item, data, {});
} else {
createDialog.handleOpen();
}
}}
disabled={handleActionDisabled(data, item)}
/>
))}
Expand Down
9 changes: 7 additions & 2 deletions src/components/CippComponents/CippAutocomplete.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const MemoTextField = React.memo(function MemoTextField({
{...otherParams}
label={label}
placeholder={placeholder}
variant="outlined"
{...otherProps}
slotProps={{
inputLabel: {
Expand Down Expand Up @@ -275,7 +274,13 @@ export const CippAutoComplete = (props) => {
sx={sx}
renderInput={(params) => (
<Stack direction="row" spacing={1}>
<MemoTextField params={params} label={label} placeholder={placeholder} required={required} {...other} />
<MemoTextField
params={params}
label={label}
placeholder={placeholder}
required={required}
{...other}
/>
{api?.url && api?.showRefresh && (
<IconButton
size="small"
Expand Down
7 changes: 5 additions & 2 deletions src/components/CippFormPages/CippJSONView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,17 @@ function CippJsonView({
<CippCodeBlock type="editor" code={JSON.stringify(cleanObject(object), null, 2)} />
) : (
<Grid container spacing={2}>
{drilldownData.slice(0, 4).map((data, index) => (
{drilldownData?.map((data, index) => (
<Grid
item
xs={12}
sm={type === "intune" ? 12 : 3}
key={index}
sx={{
borderRight: index < 3 && type !== "intune" ? "1px solid lightgrey" : "none",
//give a top border if the item is > 4, and add spacing between the top and bottom items
paddingTop: index === 0 ? 0 : 2,
borderTop: index >= 4 && type !== "intune" ? "1px solid lightgrey" : "none",
borderRight: index < drilldownData.length - 1 ? "1px solid lightgrey" : "none",
overflowWrap: "anywhere",
whiteSpace: "pre-line",
paddingRight: 2,
Expand Down
4 changes: 4 additions & 0 deletions src/components/CippTable/CIPPTableToptoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export const CIPPTableToptoolbar = ({
const pageName = router.pathname.split("/").slice(1).join("/");
const currentTenant = useSettings()?.currentTenant;

useEffect(() => {
//if usedData changes, deselect all rows
table.toggleAllRowsSelected(false);
}, [usedData]);
//if the currentTenant Switches, remove Graph filters
useEffect(() => {
if (currentTenant) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/CippTable/CippDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export const CippDataTable = (props) => {
refreshFunction={refreshFunction}
setColumnVisibility={setColumnVisibility}
filters={filters}
queryKeys={queryKey}
queryKeys={queryKey ? queryKey : title}
graphFilterData={graphFilterData}
setGraphFilterData={setGraphFilterData}
setConfiguredSimpleColumns={setConfiguredSimpleColumns}
Expand Down
7 changes: 5 additions & 2 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, Sync } from "@mui/icons-material";
import { CheckCircle, OpenInNew, Sync } from "@mui/icons-material";
import CippPermissionCheck from "../CippSettings/CippPermissionCheck";
import { useQueryClient } from "@tanstack/react-query";
import { CippApiResults } from "../CippComponents/CippApiResults";
Expand Down Expand Up @@ -265,12 +265,15 @@ export const CippDeploymentStep = (props) => {
}
onClick={() => openPopup(appId?.data?.refreshUrl)}
color="primary"
startIcon={
<OpenInNew />
}
>
Refresh Graph Token
</Button>
<Button
onClick={() => appId.refetch()}
variant="contained"
variant="outlined"
color="primary"
startIcon={<Sync />}
disabled={appId.isFetching}
Expand Down
6 changes: 1 addition & 5 deletions src/data/Extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
"helpText": "This integration allows you to manage your CSP licensing from CIPP. Purchase new licenses while adding or editing users in CIPP. Not a Sherweb partner? Sign up for the Sherweb Cloud Services for MSPs program.",
"mappingRequired": true,
"links": [
{
"name": "Register for beta",
"url": "https://go.cyberdrain.com/sherweb"
},
{
"name": "Sherweb Cloud Services for MSPs",
"url": "https://info.sherweb.com/sherweb-cloud-services-for-msps"
Expand Down Expand Up @@ -495,7 +491,7 @@
"label": "Enable Integration"
},
{
"type": "password",
"type": "textField",
"name": "CFZTNA.ClientID",
"label": "CloudFlare Tunnel Service Account Client ID"
},
Expand Down
4 changes: 2 additions & 2 deletions src/pages/cipp/advanced/table-maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ const Page = () => {
};

return (
<Container maxWidth="xl" sx={{ mt: 4 }}>
<Container maxWidth={false} sx={{ mt: 4, width: "100%" }}>
<Typography variant="h4" gutterBottom>
{pageTitle}
</Typography>
<Alert severity="warning" sx={{ mb: 2 }}>
This page allows you to view and manage data in Azure Tables. This is advanced functionality
that should only be used when directed by CyberDrain support.
</Alert>
<Grid container spacing={2}>
<Grid sx={{ flexGrow: 1, display: "flex" }} container spacing={2}>
<Grid item size={3}>
<CippPropertyListCard
title="Tables"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/endpoint/MEM/list-policies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Page = () => {
url: "/api/AddIntuneTemplate",
data: {
ID: "id",
ODataType: "@odata.type",
URLName: "URLName",
},
confirmText: "Are you sure you want to create a template based on this policy?",
icon: <Book />,
Expand Down
6 changes: 3 additions & 3 deletions src/pages/identity/administration/users/user/bec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const Page = () => {
const getUserMessage = () => {
if (!becPollingCall.data) return null;
if (becPollingCall.data.NewUsers && becPollingCall.data.NewUsers.length > 0) {
return "Suspicious new users have been found in the last 14 days. Please review the list below and take action as needed.";
return "New users have been found in the last 14 days. Please review the list below and take action as needed.";
}
return "No new users found.";
};
Expand All @@ -126,7 +126,7 @@ const Page = () => {
if (hasPotentialBreach) {
return "Potential Breach found.";
}
return "Suspicious new applications have been found. Please review the list below and take action as needed.";
return "New applications have been found. Please review the list below and take action as needed.";
}
return "No new applications found.";
};
Expand All @@ -137,7 +137,7 @@ const Page = () => {
becPollingCall.data.MailboxPermissionChanges &&
becPollingCall.data.MailboxPermissionChanges.length > 0
) {
return "Suspicious mailbox permission changes have been found.";
return "Mailbox permission changes have been found.";
}
return "No mailbox permission changes found.";
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tenant/standards/bpa-report/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Page = () => {
const [layoutMode, setLayoutMode] = useState("Table");
const bpaTemplateList = ApiGetCall({
url: "/api/listBPATemplates",
queryKey: "ListBPATemplates",
queryKey: "ListBPATemplates-All",
});
const tenantFilter = useSettings().currentTenant;
const bpaData = ApiGetCall({
Expand Down

0 comments on commit c581bb0

Please sign in to comment.