Skip to content

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

Remove the CANCELED status from stage

Tianzhou Chen2ddeb03732a1
diff --git a/frontend/src/components/TaskStatusIcon.vue b/frontend/src/components/TaskStatusIcon.vue
index d1d57c1660..af6e76c7fd 100644
--- a/frontend/src/components/TaskStatusIcon.vue
+++ b/frontend/src/components/TaskStatusIcon.vue
@@ -80,7 +80,6 @@ export default {
case "RUNNING":
case "PENDING":
case "DONE":
- case "CANCELED":
case "SKIPPED":
return "bg-white border-2 border-blue-600 text-blue-600 hover:text-blue-700 hover:border-blue-700";
}
diff --git a/frontend/src/components/TaskTable.vue b/frontend/src/components/TaskTable.vue
index 57607ec108..f06431fbf2 100644
--- a/frontend/src/components/TaskTable.vue
+++ b/frontend/src/components/TaskTable.vue
@@ -112,7 +112,7 @@ export default {
const stageList = function (task: Task): BBStep[] {
return task.attributes.stageProgressList.map((stageProgress) => {
- let stepStatus: BBStepStatus;
+ let stepStatus: BBStepStatus = "PENDING";
switch (stageProgress.status) {
case "PENDING":
if (activeStage(task).id === stageProgress.id) {
@@ -130,9 +130,6 @@ export default {
case "FAILED":
stepStatus = "FAILED";
break;
- case "CANCELED":
- stepStatus = "CANCELED";
- break;
case "SKIPPED":
stepStatus = "SKIPPED";
break;
diff --git a/frontend/src/miragejs/seeds/index.js b/frontend/src/miragejs/seeds/index.js
index 4f611e72cd..0011e7e909 100644
--- a/frontend/src/miragejs/seeds/index.js
+++ b/frontend/src/miragejs/seeds/index.js
@@ -492,7 +492,7 @@ const fillStage = (environmentList) => {
auto: true,
run: () => {},
},
- status: "CANCELED",
+ status: "PENDING",
},
],
};
diff --git a/frontend/src/types/bytebase.ts b/frontend/src/types/bytebase.ts
index bf9b88a653..90296ff3ae 100644
--- a/frontend/src/types/bytebase.ts
+++ b/frontend/src/types/bytebase.ts
@@ -42,13 +42,7 @@ export type ActivityNew = Omit<Activity, "id">;
// Stage
export type StageType = "SIMPLE" | "ENVIRONMENT";
-export type StageStatus =
- | "PENDING"
- | "RUNNING"
- | "DONE"
- | "FAILED"
- | "CANCELED"
- | "SKIPPED";
+export type StageStatus = "PENDING" | "RUNNING" | "DONE" | "FAILED" | "SKIPPED";
export type StageRunnable = {
auto: boolean;
diff --git a/frontend/src/views/TaskDetail.vue b/frontend/src/views/TaskDetail.vue
index 23c34316c2..1661b097a3 100644
--- a/frontend/src/views/TaskDetail.vue
+++ b/frontend/src/views/TaskDetail.vue
@@ -140,7 +140,6 @@ const CREATOR_APPLICABLE_STAGE_ACTION_LIST: Map<
["RUNNING", []],
["DONE", []],
["FAILED", []],
- ["CANCELED", []],
["SKIPPED", []],
]);
@@ -152,7 +151,6 @@ const ASSIGNEE_APPLICABLE_STAGE_ACTION_LIST: Map<
["RUNNING", ["CANCEL"]],
["DONE", []],
["FAILED", ["RETRY", "SKIP"]],
- ["CANCELED", []],
["SKIPPED", []],
]);
@@ -164,7 +162,6 @@ const GUEST_APPLICABLE_STAGE_ACTION_LIST: Map<
["RUNNING", []],
["DONE", []],
["FAILED", []],
- ["CANCELED", []],
["SKIPPED", []],
]);
diff --git a/frontend/src/views/TaskFlow.vue b/frontend/src/views/TaskFlow.vue
index dfd4a81414..a1915905f9 100644
--- a/frontend/src/views/TaskFlow.vue
+++ b/frontend/src/views/TaskFlow.vue
@@ -57,22 +57,6 @@
>!</span
>
</template>
- <template v-else-if="stage.status == 'CANCELED'">
- <svg
- class="w-5 h-5"
- fill="currentColor"
- viewBox="0 0 20 20"
- xmlns="http://www.w3.org/2000/svg"
- aria-hidden="true"
- >
- >
- <path
- fill-rule="evenodd"
- d="M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
- clip-rule="evenodd"
- ></path>
- </svg>
- </template>
<template v-else-if="stage.status == 'SKIPPED'">
<svg
class="w-4 h-4"
@@ -171,8 +155,6 @@ export default {
return "bg-success hover:bg-success-hover text-white";
case "FAILED":
return "bg-error text-white hover:text-white hover:bg-error-hover";
- case "CANCELED":
- return "bg-white border-2 text-gray-400 border-gray-400 hover:text-gray-500 hover:border-gray-500";
case "SKIPPED":
return "bg-white border-2 text-gray-400 border-gray-400 hover:text-gray-500 hover:border-gray-500";
}
@@ -184,7 +166,6 @@ export default {
? "font-medium "
: "font-normal ";
switch (stage.status) {
- case "CANCELED":
case "SKIPPED":
return textClass + "text-gray-500";
case "DONE":