mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Merge pull request #5040 from keithjgrant/4976-job-list-status-icons
Add status icon to job list Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
3cbd52a56e
@ -1,5 +1,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import {
|
||||
@ -14,10 +15,15 @@ import DataListCheck from '@components/DataListCheck';
|
||||
import LaunchButton from '@components/LaunchButton';
|
||||
import ListActionButton from '@components/ListActionButton';
|
||||
import VerticalSeparator from '@components/VerticalSeparator';
|
||||
import { StatusIcon } from '@components/Sparkline';
|
||||
import { toTitleCase } from '@util/strings';
|
||||
import { formatDateString } from '@util/dates';
|
||||
import { JOB_TYPE_URL_SEGMENTS } from '../../../constants';
|
||||
|
||||
const PaddedIcon = styled(StatusIcon)`
|
||||
margin-right: 20px;
|
||||
`;
|
||||
|
||||
class JobListItem extends Component {
|
||||
render() {
|
||||
const { i18n, job, isSelected, onSelect } = this.props;
|
||||
@ -38,11 +44,14 @@ class JobListItem extends Component {
|
||||
dataListCells={[
|
||||
<DataListCell key="divider">
|
||||
<VerticalSeparator />
|
||||
{job.status && <PaddedIcon status={job.status} />}
|
||||
<span>
|
||||
<Link
|
||||
to={`/jobs/${JOB_TYPE_URL_SEGMENTS[job.type]}/${job.id}`}
|
||||
>
|
||||
<b>{job.name}</b>
|
||||
<b>
|
||||
{job.id} — {job.name}
|
||||
</b>
|
||||
</Link>
|
||||
</span>
|
||||
</DataListCell>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user