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 #30

Merged
merged 30 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
aff9148
Add processor function support
JohnDuprey Aug 14, 2024
a7308f4
Add extension call to action support
JohnDuprey Aug 14, 2024
2cc024f
CIPP-SAM API Permissions
JohnDuprey Aug 14, 2024
0be696c
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Aug 14, 2024
135facb
Merge pull request #2813 from JohnDuprey/dev
JohnDuprey Aug 14, 2024
edf1178
Handle default permission objects
JohnDuprey Aug 14, 2024
197c6a5
remove permissions when SP is deleted
JohnDuprey Aug 14, 2024
630e4e1
Update CippAppPermissionBuilder.jsx
JohnDuprey Aug 14, 2024
9ccd7f1
Merge pull request #2814 from JohnDuprey/dev
JohnDuprey Aug 14, 2024
b431193
CIPP-SAM Permissions, Bugfixes and error cleanup
JohnDuprey Aug 14, 2024
8c20611
Permission builder
JohnDuprey Aug 14, 2024
7298c05
Merge pull request #2816 from JohnDuprey/dev
JohnDuprey Aug 14, 2024
7e87b2a
Create service principal capabilities
JohnDuprey Aug 14, 2024
f22f756
Permission builder
JohnDuprey Aug 14, 2024
dbb45bc
Merge pull request #2817 from JohnDuprey/dev
JohnDuprey Aug 14, 2024
d642177
Fix CellTable item count for single objects
JohnDuprey Aug 16, 2024
22c7264
Huntress RogueApps
JohnDuprey Aug 16, 2024
b4b820f
Merge branch 'KelvinTegelaar:dev' into dev
JohnDuprey Aug 16, 2024
3de5bb6
Merge pull request #2827 from JohnDuprey/dev
JohnDuprey Aug 16, 2024
b86f0dd
Assign & Unassign Teams Voice User Numbers
CHRIS-BRANNON Aug 17, 2024
58e5982
Formatting Issue
CHRIS-BRANNON Aug 17, 2024
cc0eda1
Fixes jitadmin issues
KelvinTegelaar Aug 18, 2024
22bccef
Merge pull request #2830 from CHRIS-BRANNON/dev
KelvinTegelaar Aug 18, 2024
e6258b9
Fix delete rule confirmation text
MoltenTesseract Aug 19, 2024
88fa828
Merge pull request #2831 from MoltenTesseract/dev
KelvinTegelaar Aug 19, 2024
aaa50b9
version up
KelvinTegelaar Aug 19, 2024
b3d79e6
Fix reset mfa
JohnDuprey Aug 19, 2024
3e7c14b
Merge branch 'KelvinTegelaar:dev' into dev
JohnDuprey Aug 19, 2024
3042dd4
Merge pull request #2836 from JohnDuprey/dev
JohnDuprey Aug 19, 2024
51b2170
Merge pull request #2837 from KelvinTegelaar/dev
KelvinTegelaar Aug 19, 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
12 changes: 10 additions & 2 deletions Tools/Start-CippDevEmulators.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
Write-Host "Starting CIPP Dev Emulators"
Write-Host 'Starting CIPP Dev Emulators'
Get-Process node -ErrorAction SilentlyContinue | Stop-Process -ErrorAction SilentlyContinue
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run start`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa

$Process = Read-Host -Prompt 'Start Process Function (y/N)?'

if ($Process -eq 'y') {
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run start`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa`; new-tab --title 'CIPP-API-Processor' -d $Path\CIPP-API-Processor pwsh -c func start --port 7072
} else {
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run start`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa
}

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.2.2",
"version": "6.3.0",
"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.2.2
6.3.0
8 changes: 4 additions & 4 deletions src/components/contentcards/CippButtonCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function CippButtonCard({
titleType = 'normal',
CardButton,
children,
isFetching,
isFetching = false,
className = 'h-100',
}) {
return (
Expand All @@ -22,16 +22,16 @@ export default function CippButtonCard({
{isFetching && <Skeleton />}
{children}
</CCardBody>
<CCardFooter>{CardButton}</CCardFooter>
{CardButton && <CCardFooter>{CardButton}</CCardFooter>}
</CCard>
)
}

CippButtonCard.propTypes = {
title: PropTypes.string.isRequired,
titleType: PropTypes.string,
CardButton: PropTypes.element.isRequired,
CardButton: PropTypes.element,
children: PropTypes.element.isRequired,
isFetching: PropTypes.bool.isRequired,
isFetching: PropTypes.bool,
className: PropTypes.string,
}
6 changes: 5 additions & 1 deletion src/components/forms/RFFComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ export const RFFSelectSearch = ({
retainInput = true,
isLoading = false,
allowCreate = false,
onCreateOption,
refreshFunction,
...props
}) => {
Expand Down Expand Up @@ -589,7 +590,7 @@ export const RFFSelectSearch = ({
)}
</CFormLabel>
{allowCreate ? (
<Creatable {...selectProps} isClearable={true} />
<Creatable {...selectProps} isClearable={true} onCreateOption={onCreateOption} />
) : (
<Select {...selectProps} isClearable={!onChange} />
)}
Expand All @@ -612,6 +613,9 @@ RFFSelectSearch.propTypes = {
onInputChange: PropTypes.func,
isLoading: PropTypes.bool,
refreshFunction: PropTypes.func,
allowCreate: PropTypes.bool,
onCreateOption: PropTypes.func,
retainInput: PropTypes.bool,
values: PropTypes.arrayOf(PropTypes.shape({ value: PropTypes.string, name: PropTypes.string }))
.isRequired,
}
12 changes: 10 additions & 2 deletions src/components/tables/CellGenericFormat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ function nocolour(iscolourless, content) {
export function CellTip(cell, overflow = false) {
return (
<CTooltip content={String(cell)}>
<div className="celltip-content-nowrap">{String(cell)}</div>
{overflow ? (
<div className="celltip-content">{String(cell)}</div>
) : (
<div className="celltip-content-nowrap">{String(cell)}</div>
)}
</CTooltip>
)
}

export const cellGenericFormatter =
({ warning = false, reverse = false, colourless = true, noDataIsFalse } = {}) =>
({ warning = false, reverse = false, colourless = true, noDataIsFalse, wrap = false } = {}) =>
// eslint-disable-next-line react/display-name
(row, index, column, id) => {
const cell = column.selector(row)
Expand All @@ -51,6 +55,10 @@ export const cellGenericFormatter =
</a>
)
}

if (wrap) {
return CellTip(cell, true)
}
return CellTip(cell)
}
if (typeof cell === 'number') {
Expand Down
11 changes: 10 additions & 1 deletion src/components/tables/CellTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ export default function cellTable(
if (columnProp === undefined || columnProp === null) {
columnProp = []
} else {
var objectLength = 1
var lengthText = 'Item'
if (columnProp instanceof Array) {
objectLength = columnProp.length
if (objectLength > 1) {
lengthText = 'Items'
}
}

if (!Array.isArray(columnProp) && typeof columnProp === 'object') {
columnProp = Object.keys(columnProp).map((key) => {
return {
Expand Down Expand Up @@ -93,7 +102,7 @@ export default function cellTable(
size="sm"
onClick={() => handleTable({ columnProp })}
>
{columnProp.length} Items
{objectLength} {lengthText}
</CButton>
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/tables/CellTip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export const CellTipButton = (value, display) => {
)
}

export const CellTip = (value, overflow = false) => {
export const CellTip = (value, wrap = false) => {
if (!value) {
return <div />
}
if (!overflow) {
if (!wrap) {
return (
<CTooltip content={value}>
<div className="celltip-content-nowrap">{String(value)}</div>
Expand Down
16 changes: 9 additions & 7 deletions src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const FilterComponent = ({ filterText, onFilter, onClear, filterlist, onFilterPr
{filterlist &&
filterlist.map((item, idx) => {
return (
<CDropdownItem key={idx} onClick={() => onFilterPreset(item.filter)}>
<CDropdownItem key={`filter-${idx}`} onClick={() => onFilterPreset(item.filter)}>
{item.filterName}
</CDropdownItem>
)
Expand Down Expand Up @@ -722,7 +722,7 @@ export default function CippTable({
{dataKeys() &&
dataKeys().map((item, idx) => {
return (
<CDropdownItem key={idx} onClick={() => addColumn(item)}>
<CDropdownItem key={`select-${idx}`} onClick={() => addColumn(item)}>
{updatedColumns.find(
(o) => o.exportSelector === item && o?.omit !== true,
) && <FontAwesomeIcon icon={faCheck} />}{' '}
Expand Down Expand Up @@ -820,7 +820,7 @@ export default function CippTable({
<CDropdownMenu>
{actionsList.map((item, idx) => {
return (
<CDropdownItem key={idx} onClick={() => executeselectedAction(item)}>
<CDropdownItem key={`actions-${idx}`} onClick={() => executeselectedAction(item)}>
{item.label}
</CDropdownItem>
)
Expand Down Expand Up @@ -885,6 +885,7 @@ export default function CippTable({
updatedColumns,
addColumn,
setGraphFilter,
isFetching,
])
const tablePageSize = useSelector((state) => state.app.tablePageSize)
const [codeCopied, setCodeCopied] = useState(false)
Expand Down Expand Up @@ -950,8 +951,8 @@ export default function CippTable({
const results = message.data?.Results
const displayResults = Array.isArray(results) ? results.join(', ') : results
return (
<>
<li key={`message-${idx}`}>
<React.Fragment key={`message-${idx}`}>
<li>
{displayResults}
<CopyToClipboard text={displayResults} onCopy={() => onCodeCopied()}>
<CButton
Expand All @@ -968,7 +969,7 @@ export default function CippTable({
</CButton>
</CopyToClipboard>
</li>
</>
</React.Fragment>
)
})}
{loopRunning && (
Expand Down Expand Up @@ -1008,11 +1009,12 @@ export default function CippTable({
progressPending={isFetching}
progressComponent={<CSpinner color="info" component="div" />}
paginationRowsPerPageOptions={[25, 50, 100, 200, 500]}
keyField={keyField}
{...rest}
/>
{selectedRows.length >= 1 && <CCallout>Selected {selectedRows.length} items</CCallout>}
<CippCodeOffCanvas
row={data}
row={data ?? {}}
hideButton={true}
state={codeOffcanvasVisible}
hideFunction={() => setCodeOffcanvasVisible(false)}
Expand Down
5 changes: 2 additions & 3 deletions src/components/utilities/CippActionsOffcanvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ import { faGlobe } from '@fortawesome/free-solid-svg-icons'
import { cellGenericFormatter } from '../tables/CellGenericFormat'
import ReactSelect from 'react-select'

const CippOffcanvasCard = ({ action, key }) => {
const CippOffcanvasCard = ({ action }) => {
const [offcanvasVisible, setOffcanvasVisible] = useState(false)
return (
<>
<CCard key={key} className="border-top-dark border-top-3 mb-3">
<CCard className="border-top-dark border-top-3 mb-3">
<CCardHeader className="d-flex justify-content-between align-items-center">
<CCardTitle>Report Name: {action.label}</CCardTitle>
</CCardHeader>
Expand Down Expand Up @@ -95,7 +95,6 @@ const CippOffcanvasCard = ({ action, key }) => {
}
CippOffcanvasCard.propTypes = {
action: PropTypes.object,
key: PropTypes.object,
}

export default function CippActionsOffcanvas(props) {
Expand Down
Loading