Skip to content

GDAP Wizards and Scheduler #1798

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

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
59 changes: 40 additions & 19 deletions src/views/cipp/Scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@ const Scheduler = () => {
/>
</CCol>
</CRow>
<FormSpy>
{(props) => {
const selectedCommand = availableCommands.find(
(cmd) => cmd.Function === props.values.command?.value,
)
return (
<CRow className="mb-3">
<CCol>{selectedCommand?.Synopsis}</CCol>
</CRow>
)
}}
</FormSpy>
<CRow>
<FormSpy>
{(props) => {
Expand All @@ -282,27 +294,36 @@ const Scheduler = () => {
if (parameters.length > 0) {
paramblock = parameters.map((param, idx) => (
<CRow key={idx} className="mb-3">
<CCol>
{param.Type === 'System.Boolean' ||
param.Type ===
'System.Management.Automation.SwitchParameter' ? (
<>
<label>{param.Name}</label>
<RFFCFormSwitch
initialValue={true}
<CTooltip
content={
param?.Description !== null
? param.Description
: 'No Description'
}
placement="left"
>
<CCol>
{param.Type === 'System.Boolean' ||
param.Type ===
'System.Management.Automation.SwitchParameter' ? (
<>
<label>{param.Name}</label>
<RFFCFormSwitch
initialValue={false}
name={`parameters.${param.Name}`}
label={`True`}
/>
</>
) : (
<RFFCFormInput
type="text"
key={idx}
name={`parameters.${param.Name}`}
label={`True`}
label={`${param.Name}`}
/>
</>
) : (
<RFFCFormInput
type="text"
key={idx}
name={`parameters.${param.Name}`}
label={`${param.Name}`}
/>
)}
</CCol>
)}
</CCol>
</CTooltip>
</CRow>
))
}
Expand Down
11 changes: 11 additions & 0 deletions src/views/tenant/administration/GDAPInviteWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ const GDAPInviteWizard = () => {
<CCol md={3}></CCol>
<CCol md={6}>
<h5 className="mb-0">Roles and group names</h5>
{props.values.gdapRoles.map((role, idx) => (
<>
{role.RoleName == 'Company Administrator' && (
<CCallout color="warning">
WARNING: The Company Administrator role will prevent GDAP
relationships from automatically extending. We recommend against using
this in any GDAP relationship.
</CCallout>
)}
</>
))}
<CCallout color="info">
{props.values.gdapRoles.map((role, idx) => (
<li key={idx}>
Expand Down
12 changes: 12 additions & 0 deletions src/views/tenant/administration/GDAPRoleWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ const GDAPRoleWizard = () => {
<CCol md={3}></CCol>
<CCol md={6}>
<h5 className="mb-0">Roles and group names</h5>
{props.values.gdapRoles.map((role, idx) => (
<>
{role.Name == 'Company Administrator' && (
<CCallout color="warning">
WARNING: The Company Administrator role will prevent GDAP
relationships from automatically extending. We recommend against using
this in any GDAP relationship.
</CCallout>
)}
</>
))}

<CCallout color="info">
{props.values.gdapRoles.map((role, idx) => (
<li key={idx}>
Expand Down
11 changes: 11 additions & 0 deletions src/views/tenant/administration/GDAPWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,17 @@ const GDAPWizard = () => {
))}
</CCallout>
<h5 className="mb-0">Roles and group names</h5>
{props.values.gdapRoles.map((role, idx) => (
<>
{role.RoleName == 'Company Administrator' && (
<CCallout color="warning">
WARNING: The Company Administrator role will prevent GDAP
relationships from automatically extending. We recommend against using
this in any GDAP relationship.
</CCallout>
)}
</>
))}
<CCallout color="info">
{props.values.gdapRoles.map((role, idx) => (
<li key={idx}>
Expand Down