Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#2657 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
Dev to hotfix
  • Loading branch information
JohnDuprey authored Jul 11, 2024
2 parents 961f085 + fe2c846 commit 498e5ec
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "6.0.1",
"version": "6.0.2",
"description": "The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners.",
"homepage": "https://cipp.app/",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.1
6.0.2
5 changes: 5 additions & 0 deletions src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,11 @@ const _nav = [
name: 'Extensions Settings',
to: '/cipp/extensions',
},
{
component: CNavItem,
name: 'Extension Sync',
to: '/cipp/extension-sync',
},
{
component: CNavItem,
name: 'User Settings',
Expand Down
1 change: 1 addition & 0 deletions src/importsMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import React from 'react'
"/license": React.lazy(() => import('./views/pages/license/License')),
"/cipp/settings": React.lazy(() => import('./views/cipp/app-settings/CIPPSettings')),
"/cipp/extensions": React.lazy(() => import('./views/cipp/Extensions')),
"/cipp/extension-sync": React.lazy(() => import('./views/cipp/ExtensionSync')),
"/cipp/setup": React.lazy(() => import('./views/cipp/Setup')),
"/tenant/administration/securescore": React.lazy(() => import('./views/tenant/administration/SecureScore')),
"/tenant/administration/gdap": React.lazy(() => import('./views/tenant/administration/GDAPWizard')),
Expand Down
6 changes: 6 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,12 @@
"component": "views/cipp/Extensions",
"allowedRoles": ["admin"]
},
{
"path": "/cipp/extension-sync",
"name": "Extension Sync",
"component": "views/cipp/ExtensionSync",
"allowedRoles": ["admin"]
},
{
"path": "/cipp/setup",
"name": "Setup",
Expand Down
10 changes: 2 additions & 8 deletions src/views/cipp/ExtensionMappings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,10 @@ export default function ExtensionMappings({ type, fieldMappings = false, autoMap
<CCol xs="5">
<RFFSelectSearch
name="companyId"
values={listMappingBackendResult.data?.Companies.filter((client) => {
return !Object.values(listMappingBackendResult.data?.Mappings)
.map((value) => {
return value.value
})
.includes(client.value.toString())
}).map((client) => ({
values={listMappingBackendResult.data?.Companies.map((client) => ({
name: client.name,
value: client.value,
}))}
})).sort((a, b) => a.name.localeCompare(b.name))}
onChange={(e) => setMappingValue(e)}
placeholder={`Select a ${type} Organization`}
isLoading={listMappingBackendResult.isFetching}
Expand Down
97 changes: 97 additions & 0 deletions src/views/cipp/ExtensionSync.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import React, { useState } from 'react'
import { CCol, CRow } from '@coreui/react'
import { useSelector } from 'react-redux'

import { useLazyGenericGetRequestQuery, useLazyGenericPostRequestQuery } from 'src/store/api/app'

import { CippPage, CippPageList } from 'src/components/layout'
import { CellTip, cellGenericFormatter } from 'src/components/tables/CellGenericFormat'
import 'react-datepicker/dist/react-datepicker.css'
import { CellBadge, cellBadgeFormatter, cellDateFormatter } from 'src/components/tables'
import { TitleButton } from 'src/components/buttons'

const ExtensionSync = () => {
const [ExecuteGetRequest, getResults] = useLazyGenericGetRequestQuery()
const tenantDomain = useSelector((state) => state.app.currentTenant.defaultDomainName)
const [refreshState, setRefreshState] = useState(false)
const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery()

const columns = [
{
name: 'Tenant',
selector: (row) => row['Tenant'],
sortable: true,
cell: cellGenericFormatter(),
exportSelector: 'Tenants',
},
{
name: 'Sync Type',
selector: (row) => row['SyncType'],
sortable: true,
cell: cellBadgeFormatter({ color: 'info' }),
exportSelector: 'SyncType',
},
{
name: 'Task',
selector: (row) => row['Name'],
sortable: true,
cell: cellGenericFormatter(),
exportSelector: 'Name',
},
{
name: 'Scheduled Time',
selector: (row) => row['ScheduledTime'],
sortable: true,
cell: cellDateFormatter({ format: 'short' }),
exportSelector: 'ScheduledTime',
},
{
name: 'Last Run',
selector: (row) => row['ExecutedTime'],
sortable: true,
cell: cellDateFormatter({ format: 'short' }),
exportSelector: 'ExecutedTime',
},
{
name: 'Repeats every',
selector: (row) => row['RepeatsEvery'],
sortable: true,
cell: (row) => CellTip(row['RepeatsEvery']),
exportSelector: 'RepeatsEvery',
},
{
name: 'Results',
selector: (row) => row['Results'],
sortable: true,
cell: cellGenericFormatter(),
exportSelector: 'Results',
},
]

return (
<CippPage title={`Extension Sync`} tenantSelector={false}>
<>
<CRow>
<CCol>
<CippPageList
key={refreshState}
capabilities={{
allTenants: true,
helpContext: 'https://google.com',
}}
title="Extension Sync"
tenantSelector={false}
datatable={{
columns,
reportName: `Extension Sync Report`,
path: `/api/ListExtensionSync`,
}}
/>
</CCol>
</CRow>
</>
</CippPage>
)
}

export default ExtensionSync
2 changes: 1 addition & 1 deletion src/views/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ const TenantDashboard = () => {
{organization.verifiedDomains?.slice(0, 3).map((item, idx) => (
<li key={idx}>{item.name}</li>
))}
{organization.verifiedDomains?.length > 5 && (
{organization.verifiedDomains?.length > 3 && (
<>
<CCollapse visible={domainVisible}>
{organization.verifiedDomains?.slice(3).map((item, idx) => (
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.1
6.0.2

0 comments on commit 498e5ec

Please sign in to comment.