[Reporting/Fix] Improve text of pending status in job listing (#24300)
* [Reporting/Fix] Improve text of pending status in job listing * status message change from feedback
This commit is contained in:
parent
e900879cc3
commit
5079e3d052
1 changed files with 17 additions and 2 deletions
|
@ -145,21 +145,36 @@ export class ReportListing extends Component<Props, State> {
|
|||
field: 'status',
|
||||
name: 'Status',
|
||||
render: (status: string, record: Job) => {
|
||||
if (status === 'pending') {
|
||||
return <div>pending - waiting for job to be processed</div>;
|
||||
}
|
||||
|
||||
let maxSizeReached;
|
||||
if (record.max_size_reached) {
|
||||
maxSizeReached = <span> - max size reached</span>;
|
||||
}
|
||||
|
||||
let statusTimestamp;
|
||||
if (status === 'processing' && record.started_at) {
|
||||
statusTimestamp = this.formatDate(record.started_at);
|
||||
} else if (record.completed_at && (status === 'completed' || status === 'failed')) {
|
||||
statusTimestamp = this.formatDate(record.completed_at);
|
||||
}
|
||||
if (statusTimestamp) {
|
||||
return (
|
||||
<div>
|
||||
{status}
|
||||
{' at '}
|
||||
<span className="eui-textNoWrap">{statusTimestamp}</span>
|
||||
{maxSizeReached}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// unknown status
|
||||
return (
|
||||
<div>
|
||||
{status}
|
||||
{' at '}
|
||||
<span className="eui-textNoWrap">{statusTimestamp}</span>
|
||||
{maxSizeReached}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue