(ui): Style improvement in TaskDetailsView

This commit is contained in:
Ken Hibino
2021-10-22 10:58:47 -07:00
parent 8768f48072
commit fe5bd2f3e8

View File

@@ -18,7 +18,7 @@ import { TaskDetailsRouteParams } from "../paths";
import { usePolling } from "../hooks"; import { usePolling } from "../hooks";
import { listQueuesAsync } from "../actions/queuesActions"; import { listQueuesAsync } from "../actions/queuesActions";
import SyntaxHighlighter from "../components/SyntaxHighlighter"; import SyntaxHighlighter from "../components/SyntaxHighlighter";
import { durationFromSeconds, stringifyDuration } from "../utils"; import { durationFromSeconds, stringifyDuration, timeAgo } from "../utils";
function mapStateToProps(state: AppState) { function mapStateToProps(state: AppState) {
return { return {
@@ -176,7 +176,7 @@ function TaskDetailsView(props: Props) {
{taskInfo?.error_message} ({taskInfo?.last_failed_at}) {taskInfo?.error_message} ({taskInfo?.last_failed_at})
</Typography> </Typography>
) : ( ) : (
<Typography>n/a</Typography> <Typography> - </Typography>
)} )}
</Typography> </Typography>
</div> </div>
@@ -190,7 +190,7 @@ function TaskDetailsView(props: Props) {
{taskInfo?.next_process_at ? ( {taskInfo?.next_process_at ? (
<Typography>{taskInfo?.next_process_at}</Typography> <Typography>{taskInfo?.next_process_at}</Typography>
) : ( ) : (
<Typography>n/a</Typography> <Typography> - </Typography>
)} )}
</div> </div>
</div> </div>
@@ -202,7 +202,7 @@ function TaskDetailsView(props: Props) {
{taskInfo?.timeout_seconds ? ( {taskInfo?.timeout_seconds ? (
<Typography>{taskInfo?.timeout_seconds} seconds</Typography> <Typography>{taskInfo?.timeout_seconds} seconds</Typography>
) : ( ) : (
<Typography>n/a</Typography> <Typography> - </Typography>
)} )}
</Typography> </Typography>
</div> </div>
@@ -214,7 +214,7 @@ function TaskDetailsView(props: Props) {
{taskInfo?.deadline ? ( {taskInfo?.deadline ? (
<Typography>{taskInfo?.deadline}</Typography> <Typography>{taskInfo?.deadline}</Typography>
) : ( ) : (
<Typography>n/a</Typography> <Typography> - </Typography>
)} )}
</Typography> </Typography>
</div> </div>
@@ -244,7 +244,10 @@ function TaskDetailsView(props: Props) {
Completed:{" "} Completed:{" "}
</Typography> </Typography>
<div className={classes.infoValueCell}> <div className={classes.infoValueCell}>
<Typography>{taskInfo.completed_at}</Typography> <Typography>
{timeAgo(taskInfo.completed_at)} (
{taskInfo.completed_at})
</Typography>
</div> </div>
</div> </div>
<div className={classes.infoRow}> <div className={classes.infoRow}>