Skip to content

Commit

Permalink
Merge pull request #92 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
[pull] dev from KelvinTegelaar:dev
  • Loading branch information
BNWEIN authored Jun 7, 2024
2 parents 07e8da9 + 68f666c commit 4536c2e
Show file tree
Hide file tree
Showing 80 changed files with 7,460 additions and 2,705 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.0",
"version": "5.7.1",
"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.0
5.7.1
108 changes: 53 additions & 55 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React, { Suspense } from 'react'
import { BrowserRouter, Route, Routes, Navigate } from 'react-router-dom'
import { BrowserRouter, Route, Routes, Navigate, useLocation } from 'react-router-dom'
import { PrivateRoute, FullScreenLoading, ErrorBoundary } from 'src/components/utilities'
import 'src/scss/style.scss'
import { Helmet } from 'react-helmet-async'
import { Helmet, HelmetProvider } from 'react-helmet-async'
import Skeleton from 'react-loading-skeleton'
import TimeAgo from 'javascript-time-ago'
import en from 'javascript-time-ago/locale/en.json'
TimeAgo.addDefaultLocale(en)
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import routes from 'src/routes'
import { useAuthCheck } from './components/utilities/CippauthCheck'
import importsMap from './importsMap'

library.add(fas)
Expand All @@ -32,59 +31,58 @@ const Logout = React.lazy(() => import('./views/pages/login/Logout'))
const App = () => {
return (
<BrowserRouter>
<Suspense fallback={<FullScreenLoading />}>
<Helmet>
<title>CIPP</title>
</Helmet>
<Routes>
<Route exact path="/LogoutRedirect" name="LogoutRedirect" element={<PageLogOut />} />
<Route exact path="/401" name="Page 401" element={<Page401 />} />
<Route exact path="/403" name="Page 403" element={<Page403 />} />
<Route exact path="/404" name="Page 404" element={<Page404 />} />
<Route exact path="/500" name="Page 500" element={<Page500 />} />
<Route exact path="/login" name="Login" element={<Login />} />
<Route exact path="/logout" name="Logout" element={<Logout />} />
<Route
path="/"
element={
<PrivateRoute>
<DefaultLayout />
</PrivateRoute>
}
>
{routes.map((route, idx) => {
const allowedRoles = route.allowedRoles
const Routecomponent = dynamicImport(route.path)
//console.log('route', route)
//console.log('Routecomponent', Routecomponent)
return (
route.component && (
<Route
key={`route-${idx}`}
path={route.path}
exact={route.exact}
name={route.name}
element={
<PrivateRoute allowedRoles={allowedRoles}>
<Suspense fallback={<Skeleton />}>
<Helmet>
<title>CIPP - {route.name}</title>
</Helmet>
<ErrorBoundary key={route.name}>
<Routecomponent />
</ErrorBoundary>
</Suspense>
</PrivateRoute>
}
/>
<HelmetProvider>
<Suspense fallback={<FullScreenLoading />}>
<Helmet>
<title>CIPP</title>
</Helmet>
<Routes>
<Route exact path="/LogoutRedirect" name="LogoutRedirect" element={<PageLogOut />} />
<Route exact path="/401" name="Page 401" element={<Page401 />} />
<Route exact path="/403" name="Page 403" element={<Page403 />} />
<Route exact path="/404" name="Page 404" element={<Page404 />} />
<Route exact path="/500" name="Page 500" element={<Page500 />} />
<Route exact path="/login" name="Login" element={<Login />} />
<Route exact path="/logout" name="Logout" element={<Logout />} />
<Route
path="/"
element={
<PrivateRoute>
<DefaultLayout />
</PrivateRoute>
}
>
{routes.map((route, idx) => {
const allowedRoles = route.allowedRoles
const Routecomponent = dynamicImport(route.path)
//console.log('route', route)
//console.log('Routecomponent', Routecomponent)
return (
route.component && (
<Route
key={`route-${idx}`}
path={route.path}
exact={route.exact}
name={route.name}
element={
<PrivateRoute allowedRoles={allowedRoles}>
<Suspense fallback={<Skeleton />}>
<ErrorBoundary key={route.name}>
<Routecomponent />
</ErrorBoundary>
</Suspense>
</PrivateRoute>
}
/>
)
)
)
})}
<Route path="/" element={<Navigate to="/home" replace={true} />} />
</Route>
<Route path="*" name="Page 404" element={<Page404 />} />
</Routes>
</Suspense>
})}
<Route path="/" element={<Navigate to="/home" replace={true} />} />
</Route>
<Route path="*" name="Page 404" element={<Page404 />} />
</Routes>
</Suspense>
</HelmetProvider>
</BrowserRouter>
)
}
Expand Down
38 changes: 31 additions & 7 deletions src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ const _nav = [
name: 'Roles',
to: '/identity/administration/roles',
},
{
component: CNavItem,
name: 'JIT Admin',
to: '/identity/administration/jit-admin',
},
{
component: CNavItem,
name: 'Offboarding Wizard',
Expand Down Expand Up @@ -129,14 +134,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 +155,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 +707,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 Expand Up @@ -757,6 +776,11 @@ const _nav = [
name: 'Application Settings',
to: '/cipp/settings',
},
{
component: CNavItem,
name: 'Extensions Settings',
to: '/cipp/extensions',
},
{
component: CNavItem,
name: 'User Settings',
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,
}
Loading

0 comments on commit 4536c2e

Please sign in to comment.