Skip to content

Commit

Permalink
Merge pull request #1172 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
Dev to release
  • Loading branch information
KelvinTegelaar authored Oct 28, 2022
2 parents fd0ab8e + a461a45 commit 0626ecb
Show file tree
Hide file tree
Showing 32 changed files with 1,286 additions and 352 deletions.
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.15.0
2.16.0
122 changes: 62 additions & 60 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,72 +22,74 @@ const App = () => {
return (
<BrowserRouter>
<Suspense fallback={<FullScreenLoading />}>
<ErrorBoundary>
<Helmet>
<title>CIPP</title>
</Helmet>
<Routes>
<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) => {
return (
route.component && (
<Route
key={`route-${idx}`}
path={route.path}
exact={route.exact}
name={route.name}
element={
<Helmet>
<title>CIPP</title>
</Helmet>
<Routes>
<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) => {
return (
route.component && (
<Route
key={`route-${idx}`}
path={route.path}
exact={route.exact}
name={route.name}
element={
<Suspense fallback={<Skeleton />}>
<Helmet>
<title>CIPP - {route.name}</title>
</Helmet>
<ErrorBoundary key={route.name}>
<route.component />
</ErrorBoundary>
</Suspense>
}
/>
)
)
})}
{adminRoutes.map((route, idx) => {
return (
route.component && (
<Route
key={`route-${idx}`}
path={route.path}
exact={route.exact}
name={route.name}
element={
<PrivateRoute routeType="admin">
<Suspense fallback={<Skeleton />}>
<Helmet>
<title>CIPP - {route.name}</title>
</Helmet>
<route.component />
</Suspense>
}
/>
)
)
})}
{adminRoutes.map((route, idx) => {
return (
route.component && (
<Route
key={`route-${idx}`}
path={route.path}
exact={route.exact}
name={route.name}
element={
<PrivateRoute routeType="admin">
<Suspense fallback={<Skeleton />}>
<Helmet>
<title>CIPP - {route.name}</title>
</Helmet>
<ErrorBoundary key={route.name}>
<route.component />
</Suspense>
</PrivateRoute>
}
/>
)
</ErrorBoundary>
</Suspense>
</PrivateRoute>
}
/>
)
})}
<Route path="/" element={<Navigate to="/home" replace={true} />} />
</Route>
<Route path="*" name="Page 404" element={<Page404 />} />
</Routes>
</ErrorBoundary>
)
})}
<Route path="/" element={<Navigate to="/home" replace={true} />} />
</Route>
<Route path="*" name="Page 404" element={<Page404 />} />
</Routes>
</Suspense>
</BrowserRouter>
)
Expand Down
65 changes: 40 additions & 25 deletions src/_nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List Tenants',
name: 'Tenants',
to: '/tenant/administration/tenants',
},
{
Expand All @@ -128,7 +128,7 @@ const _nav = [

{
component: CNavItem,
name: 'List Scheduled Alerts',
name: 'Scheduled Alerts',
to: '/tenant/administration/alertsqueue',
},
],
Expand Down Expand Up @@ -171,12 +171,12 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List and Edit Standards',
name: 'Edit Individual Standards',
to: '/tenant/standards/list-applied-standards',
},
{
component: CNavItem,
name: 'Apply Standard',
name: 'Apply Standards',
to: '/tenant/standards/apply-standard',
},
{
Expand Down Expand Up @@ -205,12 +205,12 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List Policies',
name: 'Policies',
to: '/tenant/conditional/list-policies',
},
{
component: CNavItem,
name: 'List Named Locations',
name: 'Named Locations',
to: '/tenant/conditional/list-named-locations',
},
{
Expand All @@ -230,7 +230,7 @@ const _nav = [
},
{
component: CNavItem,
name: 'List Templates',
name: 'Templates',
to: '/tenant/conditional/list-template',
},
],
Expand All @@ -248,12 +248,12 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List Incidents',
name: 'Incidents',
to: '/security/incidents/list-incidents',
},
{
component: CNavItem,
name: 'List Alerts',
name: 'Alerts',
to: '/security/incidents/list-alerts',
},
],
Expand Down Expand Up @@ -284,6 +284,11 @@ const _nav = [
name: 'Defender Status',
to: '/security/defender/list-defender',
},
{
component: CNavItem,
name: 'Vulnerabilities',
to: '/security/defender/list-defender-tvm',
},
],
},
{
Expand Down Expand Up @@ -313,12 +318,12 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List Applications',
name: 'Applications',
to: '/endpoint/applications/list',
},
{
component: CNavItem,
name: 'List Application Queue',
name: 'Application Queue',
to: '/endpoint/applications/queue',
},
{
Expand Down Expand Up @@ -362,17 +367,17 @@ const _nav = [
},
{
component: CNavItem,
name: 'List Autopilot Devices',
name: 'Autopilot Devices',
to: '/endpoint/autopilot/list-devices',
},
{
component: CNavItem,
name: 'List Profiles',
name: 'Profiles',
to: '/endpoint/autopilot/list-profiles',
},
{
component: CNavItem,
name: 'List Status Pages',
name: 'Status Pages',
to: '/endpoint/autopilot/list-status-pages',
},
],
Expand All @@ -386,12 +391,12 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List Devices',
name: 'Devices',
to: '/endpoint/reports/devices',
},
{
component: CNavItem,
name: 'List MEM Policies',
name: 'MEM Policies',
to: '/endpoint/MEM/list-policies',
},
{
Expand All @@ -406,7 +411,7 @@ const _nav = [
},
{
component: CNavItem,
name: 'List Templates',
name: 'Templates',
to: '/endpoint/MEM/list-templates',
},
],
Expand All @@ -424,7 +429,7 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List OneDrive',
name: 'OneDrive',
to: '/teams-share/onedrive/list',
},
],
Expand All @@ -438,7 +443,7 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List Sharepoint',
name: 'Sharepoint',
to: '/teams-share/sharepoint/list-sharepoint',
},
],
Expand All @@ -457,7 +462,7 @@ const _nav = [
},
{
component: CNavItem,
name: 'List Teams',
name: 'Teams',
to: '/teams-share/teams/list-team',
},
{
Expand Down Expand Up @@ -514,23 +519,33 @@ const _nav = [
items: [
{
component: CNavItem,
name: 'List Transport rules',
name: 'Transport rules',
to: '/email/transport/list-rules',
},
{
component: CNavItem,
name: 'Transport Templates',
to: '/email/transport/list-templates',
},
{
component: CNavItem,
name: 'Deploy Transport rule',
to: '/email/transport/deploy-rules',
},
{
component: CNavItem,
name: 'Add Template',
to: '/email/transport/add-template',
name: 'Connectors',
to: '/email/connectors/list-connectors',
},
{
component: CNavItem,
name: 'List Templates',
to: '/email/transport/list-templates',
name: 'Connector Templates',
to: '/email/connectors/list-connector-templates',
},
{
component: CNavItem,
name: 'Deploy Connector Templates',
to: '/email/connectors/deploy-connector',
},
],
},
Expand Down
7 changes: 6 additions & 1 deletion src/components/forms/RFFComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ RFFCFormSelect.propTypes = {
values: PropTypes.arrayOf(PropTypes.shape({ label: PropTypes.string, value: PropTypes.any })),
}

export function Condition({ when, is, children, like }) {
export function Condition({ when, is, children, like, regex }) {
return (
<>
{is && (
Expand All @@ -271,6 +271,11 @@ export function Condition({ when, is, children, like }) {
{({ input: { value } }) => (value.includes(like) ? children : null)}
</Field>
)}
{regex && (
<Field name={when} subscription={{ value: true }}>
{({ input: { value } }) => (value.match(regex) ? children : null)}
</Field>
)}
</>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/CippContentCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function CippContentCard({
className = null,
}) {
return (
<CCard className={`content-card ${className ?? ''}`}>
<CCard className={`content-card h-100 ${className ?? ''}`}>
<CCardHeader className="d-flex justify-content-between align-items-center">
<CCardTitle>{title}</CCardTitle>
{icon ? <FontAwesomeIcon icon={icon} /> : null}
Expand Down
Loading

0 comments on commit 0626ecb

Please sign in to comment.