Skip to content
Snippets Groups Projects
Commit c90749bd authored by ali asaria's avatar ali asaria
Browse files

change how timing is displayed (not working well)

parent ef7f5728
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,12 @@ import * as chatAPI from '../../../lib/transformerlab-api-sdk'; ...@@ -13,6 +13,12 @@ import * as chatAPI from '../../../lib/transformerlab-api-sdk';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import ViewOutputModalStreaming from './ViewOutputModalStreaming'; import ViewOutputModalStreaming from './ViewOutputModalStreaming';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
dayjs.extend(relativeTime);
var duration = require('dayjs/plugin/duration');
dayjs.extend(duration);
const fetcher = (url) => fetch(url).then((res) => res.json()); const fetcher = (url) => fetch(url).then((res) => res.json());
const EvalJobsTable = () => { const EvalJobsTable = () => {
...@@ -45,8 +51,7 @@ const EvalJobsTable = () => { ...@@ -45,8 +51,7 @@ const EvalJobsTable = () => {
<th width="50px">Id</th> <th width="50px">Id</th>
<th>Eval</th> <th>Eval</th>
<th>Progress</th> <th>Progress</th>
<th>Started At</th> <th>Started</th>
<th>Finished At</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
...@@ -64,8 +69,17 @@ const EvalJobsTable = () => { ...@@ -64,8 +69,17 @@ const EvalJobsTable = () => {
<br /> <br />
Progress: {job?.progress} Progress: {job?.progress}
</td> </td>
<td>{String(dayjs(job?.created_at))}</td> <td>
<td>{String(dayjs(job?.updated_at))}</td> Started:&nbsp;
{String(dayjs(job?.created_at).fromNow())}
<br />
Completed in:&nbsp;
{dayjs
.duration(
dayjs(job?.updated_at).diff(dayjs(job?.created_at))
)
.humanize()}
</td>
<td> <td>
<ButtonGroup variant="soft"> <ButtonGroup variant="soft">
<Button <Button
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment