Skip to content

Commit

Permalink
show event details if spawn in progress without last activity timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
christianvogt committed Jul 28, 2023
1 parent 0f08705 commit a22c666
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/pages/projects/notebook/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a22c666

Please sign in to comment.