import * as React from 'react'; import { Link, useParams } from 'react-router-dom'; import { Content, Tooltip, Truncate as PfTruncate } from '@patternfly/react-core'; import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table'; import { PIPELINE_RUNS_SECURITY_PATH } from '@routes/paths'; import { getRuleStatus } from '~/components/Conforma/utils'; import { Truncate } from '~/shared/components/truncate-text/Truncate'; import { useNamespace } from '~/shared/providers/Namespace'; import type { ConformaResultRow } from '~/types/conforma'; import { getCommonImageName } from './conforma-grouping-utils'; type DetailSubTableProps = { rows: ConformaResultRow[]; }; export const DetailSubTable: React.FC = ({ rows }) => { const namespace = useNamespace(); const { applicationName } = useParams(); return (
{rows.map((row) => { const { images } = row; const commonName = images.length > 1 ? getCommonImageName(images) : undefined; const rowKey = `${row.component}-${row.title}-${row.pipelineRunName || ''}-${row.images[0] || ''}`; return ( ); })}
Rule Component Image Status Message Pipeline run
{row.title ?? '-'} {row.code && {row.code}} {row.description && {row.description}} {row.component} {images.length > 1 ? ( {images.map((img) => (
  • {img}
  • ))} } > {commonName ? ( <> {images.length} arch variants ) : ( Affects {images.length} images )}
    ) : images.length === 1 ? ( ) : ( '-' )}
    {getRuleStatus(row.status)} {row.msg != null ? ( ) : ( '-' )} {row.solution && Solution: {row.solution}} {row.pipelineRunName ? ( ) : ( '-' )}
    ); };