feat(sj_1.2.0-beta1): JobBatch添加[执行时长]
This commit is contained in:
parent
7a255da9fa
commit
509905e7b4
@ -830,6 +830,7 @@ const local: App.I18n.Schema = {
|
||||
executorInfo: 'Executor Name',
|
||||
executorType: 'Executor type',
|
||||
executionAt: 'Start execution time',
|
||||
duration: 'Execution duration (s)',
|
||||
taskBatchStatus: 'Task Batch Status',
|
||||
operationReason: 'Reason for operation',
|
||||
form: {
|
||||
|
@ -837,6 +837,7 @@ const local: App.I18n.Schema = {
|
||||
executorInfo: '执行器名称',
|
||||
executorType: '执行器类型',
|
||||
executionAt: '开始执行时间',
|
||||
duration: '执行时长(秒)',
|
||||
taskBatchStatus: '状态',
|
||||
operationReason: '操作原因',
|
||||
form: {
|
||||
|
2
src/typings/api.d.ts
vendored
2
src/typings/api.d.ts
vendored
@ -1113,6 +1113,8 @@ declare namespace Api {
|
||||
taskBatchStatus: Common.TaskBatchStatus;
|
||||
/** 开始执行时间 */
|
||||
executionAt: string;
|
||||
/** 执行时长(virtual) */
|
||||
duration?: number;
|
||||
/** 操作原因 */
|
||||
operationReason: Common.OperationReason;
|
||||
/** 执行器类型 */
|
||||
|
1
src/typings/app.d.ts
vendored
1
src/typings/app.d.ts
vendored
@ -1037,6 +1037,7 @@ declare namespace App {
|
||||
executorInfo: string;
|
||||
executorType: string;
|
||||
executionAt: string;
|
||||
duration: string;
|
||||
taskBatchStatus: string;
|
||||
operationReason: string;
|
||||
form: {
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { NButton, NPopconfirm, NTag, NTooltip } from 'naive-ui';
|
||||
import { useBoolean } from '@sa/hooks';
|
||||
import { ref } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import {
|
||||
fetchBatchDeleteJobBatch,
|
||||
fetchDeleteJobBatch,
|
||||
@ -123,6 +124,18 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
key: 'duration',
|
||||
title: $t('page.jobBatch.duration'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
render: row => {
|
||||
if (row.taskBatchStatus === 3) {
|
||||
return Math.round(dayjs(row.updateDt).diff(dayjs(row.executionAt)) / 1000);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'taskBatchStatus',
|
||||
title: $t('page.jobBatch.taskBatchStatus'),
|
||||
|
Loading…
Reference in New Issue
Block a user