Skip to content

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

chore(frontend): show task run start time column (#8783)

Liu Jia85cadd868b8
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
index 51138d2b93..c1fc6a691e 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
@@ -16,6 +16,9 @@
<div class="bb-grid-cell">
<HumanizeDate :date="taskRun.createTime" />
</div>
+ <div class="bb-grid-cell">
+ <HumanizeDate :date="taskRun.startTime" />
+ </div>
<div class="bb-grid-cell">
{{ humanizeDurationV1(executionDurationOfTaskRun(taskRun)) }}
</div>
@@ -55,6 +58,10 @@ const columnList = computed((): BBGridColumn[] => {
title: t("task.comment"),
width: "1fr",
},
+ {
+ title: t("task.created"),
+ width: "auto",
+ },
{
title: t("task.started"),
width: "auto",
@@ -66,12 +73,17 @@ const columnList = computed((): BBGridColumn[] => {
];
});
-const executionDurationOfTaskRun = (taskRun: TaskRun): Duration => {
- const { createTime, updateTime } = taskRun;
- if (!createTime || !updateTime) return { seconds: 0, nanos: 0 };
- const createMS = createTime.getTime();
+const executionDurationOfTaskRun = (taskRun: TaskRun): Duration | undefined => {
+ const { startTime, updateTime } = taskRun;
+ if (!startTime || !updateTime) {
+ return undefined;
+ }
+ if (startTime.getTime() === 0) {
+ return undefined;
+ }
+ const startMS = startTime.getTime();
const updateMS = updateTime.getTime();
- const elapsedMS = updateMS - createMS;
+ const elapsedMS = updateMS - startMS;
return {
seconds: Math.floor(elapsedMS / 1000),
nanos: (elapsedMS % 1000) * 1e6,
diff --git a/frontend/src/components/misc/HumanizeDate.vue b/frontend/src/components/misc/HumanizeDate.vue
index e102c97cac..5a8b56902a 100644
--- a/frontend/src/components/misc/HumanizeDate.vue
+++ b/frontend/src/components/misc/HumanizeDate.vue
@@ -1,5 +1,8 @@
<template>
- <NTooltip trigger="hover">
+ <slot v-if="!date || date.getTime() === 0" name="placeholder">
+ <span v-bind="$attrs">-</span>
+ </slot>
+ <NTooltip v-else trigger="hover">
<template #trigger>
<span v-bind="$attrs">{{ humanized }}</span>
</template>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index cca75d4239..2b257873e2 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -374,7 +374,8 @@
},
"action-failed-in-current-stage": "{action} failed tasks in current stage",
"action-all-tasks-in-current-stage": "{action} all tasks in current stage",
- "cancel-task": "Cancel task | Cancel tasks"
+ "cancel-task": "Cancel task | Cancel tasks",
+ "created": "Created"
},
"banner": {
"update-license": "Update license",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index d0c038bac1..708c7afeea 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -374,7 +374,8 @@
},
"action-failed-in-current-stage": "{action} tareas fallidas en la etapa actual",
"action-all-tasks-in-current-stage": "{action} todas las tareas en la etapa actual",
- "cancel-task": "Cancelar tarea | Cancelar tareas"
+ "cancel-task": "Cancelar tarea | Cancelar tareas",
+ "created": "Creado"
},
"banner": {
"update-license": "Actualizar licencia",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index dbbd57baca..20e5e7e30e 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -372,7 +372,8 @@
},
"action-failed-in-current-stage": "{action}当前阶段失败的任务",
"action-all-tasks-in-current-stage": "{action}当前阶段的所有任务",
- "cancel-task": "取消任务"
+ "cancel-task": "取消任务",
+ "created": "创建于"
},
"banner": {
"update-license": "更新证书",