From 99acbc1963b241ebc72803bfe1b1c62b5d8153c0 Mon Sep 17 00:00:00 2001 From: Oleg Vavilov Date: Mon, 14 Oct 2024 18:42:31 +0300 Subject: [PATCH] Show run error on the run page in the UI #1655 --- frontend/src/pages/Runs/List/Preferences/consts.ts | 1 + frontend/src/pages/Runs/List/Preferences/index.tsx | 1 + frontend/src/pages/Runs/List/hooks/useColumnsDefinitions.tsx | 5 +++++ frontend/src/types/run.d.ts | 3 ++- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Runs/List/Preferences/consts.ts b/frontend/src/pages/Runs/List/Preferences/consts.ts index c4edc34339..3a06284313 100644 --- a/frontend/src/pages/Runs/List/Preferences/consts.ts +++ b/frontend/src/pages/Runs/List/Preferences/consts.ts @@ -9,6 +9,7 @@ export const DEFAULT_PREFERENCES: CollectionPreferencesProps.Preferences = { { id: 'price', visible: true }, { id: 'submitted_at', visible: true }, { id: 'status', visible: true }, + { id: 'error', visible: true }, { id: 'cost', visible: true }, // hidden by default { id: 'project', visible: false }, diff --git a/frontend/src/pages/Runs/List/Preferences/index.tsx b/frontend/src/pages/Runs/List/Preferences/index.tsx index 8979036014..08e12aac5b 100644 --- a/frontend/src/pages/Runs/List/Preferences/index.tsx +++ b/frontend/src/pages/Runs/List/Preferences/index.tsx @@ -24,6 +24,7 @@ export const Preferences: React.FC = () => { { id: 'price', label: t('projects.run.price') }, { id: 'submitted_at', label: t('projects.run.submitted_at') }, { id: 'status', label: t('projects.run.status') }, + { id: 'error', label: t('projects.run.error') }, { id: 'cost', label: t('projects.run.cost') }, // hidden by default { id: 'project', label: t('projects.run.project') }, diff --git a/frontend/src/pages/Runs/List/hooks/useColumnsDefinitions.tsx b/frontend/src/pages/Runs/List/hooks/useColumnsDefinitions.tsx index 481d43f0e1..56e94aef82 100644 --- a/frontend/src/pages/Runs/List/hooks/useColumnsDefinitions.tsx +++ b/frontend/src/pages/Runs/List/hooks/useColumnsDefinitions.tsx @@ -60,6 +60,11 @@ export const useColumnsDefinitions = () => { ), }, + { + id: 'error', + header: t('projects.run.error'), + cell: (item: IRun) => item.error ?? '-', + }, { id: 'cost', header: `${t('projects.run.cost')}`, diff --git a/frontend/src/types/run.d.ts b/frontend/src/types/run.d.ts index 54984c7693..262a448a39 100644 --- a/frontend/src/types/run.d.ts +++ b/frontend/src/types/run.d.ts @@ -150,7 +150,8 @@ declare interface IRun { project_name: string, user: string, submitted_at: string, - status: TJobStatus + status: TJobStatus, + error?: string jobs: IJob[], run_spec: IRunSpec, latest_job_submission?: IJobSubmission