diff --git a/frontend/src/components/notebook/NotebookDeleteButton.tsx b/frontend/src/components/notebook/NotebookDeleteButton.tsx index c279c86..dd9852a 100644 --- a/frontend/src/components/notebook/NotebookDeleteButton.tsx +++ b/frontend/src/components/notebook/NotebookDeleteButton.tsx @@ -31,6 +31,12 @@ export function NotebookDeleteButton({resource}: NotebookDeleteButtonProps): JSX )) { return null } + if(resource.value.is_running) { + return null + } + if(resource.value.locked_by) { + return null + } return ( resource.destroy()} disabled={resource.busy}> diff --git a/frontend/src/components/notebook/NotebookResourcePanel.tsx b/frontend/src/components/notebook/NotebookResourcePanel.tsx index 6fe1e8b..96fb6b4 100644 --- a/frontend/src/components/notebook/NotebookResourcePanel.tsx +++ b/frontend/src/components/notebook/NotebookResourcePanel.tsx @@ -24,7 +24,7 @@ export function NotebookResourcePanel({resource}: NotebookResourcePanelProps): J const locked_by = cache?.getUserById(resource.value.locked_by)?.value.username return ( - + @@ -43,11 +43,11 @@ export function NotebookResourcePanel({resource}: NotebookResourcePanelProps): J } + - )