Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rbanke committed May 16, 2024
2 parents 080afeb + 1c76dec commit 497f33f
Show file tree
Hide file tree
Showing 60 changed files with 5,475 additions and 2,468 deletions.
13 changes: 11 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "5.6.1",
"version": "5.7.0",
"description": "The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners.",
"homepage": "https://cipp.app/",
"bugs": {
Expand Down Expand Up @@ -64,6 +64,7 @@
"react": "^18.2.0",
"react-app-polyfill": "^2.0.0",
"react-bootstrap": "^1.6.5",
"react-circular-progressbar": "^2.1.0",
"react-copy-to-clipboard": "^5.1.0",
"react-data-table-component": "^7.4.5",
"react-datepicker": "^4.10.0",
Expand Down
16 changes: 16 additions & 0 deletions public/GDAPRoles.json
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,22 @@
"Name": "Virtual Visits Administrator",
"ObjectId": "e300d9e7-4a2b-4295-9eff-f1c78b36cc98"
},
{
"ExtensionData": {},
"Description": "Manage and configure all aspects of Microsoft Viva Goals.",
"IsEnabled": true,
"IsSystem": true,
"Name": "Viva Goals Administrator",
"ObjectId": "92b086b3-e367-4ef2-b869-1de128fb986e"
},
{
"ExtensionData": {},
"Description": "Can manage all settings for Microsoft Viva Pulse app.",
"IsEnabled": true,
"IsSystem": true,
"Name": "Viva Pulse Administrator",
"ObjectId": "87761b17-1ed2-4af3-9acd-92a150038160"
},
{
"ExtensionData": {},
"Description": "Can provision and manage all aspects of Cloud PCs.",
Expand Down
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.6.1
5.7.0
28 changes: 21 additions & 7 deletions src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,9 @@ const _nav = [
},
{
component: CNavItem,
name: 'Alerts (Classic)',
name: 'Alerts',
to: '/tenant/administration/alertsqueue',
},
{
component: CNavItem,
name: 'Alert Rules',
to: '/tenant/administration/AlertRules',
},
{
component: CNavItem,
name: 'Enterprise Applications',
Expand All @@ -155,7 +150,7 @@ const _nav = [
{
component: CNavItem,
name: 'Tenant Onboarding',
to: '/tenant/administration/tenant-onboarding-wizard',
to: '/tenant/administration/tenant-onboarding',
},
{
component: CNavItem,
Expand Down Expand Up @@ -707,6 +702,25 @@ const _nav = [
},
],
},
{
component: CNavGroup,
name: ' Room Management',
section: 'Email & Exchange',
to: '/rooms/management',
icon: <FontAwesomeIcon icon={faToolbox} className="nav-icon" />,
items: [
{
component: CNavItem,
name: 'Rooms',
to: '/rooms/management/list-rooms',
},
{
component: CNavItem,
name: 'Room Lists',
to: '/rooms/management/room-lists',
},
],
},
{
component: CNavGroup,
name: 'Reports',
Expand Down
49 changes: 49 additions & 0 deletions src/components/contentcards/CippAccordionItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from 'react'
import {
CAccordionBody,
CAccordionHeader,
CAccordionItem,
CCard,
CCardBody,
CCardFooter,
CCardHeader,
CCardTitle,
} from '@coreui/react'
import Skeleton from 'react-loading-skeleton'
import PropTypes from 'prop-types'

export default function CippAccordionItem({
title,
titleType = 'normal',
CardButton,
children,
isFetching,
}) {
return (
<CAccordionItem>
<CAccordionHeader>{title}</CAccordionHeader>
<CAccordionBody>
<CCard>
<CCardHeader>
<CCardTitle>
{titleType === 'big' ? <h3 className="underline mb-3">{title}</h3> : title}
</CCardTitle>
</CCardHeader>
<CCardBody className="my-3">
{isFetching && <Skeleton />}
{children}
</CCardBody>
<CCardFooter>{CardButton}</CCardFooter>
</CCard>
</CAccordionBody>
</CAccordionItem>
)
}

CippAccordionItem.propTypes = {
title: PropTypes.string.isRequired,
titleType: PropTypes.string,
CardButton: PropTypes.element.isRequired,
children: PropTypes.element.isRequired,
isFetching: PropTypes.bool.isRequired,
}
10 changes: 9 additions & 1 deletion src/components/contentcards/CippButtonCard.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { CCard, CCardBody, CCardFooter, CCardHeader, CCardTitle } from '@coreui/react'
import Skeleton from 'react-loading-skeleton'
import PropTypes from 'prop-types'

export default function CippButtonCard({
title,
Expand All @@ -25,3 +25,11 @@ export default function CippButtonCard({
</CCard>
)
}

CippButtonCard.propTypes = {
title: PropTypes.string.isRequired,
titleType: PropTypes.string,
CardButton: PropTypes.element.isRequired,
children: PropTypes.element.isRequired,
isFetching: PropTypes.bool.isRequired,
}
86 changes: 86 additions & 0 deletions src/components/contentcards/CippChartCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { CButton, CCard, CCardBody, CCardHeader, CCardTitle } from '@coreui/react'
import { CChart } from '@coreui/react-chartjs'
import { getStyle } from '@coreui/utils'
import PropTypes from 'prop-types'

export default function CippChartCard({
title,
titleType = 'normal',
ChartData,
ChartLabels,
ChartType = 'pie',
LegendLocation = 'bottom',
isFetching,
refreshFunction,
}) {
return (
<CCard className="h-100 mb-3">
<CCardHeader>
<CCardTitle>
{titleType === 'big' ? <h3 className="underline mb-3">{title}</h3> : title}
{refreshFunction ? (
<CButton
className="position-absolute top-0 end-0 mt-2 me-2"
variant="ghost"
onClick={refreshFunction}
disabled={isFetching}
>
<FontAwesomeIcon icon="sync" spin={isFetching} />
</CButton>
) : (
<CButton className="position-absolute top-0 end-0 mt-2 me-2" variant="ghost" disabled>
<FontAwesomeIcon icon="sync" spin={isFetching} />
</CButton>
)}
</CCardTitle>
</CCardHeader>
<CCardBody>
{ChartData && (
<CChart
type={ChartType}
data={{
labels: ChartLabels,
datasets: [
{
label: title,
backgroundColor: [
getStyle('--cyberdrain-warning'),
getStyle('--cyberdrain-info'),
getStyle('--cyberdrain-success'),
getStyle('--cyberdrain-danger'),
getStyle('--cyberdrain-primary'),
getStyle('--cyberdrain-secondary'),
],
data: ChartData,
borderWidth: 3,
},
],
}}
options={{
plugins: {
legend: {
position: LegendLocation,
labels: {
color: getStyle('--cui-body-color'),
},
},
},
}}
/>
)}
</CCardBody>
</CCard>
)
}
CippChartCard.propTypes = {
title: PropTypes.string.isRequired,
titleType: PropTypes.oneOf(['normal', 'big']),
ChartData: PropTypes.array.isRequired,
ChartLabels: PropTypes.array.isRequired,
ChartType: PropTypes.oneOf(['pie', 'bar', 'line']),
LegendLocation: PropTypes.oneOf(['top', 'bottom', 'left', 'right']),
isFetching: PropTypes.bool,
refreshFunction: PropTypes.func,
}
46 changes: 46 additions & 0 deletions src/components/contentcards/CippPrettyCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react'
import { CCard, CCardBody, CCardFooter, CCardHeader, CCardTitle, CCol, CRow } from '@coreui/react'
import Skeleton from 'react-loading-skeleton'
import { CircularProgressbar } from 'react-circular-progressbar'
import 'react-circular-progressbar/dist/styles.css'

export default function CippPrettyCard({
title,
titleType = 'normal',
percentage,
topLabel,
smallLabel,
ringcolor = '#f89226',
isFetching,
}) {
return (
<CCard className="h-100 mb-3">
<CCardHeader>
<CCardTitle>
{titleType === 'big' ? <h3 className="underline mb-3">{title}</h3> : title}
</CCardTitle>
</CCardHeader>
<CCardBody>
{isFetching && <Skeleton />}
{!isFetching && (
<CRow>
<CCol>
<div style={{ width: '50%', height: '50%' }}>
<CircularProgressbar
styles={{ path: { stroke: ringcolor }, text: { fill: ringcolor } }}
strokeWidth={3}
value={percentage}
text={`${percentage}%`}
/>
</div>
</CCol>
<CCol className="m-2">
<h4>{topLabel}</h4>
<small className="text-medium-emphasis">{smallLabel}</small>
</CCol>
</CRow>
)}
</CCardBody>
</CCard>
)
}
Loading

0 comments on commit 497f33f

Please sign in to comment.