Skip to content

Commit 60e8fd6

Browse files
Merge pull request #835 from KelvinTegelaar/dev
Dev to release
2 parents 117b27e + 9edbba3 commit 60e8fd6

38 files changed

+3777
-2748
lines changed

.github/workflows/CodeQL_Analyser.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
name: 'CodeQL'
3-
on: # yamllint disable-line rule:truthy
4-
push:
5-
branches: [master, main, dev, react]
3+
on: # yamllint disable-line rule:truthy
64
pull_request:
75
branches: [master, main, dev, react]
86
schedule:

.github/workflows/Node_Project_Check.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
---
22
name: NodeJS Project Check
3-
on: # yamllint disable-line rule:truthy
4-
push:
5-
branches:
6-
- main
7-
- dev
3+
on: # yamllint disable-line rule:truthy
84
pull_request:
95
branches:
106
- main

.github/workflows/Run_Linters.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
---
22
name: Lint Code Base
3-
on: # yamllint disable-line rule:truthy
4-
push:
5-
branches:
6-
- master
7-
- main
8-
- dev
3+
on: # yamllint disable-line rule:truthy
94
pull_request_target:
105
branches:
116
- master

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@
1414
"type": "node-terminal",
1515
"preLaunchTask": "RunAllTasks",
1616
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"]
17+
},
18+
{
19+
"name": "Launch Edge",
20+
"request": "launch",
21+
"type": "pwa-msedge",
22+
"url": "https://localhost:4280",
23+
"webRoot": "${workspaceFolder}"
24+
},
25+
{
26+
"name": "Attach to Edge",
27+
"port": 9222,
28+
"request": "attach",
29+
"type": "pwa-msedge",
30+
"urlFilter": "https://localhost:4280/*",
31+
"webRoot": "${workspaceFolder}"
1732
}
1833
],
1934
"compounds": [

package-lock.json

Lines changed: 2456 additions & 2222 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.2.0
1+
2.3.0

src/_nav.js

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,40 @@ const _nav = [
105105
},
106106
{
107107
component: CNavItem,
108-
name: 'List Licences',
108+
name: 'Alerts Wizard',
109+
to: '/tenant/administration/alertswizard',
110+
},
111+
112+
{
113+
component: CNavItem,
114+
name: 'List Scheduled Alerts',
115+
to: '/tenant/administration/alertsqueue',
116+
},
117+
],
118+
},
119+
{
120+
component: CNavGroup,
121+
name: 'Reports',
122+
section: 'Reports',
123+
to: '/tenant/reports',
124+
icon: <FontAwesomeIcon icon={faChartBar} className="nav-icon" />,
125+
items: [
126+
{
127+
component: CNavItem,
128+
name: 'Graph Explorer',
129+
to: '/tenant/administration/graph-explorer',
130+
},
131+
{
132+
component: CNavItem,
133+
name: 'Licence Report',
109134
to: '/tenant/administration/list-licenses',
110135
},
136+
111137
{
112138
component: CNavItem,
113139
name: 'Conditional Access Policies',
114140
to: '/tenant/administration/conditional-access-policies',
115141
},
116-
// Temp removed due to not ready for release
117-
// {
118-
// component: CNavItem,
119-
// name: 'Alerts Wizard',
120-
// to: '/tenant/administration/alertswizard',
121-
// },
122-
// Temp removed due to not ready for release
123-
// {
124-
// component: CNavItem,
125-
// name: 'List Scheduled Alerts',
126-
// to: '/tenant/administration/alertsqueue',
127-
// },
128142
],
129143
},
130144
{

src/components/layout/CippContentCard.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export default function CippContentCard({
77
title,
88
children,
99
icon,
10+
button,
1011
bodyClass = null,
1112
className = null,
1213
}) {
@@ -15,6 +16,7 @@ export default function CippContentCard({
1516
<CCardHeader className="d-flex justify-content-between align-items-center">
1617
<CCardTitle>{title}</CCardTitle>
1718
{icon ? <FontAwesomeIcon icon={icon} /> : null}
19+
{button ? button : null}
1820
</CCardHeader>
1921
<CCardBody className={bodyClass}>{children}</CCardBody>
2022
</CCard>
@@ -25,6 +27,7 @@ CippContentCard.propTypes = {
2527
title: PropTypes.string.isRequired,
2628
children: PropTypes.arrayOf(PropTypes.element).isRequired,
2729
icon: PropTypes.object,
30+
button: PropTypes.element,
2831
bodyClass: PropTypes.string,
2932
className: PropTypes.string,
3033
}

src/components/layout/CippMasonry.js

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { CContainer, CCol } from '@coreui/react'
55

66
export function CippMasonryItem({ size, children, className = null }) {
77
const columnSizes = {
8+
card: {
9+
xs: 12,
10+
lg: 2,
11+
xl: 3,
12+
},
813
single: {
914
xs: 12,
1015
lg: 6,
@@ -20,6 +25,16 @@ export function CippMasonryItem({ size, children, className = null }) {
2025
lg: 12,
2126
xl: 12,
2227
},
28+
full: {
29+
xs: 12,
30+
lg: 12,
31+
xl: 12,
32+
},
33+
half: {
34+
xs: 12,
35+
lg: 6,
36+
xl: 6,
37+
},
2338
}
2439

2540
return (
@@ -30,12 +45,35 @@ export function CippMasonryItem({ size, children, className = null }) {
3045
}
3146

3247
CippMasonryItem.propTypes = {
33-
size: PropTypes.oneOf(['single', 'double', 'triple']),
48+
size: PropTypes.oneOf(['single', 'double', 'triple', 'full', 'half']),
3449
children: PropTypes.object,
3550
className: PropTypes.string,
3651
}
3752

38-
export function CippMasonry({ children, className = null }) {
53+
export function CippMasonry({ columns = 3, children, className = null }) {
54+
const numberOfColumns = {
55+
1: {
56+
xs: 12,
57+
lg: 12,
58+
xl: 12,
59+
},
60+
2: {
61+
xs: 12,
62+
lg: 6,
63+
xl: 6,
64+
},
65+
3: {
66+
xs: 12,
67+
lg: 4,
68+
xl: 4,
69+
},
70+
4: {
71+
xs: 12,
72+
lg: 3,
73+
xl: 3,
74+
},
75+
}
76+
3977
const CippMasonryOptions = {
4078
transitionDuration: 0,
4179
percentPosition: true,
@@ -50,14 +88,15 @@ export function CippMasonry({ children, className = null }) {
5088
options={CippMasonryOptions}
5189
enableResizableChildren={true}
5290
>
53-
<CCol className="cipp-masonry-sizer" xl={4} lg={6} xs={12}></CCol>
91+
<CCol className="cipp-masonry-sizer" {...numberOfColumns[columns]}></CCol>
5492
{children}
5593
</Masonry>
5694
</CContainer>
5795
)
5896
}
5997

6098
CippMasonry.propTypes = {
99+
columns: PropTypes.oneOf([1, 2, 3]),
61100
children: PropTypes.array,
62101
className: PropTypes.string,
63102
}

src/components/tables/CippTable.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,15 @@ const customSort = (rows, selector, direction) => {
3434
// use the selector to resolve your field names by passing the sort comparitors
3535
let aField
3636
let bField
37-
if (typeof selector(a) === 'string') {
38-
aField = selector(a).toLowerCase()
39-
} else {
40-
aField = selector(a)
41-
}
42-
if (typeof selector(b) === 'string') {
43-
bField = selector(b).toLowerCase()
44-
} else {
45-
bField = selector(b)
46-
}
37+
38+
aField = selector(a)
39+
bField = selector(b)
4740

4841
let comparison = 0
4942

50-
if (aField > bField) {
43+
if (aField?.toString().localeCompare(bField, 'en', { numeric: true }) > 0) {
5144
comparison = 1
52-
} else if (aField < bField) {
45+
} else if (aField?.toString().localeCompare(bField, 'en', { numeric: true }) < 0) {
5346
comparison = -1
5447
}
5548

0 commit comments

Comments
 (0)