import {Fragment} from 'react'; import styled from '@emotion/styled'; import ExternalLink from 'sentry/components/links/externalLink'; import Panel from 'sentry/components/panels/panel'; import PanelItem from 'sentry/components/panels/panelItem'; import {IconCheckmark, IconWarning} from 'sentry/icons'; import {t, tct, tn} from 'sentry/locale'; import FooterWithButtons from './components/footerWithButtons'; import HeaderWithHelp from './components/headerWithHelp'; type ErrorDetail = {error: string; name: string}; type Props = { lambdaFunctionFailures: ErrorDetail[]; successCount: number; }; export default function AwsLambdaFailureDetails({ lambdaFunctionFailures, successCount, }: Props) { const baseDocsUrl = 'https://docs.sentry.io/product/integrations/cloud-monitoring/aws-lambda/'; return (

{tn( 'successfully updated %s function', 'successfully updated %s functions', successCount )}

{tn( 'Failed to update %s function', 'Failed to update %s functions', lambdaFunctionFailures.length )}

{tct('See [link:Troubleshooting Docs]', { link: , })}
{lambdaFunctionFailures.map(SingleFailure)}
); } function SingleFailure(errorDetail: ErrorDetail) { return ( {errorDetail.name} {errorDetail.error} ); } const Wrapper = styled('div')` padding: 100px 50px 50px 50px; `; const StyledRow = styled(PanelItem)` display: flex; flex-direction: column; `; const Error = styled('span')` color: ${p => p.theme.subText}; `; const StyledPanel = styled(Panel)` overflow: hidden; margin-left: 34px; `; const Troubleshooting = styled('p')` margin-left: 34px; `; const StyledCheckmark = styled(IconCheckmark)` float: left; margin-right: 10px; height: 24px; width: 24px; `; const StyledWarning = styled(IconWarning)` float: left; margin-right: 10px; height: 24px; width: 24px; `;