feat(frontend): added a support for the self-hosted sentry (#2890)
This commit is contained in:
parent
8882a18c0d
commit
129ab734f3
1 changed files with 13 additions and 1 deletions
|
|
@ -12,12 +12,14 @@ import { toast } from 'react-toastify';
|
|||
import DocLink from 'Shared/DocLink/DocLink';
|
||||
|
||||
interface SentryConfig {
|
||||
url: string;
|
||||
organization_slug: string;
|
||||
project_slug: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
const initialValues = {
|
||||
url: 'https://sentry.io',
|
||||
organization_slug: '',
|
||||
project_slug: '',
|
||||
token: '',
|
||||
|
|
@ -39,6 +41,9 @@ function SentryForm({
|
|||
removeMutation,
|
||||
} = useIntegration<SentryConfig>('sentry', siteId, initialValues);
|
||||
const { values, errors, handleChange, hasErrors, checkErrors, } = useForm(data, {
|
||||
url: {
|
||||
required: false,
|
||||
},
|
||||
organization_slug: {
|
||||
required: true,
|
||||
},
|
||||
|
|
@ -95,12 +100,19 @@ function SentryForm({
|
|||
/>
|
||||
|
||||
<Loader loading={isPending}>
|
||||
<FormField
|
||||
label="URL"
|
||||
name="url"
|
||||
value={values.url}
|
||||
onChange={handleChange}
|
||||
errors={errors.url}
|
||||
/>
|
||||
<FormField
|
||||
label="Organization Slug"
|
||||
name="organization_slug"
|
||||
value={values.organization_slug}
|
||||
onChange={handleChange}
|
||||
errors={errors.url}
|
||||
errors={errors.organization_slug}
|
||||
autoFocus
|
||||
/>
|
||||
<FormField
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue