From 841f6ae2def958574098bccac8fb8098e577c958 Mon Sep 17 00:00:00 2001 From: Abheek Tripathy <90976669+abheektripathy@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:12:31 +0530 Subject: [PATCH] fixes #1096 (#1362) * fixes #1096 * reviewed-changes * reviewed-changes2 * reviewed-changes --- frontend/src/components/jobs/result/utils/sections.jsx | 7 ++++++- frontend/src/components/jobs/table/data.jsx | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/jobs/result/utils/sections.jsx b/frontend/src/components/jobs/result/utils/sections.jsx index f8a3d0c9eb..ee2265f6a6 100644 --- a/frontend/src/components/jobs/result/utils/sections.jsx +++ b/frontend/src/components/jobs/result/utils/sections.jsx @@ -1,3 +1,4 @@ +/* eslint-disable camelcase */ import React from "react"; import PropTypes from "prop-types"; import { Button, ListGroup, ListGroupItem, Badge, Fade } from "reactstrap"; @@ -111,6 +112,10 @@ export function JobActionsBar({ job }) { } export function JobInfoCard({ job }) { + const process_time_mmss = new Date(job.process_time * 1000) + .toISOString() + .substring(14, 19); + return ( <> @@ -140,7 +145,7 @@ export function JobInfoCard({ job }) { ["TLP", ], ["User", job.user?.username], ["MD5", job.md5], - ["Process Time (s)", job.process_time], + ["Process Time (mm:ss)", process_time_mmss], [ "Start Time", + new Date(value * 1000).toISOString().substring(14, 19); + const jobTableColumns = [ { Header: () => null, // No header @@ -162,9 +166,11 @@ const jobTableColumns = [ maxWidth: 175, }, { - Header: "Process Time (s)", + Header: "Process Time (mm:ss)", id: "process_time", accessor: "process_time", + Cell: ({ value }) => {process_time_mmss(value)}, + disableSortBy: true, maxWidth: 125, },