Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Allow ASSIGNEE to cancel the current RUNNING stage

Tianzhou Chen28104c38d424
diff --git a/frontend/src/views/TaskDetail.vue b/frontend/src/views/TaskDetail.vue
index 91a815a68f..23c34316c2 100644
--- a/frontend/src/views/TaskDetail.vue
+++ b/frontend/src/views/TaskDetail.vue
@@ -130,7 +130,7 @@ import {
} from "../types";
import { taskTemplateList, TaskField, TaskTemplate } from "../plugins";
-type StageTransitionType = "RUN" | "RETRY" | "SKIP";
+type StageTransitionType = "RUN" | "RETRY" | "CANCEL" | "SKIP";
const CREATOR_APPLICABLE_STAGE_ACTION_LIST: Map<
StageStatus,
@@ -149,7 +149,7 @@ const ASSIGNEE_APPLICABLE_STAGE_ACTION_LIST: Map<
StageTransitionType[]
> = new Map([
["PENDING", ["RUN", "SKIP"]],
- ["RUNNING", []],
+ ["RUNNING", ["CANCEL"]],
["DONE", []],
["FAILED", ["RETRY", "SKIP"]],
["CANCELED", []],
@@ -198,6 +198,13 @@ const STAGE_TRANSITION_LIST: Transition[] = [
requiredRunnable: true,
to: "RUNNING",
},
+ {
+ type: "CANCEL",
+ actionName: "Cancel",
+ actionType: ActionType.PRIMARY,
+ requiredRunnable: true,
+ to: "PENDING",
+ },
{
type: "SKIP",
actionName: "Skip",