From a22c666a903dbbc76bf5ca86d12628a73a667265 Mon Sep 17 00:00:00 2001 From: Christian Vogt Date: Fri, 28 Jul 2023 13:08:23 -0400 Subject: [PATCH] show event details if spawn in progress without last activity timestamp --- frontend/src/pages/projects/notebook/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/projects/notebook/utils.ts b/frontend/src/pages/projects/notebook/utils.ts index 4619b959f7..0f08aa017f 100644 --- a/frontend/src/pages/projects/notebook/utils.ts +++ b/frontend/src/pages/projects/notebook/utils.ts @@ -124,7 +124,11 @@ export const useNotebookStatus = ( const events = useWatchNotebookEvents(notebook.metadata.namespace, podUid, spawnInProgress); const annotationTime = notebook?.metadata.annotations?.['notebooks.kubeflow.org/last-activity']; - const lastActivity = annotationTime ? new Date(annotationTime) : null; + const lastActivity = annotationTime + ? new Date(annotationTime) + : spawnInProgress + ? new Date(0) + : null; if (!lastActivity) { // Notebook not started, we don't have a filter time, ignore