import {Component} from 'react'; import {browserHistory} from 'react-router'; import ApiForm from 'sentry/components/forms/apiForm'; import MultipleCheckbox from 'sentry/components/forms/controls/multipleCheckbox'; import BooleanField from 'sentry/components/forms/fields/booleanField'; import TextField from 'sentry/components/forms/fields/textField'; import FormField from 'sentry/components/forms/formField'; import {Panel, PanelBody, PanelHeader} from 'sentry/components/panels'; import {t} from 'sentry/locale'; import {Choices, ServiceHook} from 'sentry/types'; const EVENT_CHOICES: Choices = ['event.alert', 'event.created'].map(e => [e, e]); type Props = { initialData: Partial & {isActive: boolean}; orgId: string; projectId: string; hookId?: string; }; export default class ServiceHookSettingsForm extends Component { onSubmitSuccess = () => { const {orgId, projectId} = this.props; browserHistory.push(`/settings/${orgId}/projects/${projectId}/hooks/`); }; render() { const {initialData, orgId, projectId, hookId} = this.props; const endpoint = hookId ? `/projects/${orgId}/${projectId}/hooks/${hookId}/` : `/projects/${orgId}/${projectId}/hooks/`; return ( {t('Hook Configuration')} {({value, onChange}) => ( )} ); } }