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',
|
executorInfo: 'Executor Name',
|
||||||
executorType: 'Executor type',
|
executorType: 'Executor type',
|
||||||
executionAt: 'Start execution time',
|
executionAt: 'Start execution time',
|
||||||
|
duration: 'Execution duration (s)',
|
||||||
taskBatchStatus: 'Task Batch Status',
|
taskBatchStatus: 'Task Batch Status',
|
||||||
operationReason: 'Reason for operation',
|
operationReason: 'Reason for operation',
|
||||||
form: {
|
form: {
|
||||||
|
@ -837,6 +837,7 @@ const local: App.I18n.Schema = {
|
|||||||
executorInfo: '执行器名称',
|
executorInfo: '执行器名称',
|
||||||
executorType: '执行器类型',
|
executorType: '执行器类型',
|
||||||
executionAt: '开始执行时间',
|
executionAt: '开始执行时间',
|
||||||
|
duration: '执行时长(秒)',
|
||||||
taskBatchStatus: '状态',
|
taskBatchStatus: '状态',
|
||||||
operationReason: '操作原因',
|
operationReason: '操作原因',
|
||||||
form: {
|
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;
|
taskBatchStatus: Common.TaskBatchStatus;
|
||||||
/** 开始执行时间 */
|
/** 开始执行时间 */
|
||||||
executionAt: string;
|
executionAt: string;
|
||||||
|
/** 执行时长(virtual) */
|
||||||
|
duration?: number;
|
||||||
/** 操作原因 */
|
/** 操作原因 */
|
||||||
operationReason: Common.OperationReason;
|
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;
|
executorInfo: string;
|
||||||
executorType: string;
|
executorType: string;
|
||||||
executionAt: string;
|
executionAt: string;
|
||||||
|
duration: string;
|
||||||
taskBatchStatus: string;
|
taskBatchStatus: string;
|
||||||
operationReason: string;
|
operationReason: string;
|
||||||
form: {
|
form: {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { NButton, NPopconfirm, NTag, NTooltip } from 'naive-ui';
|
import { NButton, NPopconfirm, NTag, NTooltip } from 'naive-ui';
|
||||||
import { useBoolean } from '@sa/hooks';
|
import { useBoolean } from '@sa/hooks';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
import {
|
import {
|
||||||
fetchBatchDeleteJobBatch,
|
fetchBatchDeleteJobBatch,
|
||||||
fetchDeleteJobBatch,
|
fetchDeleteJobBatch,
|
||||||
@ -123,6 +124,18 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120
|
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',
|
key: 'taskBatchStatus',
|
||||||
title: $t('page.jobBatch.taskBatchStatus'),
|
title: $t('page.jobBatch.taskBatchStatus'),
|
||||||
|
Loading…
Reference in New Issue
Block a user