Skip to content

Commit

Permalink
Support for delete/abort when experiment is stuck in Queued state
Browse files Browse the repository at this point in the history
Signed-off-by: Baalekshan <[email protected]>
  • Loading branch information
Baalekshan committed Aug 31, 2024
1 parent 21aa026 commit 1fd1b5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ const ExperimentDashboardV2Table = ({
);
case ExperimentRunStatus.QUEUED:
return (
<RunExperimentButton
buttonProps={{ disabled: true }}
<StopExperimentButton
experimentID={data.experimentID}
refetchExperiments={refetchExperiments}
infrastructureType={InfrastructureType.KUBERNETES}
/>
);
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export const MenuCell = ({
onError: error => showError(error.message)
});

const lastExperimentRunStatus = data.recentExecutions[0]?.experimentRunStatus;
const isDeleteButtonEnabled = !data.recentExecutions.some(
execution => execution?.experimentRunStatus === ExperimentRunStatus.RUNNING
);

// <!-- confirmation dialog boxes -->
const confirmationDialogProps = {
Expand Down Expand Up @@ -108,7 +110,7 @@ export const MenuCell = ({
icon="main-trash"
text={getString('deleteExperiment')}
onClick={openDeleteDialog}
disabled={lastExperimentRunStatus === ExperimentRunStatus.RUNNING}
disabled={isDeleteButtonEnabled == false}
permission={PermissionGroup.OWNER}
/>
</Menu>
Expand Down

0 comments on commit 1fd1b5a

Please sign in to comment.