Skip to content

Commit 0d5cafc

Browse files
Merge pull request #770 from KelvinTegelaar/dev
Pushing dev to release
2 parents 1901a03 + 4a49a39 commit 0d5cafc

32 files changed

+1034
-500
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This project is **FREE** but we do have a **Sponsorware** component. The sponsor
5151
- The project will be hosted for you.
5252
- The hosted version will always be the latest release and automatically updated.
5353
- You'll also receive a staging environment with the latest (nightly/beta) build, to see new features before anyone else.
54-
- You will receive priority on support issues reported on Github.
54+
- You will receive priority on support issues reported on GitHub.
5555
- You will be able to make 1 priortized feature request per month.
5656

5757
Sponsorship allows me to sink some more time into this project and keep it free, so please consider it. :)

package-lock.json

Lines changed: 147 additions & 245 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/version_latest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.2
1+
2.2.0

src/_nav.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ const _nav = [
8080
name: 'Basic Auth Report',
8181
to: '/identity/reports/basic-auth-report',
8282
},
83+
{
84+
component: CNavItem,
85+
name: 'AAD Connect Report',
86+
to: '/identity/reports/azure-ad-connect-report',
87+
},
8388
],
8489
},
8590
{
@@ -95,9 +100,14 @@ const _nav = [
95100
items: [
96101
{
97102
component: CNavItem,
98-
name: 'Tenants',
103+
name: 'List Tenants',
99104
to: '/tenant/administration/tenants',
100105
},
106+
{
107+
component: CNavItem,
108+
name: 'List Licences',
109+
to: '/tenant/administration/list-licenses',
110+
},
101111
{
102112
component: CNavItem,
103113
name: 'Conditional Access Policies',
@@ -167,6 +177,11 @@ const _nav = [
167177
name: 'List Alerts',
168178
to: '/security/reports/list-alerts',
169179
},
180+
{
181+
component: CNavItem,
182+
name: 'Device Compliance',
183+
to: '/security/reports/list-device-compliance',
184+
},
170185
],
171186
},
172187
{
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
3+
import { CListGroup, CListGroupItem } from '@coreui/react'
4+
import { CippOffcanvas } from '.'
5+
6+
export default function CippListOffcanvas(props) {
7+
return (
8+
<CippOffcanvas
9+
placement={props.placement}
10+
title={props.title}
11+
visible={props.visible}
12+
id={props.id}
13+
hideFunction={props.hideFunction}
14+
>
15+
{props.groups.map((group, key) => (
16+
<OffcanvasListSection title={group.title} items={group.items} key={key} />
17+
))}
18+
</CippOffcanvas>
19+
)
20+
}
21+
22+
CippListOffcanvas.propTypes = {
23+
groups: PropTypes.array,
24+
placement: PropTypes.string.isRequired,
25+
title: PropTypes.string.isRequired,
26+
visible: PropTypes.bool,
27+
id: PropTypes.string.isRequired,
28+
hideFunction: PropTypes.func.isRequired,
29+
}
30+
31+
export function OffcanvasListSection({ title, items }) {
32+
return (
33+
<>
34+
<h4 className="mt-4">{title}</h4>
35+
{items.length > 0 && (
36+
<CListGroup className="my-3">
37+
{items.map((item, key) => (
38+
<CListGroupItem className="d-flex justify-content-between align-items-center" key={key}>
39+
{item.heading && <h6 className="w-50 mb-0">{item.heading}</h6>}
40+
{item.content}
41+
</CListGroupItem>
42+
))}
43+
</CListGroup>
44+
)}
45+
</>
46+
)
47+
}
48+
OffcanvasListSection.propTypes = {
49+
title: PropTypes.string,
50+
items: PropTypes.array,
51+
}

src/components/utilities/TenantSelector.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { useDispatch, useSelector } from 'react-redux'
44
import PropTypes from 'prop-types'
55
import { useListTenantsQuery } from 'src/store/api/tenants'
66
import { setCurrentTenant } from 'src/store/features/app'
7+
import { CippContentCard } from 'src/components/layout'
8+
import { faCity, faBuilding } from '@fortawesome/free-solid-svg-icons'
79

810
const TenantSelector = ({ action, showAllTenantSelector = false }) => {
911
const dispatch = useDispatch()
@@ -29,18 +31,24 @@ const TenantSelector = ({ action, showAllTenantSelector = false }) => {
2931
}
3032

3133
return (
32-
<SelectSearch
33-
search
34-
onChange={activated}
35-
filterOptions={fuzzySearch}
36-
placeholder={placeholder}
37-
disabled={isLoading}
38-
value={currentTenant && currentTenant.customerId}
39-
options={tenants.map(({ customerId, displayName, defaultDomainName }) => ({
40-
value: customerId,
41-
name: [displayName] + [` (${defaultDomainName})`],
42-
}))}
43-
/>
34+
<CippContentCard
35+
title={showAllTenantSelector ? 'Select a Tenant or All Tenants' : 'Select a Tenant'}
36+
icon={showAllTenantSelector ? faCity : faBuilding}
37+
className="tenant-selector"
38+
>
39+
<SelectSearch
40+
search
41+
onChange={activated}
42+
filterOptions={fuzzySearch}
43+
placeholder={placeholder}
44+
disabled={isLoading}
45+
value={currentTenant && currentTenant.customerId}
46+
options={tenants.map(({ customerId, displayName, defaultDomainName }) => ({
47+
value: customerId,
48+
name: [displayName] + [` (${defaultDomainName})`],
49+
}))}
50+
/>
51+
</CippContentCard>
4452
)
4553
}
4654

src/components/utilities/Toasts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const Toast = ({ message, title, onClose, error }) => {
3939
<CToastBody>
4040
<div className="d-flex justify-content-between align-items-center text-danger">
4141
<strong>{message}</strong>
42-
<CButton size="sm" variant="outline" color="light" onClick={() => setVisible(!visible)}>
42+
<CButton size="sm" variant="outline" color="primary" onClick={() => setVisible(!visible)}>
4343
Details
4444
<FontAwesomeIcon
4545
className="ms-1"

src/routes.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ const EditTenant = React.lazy(() => import('src/views/tenant/administration/Edit
2626
const ConditionalAccess = React.lazy(() =>
2727
import('src/views/tenant/administration/ConditionalAccess'),
2828
)
29+
const ListLicences = React.lazy(() => import('src/views/tenant/administration/ListLicences'))
2930

3031
const BasicAuthReport = React.lazy(() => import('src/views/identity/reports/BasicAuthReport'))
32+
const AzureADConnectReport = React.lazy(() =>
33+
import('src/views/identity/reports/AzureADConnectReport'),
34+
)
35+
const DeviceComplianceReport = React.lazy(() =>
36+
import('src/views/security/reports/ListDeviceComplianceReport'),
37+
)
3138
const BestPracticeAnalyzer = React.lazy(() =>
3239
import('src/views/tenant/standards/BestPracticeAnalyser'),
3340
)
@@ -39,7 +46,6 @@ const ListAppliedStandards = React.lazy(() =>
3946
import('src/views/tenant/standards/ListAppliedStandards'),
4047
)
4148
const IndividualDomain = React.lazy(() => import('src/views/tenant/standards/IndividualDomain'))
42-
const ApplyStandard = React.lazy(() => import('src/views/tenant/standards/ApplyStandard'))
4349
const ListAlerts = React.lazy(() => import('src/views/security/reports/ListAlerts'))
4450
const ApplicationsList = React.lazy(() =>
4551
import('src/views/endpoint/applications/ApplicationsList'),
@@ -148,6 +154,11 @@ const routes = [
148154
name: 'Basic Auth Report',
149155
component: BasicAuthReport,
150156
},
157+
{
158+
path: '/identity/reports/azure-ad-connect-report',
159+
name: 'AAD Connect Report',
160+
component: AzureADConnectReport,
161+
},
151162
{ path: '/tenant', name: 'Tenant' },
152163
{ path: '/tenant/administration', name: 'Administration' },
153164
{ path: '/tenant/administration/tenants', name: 'Tenants', component: Tenants },
@@ -161,13 +172,17 @@ const routes = [
161172
name: 'Conditional Access',
162173
component: ConditionalAccess,
163174
},
175+
{
176+
path: '/tenant/administration/list-licenses',
177+
name: 'List Licenses',
178+
component: ListLicences,
179+
},
164180
{ path: '/tenant/standards', name: 'Standards' },
165181
{
166182
path: '/tenant/standards/list-applied-standards',
167183
name: 'List Applied Standards',
168184
component: ListAppliedStandards,
169185
},
170-
{ path: '/tenant/standards/apply-standard', name: 'Apply Standard', component: ApplyStandard },
171186
{
172187
path: '/tenant/standards/bpa-report',
173188
name: 'Best Practice Report',
@@ -302,6 +317,11 @@ const routes = [
302317
path: '/security/reports/list-alerts',
303318
component: SecurityComplianceAlerts,
304319
},
320+
{
321+
name: 'List Device Compliance Report',
322+
path: '/security/reports/list-device-compliance',
323+
component: DeviceComplianceReport,
324+
},
305325
{
306326
name: 'License',
307327
path: '/license',

src/scss/_custom.scss

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
.btn {
5757
border-radius: var(--cipp-border-radius);
58+
white-space: nowrap;
5859
}
5960

6061
.card {
@@ -344,6 +345,30 @@
344345
}
345346
}
346347

348+
.rdt_TableRow.mbusage-warning {
349+
background-color: color.adjust($cyberdrain-warning, $alpha: -0.5) !important;
350+
351+
.text-success {
352+
color: var(--cui-body-color) !important;
353+
}
354+
355+
.text-danger {
356+
color: var(--cui-body-color) !important;
357+
}
358+
}
359+
360+
.rdt_TableRow.mbusage-danger {
361+
background-color: color.adjust($cyberdrain-danger, $alpha: -0.5) !important;
362+
363+
.text-success {
364+
color: var(--cui-body-color) !important;
365+
}
366+
367+
.text-danger {
368+
color: var(--cui-body-color) !important;
369+
}
370+
}
371+
347372
/* Footer */
348373
.footer {
349374
p {
@@ -354,3 +379,11 @@
354379
max-height: 2rem;
355380
}
356381
}
382+
383+
/* Toasts */
384+
385+
.toast-body {
386+
.btn {
387+
margin-left: 1rem;
388+
}
389+
}

src/store/api/adconnect.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { baseApi } from 'src/store/api/baseApi'
2+
3+
export const adconnectApi = baseApi.injectEndpoints({
4+
endpoints: (builder) => ({
5+
listAdConnectSettings: builder.query({
6+
query: ({ tenantDomain }) => ({
7+
path: '/api/ListAzureADConnectStatus',
8+
params: { TenantFilter: tenantDomain, DataToReturn: 'AzureADConnectSettings' },
9+
}),
10+
transformResponse: (response) => {
11+
if (!response) {
12+
return []
13+
}
14+
return response
15+
},
16+
}),
17+
}),
18+
})
19+
20+
export const { useListAdConnectSettingsQuery } = adconnectApi

0 commit comments

Comments
 (0)