import * as React from 'react'; import { Link } from 'react-router-dom'; import { PipelineRunLabel, runStatus } from '~/consts/pipelinerun'; import { useReleaseStatus } from '~/hooks/useReleaseStatus'; import { APPLICATION_DETAILS_PATH, APPLICATION_RELEASE_DETAILS_PATH, COMPONENT_DETAILS_PATH, RELEASEPLAN_PATH, } from '../../routes/paths'; import ActionMenu from '../../shared/components/action-menu/ActionMenu'; import { RowFunctionArgs, TableData } from '../../shared/components/table'; import { Timestamp } from '../../shared/components/timestamp/Timestamp'; import { MonitoredReleaseKind } from '../../types'; import { useReleaseActions } from '../Releases/release-actions'; import { StatusIconWithText } from '../StatusIcon/StatusIcon'; import { releaseTableColumnClasses } from './ReleaseListHeader'; const ReleaseListRow: React.FC> = ({ obj }) => { const status = useReleaseStatus(obj); const actions = useReleaseActions(obj); return ( <> {obj.metadata.name} {obj.metadata.labels?.[PipelineRunLabel.COMPONENT]} {obj.metadata.labels?.[PipelineRunLabel.APPLICATION]} {obj.spec.releasePlan} {obj.metadata.namespace} {obj.product} {obj.productVersion} {status === runStatus.Failed && } ); }; export default ReleaseListRow;