import {Fragment} from 'react'; import styled from '@emotion/styled'; import Access from 'sentry/components/acl/access'; import {Role} from 'sentry/components/acl/role'; import {Button} from 'sentry/components/button'; import ButtonBar from 'sentry/components/buttonBar'; import Confirm from 'sentry/components/confirm'; import FileSize from 'sentry/components/fileSize'; import Link from 'sentry/components/links/link'; import Tag from 'sentry/components/tag'; import TimeSince from 'sentry/components/timeSince'; import {Tooltip} from 'sentry/components/tooltip'; import {IconClock, IconDelete, IconDownload} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import {Project} from 'sentry/types'; import {DebugFile} from 'sentry/types/debugFiles'; import {getFeatureTooltip, getPrettyFileType} from './utils'; type Props = { debugFile: DebugFile; downloadRole: string; downloadUrl: string; onDelete: (id: string) => void; orgSlug: string; project: Project; showDetails: boolean; }; function DebugFileRow({ debugFile, showDetails, downloadUrl, downloadRole, onDelete, orgSlug, project, }: Props) { const {id, data, debugId, uuid, size, dateCreated, objectName, symbolType, codeId} = debugFile; const {features} = data || {}; return (
{debugId || uuid}
{symbolType === 'proguard' && objectName === 'proguard-mapping' ? '\u2015' : objectName} {getPrettyFileType(debugFile)} {features && ( {features.map(feature => ( {feature} ))} )} {showDetails && (
{/* there will be more stuff here in the future */} {codeId && ( {t('Code ID')}: {codeId} )}
)}
{({hasRole}) => ( , } )} isHoverable > )} {({hasAccess}) => ( onDelete(id)} disabled={!hasAccess} >