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

Merged
merged 106 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
2c4f0aa
Merge pull request #2427 from JohnDuprey/jit-admin
JohnDuprey May 9, 2024
6a41fba
Merge pull request #173 from JohnDuprey/dev
JohnDuprey May 9, 2024
f873014
Update DeployJITAdmin.jsx
JohnDuprey May 9, 2024
dee71f5
Update DeployJITAdmin.jsx
JohnDuprey May 9, 2024
0c371e4
Merge pull request #38 from KelvinTegelaar/dev
kris6673 May 17, 2024
eef83c8
Prevent mapping with API errors
JohnDuprey May 17, 2024
b217bcf
Update Activity Based Timeout standard to have options
kris6673 May 17, 2024
895ad36
Roles View Update
OfficialEsco May 22, 2024
1b4a459
Merge pull request #2463 from kris6673/dev
KelvinTegelaar May 26, 2024
210829d
Merge pull request #2472 from Ren-Roros-Digital/roleview
KelvinTegelaar May 26, 2024
7a36687
added top 300
KelvinTegelaar May 26, 2024
42f81ab
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
KelvinTegelaar May 26, 2024
cfd802e
fixes offboarding wizard speed
KelvinTegelaar May 26, 2024
202962f
removed data from loop
KelvinTegelaar May 26, 2024
fe06f78
added bulk options for policies
KelvinTegelaar May 26, 2024
25f3801
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 26, 2024
a5505d3
Add shorten meetings standard
kris6673 May 26, 2024
c6265ac
Merge pull request #2480 from kris6673/shorten-meetings
KelvinTegelaar May 27, 2024
5059a03
Graph Explorer Scheduler
JohnDuprey May 27, 2024
b26aea1
improvements to autopilot.
KelvinTegelaar May 28, 2024
65c7a36
pretification
KelvinTegelaar May 28, 2024
84e24b1
Update Users.jsx
PremierOneData May 28, 2024
1da3471
Merge pull request #2484 from PremierOneData/patch-4
KelvinTegelaar May 28, 2024
6fd3c25
Custom Roles
JohnDuprey May 29, 2024
dafe571
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 29, 2024
551ae1d
Custom Role Info
JohnDuprey May 29, 2024
17dcf39
Update SettingsCustomRoles.jsx
JohnDuprey May 29, 2024
ed01c11
Merge pull request #2490 from JohnDuprey/dev
JohnDuprey May 29, 2024
8fc74f7
Merge pull request #40 from KelvinTegelaar/dev
kris6673 May 29, 2024
6ed7aa3
Fix scripted alert react error
JohnDuprey May 29, 2024
2b7edbd
Add beta notice
JohnDuprey May 29, 2024
9aed574
Merge branch 'KelvinTegelaar:dev' into dev
JohnDuprey May 29, 2024
2e67192
Fix meta.error on RFFSelectSearch
JohnDuprey May 29, 2024
215de12
Merge pull request #2492 from JohnDuprey/dev
JohnDuprey May 29, 2024
25688a6
remove accordian for superadmin
KelvinTegelaar May 29, 2024
0c07f2c
Update ListAppliedStandards.jsx
JohnDuprey May 30, 2024
f288e02
Merge pull request #2493 from JohnDuprey/dev
JohnDuprey May 30, 2024
875d47b
Custom role callouts
JohnDuprey May 30, 2024
7a12be5
Update SettingsCustomRoles.jsx
JohnDuprey May 30, 2024
9f62c0a
new extension config page
KelvinTegelaar May 30, 2024
0793819
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
KelvinTegelaar May 30, 2024
4488741
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 30, 2024
7d90d70
Merge pull request #2494 from KelvinTegelaar/jit-admin
JohnDuprey May 30, 2024
6c9c789
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 30, 2024
5eeccda
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 30, 2024
b8ea2ae
Merge branch 'dev' of https://github.com/johnduprey/CIPP into dev
JohnDuprey May 30, 2024
40d54d6
remove old extensions
KelvinTegelaar May 30, 2024
15dcc67
JIT admin route/nav
JohnDuprey May 30, 2024
c74cd41
Remove extension tabs from settings
JohnDuprey May 30, 2024
04a4111
Merge branch 'dev' into dev
JohnDuprey May 30, 2024
6499786
Merge pull request #2495 from JohnDuprey/dev
JohnDuprey May 30, 2024
a6c1f61
fix nav/route
JohnDuprey May 30, 2024
9ac5e9e
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 30, 2024
7be941d
fixes bpa if never run
KelvinTegelaar May 30, 2024
5aff8e1
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 30, 2024
51d69c1
Merge pull request #41 from KelvinTegelaar/dev
kris6673 May 31, 2024
4c03185
Add CloudMessageRecall standard
kris6673 May 31, 2024
472d523
fixes errormessages not showing up
KelvinTegelaar May 31, 2024
01dc70a
update settings
KelvinTegelaar May 31, 2024
8da455d
Add TeamsMeetingsByDefault standard
kris6673 May 31, 2024
180f176
permissions fix
KelvinTegelaar May 31, 2024
900c007
fixed
KelvinTegelaar May 31, 2024
e7738cf
Add bookings standard
kris6673 May 31, 2024
8bb45a4
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey May 31, 2024
898fcd2
Merge pull request #2503 from kris6673/cloudrecall
KelvinTegelaar May 31, 2024
1d326a7
Merge pull request #2502 from kris6673/teamsmeetings
KelvinTegelaar May 31, 2024
96b32e9
Merge pull request #2501 from kris6673/bookings
KelvinTegelaar May 31, 2024
e685d04
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Jun 2, 2024
ffdc744
Fix JIT route
JohnDuprey Jun 2, 2024
6ea3f5e
Merge pull request #43 from KelvinTegelaar/dev
kris6673 Jun 3, 2024
5ede288
JIT Admin
JohnDuprey Jun 3, 2024
0604ba7
Merge pull request #2507 from JohnDuprey/dev
JohnDuprey Jun 3, 2024
b542489
Update JIT actions
JohnDuprey Jun 3, 2024
5423ed5
Merge pull request #2508 from JohnDuprey/dev
JohnDuprey Jun 3, 2024
c889ed1
Update DeployJITAdmin.jsx
JohnDuprey Jun 4, 2024
70dddff
Merge pull request #2511 from JohnDuprey/dev
JohnDuprey Jun 4, 2024
a540aa5
Added more Anti-Phishing actions
OfficialEsco Jun 5, 2024
5d8dee5
Merge branch 'KelvinTegelaar:dev' into dev
kris6673 Jun 5, 2024
651de59
Tenant block list
JohnDuprey Jun 5, 2024
9ee4e4b
Merge pull request #2514 from JohnDuprey/dev
JohnDuprey Jun 5, 2024
af8202c
Add sort
JohnDuprey Jun 5, 2024
8b35938
Add Pronouns standard
kris6673 Jun 5, 2024
8a979de
Update SettingsCustomRoles.jsx
JohnDuprey Jun 5, 2024
622e1dd
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Jun 5, 2024
4f9fdf1
Merge pull request #2516 from JohnDuprey/dev
JohnDuprey Jun 5, 2024
e742061
Add input list for string[] values
JohnDuprey Jun 5, 2024
665aafe
Update SettingsCustomRoles.jsx
JohnDuprey Jun 5, 2024
8238f95
Merge branch 'KelvinTegelaar:dev' into dev
JohnDuprey Jun 5, 2024
49218f0
Merge pull request #2518 from JohnDuprey/dev
JohnDuprey Jun 5, 2024
c569c82
Merge pull request #2513 from Ren-Roros-Digital/antiphishpolicy
KelvinTegelaar Jun 5, 2024
5bdb4c1
Merge pull request #2515 from kris6673/pronouns
KelvinTegelaar Jun 5, 2024
95ee284
Extension tweaks
JohnDuprey Jun 5, 2024
aeeb2eb
Merge pull request #182 from KelvinTegelaar/dev
JohnDuprey Jun 5, 2024
5d3c33e
Merge pull request #2522 from JohnDuprey/dev
JohnDuprey Jun 5, 2024
3624930
Update Extensions.json
JohnDuprey Jun 5, 2024
722274f
Merge branch 'KelvinTegelaar:dev' into dev
JohnDuprey Jun 5, 2024
bc2d74f
Merge pull request #2523 from JohnDuprey/dev
JohnDuprey Jun 5, 2024
8e0710d
fixes bug with rffcomponents and input
KelvinTegelaar Jun 6, 2024
b544f43
improved fuzzy search
KelvinTegelaar Jun 6, 2024
de39748
remove console.log
KelvinTegelaar Jun 6, 2024
68f666c
add language option to autopilot profile
KelvinTegelaar Jun 6, 2024
637a0be
adds autoback cipp
KelvinTegelaar Jun 7, 2024
020c39b
added publish to bpa reports
KelvinTegelaar Jun 7, 2024
362a6a9
version up
KelvinTegelaar Jun 7, 2024
0f08cc2
Merge branch 'main' into dev
KelvinTegelaar Jun 7, 2024
608f3c2
Merge pull request #2534 from KelvinTegelaar/dev
KelvinTegelaar Jun 7, 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 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "5.7.1",
"version": "5.8.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 @@
5.7.1
5.8.0
10 changes: 10 additions & 0 deletions src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ const _nav = [
name: 'Roles',
to: '/identity/administration/roles',
},
{
component: CNavItem,
name: 'JIT Admin',
to: '/identity/administration/jit-admin',
},
{
component: CNavItem,
name: 'Offboarding Wizard',
Expand Down Expand Up @@ -771,6 +776,11 @@ const _nav = [
name: 'Application Settings',
to: '/cipp/settings',
},
{
component: CNavItem,
name: 'Extensions Settings',
to: '/cipp/extensions',
},
{
component: CNavItem,
name: 'User Settings',
Expand Down
168 changes: 85 additions & 83 deletions src/components/forms/RFFComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,54 @@ RFFCFormInputArray.propTypes = {
...sharedPropTypes,
}

export const RFFCFormInputList = ({ name, label, className = 'mb-3' }) => {
return (
<>
<FieldArray name={name}>
{({ fields }) => (
<div>
<div className="mb-2">
{label && (
<CFormLabel className="me-2" htmlFor={name}>
{label}
</CFormLabel>
)}
<CButton
onClick={() => fields.push({ Key: '', Value: '' })}
className="circular-button"
title={'+'}
>
<FontAwesomeIcon icon={'plus'} />
</CButton>
</div>
{fields.map((name, index) => (
<div key={name} className={className}>
<div>
<Field name={`${name}`} component="input">
{({ input, meta }) => {
return <CFormInput placeholder="Value" {...input} className="mb-2" />
}}
</Field>
</div>
<CButton
onClick={() => fields.remove(index)}
className={`circular-button`}
title={'-'}
>
<FontAwesomeIcon icon={'minus'} />
</CButton>
</div>
))}
</div>
)}
</FieldArray>
</>
)
}
RFFCFormInputList.propTypes = {
...sharedPropTypes,
}

export const RFFCFormRadio = ({
name,
label,
Expand Down Expand Up @@ -293,7 +341,6 @@ export const RFFCFormRadioList = ({
name,
options,
className = 'mb-3',
disabled = false,
onClick,
inline = false,
}) => {
Expand All @@ -312,7 +359,6 @@ export const RFFCFormRadioList = ({
onChange={input.onChange}
type="radio"
{...option}
disabled={disabled}
onClick={onClick}
inline={inline}
/>
Expand Down Expand Up @@ -465,10 +511,10 @@ export const RFFSelectSearch = ({
isLoading = false,
allowCreate = false,
refreshFunction,
props,
...props
}) => {
const [inputText, setInputText] = useState('')
const selectSearchvalues = values.map((val) => ({
const selectSearchValues = values.map((val) => ({
value: val.value,
label: val.name,
...val.props,
Expand All @@ -492,12 +538,33 @@ export const RFFSelectSearch = ({
return (
<Field name={name} validate={validate}>
{({ meta, input }) => {
const handleChange = onChange
? (e) => {
input.onChange(e)
onChange(e)
}
: input.onChange
const handleChange = (e) => {
if (onChange) {
onChange(e)
}
input.onChange(e)
}

const selectProps = {
classNamePrefix: 'react-select',
...input,
name,
id: name,
disabled,
options: selectSearchValues,
placeholder,
isMulti: multi,
inputValue: inputText,
isLoading,
onChange: handleChange,
onInputChange: setOnInputChange,
...props,
//merge className from props into the default className
className: props.className
? `${props.className} react-select-container`
: 'react-select-container',
}

return (
<div>
<CFormLabel htmlFor={name}>
Expand All @@ -515,81 +582,16 @@ export const RFFSelectSearch = ({
</CTooltip>
)}
</CFormLabel>
{!allowCreate && onChange && (
<Select
className="react-select-container"
classNamePrefix="react-select"
{...input}
isClearable={false}
name={name}
id={name}
disabled={disabled}
options={selectSearchvalues}
placeholder={placeholder}
isMulti={multi}
onChange={handleChange}
onInputChange={debounceOnInputChange}
inputValue={inputText}
isLoading={isLoading}
{...props}
/>
)}
{!allowCreate && !onChange && (
<Select
className="react-select-container"
classNamePrefix="react-select"
{...input}
isClearable={true}
name={name}
id={name}
disabled={disabled}
options={selectSearchvalues}
placeholder={placeholder}
onInputChange={setOnInputChange}
isMulti={multi}
inputValue={inputText}
isLoading={isLoading}
{...props}
/>
)}
{allowCreate && onChange && (
<Creatable
className="react-select-container"
classNamePrefix="react-select"
{...input}
isClearable={false}
name={name}
id={name}
disabled={disabled}
options={selectSearchvalues}
placeholder={placeholder}
isMulti={multi}
onChange={handleChange}
onInputChange={debounceOnInputChange}
inputValue={inputText}
isLoading={isLoading}
{...props}
/>
{allowCreate ? (
<Creatable {...selectProps} isClearable={true} />
) : (
<Select {...selectProps} isClearable={!onChange} />
)}
{allowCreate && !onChange && (
<Creatable
className="react-select-container"
classNamePrefix="react-select"
{...input}
isClearable={true}
name={name}
id={name}
disabled={disabled}
options={selectSearchvalues}
placeholder={placeholder}
onInputChange={setOnInputChange}
isMulti={multi}
inputValue={inputText}
isLoading={isLoading}
{...props}
/>
{meta.error && meta.touched && (
<span className="text-danger">
{typeof meta.error === 'object' ? Object.values(meta.error).join('') : meta.error}
</span>
)}
{meta.error && meta.touched && <span className="text-danger">{meta.error}</span>}
</div>
)
}}
Expand Down
2 changes: 2 additions & 0 deletions src/components/forms/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
RFFCFormSelect,
RFFSelectSearch,
RFFCFormInputArray,
RFFCFormInputList,
} from 'src/components/forms/RFFComponents'

export {
Expand All @@ -24,4 +25,5 @@ export {
RFFCFormSelect,
RFFSelectSearch,
RFFCFormInputArray,
RFFCFormInputList,
}
28 changes: 14 additions & 14 deletions src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export default function CippTable({
(modalMessage, modalUrl, modalType = 'GET', modalBody, modalInput, modalDropdown) => {
if (modalType === 'GET') {
ModalService.confirm({
getData: () => inputRef.current?.value,
body: (
<div style={{ overflow: 'visible' }}>
<div>{modalMessage}</div>
Expand Down Expand Up @@ -466,6 +467,18 @@ export default function CippTable({
title: 'Confirm',
onConfirm: async () => {
const resultsarr = []
const selectedValue = inputRef.current.value
let additionalFields = {}
if (inputRef.current.nodeName === 'SELECT') {
const selectedItem = dropDownInfo.data.find(
(item) => item[modalDropdown.valueField] === selectedValue,
)
if (selectedItem && modalDropdown.addedField) {
Object.keys(modalDropdown.addedField).forEach((key) => {
additionalFields[key] = selectedItem[modalDropdown.addedField[key]]
})
}
}
for (const row of selectedRows) {
setLoopRunning(true)
const urlParams = new URLSearchParams(modalUrl.split('?')[1])
Expand All @@ -492,26 +505,13 @@ export default function CippTable({
}
}
const NewModalUrl = `${modalUrl.split('?')[0]}?${urlParams.toString()}`
const selectedValue = inputRef.current.value
let additionalFields = {}
if (inputRef.current.nodeName === 'SELECT') {
const selectedItem = dropDownInfo.data.find(
(item) => item[modalDropdown.valueField] === selectedValue,
)
if (selectedItem && modalDropdown.addedField) {
Object.keys(modalDropdown.addedField).forEach((key) => {
additionalFields[key] = selectedItem[modalDropdown.addedField[key]]
})
}
}

const results = await genericPostRequest({
path: NewModalUrl,
values: {
...modalBody,
...newModalBody,
...additionalFields,
...{ input: inputRef.current.value },
...{ input: selectedValue },
},
})
resultsarr.push(results)
Expand Down
6 changes: 3 additions & 3 deletions src/components/utilities/CippFuzzySearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Fuse from 'fuse.js'
function CippfuzzySearch(options) {
const fuse = new Fuse(options, {
keys: ['name', 'groupName', 'items.name'],
threshold: 0.5,
threshold: 0.3,
location: 0,
ignoreLocation: true,
useExtendedSearch: true,
Expand All @@ -15,8 +15,8 @@ function CippfuzzySearch(options) {
if (!value.length) {
return options
}

return fuse.search(value).map((_ref) => {
const search = fuse.search(value)
return search.map((_ref) => {
let { item } = _ref
return item
})
Expand Down
9 changes: 7 additions & 2 deletions src/components/utilities/CippListOffcanvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CippListOffcanvas.propTypes = {
hideFunction: PropTypes.func.isRequired,
}

export function OffcanvasListSection({ title, items }) {
export function OffcanvasListSection({ title, items, showCardTitle = true }) {
//console.log(items)
const mappedItems = items.map((item, key) => ({ value: item.content, label: item.heading }))
return (
Expand All @@ -48,7 +48,11 @@ export function OffcanvasListSection({ title, items }) {
<CCard className="content-card">
<CCardHeader className="d-flex justify-content-between align-items-center">
<CCardTitle>
<FontAwesomeIcon icon={faGlobe} className="mx-2" /> Extended Information
{showCardTitle && (
<>
<FontAwesomeIcon icon={faGlobe} className="mx-2" /> Extended Information
</>
)}
</CCardTitle>
</CCardHeader>
<CCardBody>
Expand All @@ -62,4 +66,5 @@ export function OffcanvasListSection({ title, items }) {
OffcanvasListSection.propTypes = {
title: PropTypes.string,
items: PropTypes.array,
showCardTitle: PropTypes.bool,
}
Loading