Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,18 @@ import { PlusCircleIcon, TrashIcon } from '@patternfly/react-icons';
import * as yup from 'yup';
import { FieldArray, FormikProvider } from 'formik';

import { NotifierIntegrationBase } from 'services/NotifierIntegrationsService';

import usePageState from 'Containers/Integrations/hooks/usePageState';
import FormMessage from 'Components/PatternFly/FormMessage';
import FormTestButton from 'Components/PatternFly/FormTestButton';
import FormSaveButton from 'Components/PatternFly/FormSaveButton';
import FormCancelButton from 'Components/PatternFly/FormCancelButton';
import { GenericNotifierIntegration as GenericWebhookIntegration } from 'types/notifier.proto';
import useIntegrationForm from '../useIntegrationForm';
import { IntegrationFormProps } from '../integrationFormTypes';

import IntegrationFormActions from '../IntegrationFormActions';
import FormLabelGroup from '../FormLabelGroup';

export type GenericWebhookIntegration = {
generic: {
endpoint: string;
skipTlsVerify: boolean;
auditLoggingEnabled: boolean;
caCert: string;
username: string;
password: string;
headers: {
key: string;
value: string;
}[];
extraFields: {
key: string;
value: string;
}[];
};
type: 'generic';
} & NotifierIntegrationBase;

export type GenericWebhookIntegrationFormValues = {
notifier: GenericWebhookIntegration;
updatePassword: boolean;
Expand Down Expand Up @@ -105,7 +84,7 @@ export const defaultValues: GenericWebhookIntegrationFormValues = {
name: '',
generic: {
endpoint: '',
skipTlsVerify: false,
skipTLSVerify: false,
auditLoggingEnabled: false,
caCert: '',
username: '',
Expand Down Expand Up @@ -207,13 +186,13 @@ function GenericWebhookIntegrationForm({
</FormLabelGroup>
<FormLabelGroup
label=""
fieldId="notifier.generic.skipTlsVerify"
fieldId="notifier.generic.skipTLSVerify"
errors={errors}
>
<Checkbox
label="Skip TLS verification"
id="notifier.generic.skipTlsVerify"
isChecked={values.notifier.generic.skipTlsVerify}
id="notifier.generic.skipTLSVerify"
isChecked={values.notifier.generic.skipTLSVerify}
onChange={onChange}
onBlur={handleBlur}
isDisabled={!isEditable}
Expand Down