Skip to content

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

Make pipeline status match stage status

Tianzhou Chen501da465c1b9
diff --git a/frontend/src/miragejs/factories/pipeline.js b/frontend/src/miragejs/factories/pipeline.js
index b53b0bac7d..006d678ca5 100644
--- a/frontend/src/miragejs/factories/pipeline.js
+++ b/frontend/src/miragejs/factories/pipeline.js
@@ -14,18 +14,8 @@ export default {
const scaleFactor = Math.random() * i;
return Date.now() - scaleFactor * 3600 * 20 * 1000;
},
- status(i) {
- if (i % 5 == 0) {
- return "CREATED";
- } else if (i % 5 == 1) {
- return "RUNNING";
- } else if (i % 5 == 2) {
- return "DONE";
- } else if (i % 5 == 3) {
- return "FAILED";
- } else {
- return "CANCELED";
- }
+ status() {
+ return "CREATED";
},
type() {
let dice = Math.random();
diff --git a/frontend/src/miragejs/seeds/index.js b/frontend/src/miragejs/seeds/index.js
index ddaabef725..1ad5a03851 100644
--- a/frontend/src/miragejs/seeds/index.js
+++ b/frontend/src/miragejs/seeds/index.js
@@ -229,6 +229,7 @@ const fillStage = (environmentList) => {
const i = Math.floor(Math.random() * 5);
if (i % 5 == 0) {
return {
+ status: "CREATED",
currentStageId: environmentList[0].id,
stageProgressList: [
{
@@ -255,6 +256,7 @@ const fillStage = (environmentList) => {
};
} else if (i % 5 == 1) {
return {
+ status: "RUNNING",
currentStageId: environmentList[2].id,
stageProgressList: [
{
@@ -281,6 +283,7 @@ const fillStage = (environmentList) => {
};
} else if (i % 5 == 2) {
return {
+ status: "DONE",
currentStageId: environmentList[3].id,
stageProgressList: [
{
@@ -307,6 +310,7 @@ const fillStage = (environmentList) => {
};
} else if (i % 5 == 3) {
return {
+ status: "FAILED",
currentStageId: environmentList[1].id,
stageProgressList: [
{
@@ -333,6 +337,7 @@ const fillStage = (environmentList) => {
};
} else {
return {
+ status: "CANCELED",
currentStageId: environmentList[3].id,
stageProgressList: [
{