Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from KelvinTegelaar:main #7

Merged
merged 77 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
394753d
Merge pull request #61 from KelvinTegelaar/dev
BNWEIN Nov 6, 2023
5cc9447
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Nov 6, 2023
ba686dd
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Nov 14, 2023
5ccff1b
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Nov 16, 2023
8d15fef
Merge pull request #70 from KelvinTegelaar/dev
BNWEIN Nov 21, 2023
464f727
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Nov 22, 2023
666442b
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Nov 27, 2023
2b8a424
Merge branch 'KelvinTegelaar:dev' into dev
BNWEIN Nov 28, 2023
9e6cf24
Merge pull request #77 from KelvinTegelaar/dev
BNWEIN Dec 12, 2023
0d65bce
Merge pull request #78 from KelvinTegelaar/dev
BNWEIN Dec 18, 2023
823b44d
Merge pull request #79 from KelvinTegelaar/dev
BNWEIN Jan 3, 2024
0ce553a
Update GraphExplorer.jsx
JohnDuprey Feb 24, 2024
8c44073
Update GraphExplorer.jsx
JohnDuprey Feb 24, 2024
ced715f
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Feb 25, 2024
417ed6f
Add refresh function
JohnDuprey Feb 25, 2024
98b56a4
Update RFFComponents.jsx
JohnDuprey Feb 25, 2024
d78fbc6
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Feb 26, 2024
ba13bf6
Merge pull request #81 from KelvinTegelaar/dev
BNWEIN Feb 27, 2024
4f5d03a
Update DomainsAnalyser.jsx
BNWEIN Feb 27, 2024
e2339d9
Merge pull request #2177 from BNWEIN/dev
JohnDuprey Feb 27, 2024
3e0a1b5
remove old imports
KelvinTegelaar Feb 27, 2024
bbe4231
save columns when user changes them with option to reset
KelvinTegelaar Feb 28, 2024
250cf4d
add exportselector where required
KelvinTegelaar Feb 28, 2024
c7eb44a
fixes missing postal code
KelvinTegelaar Feb 28, 2024
ced6cd1
Added custom thresholds for SharePoint and Mailbox Quota alerts
BNWEIN Feb 28, 2024
9fd38bf
removed default value
BNWEIN Feb 28, 2024
b425621
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Feb 28, 2024
0477b25
Merge pull request #2180 from JohnDuprey/dev
JohnDuprey Feb 28, 2024
9e10c78
Merge pull request #2178 from BNWEIN/dev
KelvinTegelaar Feb 28, 2024
a02aa52
use endpointname instead of report name.
KelvinTegelaar Feb 28, 2024
c313de9
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
KelvinTegelaar Feb 28, 2024
b1e63d4
CippDatatable - refetch
JohnDuprey Feb 28, 2024
e54be47
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Feb 28, 2024
9489fbb
for now, this'll do.
KelvinTegelaar Feb 28, 2024
ee6aa12
CippTable fix
JohnDuprey Feb 28, 2024
249f119
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Feb 28, 2024
72cccaf
Merge pull request #2181 from JohnDuprey/dev
JohnDuprey Feb 28, 2024
45bb37c
More omit checks
JohnDuprey Feb 28, 2024
04c8cfb
Merge pull request #2182 from JohnDuprey/dev
JohnDuprey Feb 28, 2024
4a98832
Made a start on adding "New User" attributes in "User Settings"
BNWEIN Feb 29, 2024
a97d970
Fix nav items property
JohnDuprey Mar 1, 2024
0696ae1
Devices Bulk Actions
JohnDuprey Mar 1, 2024
147f7fe
Merge pull request #2195 from JohnDuprey/dev
JohnDuprey Mar 1, 2024
789ef93
Settings refactor, CippCallout wip
k-grube Mar 5, 2024
0c04ed8
Bump version, update font awesome icons
k-grube Mar 12, 2024
5d2f33e
Unify all results notifications to use new component CippCallout whic…
k-grube Mar 12, 2024
e8418ff
Merge pull request #2208 from k-grube/dev
KelvinTegelaar Mar 12, 2024
da55cfd
Merge branch 'dev' into dev
KelvinTegelaar Mar 12, 2024
b60e581
add saving of user settings
KelvinTegelaar Mar 12, 2024
2e99c74
added defaultAttributes
KelvinTegelaar Mar 12, 2024
c00851b
update license overview
KelvinTegelaar Mar 12, 2024
7eadc37
add anon data warning.
KelvinTegelaar Mar 12, 2024
4dd820e
fixes anon
KelvinTegelaar Mar 12, 2024
39400ad
added #2189
KelvinTegelaar Mar 12, 2024
8cb3569
Pending Webhooks
JohnDuprey Mar 13, 2024
d86e348
Merge pull request #2213 from JohnDuprey/dev
JohnDuprey Mar 13, 2024
305514f
fix button text
JohnDuprey Mar 13, 2024
e25ef82
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Mar 13, 2024
08f6e33
fixes bug when endpoint name is null for modals
KelvinTegelaar Mar 14, 2024
d2d9fdc
fixed issue with graph explorer columns
KelvinTegelaar Mar 14, 2024
890c800
minor bug with new column setup
KelvinTegelaar Mar 14, 2024
bef8ab3
Update AppHeader.jsx
JohnDuprey Mar 14, 2024
ed53d22
Merge pull request #2215 from JohnDuprey/dev
JohnDuprey Mar 14, 2024
f5c816c
fix card layout while bringing sexy back
KelvinTegelaar Mar 14, 2024
c348b7c
fix button
JohnDuprey Mar 14, 2024
b511e62
cleanup imports
JohnDuprey Mar 14, 2024
f53a348
Pretty MEM policy list json
JohnDuprey Mar 14, 2024
377a662
Add tooltips
JohnDuprey Mar 14, 2024
c4f220b
Merge pull request #2216 from JohnDuprey/dev
JohnDuprey Mar 14, 2024
1744088
Graph Explorer - Org Branding preset
JohnDuprey Mar 15, 2024
886d8d5
Merge pull request #2217 from JohnDuprey/dev
JohnDuprey Mar 15, 2024
e17aa34
upp version
KelvinTegelaar Mar 15, 2024
5b71920
Merge pull request #2218 from KelvinTegelaar/dev
KelvinTegelaar Mar 15, 2024
b08a54c
Add null safe operator to default settings
JohnDuprey Mar 15, 2024
8197a11
up version
JohnDuprey Mar 15, 2024
3697f63
Merge pull request #2221 from JohnDuprey/dev
JohnDuprey Mar 15, 2024
c2e94b0
Merge pull request #2222 from KelvinTegelaar/dev
JohnDuprey Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,742 changes: 1,464 additions & 1,278 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "4.5.5",
"version": "5.3.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 @@ -31,11 +31,11 @@
"@coreui/react": "^4.11.0",
"@coreui/react-chartjs": "^2.1.3",
"@coreui/utils": "^1.3.1",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/free-regular-svg-icons": "^5.15.4",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.1.16",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-brands-svg-icons": "^6.5.1",
"@fortawesome/free-regular-svg-icons": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@monaco-editor/react": "^4.5.2",
"@popperjs/core": "^2.10.2",
"@reduxjs/toolkit": "^1.9.7",
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.2.1
5.3.1
27 changes: 22 additions & 5 deletions src/adminRoutes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
const CIPPSettings = React.lazy(() => import('src/views/cipp/CIPPSettings'))

const CIPPSettings = React.lazy(() => import('src/views/cipp/app-settings/CIPPSettings'))
const Setup = React.lazy(() => import('src/views/cipp/Setup'))
const ApplyStandard = React.lazy(() => import('src/views/tenant/standards/ListStandards'))
const GDAPStatus = React.lazy(() => import('src/views/tenant/administration/ListGDAPQueue'))
Expand All @@ -25,7 +26,11 @@ const adminRoutes = [
{ path: '/cipp/setup', name: 'Setup', component: Setup },

{ path: '/tenant/administration/gdap', name: 'GDAP Wizard', component: GDAP },
{ path: '/tenant/administration/gdap-invite', name: 'GDAP Invite Wizard', component: GDAPInvite },
{
path: '/tenant/administration/gdap-invite',
name: 'GDAP Invite Wizard',
component: GDAPInvite,
},
{
path: '/tenant/administration/gdap-role-wizard',
name: 'GDAP Role Wizard',
Expand All @@ -41,9 +46,21 @@ const adminRoutes = [
name: 'GDAP Relationships',
component: GDAPRelationships,
},
{ path: '/tenant/administration/appapproval', name: 'App Approval', component: appapproval },
{ path: '/tenant/administration/gdap-status', name: 'GDAP Status', component: GDAPStatus },
{ path: '/tenant/standards/list-standards', name: 'List Standard', component: ApplyStandard },
{
path: '/tenant/administration/appapproval',
name: 'App Approval',
component: appapproval,
},
{
path: '/tenant/administration/gdap-status',
name: 'GDAP Status',
component: GDAPStatus,
},
{
path: '/tenant/standards/list-standards',
name: 'List Standard',
component: ApplyStandard,
},
{
path: '/tenant/administration/tenant-offboarding-wizard',
name: 'Tenant Offboarding',
Expand Down
10 changes: 8 additions & 2 deletions src/components/forms/RFFComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ export const RFFCFormInput = ({
disabled = false,
spellCheck = true,
autoFocus = false,
hiddenValue,
onChange,
}) => {
return (
<Field name={name} validate={validate}>
<Field initialValue={hiddenValue} name={name} validate={validate}>
{({ input, meta }) => {
const handleChange = onChange
? (e) => {
Expand Down Expand Up @@ -429,7 +430,12 @@ export const RFFSelectSearch = ({
{label}
{refreshFunction && (
<CTooltip content="Refresh" placement="right">
<CButton onClick={refreshFunction} variant="ghost" className="ms-1" size="sm">
<CButton
onClick={refreshFunction}
variant="ghost"
className="ms-1 py-0 border-0"
size="sm"
>
<FontAwesomeIcon icon="sync" />
</CButton>
</CTooltip>
Expand Down
10 changes: 6 additions & 4 deletions src/components/header/AppHeaderSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback } from 'react'
import { faSearch } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { toggleSwitcher } from 'src/store/features/switcher'
import { CButton } from '@coreui/react'
import { CButton, CTooltip } from '@coreui/react'
import { useDispatch } from 'react-redux'

const AppHeaderSearch = () => {
Expand All @@ -12,9 +12,11 @@ const AppHeaderSearch = () => {
}, [dispatch])
return (
<>
<CButton variant="ghost" onClick={handleFastSwitcher}>
<FontAwesomeIcon icon={faSearch} size="lg" />
</CButton>
<CTooltip content="Search" placement="bottom">
<CButton variant="ghost" onClick={handleFastSwitcher}>
<FontAwesomeIcon icon={faSearch} size="lg" />
</CButton>
</CTooltip>
</>
)
}
Expand Down
96 changes: 87 additions & 9 deletions src/components/layout/AppHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@ import { useSelector, useDispatch } from 'react-redux'
import {
CAlert,
CAlertLink,
CContainer,
CCollapse,
CHeader,
CHeaderNav,
CNavItem,
CHeaderToggler,
CImage,
CSidebarBrand,
CButton,
CFormSwitch,
CTooltip,
} from '@coreui/react'
import { AppHeaderSearch } from 'src/components/header'
import { TenantSelector } from '../utilities'
import { CippActionsOffcanvas, TenantSelector } from '../utilities'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faBars } from '@fortawesome/free-solid-svg-icons'
import { setCurrentTheme, setUserSettings, toggleSidebarShow } from 'src/store/features/app'
import { useMediaPredicate } from 'react-media-hook'
import { useGenericGetRequestQuery, useLoadAlertsDashQuery } from 'src/store/api/app'
import {
useGenericGetRequestQuery,
useLazyGenericGetRequestQuery,
useLoadAlertsDashQuery,
} from 'src/store/api/app'
import { useLocation } from 'react-router-dom'

const AppHeader = () => {
Expand All @@ -31,6 +32,11 @@ const AppHeader = () => {
const sidebarShow = useSelector((state) => state.app.sidebarShow)
const currentTheme = useSelector((state) => state.app.currentTheme)
const preferredTheme = useMediaPredicate('(prefers-color-scheme: dark)') ? 'impact' : 'cyberdrain'
const [cippQueueExtendedInfo, setCippQueueExtendedInfo] = useState([])
const [cippQueueVisible, setCippQueueVisible] = useState(false)
const [cippQueueRefresh, setCippQueueRefresh] = useState(
(Math.random() + 1).toString(36).substring(7),
)
const { data: dashboard } = useLoadAlertsDashQuery()
const {
data: userSettings,
Expand All @@ -54,6 +60,49 @@ const AppHeader = () => {
userSettings,
])

const [getCippQueueList, cippQueueList] = useLazyGenericGetRequestQuery()

function loadCippQueue() {
setCippQueueVisible(true)
getCippQueueList({ path: 'api/ListCippQueue', params: { refresh: cippQueueRefresh } })
}

function refreshCippQueue() {
setCippQueueRefresh((Math.random() + 1).toString(36).substring(7))
loadCippQueue()
}

useEffect(() => {
if (cippQueueList.isFetching || cippQueueList.isLoading) {
setCippQueueExtendedInfo([
{
label: 'Fetching recent jobs',
value: 'Please wait',
timestamp: Date(),
link: '#',
},
])
}
if (
cippQueueList.isSuccess &&
Array.isArray(cippQueueList.data) &&
cippQueueList.data.length > 0
) {
setCippQueueExtendedInfo(
cippQueueList.data?.map((job) => ({
label: `${job.Name}`,
value: job.Status,
link: job.Link,
timestamp: job.Timestamp,
})),
)
} else {
setCippQueueExtendedInfo([
{ label: 'No jobs to display', value: '', timpestamp: Date(), link: '#' },
])
}
}, [cippQueueList])

const SwitchTheme = () => {
let targetTheme = preferredTheme
if (isDark) {
Expand Down Expand Up @@ -89,14 +138,23 @@ const AppHeader = () => {
target="_blank"
href={`https://docs.cipp.app/user-documentation${location.pathname}`}
>
<CButton variant="ghost">
<FontAwesomeIcon icon={'question'} size="lg" />
</CButton>
<CTooltip content="Documentation" placement="bottom">
<CButton variant="ghost">
<FontAwesomeIcon icon={'question'} size="lg" />
</CButton>
</CTooltip>
</a>
</CNavItem>
<CNavItem>
<AppHeaderSearch />
</CNavItem>
<CNavItem>
<CTooltip content="Recent Jobs" placement="bottom">
<CButton variant="ghost" onClick={() => loadCippQueue()} className="me-1">
<FontAwesomeIcon icon={'history'} size="lg" />
</CButton>
</CTooltip>
</CNavItem>
<CNavItem>
<div className="custom-switch-wrapper primary">
<CFormSwitch
Expand Down Expand Up @@ -134,6 +192,26 @@ const AppHeader = () => {
</div>
))}
</div>
<CippActionsOffcanvas
title="Recent Jobs"
extendedInfo={[]}
cards={cippQueueExtendedInfo}
refreshFunction={refreshCippQueue}
actions={[
{
label: 'Clear History',
color: 'info',
modal: true,
modalUrl: `/api/RemoveCippQueue`,
modalMessage: 'Are you sure you want clear the history?',
icon: <FontAwesomeIcon icon="trash" className="me-2" />,
},
]}
placement="end"
visible={cippQueueVisible}
id="cipp-queue"
hideFunction={() => setCippQueueVisible(false)}
/>
</>
)
}
Expand Down
6 changes: 2 additions & 4 deletions src/components/layout/AppSidebarNav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const AppSidebarNav = ({ items }) => {
)
}
const navGroup = (item, index) => {
const { component, name, icon, to, ...rest } = item
const { component, name, icon, to, items, ...rest } = item
const Component = component
const navGroupKey = `${item.name.toLowerCase().replace(' ', '-')}_${index}`
const navGroupIdx = `${item.section.toLowerCase().replace(' ', '-')}_${item.name
Expand All @@ -79,9 +79,7 @@ export const AppSidebarNav = ({ items }) => {
visible={location.pathname.startsWith(to)}
{...rest}
>
{item.items?.map((item, index) =>
item.items ? navGroup(item, index) : navItem(item, index),
)}
{items?.map((item, index) => (item.items ? navGroup(item, index) : navItem(item, index)))}
</Component>
)
}
Expand Down
28 changes: 28 additions & 0 deletions src/components/layout/CippCallout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.cipp-callout {
--cui-callout-padding-x: 1rem;
--cui-callout-padding-y: 1rem;
--cui-callout-border-width: var(--cui-border-width);
--cui-callout-border-color: var(--cui-border-color);
--cui-callout-border-left-width: calc(var(--cui-border-width) * 4);
--cui-callout-border-radius: var(--cui-border-radius);
border: var(--cui-callout-border-width) solid var(--cui-callout-border-color);
border-radius: var(--cui-callout-border-radius);
margin-bottom: 16px;
padding: var(--cui-callout-padding-y) var(--cui-callout-padding-x);
}

html:not([dir=rtl]) .cipp-callout {
border-left-color: var(--cui-callout-border-left-color);
}

html:not([dir=rtl]) .cipp-callout {
border-left-width: var(--cui-callout-border-left-width);
}

html:not([dir=rtl]) .cipp-callout-dismissible .btn {
right: 0;
}

.cipp-callout-dismissible .btn {
cursor: pointer;
}
70 changes: 70 additions & 0 deletions src/components/layout/CippCallout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React, { useState } from 'react'
import { CAlert, CCallout } from '@coreui/react'
import PropTypes from 'prop-types'
import './CippCallout.css'
import classNames from 'classnames'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faXmark } from '@fortawesome/free-solid-svg-icons'

export function CippCallout({
dismissible = false,
color = 'primary',
children = null,
className = '',
style = {},
...rest
}) {
const [open, setOpen] = useState(true)

if (!open) {
return null
}

return (
<div
className={classNames(className, 'cipp-callout', `callout-${color}`, {
'cipp-callout-dismissible': dismissible,
})}
color={color}
style={{
backgroundColor: 'rgb(var(--cui-body-color-rgb))',
color: 'var(--cui-body-color)',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'flex-start',
...style,
}}
{...rest}
>
<div>{children}</div>
{dismissible && (
<button
type="button"
className="btn"
aria-label="Close"
onClick={() => setOpen(false)}
style={{ padding: 0, margin: 0 }}
>
<FontAwesomeIcon icon={faXmark} size={'xl'} />
</button>
)}
</div>
)
}

CippCallout.propTypes = {
dismissible: PropTypes.bool,
color: PropTypes.oneOf([
'primary',
'secondary',
'success',
'warning',
'danger',
'info',
'light',
'dark',
]),
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
className: PropTypes.string,
style: PropTypes.object,
}
Loading
Loading