Skip to content
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

[pull] main from KelvinTegelaar:main #57

Merged
merged 60 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d0a3ac9
Create azure-static-web-apps-proud-smoke-0849e8603.yml
BNWEIN Oct 9, 2023
e0798d2
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Oct 12, 2023
7872684
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Oct 13, 2023
49712dd
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Oct 13, 2023
4f6b4eb
Add Advanced Out of Office Tool
Jr7468 Oct 13, 2023
96f34f4
Merge branch 'KelvinTegelaar:dev' into dev
Jr7468 Oct 13, 2023
749b17b
Delete .github/workflows/azure-static-web-apps-proud-smoke-0849e8603.yml
BNWEIN Oct 15, 2023
2fc7853
fixes sort
KelvinTegelaar Oct 16, 2023
f3b2d22
Merge pull request #1804 from Jr7468/dev
KelvinTegelaar Oct 17, 2023
7f4c8df
Fixed spacing
Jr7468 Oct 17, 2023
176471a
Merge branch 'KelvinTegelaar:dev' into dev
Jr7468 Oct 17, 2023
beaabfa
Merge pull request #1811 from Jr7468/dev
KelvinTegelaar Oct 17, 2023
680d253
Used regex to eliminate HTML elements in output
Jr7468 Oct 18, 2023
192621f
Merge branch 'dev' of https://github.com/Jr7468/CIPP into dev
Jr7468 Oct 18, 2023
807b90d
Permission Checks
JohnDuprey Oct 19, 2023
9012adf
Merge pull request #86 from KelvinTegelaar/dev
JohnDuprey Oct 19, 2023
06db64e
spacing
JohnDuprey Oct 19, 2023
f895e1c
Merge pull request #1813 from Jr7468/dev
KelvinTegelaar Oct 19, 2023
7bb748b
Merge pull request #1815 from johnduprey/dev
KelvinTegelaar Oct 19, 2023
7b36891
changed text a little.
KelvinTegelaar Oct 19, 2023
09a4052
changed nav
KelvinTegelaar Oct 19, 2023
d752fbb
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Oct 19, 2023
a8f7ddc
Fixed Link on Transport Rules Page
BNWEIN Oct 20, 2023
8dcfb90
Add an Edit Mailbox Permissions button when viewing a user
kris6673 Oct 20, 2023
08f1422
Merge pull request #1821 from kris6673/dev
KelvinTegelaar Oct 20, 2023
2c7493a
Merge pull request #1820 from BNWEIN/Transport-Rules-Page-Fix
KelvinTegelaar Oct 20, 2023
0a1abb1
Tenant Access Check
JohnDuprey Oct 21, 2023
42de4f3
Merge pull request #1824 from johnduprey/dev
KelvinTegelaar Oct 22, 2023
8631d8b
improvements to table looks
KelvinTegelaar Oct 22, 2023
9c0b574
caps
KelvinTegelaar Oct 22, 2023
8cd0cb7
add requireMFAadd requireMFA
KelvinTegelaar Oct 23, 2023
eda41a1
Remove mailbox permissions
KelvinTegelaar Oct 23, 2023
5a863dc
prettification
KelvinTegelaar Oct 23, 2023
7877fa2
Fix small label error to make labels consistent with the ones found i…
kris6673 Oct 23, 2023
8716e55
Whoops
kris6673 Oct 23, 2023
fa5ab48
Move timeout to global standards
kris6673 Oct 23, 2023
4fc2843
CippTable / Access Check Tweaks
JohnDuprey Oct 24, 2023
0095c52
Merge pull request #1830 from johnduprey/dev
KelvinTegelaar Oct 24, 2023
a12fc11
Merge pull request #1829 from kris6673/dev
KelvinTegelaar Oct 24, 2023
cb68ab8
external link for GA
KelvinTegelaar Oct 24, 2023
c9f6c90
Make Universal search remember the user you clicked on
kris6673 Oct 24, 2023
acf3131
Merge pull request #1831 from kris6673/dev
KelvinTegelaar Oct 24, 2023
bc60b61
fix spacing
KelvinTegelaar Oct 24, 2023
9055f28
case sensitivity issue
KelvinTegelaar Oct 26, 2023
13c1736
improvements to cipp-sam
KelvinTegelaar Oct 26, 2023
b557a23
Update ListAppliedStandards.js
BNWEIN Oct 26, 2023
f4afa69
Merge pull request #1832 from BNWEIN/dev
KelvinTegelaar Oct 26, 2023
0752d4b
added complex filter licenses
KelvinTegelaar Oct 26, 2023
c9e0609
add standard
KelvinTegelaar Oct 26, 2023
073e033
Fix bug with showing logs
KelvinTegelaar Oct 26, 2023
406355a
removed console.logs
KelvinTegelaar Oct 26, 2023
9573b96
Add custom group support for apps
KelvinTegelaar Oct 26, 2023
060509e
add removal of standards from table
KelvinTegelaar Oct 26, 2023
86ec453
added custom groups for intune
KelvinTegelaar Oct 26, 2023
c59af15
add autoextend button
KelvinTegelaar Oct 26, 2023
f34fe8f
fix bulk extend
KelvinTegelaar Oct 26, 2023
ca4ad83
uncomment migration tool becasue extra month
KelvinTegelaar Oct 27, 2023
12872b8
old content
KelvinTegelaar Oct 27, 2023
34a8a1a
upped version
KelvinTegelaar Oct 27, 2023
5a6b29d
Merge pull request #1834 from KelvinTegelaar/dev
KelvinTegelaar Oct 27, 2023
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
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.0
4.5.0
93 changes: 41 additions & 52 deletions src/_nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,45 @@ const _nav = [
},
],
},
{
component: CNavGroup,
name: 'GDAP Management',
section: 'Settings',
to: '/cipp/gdap',
icon: <FontAwesomeIcon icon={faUserShield} className="nav-icon" />,
items: [
{
component: CNavItem,
name: 'Role Wizard',
to: '/tenant/administration/gdap-role-wizard',
},
{
component: CNavItem,
name: 'GDAP Roles',
to: '/tenant/administration/gdap-roles',
},
{
component: CNavItem,
name: 'Migration Wizard',
to: '/tenant/administration/gdap',
},
{
component: CNavItem,
name: 'GDAP Migration Status',
to: '/tenant/administration/gdap-status',
},
{
component: CNavItem,
name: 'Invite Wizard',
to: '/tenant/administration/gdap-invite',
},
{
component: CNavItem,
name: 'GDAP Relationships',
to: '/tenant/administration/gdap-relationships',
},
],
},
{
component: CNavGroup,
name: 'Reports',
Expand Down Expand Up @@ -293,15 +332,6 @@ const _nav = [
},
],
},
// Coming in another branch (heads up)
//{
//component: CNavGroup,
//name: 'Vulnerabilities',
//section: 'Security & Compliance',
//to: '/security/vulnerabilities',
//icon: <FontAwesomeIcon icon={faChessRook} className="nav-icon" />,
//items: [],
//},
{
component: CNavGroup,
name: 'Defender',
Expand Down Expand Up @@ -678,56 +708,15 @@ const _nav = [
name: 'Logbook',
to: '/cipp/logs',
},

{
component: CNavItem,
name: 'SAM Setup Wizard',
to: '/cipp/setup',
},
],
},
{
component: CNavGroup,
name: 'GDAP Migration',
section: 'Settings',
to: '/cipp/gdap',
icon: <FontAwesomeIcon icon={faUserShield} className="nav-icon" />,
items: [
{
component: CNavItem,
name: 'Role Wizard',
to: '/tenant/administration/gdap-role-wizard',
},
{
component: CNavItem,
name: 'GDAP Roles',
to: '/tenant/administration/gdap-roles',
},
{
component: CNavItem,
name: 'Migration Wizard',
to: '/tenant/administration/gdap',
},
{
component: CNavItem,
name: 'GDAP Migration Status',
to: '/tenant/administration/gdap-status',
},
{
component: CNavItem,
name: 'Invite Wizard',
to: '/tenant/administration/gdap-invite',
},
{
component: CNavItem,
name: 'GDAP Relationships',
to: '/tenant/administration/gdap-relationships',
},
{
component: CNavItem,
name: 'Documentation',
href: 'https://cipp.app/docs/user/usingcipp/GDAP/migration',
target: '_blank',
name: 'Log Out',
to: '/logout',
},
],
},
Expand Down
40 changes: 40 additions & 0 deletions src/components/buttons/TableModalButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react'
import { CButton } from '@coreui/react'
import { ModalService } from '../utilities'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'
import { cellGenericFormatter } from '../tables/CellGenericFormat'

export default function TableModalButton({ data, title, className }) {
const handleTable = (data) => {
const QueryColumns = []
const columns = Object.keys(data[0]).map((key) => {
QueryColumns.push({
name: key,
selector: (row) => row[key], // Accessing the property using the key
sortable: true,
exportSelector: key,
cell: cellGenericFormatter(),
})
})
ModalService.open({
data: data,
componentType: 'table',
componentProps: {
columns: QueryColumns,
keyField: 'id',
},
title: title,
size: 'lg',
})
}
const buttonClass = 'btn ' + className

return (
<CButton className={buttonClass} onClick={() => handleTable(data)}>
<>
{title} ({data.length})
</>
</CButton>
)
}
3 changes: 2 additions & 1 deletion src/components/buttons/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ExportCsvButton from 'src/components/buttons/CsvButton'
import ExportPDFButton from 'src/components/buttons/PdfButton'
import TitleButton from 'src/components/buttons/TitleButton'
import TableModalButton from 'src/components/buttons/TableModalButton'

export { ExportCsvButton, ExportPDFButton, TitleButton }
export { ExportCsvButton, ExportPDFButton, TitleButton, TableModalButton }
38 changes: 31 additions & 7 deletions src/components/tables/CellTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@ import { CButton } from '@coreui/react'
import { ModalService } from '../utilities'
import { CBadge } from '@coreui/react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'
import { faCheckCircle, faTimesCircle } from '@fortawesome/free-solid-svg-icons' // 1. Import the required FontAwesome icon
import { cellGenericFormatter } from './CellGenericFormat'

export default function cellTable(row, column, propertyName) {
export default function cellTable(
row,
column,
propertyName,
checkWhenZero = false,
crossWhenZero = false,
) {
const handleTable = ({ row }) => {
const QueryColumns = []
const columns = Object.keys(row[propertyName][0]).map((key) => {
QueryColumns.push({
name: key,
selector: (row) => row[key], // Accessing the property using the key
selector: (row) => row[key],
sortable: true,
exportSelector: key,
cell: cellGenericFormatter(),
Expand All @@ -29,8 +35,24 @@ export default function cellTable(row, column, propertyName) {
size: 'lg',
})
}
//if the row propertyName is a bool, then return a check or cross
if (typeof row[propertyName] === 'boolean') {
if (row[propertyName]) {
return <FontAwesomeIcon icon={faCheckCircle} className="text-success" />
}
return <FontAwesomeIcon icon={faTimesCircle} className="text-danger" />
}

if (!row[propertyName] || !Array.isArray(row[propertyName]) || row.length === 0) {
if (!row[propertyName] || !Array.isArray(row[propertyName]) || row[propertyName].length === 0) {
if (row[propertyName] === undefined) {
return <FontAwesomeIcon icon={faCheckCircle} className="text-success" />
}
if (checkWhenZero) {
return <FontAwesomeIcon icon={faCheckCircle} className="text-success" />
}
if (crossWhenZero) {
return <FontAwesomeIcon icon={faTimesCircle} className="text-danger" />
}
return <FontAwesomeIcon icon={faCheckCircle} className="text-success" />
}

Expand All @@ -41,6 +63,8 @@ export default function cellTable(row, column, propertyName) {
)
}

export const cellTableFormatter = (propertyName) => (row, index, column, id) => {
return cellTable(row, column, propertyName)
}
export const cellTableFormatter =
(propertyName, checkWhenZero = false, crossWhenZero = false) =>
(row, index, column, id) => {
return cellTable(row, column, propertyName, checkWhenZero, crossWhenZero)
}
55 changes: 28 additions & 27 deletions src/components/tables/CippTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,23 @@ FilterComponent.propTypes = {
filterlist: PropTypes.arrayOf(PropTypes.object),
onFilterPreset: PropTypes.func,
}
const compareValues = (a, b) => {
if (a === null) return 1
if (b === null) return -1
if (typeof a === 'number' && typeof b === 'number') return a - b
if (typeof a === 'boolean' && typeof b === 'boolean') return a === b ? 0 : a ? -1 : 1
return String(a).localeCompare(String(b), 'en', { numeric: true })
}

const customSort = (rows, selector, direction) => {
return rows.sort((a, b) => {
// use the selector to resolve your field names by passing the sort comparitors
let aField
let bField

aField = selector(a)
bField = selector(b)

let comparison = 0

if (aField?.toString().localeCompare(bField, 'en', { numeric: true }) > 0) {
comparison = 1
} else if (aField?.toString().localeCompare(bField, 'en', { numeric: true }) < 0) {
comparison = -1
}

let aField = selector(a)
let bField = selector(b)
let comparison = compareValues(aField, bField)
return direction === 'desc' ? comparison * -1 : comparison
})
}

export default function CippTable({
data,
isFetching = false,
Expand All @@ -115,6 +111,7 @@ export default function CippTable({
isModal = false,
exportFiltered = false,
filterlist,
showFilter = true,
tableProps: {
keyField = 'id',
theme = 'cyberdrain',
Expand Down Expand Up @@ -472,6 +469,10 @@ export default function CippTable({
])
}

actions.forEach((action) => {
defaultActions.push(action)
})

if (!disablePDFExport || !disableCSVExport) {
const keys = []
const exportFormatter = {}
Expand Down Expand Up @@ -582,9 +583,7 @@ export default function CippTable({
</CDropdown>,
])
}
actions.forEach((action) => {
defaultActions.push(action)
})

defaultActions.push([
<ExportPDFButton
key="export-pdf-action"
Expand Down Expand Up @@ -631,15 +630,17 @@ export default function CippTable({
return (
<>
<div className="w-100 d-flex justify-content-start">
<FilterComponent
onFilter={(e) => setFilterText(e.target.value)}
onFilterPreset={(e) => {
setFilterText(e)
}}
onClear={handleClear}
filterText={filterText}
filterlist={filterlist}
/>
{showFilter && (
<FilterComponent
onFilter={(e) => setFilterText(e.target.value)}
onFilterPreset={(e) => {
setFilterText(e)
}}
onClear={handleClear}
filterText={filterText}
filterlist={filterlist}
/>
)}
{defaultActions}
</div>
</>
Expand Down
6 changes: 4 additions & 2 deletions src/components/utilities/UniversalSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const UniversalSearch = React.forwardRef(

const handleKeyDown = (event) => {
if (event.key === 'Enter') {
// on enter key, start the search
// on enter key, start the searchs
getSearchItems({ path: `/api/ExecUniversalSearch?name=${searchValue}` })
}
}
Expand Down Expand Up @@ -80,7 +80,9 @@ const ResultsRow = ({ match }) => {

const handleClick = () => {
dispatch(hideSwitcher())
navigate(`/identity/administration/users?customerId=${match._tenantId}`)
navigate(
`/identity/administration/users?customerId=${match._tenantId}&tableFilter=${match.userPrincipalName}`,
)
}

return (
Expand Down
15 changes: 14 additions & 1 deletion src/data/standards.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,13 @@
},
"label": "Set Outbound Spam Alert e-mail"
},
{
"name": "standards.SafeSendersDisable",
"cat": "Exchange",
"helpText": "",
"addedComponent": null,
"label": "Remove Safe Senders to prevent SPF bypass"
},
{
"name": "standards.DisableSharedMailbox",
"cat": "Exchange",
Expand Down Expand Up @@ -332,7 +339,7 @@
},
{
"name": "standards.ActivityBasedTimeout",
"cat": "SharePoint",
"cat": "Global",
"helpText": "",
"addedComponent": null,
"label": "Enable 1 hour Activity based Timeout"
Expand Down Expand Up @@ -415,6 +422,12 @@
},
"label": "Set inactive device retirement days"
},
{
"name": "standards.intuneRequireMFA",
"cat": "Intune",
"helpText": "",
"label": "Require Multifactor Authentication to register or join devices with Microsoft Entra"
},
{
"name": "standards.sharingCapability.Enabled",
"cat": "SharePoint",
Expand Down
Loading
Loading