import {Component, Fragment} from 'react'; import styled from '@emotion/styled'; import {addErrorMessage} from 'sentry/actionCreators/indicator'; import {ModalRenderProps} from 'sentry/actionCreators/modal'; import Form from 'sentry/components/forms/form'; import NumberField from 'sentry/components/forms/numberField'; import RadioField from 'sentry/components/forms/radioField'; import ExternalLink from 'sentry/components/links/externalLink'; import List from 'sentry/components/list'; import ListItem from 'sentry/components/list/listItem'; import {t, tct} from 'sentry/locale'; import space from 'sentry/styles/space'; import {Group, Organization} from 'sentry/types'; const impacts = [ tct( "[strong:Quota applies.] Every event you choose to reprocess counts against your plan's quota. Rate limits and spike protection do not apply.", {strong: } ), tct( '[strong:Attachment storage required.] If your events come from minidumps or unreal crash reports, you must have [link:attachment storage] enabled.', { strong: , link: ( ), } ), t( 'Please wait one hour after upload before attempting to reprocess missing debug files.' ), ]; const remainingEventsChoices: [string, string][] = [ ['keep', t('Keep')], ['delete', t('Delete')], ]; export type ReprocessEventModalOptions = { groupId: Group['id']; organization: Organization; }; type Props = ModalRenderProps & ReprocessEventModalOptions; type State = { maxEvents?: number; }; class ReprocessingEventModal extends Component { state: State = {maxEvents: undefined}; handleSuccess = () => { const {closeModal} = this.props; closeModal(); window.location.reload(); }; handleError() { addErrorMessage(t('Failed to reprocess. Please check your input.')); } handleMaxEventsChange = (maxEvents: string) => { this.setState({maxEvents: Number(maxEvents) || undefined}); }; render() { const {organization, Header, Body, closeModal, groupId} = this.props; const {maxEvents} = this.state; const orgSlug = organization.slug; const endpoint = `/organizations/${orgSlug}/issues/${groupId}/reprocessing/`; const title = t('Reprocess Events'); return (
{title}
{t( 'Reprocessing applies new debug files and grouping enhancements to this Issue. Please consider these impacts:' )} {impacts.map((impact, index) => ( {impact} ))} {tct('For more information, please refer to [link:the documentation.]', { link: ( ), })}
); } } export default ReprocessingEventModal; const Introduction = styled('p')` font-size: ${p => p.theme.fontSizeLarge}; `; const StyledList = styled(List)` gap: ${space(1)}; margin-bottom: ${space(4)}; font-size: ${p => p.theme.fontSizeMedium}; `;