From aa78d346533946fa008a6637aca661b2bfa12f6d Mon Sep 17 00:00:00 2001 From: John Duprey Date: Mon, 29 Apr 2024 15:25:47 -0400 Subject: [PATCH 01/15] null safe status for mail test --- src/views/email-exchange/tools/MailTest.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/email-exchange/tools/MailTest.jsx b/src/views/email-exchange/tools/MailTest.jsx index d433e658dba3..633d351fd489 100644 --- a/src/views/email-exchange/tools/MailTest.jsx +++ b/src/views/email-exchange/tools/MailTest.jsx @@ -40,22 +40,22 @@ const MailTest = () => { }, { name: 'SPF', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'spf')[0].Status == 'pass', + selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'spf')[0]?.Status == 'pass', cell: cellBooleanFormatter(), }, { name: 'DKIM', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dkim')[0].Status == 'pass', + selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dkim')[0]?.Status == 'pass', cell: cellBooleanFormatter(), }, { name: 'DMARC', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dmarc')[0].Status == 'pass', + selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dmarc')[0]?.Status == 'pass', cell: cellBooleanFormatter(), }, { name: 'Comp Auth', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'compauth')[0].Status == 'pass', + selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'compauth')[0]?.Status == 'pass', cell: cellBooleanFormatter(), }, { From 58377de98cab466d5e706a719baaec7777f65310 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Mon, 29 Apr 2024 15:27:34 -0400 Subject: [PATCH 02/15] Move Helmet/Title to DefaultLayout --- src/App.jsx | 108 ++++++++++++++--------------- src/hooks/useNavFavouriteCheck.jsx | 2 +- src/layout/DefaultLayout.jsx | 46 ++++++++---- 3 files changed, 85 insertions(+), 71 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 276f9dcc21a5..422ebac60c62 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,8 +1,8 @@ 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' @@ -10,7 +10,6 @@ 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) @@ -32,59 +31,58 @@ const Logout = React.lazy(() => import('./views/pages/login/Logout')) const App = () => { return ( - }> - - CIPP - - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - - - } - > - {routes.map((route, idx) => { - const allowedRoles = route.allowedRoles - const Routecomponent = dynamicImport(route.path) - //console.log('route', route) - //console.log('Routecomponent', Routecomponent) - return ( - route.component && ( - - }> - - CIPP - {route.name} - - - - - - - } - /> + + }> + + CIPP + + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + + } + > + {routes.map((route, idx) => { + const allowedRoles = route.allowedRoles + const Routecomponent = dynamicImport(route.path) + //console.log('route', route) + //console.log('Routecomponent', Routecomponent) + return ( + route.component && ( + + }> + + + + + + } + /> + ) ) - ) - })} - } /> - - } /> - - + })} + } /> + + } /> + + + ) } diff --git a/src/hooks/useNavFavouriteCheck.jsx b/src/hooks/useNavFavouriteCheck.jsx index 1f04018f089e..dc53534dfddc 100644 --- a/src/hooks/useNavFavouriteCheck.jsx +++ b/src/hooks/useNavFavouriteCheck.jsx @@ -28,7 +28,7 @@ export const useNavFavouriteCheck = (navigation) => { var items = [] recentPages.map((path) => { - const item = routes.find((route) => route.path === path) + const item = routes.find((route) => route.path.toLowerCase() === path.toLowerCase()) if (item?.path) { items.push({ name: item.name, diff --git a/src/layout/DefaultLayout.jsx b/src/layout/DefaultLayout.jsx index aa39ae8273b3..0b08e4ad8b8c 100644 --- a/src/layout/DefaultLayout.jsx +++ b/src/layout/DefaultLayout.jsx @@ -8,6 +8,8 @@ import { toggleSwitcher } from 'src/store/features/switcher' import { useHotkeys } from 'react-hotkeys-hook' import { useMediaPredicate } from 'react-media-hook' import { setRecentPages } from 'src/store/features/app' +import routes from 'src/routes' +import { Helmet } from 'react-helmet-async' const DefaultLayout = () => { const preferredTheme = useMediaPredicate('(prefers-color-scheme: dark)') ? 'impact' : 'cyberdrain' @@ -17,6 +19,15 @@ const DefaultLayout = () => { const dispatch = useDispatch() const location = useLocation() + const [title, setTitle] = useState('CIPP') + useEffect(() => { + let route = routes.find((route) => route.path.toLowerCase() === location.pathname.toLowerCase()) + if (route?.name) { + console.log(route) + setTitle(route.name) + } + }, [setTitle, location.pathname]) + let theme if (themePreference === 'default') { theme = preferredTheme @@ -70,24 +81,29 @@ const DefaultLayout = () => { ) return ( -
- - - + <> + + CIPP - {title} + +
+ + + - -
- -
- - }> - - - + +
+ +
+ + }> + + + +
+
-
-
+ ) } From 23d998bcda85845275ce4b141e9ad2889b5b9c30 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Mon, 29 Apr 2024 17:28:49 -0400 Subject: [PATCH 03/15] copy to clipboard spacing --- src/components/utilities/CippCopyToClipboard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/utilities/CippCopyToClipboard.jsx b/src/components/utilities/CippCopyToClipboard.jsx index 064392d9b4fa..fa930968f7a6 100644 --- a/src/components/utilities/CippCopyToClipboard.jsx +++ b/src/components/utilities/CippCopyToClipboard.jsx @@ -14,7 +14,7 @@ function CippCopyToClipboard({ text }) { onCodeCopied()}> From 459947e405d33b9d583198debd2a4bd72decc5db Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Tue, 30 Apr 2024 00:57:44 +0200 Subject: [PATCH 04/15] design stuff --- package-lock.json | 13 +++- package.json | 1 + src/components/contentcards/CippChartCard.jsx | 61 +++++++++++++++++++ .../contentcards/CippPrettyCard.jsx | 44 +++++++++++++ src/views/home/Home.jsx | 4 +- 5 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 src/components/contentcards/CippChartCard.jsx create mode 100644 src/components/contentcards/CippPrettyCard.jsx diff --git a/package-lock.json b/package-lock.json index 232261d7bcc3..490fb9a392b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cipp", - "version": "5.5.0", + "version": "5.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cipp", - "version": "5.5.0", + "version": "5.6.1", "license": "AGPL-3.0", "dependencies": { "@coreui/chartjs": "^3.0.0", @@ -46,6 +46,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", @@ -6864,6 +6865,14 @@ "react-dom": ">=16.8.0" } }, + "node_modules/react-circular-progressbar": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/react-circular-progressbar/-/react-circular-progressbar-2.1.0.tgz", + "integrity": "sha512-xp4THTrod4aLpGy68FX/k1Q3nzrfHUjUe5v6FsdwXBl3YVMwgeXYQKDrku7n/D6qsJA9CuunarAboC2xCiKs1g==", + "peerDependencies": { + "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-copy-to-clipboard": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", diff --git a/package.json b/package.json index 5286527775d3..8ea30f0e681b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/contentcards/CippChartCard.jsx b/src/components/contentcards/CippChartCard.jsx new file mode 100644 index 000000000000..468282888f5b --- /dev/null +++ b/src/components/contentcards/CippChartCard.jsx @@ -0,0 +1,61 @@ +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 { CChart } from '@coreui/react-chartjs' +import { getStyle } from '@coreui/utils' + +export default function CippChartCard({ + title, + titleType = 'normal', + ChartData, + ChartLabels, + ChartType = 'pie', + LegendLocation = 'bottom', + isFetching, +}) { + return ( + + + + {titleType === 'big' ?

{title}

: title} +
+
+ + {isFetching && } + {!isFetching && ( + + )} + +
+ ) +} diff --git a/src/components/contentcards/CippPrettyCard.jsx b/src/components/contentcards/CippPrettyCard.jsx new file mode 100644 index 000000000000..51f55d05551c --- /dev/null +++ b/src/components/contentcards/CippPrettyCard.jsx @@ -0,0 +1,44 @@ +import React from 'react' +import { CCard, CCardBody, CCardFooter, CCardHeader, CCardTitle, CCol, CRow } from '@coreui/react' +import Skeleton from 'react-loading-skeleton' +import { CircularProgressbar } from 'react-circular-progressbar' +import 'react-circular-progressbar/dist/styles.css' + +export default function CippPrettyCard({ + title, + titleType = 'normal', + percentage, + topLabel, + smallLabel, + ringcolor = '#f89226', + isFetching, +}) { + return ( + + + + {titleType === 'big' ?

{title}

: title} +
+
+ + {isFetching && } + {!isFetching && ( + + + + + +

{topLabel}

+ {smallLabel} +
+
+ )} +
+
+ ) +} diff --git a/src/views/home/Home.jsx b/src/views/home/Home.jsx index d5dfafb0e552..21ed159074d5 100644 --- a/src/views/home/Home.jsx +++ b/src/views/home/Home.jsx @@ -37,7 +37,7 @@ import { CChart } from '@coreui/react-chartjs' import { getStyle } from '@coreui/utils' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { Link } from 'react-router-dom' -import { useMediaPredicate } from 'react-media-hook' +import CippPrettyCard from 'src/components/contentcards/CippPrettyCard' const TenantDashboard = () => { const [visible, setVisible] = useState(false) @@ -333,7 +333,7 @@ const TenantDashboard = () => { options={{ plugins: { legend: { - position: 'bottom', + position: 'left', labels: { color: getStyle('--cui-body-color'), }, From 8fe354d61a704dfe47e00bd015666dc5215b0d07 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 30 Apr 2024 09:33:44 -0400 Subject: [PATCH 05/15] Add propTypes to CippButtonCard --- src/components/contentcards/CippButtonCard.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/contentcards/CippButtonCard.jsx b/src/components/contentcards/CippButtonCard.jsx index 1540c09a888f..4a6400ad9cca 100644 --- a/src/components/contentcards/CippButtonCard.jsx +++ b/src/components/contentcards/CippButtonCard.jsx @@ -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, @@ -25,3 +25,11 @@ export default function CippButtonCard({ ) } + +CippButtonCard.propTypes = { + title: PropTypes.string.isRequired, + titleType: PropTypes.string, + CardButton: PropTypes.element.isRequired, + children: PropTypes.element.isRequired, + isFetching: PropTypes.bool.isRequired, +} From 018d3647722aa9dbac883092baafbf0ef29e4450 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 30 Apr 2024 09:34:30 -0400 Subject: [PATCH 06/15] Graph Explorer Default to $select list instead of first row if provided --- .../tenant/administration/GraphExplorer.jsx | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/views/tenant/administration/GraphExplorer.jsx b/src/views/tenant/administration/GraphExplorer.jsx index bad378c27d3a..91225f285ea9 100644 --- a/src/views/tenant/administration/GraphExplorer.jsx +++ b/src/views/tenant/administration/GraphExplorer.jsx @@ -75,7 +75,38 @@ const GraphExplorer = () => { }, []) if (graphrequest.isSuccess) { - if (graphrequest.data?.Results?.length > 0) { + if ( + graphrequest.data?.Metadata?.Parameters?.$select !== undefined && + graphrequest.data?.Metadata?.Parameters?.$select !== '' && + graphrequest.data?.Metadata?.Parameters?.$select !== null + ) { + //set columns + if (graphrequest.data?.Metadata?.TenantFilter === 'AllTenants') { + QueryColumns.data.push({ + name: 'Tenant', + selector: (row) => row['Tenant'], + sortable: true, + exportSelector: 'Tenant', + cell: cellGenericFormatter(), + }) + QueryColumns.data.push({ + name: 'CippStatus', + selector: (row) => row['CippStatus'], + sortable: true, + exportSelector: 'CippStatus', + cell: cellGenericFormatter(), + }) + } + graphrequest.data?.Metadata?.Parameters?.$select.split(',')?.map((value) => + QueryColumns.data.push({ + name: value, + selector: (row) => row[`${value.toString()}`], + sortable: true, + exportSelector: value, + cell: cellGenericFormatter(), + }), + ) + } else if (graphrequest.data?.Results?.length > 0) { //set columns Object.keys(graphrequest.data?.Results[0]).map((value) => QueryColumns.data.push({ @@ -121,7 +152,7 @@ const GraphExplorer = () => { { name: 'All users with email addresses', id: '6164e239-0c9a-4a27-9049-6250bf65a3e3', - params: { endpoint: '/users', $select: 'userprincipalname,mail,proxyAddresses', $filter: '' }, + params: { endpoint: '/users', $select: 'userPrincipalName,mail,proxyAddresses', $filter: '' }, isBuiltin: true, }, { @@ -248,6 +279,9 @@ const GraphExplorer = () => { if (params?.$select) { select = params.$select.map((p) => p.value).join(',') } + if (params?.name) { + params.QueueNameOverride = params.name + } execGraphRequest({ path: 'api/ListGraphRequest', params: { From 707b0ff5433d4309d4fbb23b90f470bf7c9e4385 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 30 Apr 2024 11:57:22 -0400 Subject: [PATCH 07/15] Fix notification test button --- .../cipp/app-settings/SettingsNotifications.jsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/cipp/app-settings/SettingsNotifications.jsx b/src/views/cipp/app-settings/SettingsNotifications.jsx index 555a1fbdd19d..781d2ac72e6a 100644 --- a/src/views/cipp/app-settings/SettingsNotifications.jsx +++ b/src/views/cipp/app-settings/SettingsNotifications.jsx @@ -44,11 +44,20 @@ export function SettingsNotifications() {
generateTestAlert({ text: 'Test Alert', Severity: 'Alert' })} + onClick={() => + generateTestAlert({ text: 'Manually Generated Test Alert', Severity: 'Alert' }) + } disabled={generateAlertResult.isFetching} > - {generateAlertResult.isFetching && } - {generateAlertResult.isSuccess && } + {generateAlertResult.isFetching ? ( + + ) : ( + <> + {generateAlertResult.isSuccess && ( + + )} + + )} Generate Test Alert From e55791973529a28826ff46233ce8bc5fd7d3c66f Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 30 Apr 2024 11:57:33 -0400 Subject: [PATCH 08/15] Fix mail test --- src/views/email-exchange/tools/MailTest.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/email-exchange/tools/MailTest.jsx b/src/views/email-exchange/tools/MailTest.jsx index 633d351fd489..27b55070f6db 100644 --- a/src/views/email-exchange/tools/MailTest.jsx +++ b/src/views/email-exchange/tools/MailTest.jsx @@ -40,22 +40,22 @@ const MailTest = () => { }, { name: 'SPF', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'spf')[0]?.Status == 'pass', + selector: (row) => row?.AuthResult?.find((x) => x?.Name === 'spf')?.Status == 'pass', cell: cellBooleanFormatter(), }, { name: 'DKIM', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dkim')[0]?.Status == 'pass', + selector: (row) => row?.AuthResult?.find((x) => x?.Name === 'dkim')?.Status == 'pass', cell: cellBooleanFormatter(), }, { name: 'DMARC', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dmarc')[0]?.Status == 'pass', + selector: (row) => row?.AuthResult?.find((x) => x?.Name === 'dmarc')?.Status == 'pass', cell: cellBooleanFormatter(), }, { name: 'Comp Auth', - selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'compauth')[0]?.Status == 'pass', + selector: (row) => row?.AuthResult?.find((x) => x?.Name === 'compauth')?.Status == 'pass', cell: cellBooleanFormatter(), }, { From e277b6b202b767cb75d65b128584c46f8003940e Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 30 Apr 2024 11:57:47 -0400 Subject: [PATCH 09/15] Add Graph Explorer queue override name --- src/views/tenant/administration/GraphExplorer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/tenant/administration/GraphExplorer.jsx b/src/views/tenant/administration/GraphExplorer.jsx index 91225f285ea9..d6947f18f5de 100644 --- a/src/views/tenant/administration/GraphExplorer.jsx +++ b/src/views/tenant/administration/GraphExplorer.jsx @@ -280,7 +280,7 @@ const GraphExplorer = () => { select = params.$select.map((p) => p.value).join(',') } if (params?.name) { - params.QueueNameOverride = params.name + params.QueueNameOverride = 'Graph Explorer - ' + params.name } execGraphRequest({ path: 'api/ListGraphRequest', From a3675bd1000f51afe4beca044bae44847b47bb0b Mon Sep 17 00:00:00 2001 From: John Duprey Date: Wed, 1 May 2024 18:26:15 -0400 Subject: [PATCH 10/15] Update CellTable.jsx --- src/components/tables/CellTable.jsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/tables/CellTable.jsx b/src/components/tables/CellTable.jsx index 0fffd6da5637..cfcbd5403065 100644 --- a/src/components/tables/CellTable.jsx +++ b/src/components/tables/CellTable.jsx @@ -20,20 +20,24 @@ export default function cellTable( columnProp = column } - if (!Array.isArray(columnProp) && typeof columnProp === 'object') { - columnProp = Object.keys(columnProp).map((key) => { - return { - Key: key, - Value: columnProp[key], - } - }) + if (columnProp === undefined || columnProp === null) { + columnProp = [] } else { - if (Array.isArray(columnProp) && typeof columnProp[0] !== 'object') { - columnProp = columnProp.map((row) => { + if (!Array.isArray(columnProp) && typeof columnProp === 'object') { + columnProp = Object.keys(columnProp).map((key) => { return { - Value: row, + Key: key, + Value: columnProp[key], } }) + } else { + if (Array.isArray(columnProp) && typeof columnProp[0] !== 'object') { + columnProp = columnProp.map((row) => { + return { + Value: row, + } + }) + } } } From 130d25bcfb70199d354c24ae20a9e63e6a0a1388 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Wed, 1 May 2024 19:05:04 -0400 Subject: [PATCH 11/15] Update Users.jsx --- src/views/identity/administration/Users.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/identity/administration/Users.jsx b/src/views/identity/administration/Users.jsx index dc3b5243815b..2d0a4aa9ac49 100644 --- a/src/views/identity/administration/Users.jsx +++ b/src/views/identity/administration/Users.jsx @@ -480,6 +480,7 @@ const Users = (row) => { 'id,accountEnabled,businessPhones,city,createdDateTime,companyName,country,department,displayName,faxNumber,givenName,isResourceAccount,jobTitle,mail,mailNickname,mobilePhone,onPremisesDistinguishedName,officeLocation,onPremisesLastSyncDateTime,otherMails,postalCode,preferredDataLocation,preferredLanguage,proxyAddresses,showInAddressList,state,streetAddress,surname,usageLocation,userPrincipalName,userType,assignedLicenses,onPremisesSyncEnabled', $count: true, $orderby: 'displayName', + $top: 999, }, tableProps: { keyField: 'id', From cdc867d2f0a5f2d1792f1774eb30bee8501b9ad6 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 2 May 2024 14:03:29 +0200 Subject: [PATCH 12/15] add pretty card, fix dashboord calc --- .../contentcards/CippPrettyCard.jsx | 18 +++++----- src/views/home/Home.jsx | 10 ++++-- .../tenant/administration/SecureScore.jsx | 33 ++++++------------- 3 files changed, 28 insertions(+), 33 deletions(-) diff --git a/src/components/contentcards/CippPrettyCard.jsx b/src/components/contentcards/CippPrettyCard.jsx index 51f55d05551c..b3ef939fb801 100644 --- a/src/components/contentcards/CippPrettyCard.jsx +++ b/src/components/contentcards/CippPrettyCard.jsx @@ -6,7 +6,7 @@ import 'react-circular-progressbar/dist/styles.css' export default function CippPrettyCard({ title, - titleType = 'normal', + titleType = 'big', percentage, topLabel, smallLabel, @@ -25,14 +25,16 @@ export default function CippPrettyCard({ {!isFetching && ( - +
+ +
- +

{topLabel}

{smallLabel}
diff --git a/src/views/home/Home.jsx b/src/views/home/Home.jsx index 21ed159074d5..f764cfc32915 100644 --- a/src/views/home/Home.jsx +++ b/src/views/home/Home.jsx @@ -422,14 +422,20 @@ const TenantDashboard = () => { { const textRef = useRef() @@ -220,29 +221,15 @@ const SecureScore = () => {
- - - Current Score - - - - {isFetching && } - {translateState && ( - <> -

- {Math.round( - (translateData?.currentScore / translateData?.maxScore) * 100 * 10, - ) / 10} - % -

- - {translateData?.currentScore} of {translateData?.maxScore} points - - - )} -
-
-
+
From d8662fa55bda90cdb94166c070de43887877642f Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Thu, 2 May 2024 14:09:04 +0200 Subject: [PATCH 13/15] secure score pimpin' --- .../contentcards/CippPrettyCard.jsx | 2 +- .../tenant/administration/SecureScore.jsx | 90 +++++++------------ 2 files changed, 31 insertions(+), 61 deletions(-) diff --git a/src/components/contentcards/CippPrettyCard.jsx b/src/components/contentcards/CippPrettyCard.jsx index b3ef939fb801..b97516e3713c 100644 --- a/src/components/contentcards/CippPrettyCard.jsx +++ b/src/components/contentcards/CippPrettyCard.jsx @@ -6,7 +6,7 @@ import 'react-circular-progressbar/dist/styles.css' export default function CippPrettyCard({ title, - titleType = 'big', + titleType = 'normal', percentage, topLabel, smallLabel, diff --git a/src/views/tenant/administration/SecureScore.jsx b/src/views/tenant/administration/SecureScore.jsx index b900d4b1b055..368c2e9ff38e 100644 --- a/src/views/tenant/administration/SecureScore.jsx +++ b/src/views/tenant/administration/SecureScore.jsx @@ -232,68 +232,38 @@ const SecureScore = () => { /> - - - Compared Score (Similiar sized business) - - - - {isFetching && } - {translateState && ( - <> -

- { - //calculate percentage, round to 1 dec. - Math.round( - (translateData?.averageComparativeScores[1]?.averageScore / - translateData?.maxScore) * - 100 * - 10, - ) / 10 - } - % -

- - {translateData?.averageComparativeScores[1]?.averageScore} of{' '} - {translateData?.maxScore} points - - - )} -
-
-
+
- - - Compared Score (All businesses) - - - - {isFetching && } - {translateState && ( - <> -

- { - //calculate percentage, round to 1 dec. - Math.round( - (translateData?.averageComparativeScores[0]?.averageScore / - translateData?.maxScore) * - 100 * - 10, - ) / 10 - } - % -

- - {translateData?.averageComparativeScores[0]?.averageScore} of{' '} - {translateData?.maxScore} points - - - )} -
-
-
+
From c76e042cdad1438957465bef859ab49c6056943c Mon Sep 17 00:00:00 2001 From: John Duprey Date: Thu, 2 May 2024 11:14:31 -0400 Subject: [PATCH 14/15] Add format parameter --- src/views/tenant/administration/GraphExplorer.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/tenant/administration/GraphExplorer.jsx b/src/views/tenant/administration/GraphExplorer.jsx index d6947f18f5de..3d6950c598d4 100644 --- a/src/views/tenant/administration/GraphExplorer.jsx +++ b/src/views/tenant/administration/GraphExplorer.jsx @@ -539,6 +539,13 @@ const GraphExplorer = () => { label="Reverse Tenant Lookup" /> + + Date: Thu, 2 May 2024 17:14:12 -0400 Subject: [PATCH 15/15] up version --- package.json | 2 +- public/version_latest.txt | 2 +- version_latest.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8ea30f0e681b..616ab46b1e64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cipp", - "version": "5.6.1", + "version": "5.6.2", "description": "The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners.", "homepage": "https://cipp.app/", "bugs": { diff --git a/public/version_latest.txt b/public/version_latest.txt index b7c75422bc1d..d6a86bf436c0 100644 --- a/public/version_latest.txt +++ b/public/version_latest.txt @@ -1 +1 @@ -5.6.1 +5.6.2 diff --git a/version_latest.txt b/version_latest.txt index b7c75422bc1d..d6a86bf436c0 100644 --- a/version_latest.txt +++ b/version_latest.txt @@ -1 +1 @@ -5.6.1 +5.6.2