Skip to content

Commit

Permalink
added disablement options
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Dec 8, 2023
1 parent dc03cb0 commit 40a7d21
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 29 deletions.
9 changes: 7 additions & 2 deletions src/data/standards.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"name": "standards.MailContacts",
"cat": "Global Standards",
"helpText": "Defines the email address to receive general updates and information related to M365 subscriptions. Leave a contact field blank if you do not want to update the contact information.",
"disabledFeatures": {
"report": false,
"warn": false,
"remediate": false
},
"addedComponent": [
{
"type": "input",
Expand Down Expand Up @@ -493,8 +498,8 @@
"helpText": "Blocks login for all accounts that are marked as a shared mailbox. This is Microsoft best practice to prevent direct logons to shared mailboxes.",
"addedComponent": [],
"label": "Disable Shared Mailbox AAD accounts",
"impact": "High Impact",
"impactColour": "danger"
"impact": "Medium Impact",
"impactColour": "warning"
},
{
"name": "standards.intuneDeviceRetirementDays",
Expand Down
40 changes: 13 additions & 27 deletions src/views/tenant/standards/ListAppliedStandards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const ListAppliedStandards = () => {
let count = 0
Object.keys(standards).forEach((key) => {
const standard = standards[key]
// Check if 'Enabled' exists and the specific type is true
// Check if 'Enabled' exists and the specific type is true, for non-v2 standards
if (standard?.Enabled && standard?.Enabled[type]) {
count++
} else if (standard && standard[type]) {
Expand Down Expand Up @@ -354,12 +354,12 @@ const ListAppliedStandards = () => {
</p>
</CCol>
<CCol>
<h5>Warn</h5>
<h5>Report</h5>
<RFFCFormSwitch
name="ignore.ignore1"
disabled={true}
helpText={
'Exclude this standard from the All Tenants standard. This will only apply explicitly set standards to this tenant.'
'Report stores the data in the database to use in custom BPA reports.'
}
/>
</CCol>
Expand All @@ -369,17 +369,15 @@ const ListAppliedStandards = () => {
name="ignore.ignore2"
disabled={true}
helpText={
'Exclude this standard from the All Tenants standard. This will only apply explicitly set standards to this tenant.'
'Alert Generates an alert in the log, if remediate is enabled the log entry will also say if the remediation was successful.'
}
/>
</CCol>
<CCol>
<h5>Remediate</h5>
<RFFCFormSwitch
name="standards.OverrideAllTenants.remediate"
helpText={
'Exclude this standard from the All Tenants standard. This will only apply explicitly set standards to this tenant.'
}
helpText={'Remediate executes the fix for standard.'}
/>
</CCol>
<CCol md={3}>
Expand Down Expand Up @@ -416,26 +414,29 @@ const ListAppliedStandards = () => {
</p>
</CCol>
<CCol>
<h5>Warn</h5>
<h5>Report</h5>
<RFFCFormSwitch
name={`${obj.name}.report`}
helpText={obj.helpText}
disabled={obj.disabledFeatures?.report}
helpText="Report stores the data in the database to use in custom BPA reports."
sublabel={getLabel(obj)}
/>
</CCol>
<CCol>
<h5>Alert</h5>
<RFFCFormSwitch
name={`${obj.name}.alert`}
helpText={obj.helpText}
disabled={obj.disabledFeatures?.warn}
helpText="Alert Generates an alert in the log, if remediate is enabled the log entry will also say if the remediation was successful."
sublabel={getLabel(obj)}
/>
</CCol>
<CCol>
<h5>Remediate</h5>
<RFFCFormSwitch
name={`${obj.name}.remediate`}
helpText={obj.helpText}
disabled={obj.disabledFeatures?.remediate}
helpText={'Remediate executes the fix for standard.'}
sublabel={getLabel(obj)}
/>
</CCol>
Expand Down Expand Up @@ -516,7 +517,7 @@ const ListAppliedStandards = () => {
<small>Deploy {template.name}</small>
</CCol>
<CCol>
<h5>Warn</h5>
<h5>Report</h5>
<RFFCFormSwitch name="ignore.ignore1" disabled={true} />
</CCol>
<CCol>
Expand Down Expand Up @@ -582,21 +583,6 @@ const ListAppliedStandards = () => {
)}
</CippContentCard>
</CCol>
{/* <CCol lg={6} xs={12}>
{listStandardsAllTenants && (
<CippContentCard title="Currently Applied Standards">
{getResults.isLoading && <CSpinner size="sm" />}
{getResults.isSuccess && (
<CCallout color="info">{getResults.data?.Results}</CCallout>
)}
<CippTable
reportName={`Standards`}
data={listStandardsAllTenants}
columns={tableColumns}
/>
</CippContentCard>
)}
</CCol> */}
</CRow>
</>
</CippPage>
Expand Down

0 comments on commit 40a7d21

Please sign in to comment.