Add created at to workflow runs table (#645)

This commit is contained in:
Kerem Yilmaz
2024-07-25 06:54:32 -07:00
committed by GitHub
parent 435451d844
commit e72dd59c19

View File

@@ -23,6 +23,7 @@ import {
} from "@/components/ui/pagination"; } from "@/components/ui/pagination";
import { cn } from "@/util/utils"; import { cn } from "@/util/utils";
import { WorkflowTitle } from "./WorkflowTitle"; import { WorkflowTitle } from "./WorkflowTitle";
import { basicTimeFormat } from "@/util/timeFormat";
function Workflows() { function Workflows() {
const credentialGetter = useCredentialGetter(); const credentialGetter = useCredentialGetter();
@@ -152,20 +153,21 @@ function Workflows() {
<Table> <Table>
<TableHeader> <TableHeader>
<TableRow> <TableRow>
<TableHead className="w-1/4">Workflow ID</TableHead> <TableHead className="w-1/5">Workflow ID</TableHead>
<TableHead className="w-1/4">Workflow Title</TableHead> <TableHead className="w-1/4">Workflow Title</TableHead>
<TableHead className="w-1/4">Workflow Run ID</TableHead> <TableHead className="w-1/5">Workflow Run ID</TableHead>
<TableHead className="w-1/4">Status</TableHead> <TableHead className="w-1/7">Status</TableHead>
<TableHead className="w-1/4">Created At</TableHead>
</TableRow> </TableRow>
</TableHeader> </TableHeader>
<TableBody> <TableBody>
{workflowRunsIsLoading ? ( {workflowRunsIsLoading ? (
<TableRow> <TableRow>
<TableCell colSpan={4}>Loading...</TableCell> <TableCell colSpan={5}>Loading...</TableCell>
</TableRow> </TableRow>
) : workflowRuns?.length === 0 ? ( ) : workflowRuns?.length === 0 ? (
<TableRow> <TableRow>
<TableCell colSpan={4}>No workflow runs found</TableCell> <TableCell colSpan={5}>No workflow runs found</TableCell>
</TableRow> </TableRow>
) : ( ) : (
workflowRuns?.map((workflowRun) => { workflowRuns?.map((workflowRun) => {
@@ -179,7 +181,7 @@ function Workflows() {
}} }}
className="cursor-pointer" className="cursor-pointer"
> >
<TableCell className="w-1/4"> <TableCell className="w-1/5">
{workflowRun.workflow_permanent_id} {workflowRun.workflow_permanent_id}
</TableCell> </TableCell>
<TableCell className="w-1/4"> <TableCell className="w-1/4">
@@ -187,12 +189,15 @@ function Workflows() {
workflowPermanentId={workflowRun.workflow_permanent_id} workflowPermanentId={workflowRun.workflow_permanent_id}
/> />
</TableCell> </TableCell>
<TableCell className="w-1/4"> <TableCell className="w-1/5">
{workflowRun.workflow_run_id} {workflowRun.workflow_run_id}
</TableCell> </TableCell>
<TableCell className="w-1/4"> <TableCell className="w-1/7">
<StatusBadge status={workflowRun.status} /> <StatusBadge status={workflowRun.status} />
</TableCell> </TableCell>
<TableCell className="w-1/4">
{basicTimeFormat(workflowRun.created_at)}
</TableCell>
</TableRow> </TableRow>
); );
}) })