diff --git a/frontend/src/concepts/pipelines/content/tables/columns.ts b/frontend/src/concepts/pipelines/content/tables/columns.ts index b232fc6e4a..eac08dacc6 100644 --- a/frontend/src/concepts/pipelines/content/tables/columns.ts +++ b/frontend/src/concepts/pipelines/content/tables/columns.ts @@ -76,6 +76,11 @@ export const experimentColumns: SortableData[] = [ field: 'created_at', sortable: true, }, + { + label: 'Last run started', + field: 'last_run_started', + sortable: (a, b) => new Date(a.created_at).getTime() - new Date(b.created_at).getTime(), + }, { label: 'Last 5 runs', field: 'last_5_runs', diff --git a/frontend/src/concepts/pipelines/content/tables/experiment/ExperimentTableRow.tsx b/frontend/src/concepts/pipelines/content/tables/experiment/ExperimentTableRow.tsx index af730b7c56..1ca7ac4cfb 100644 --- a/frontend/src/concepts/pipelines/content/tables/experiment/ExperimentTableRow.tsx +++ b/frontend/src/concepts/pipelines/content/tables/experiment/ExperimentTableRow.tsx @@ -7,7 +7,7 @@ import { ExperimentKFv2, StorageStateKF } from '~/concepts/pipelines/kfTypes'; import { CheckboxTd } from '~/components/table'; import { experimentRunsRoute } from '~/routes'; import { usePipelinesAPI } from '~/concepts/pipelines/context'; -import { ExperimentCreated, LastExperimentRuns } from './renderUtils'; +import { ExperimentCreated, LastExperimentRuns, LastExperimentRunsStarted } from './renderUtils'; type ExperimentTableRowProps = { isChecked: boolean; @@ -43,6 +43,9 @@ const ExperimentTableRow: React.FC = ({ + + + diff --git a/frontend/src/concepts/pipelines/content/tables/experiment/renderUtils.tsx b/frontend/src/concepts/pipelines/content/tables/experiment/renderUtils.tsx index 8de348eef8..19767d12da 100644 --- a/frontend/src/concepts/pipelines/content/tables/experiment/renderUtils.tsx +++ b/frontend/src/concepts/pipelines/content/tables/experiment/renderUtils.tsx @@ -12,6 +12,20 @@ export const ExperimentCreated: ExperimentUtil = ({ experiment }) => { return ; }; +export const LastExperimentRunsStarted: ExperimentUtil = ({ experiment }) => { + const [runs] = usePipelineRunsByExperiment(experiment.experiment_id, { + sortDirection: 'desc', + sortField: 'created_at', + }); + + if (runs.items.length === 0) { + return <>-; + } + + const lastRunStarted = new Date(runs.items[0].created_at); + return ; +}; + export const LastExperimentRuns: ExperimentUtil = ({ experiment }) => { const [runs] = usePipelineRunsByExperiment(experiment.experiment_id, { sortDirection: 'desc',