Skip to content

Commit

Permalink
Add standard exclusion to partner webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed May 15, 2024
1 parent c8bcc83 commit d230813
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/views/cipp/app-settings/SettingsPartner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CSpinner,
} from '@coreui/react'
import { Form } from 'react-final-form'
import { RFFSelectSearch } from 'src/components/forms/index.js'
import { RFFCFormSwitch, RFFSelectSearch } from 'src/components/forms/index.js'
import React, { useEffect } from 'react'
import { CippCallout } from 'src/components/layout/index.js'
import { CippCodeBlock } from 'src/components/utilities'
Expand All @@ -45,6 +45,7 @@ export function SettingsPartner() {
const onSubmit = (values) => {
const shippedValues = {
EventType: values?.EventType?.map((event) => event.value),
standardsExcludeAllTenants: values?.standardsExcludeAllTenants,
}
submitWebhook({
path: '/api/ExecPartnerWebhook?Action=CreateSubscription',
Expand Down Expand Up @@ -141,6 +142,8 @@ export function SettingsPartner() {
label: event,
value: event,
})),
standardsExcludeAllTenants:
webhookConfig?.data?.Results?.standardsExcludeAllTenants,
}}
render={({ handleSubmit }) => (
<>
Expand All @@ -156,6 +159,14 @@ export function SettingsPartner() {
refreshFunction={() => webhookEvents.refetch()}
helpText="Select the events you want to receive notifications for."
/>
<RFFCFormSwitch
name="standardsExcludeAllTenants"
helpText='Enabling this feature excludes tenants from any top-level
"All Tenants" standard. This means that only the standards you
explicitly set for this tenant will be applied.'
label="Exclude onboarded tenants from top-level standards"
className="mt-3"
/>
<CButton
type="submit"
color="primary"
Expand Down

0 comments on commit d230813

Please sign in to comment.