Use summary job_type on host list

This commit is contained in:
Jake McDermott
2020-07-16 14:10:55 -04:00
parent cd6df9299f
commit bf74aae80e

View File

@@ -30,11 +30,6 @@ const DataListAction = styled(_DataListAction)`
function HostListItem({ i18n, host, isSelected, onSelect, detailUrl }) { function HostListItem({ i18n, host, isSelected, onSelect, detailUrl }) {
const labelId = `check-action-${host.id}`; const labelId = `check-action-${host.id}`;
const recentPlaybookJobs = host.summary_fields.recent_jobs.map(job => ({
...job,
type: 'job',
}));
return ( return (
<DataListItem key={host.id} aria-labelledby={labelId} id={`${host.id}`}> <DataListItem key={host.id} aria-labelledby={labelId} id={`${host.id}`}>
<DataListItemRow> <DataListItemRow>
@@ -52,7 +47,7 @@ function HostListItem({ i18n, host, isSelected, onSelect, detailUrl }) {
</Link> </Link>
</DataListCell>, </DataListCell>,
<DataListCell key="recentJobs"> <DataListCell key="recentJobs">
<Sparkline jobs={recentPlaybookJobs} /> <Sparkline jobs={host.summary_fields.recent_jobs} />
</DataListCell>, </DataListCell>,
<DataListCell key="inventory"> <DataListCell key="inventory">
{host.summary_fields.inventory && ( {host.summary_fields.inventory && (