feat(1.4.0-beta1): 1. 修改retry-log改为 retry-task 2. 调试重试任务列表
This commit is contained in:
parent
c9d5cc8fba
commit
27546ed6bb
@ -25,7 +25,7 @@ interface Props {
|
|||||||
title?: string;
|
title?: string;
|
||||||
drawer?: boolean;
|
drawer?: boolean;
|
||||||
type?: 'job' | 'retry';
|
type?: 'job' | 'retry';
|
||||||
taskData?: Api.Job.JobTask | Api.RetryLog.RetryLog | Api.RetryTask.RetryTask;
|
taskData?: Api.Job.JobTask | Api.RetryTask.RetryTask;
|
||||||
modelValue?: Api.JobLog.JobMessage[];
|
modelValue?: Api.JobLog.JobMessage[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,10 +90,10 @@ async function getLogList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (props.type === 'retry') {
|
if (props.type === 'retry') {
|
||||||
const taskData = props.taskData! as Api.RetryLog.RetryLog | Api.RetryTask.RetryTask;
|
const taskData = props.taskData! as Api.RetryTask.RetryTask;
|
||||||
const { data, error } = await fetchRetryLogList({
|
const { data, error } = await fetchRetryLogList({
|
||||||
groupName: taskData.groupName,
|
groupName: taskData.groupName,
|
||||||
uniqueId: taskData.uniqueId!,
|
retryTaskId: taskData.id!,
|
||||||
startId,
|
startId,
|
||||||
fromIndex,
|
fromIndex,
|
||||||
size: 50
|
size: 50
|
||||||
@ -208,8 +208,8 @@ function openNewTab() {
|
|||||||
if (props.type === 'retry') {
|
if (props.type === 'retry') {
|
||||||
query = {
|
query = {
|
||||||
type: props.type,
|
type: props.type,
|
||||||
groupName: (props.taskData as Api.RetryLog.RetryLog | Api.RetryTask.RetryTask).groupName,
|
groupName: (props.taskData as Api.RetryTask.RetryTask | Api.Retry.Retry).groupName,
|
||||||
uniqueId: (props.taskData as Api.RetryLog.RetryLog | Api.RetryTask.RetryTask).uniqueId
|
retryTaskId: (props.taskData as Api.RetryTask.RetryTask).id
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const url = router.resolve({ path: '/log', query });
|
const url = router.resolve({ path: '/log', query });
|
||||||
|
@ -89,7 +89,7 @@ export const groupConfigYesOrNoRecord: Record<Api.GroupConfig.YesOrNoType, App.I
|
|||||||
};
|
};
|
||||||
export const groupConfigYesOrNoOptions = transformRecordToNumberOption(groupConfigYesOrNoRecord, true);
|
export const groupConfigYesOrNoOptions = transformRecordToNumberOption(groupConfigYesOrNoRecord, true);
|
||||||
|
|
||||||
export const retryStatusTypeRecord: Record<Api.RetryTask.RetryStatusType, App.I18n.I18nKey> = {
|
export const retryStatusTypeRecord: Record<Api.Retry.RetryStatusType, App.I18n.I18nKey> = {
|
||||||
0: 'page.retryTask.retryStatusType.retrying',
|
0: 'page.retryTask.retryStatusType.retrying',
|
||||||
1: 'page.retryTask.retryStatusType.finished',
|
1: 'page.retryTask.retryStatusType.finished',
|
||||||
2: 'page.retryTask.retryStatusType.maxRetry',
|
2: 'page.retryTask.retryStatusType.maxRetry',
|
||||||
@ -97,17 +97,17 @@ export const retryStatusTypeRecord: Record<Api.RetryTask.RetryStatusType, App.I1
|
|||||||
};
|
};
|
||||||
export const retryStatusTypeOptions = transformRecordToNumberOption(retryStatusTypeRecord);
|
export const retryStatusTypeOptions = transformRecordToNumberOption(retryStatusTypeRecord);
|
||||||
|
|
||||||
export const retryTaskStatusTypeRecord: Record<Api.RetryTask.RetryTaskStatusType, App.I18n.I18nKey> = {
|
export const retryTaskStatusTypeRecord: Record<Api.Retry.RetryTaskStatusType, App.I18n.I18nKey> = {
|
||||||
1: 'page.retryTask.retryStatusType.finished',
|
1: 'common.retryTaskStatus.items.waiting',
|
||||||
2: 'page.retryTask.retryStatusType.maxRetry',
|
2: 'common.retryTaskStatus.items.running',
|
||||||
3: 'page.retryTask.retryStatusType.paused',
|
3: 'common.retryTaskStatus.items.success',
|
||||||
4: 'page.retryTask.retryStatusType.paused',
|
4: 'common.retryTaskStatus.items.fail',
|
||||||
5: 'page.retryTask.retryStatusType.paused',
|
5: 'common.retryTaskStatus.items.stop',
|
||||||
6: 'page.retryTask.retryStatusType.paused'
|
6: 'common.retryTaskStatus.items.cancel'
|
||||||
};
|
};
|
||||||
export const retryTaskStatusTypeOptions = transformRecordToNumberOption(retryTaskStatusTypeRecord);
|
export const retryTaskStatusTypeOptions = transformRecordToNumberOption(retryTaskStatusTypeRecord);
|
||||||
|
|
||||||
export const retryTaskTypeRecord: Record<Api.RetryTask.TaskType, App.I18n.I18nKey> = {
|
export const retryTaskTypeRecord: Record<Api.Retry.TaskType, App.I18n.I18nKey> = {
|
||||||
1: 'page.retryTask.taskTypeDict.retry',
|
1: 'page.retryTask.taskTypeDict.retry',
|
||||||
2: 'page.retryTask.taskTypeDict.callback'
|
2: 'page.retryTask.taskTypeDict.callback'
|
||||||
};
|
};
|
||||||
|
@ -176,6 +176,18 @@ const local: App.I18n.Schema = {
|
|||||||
skip: 'Skip'
|
skip: 'Skip'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
retryTaskStatus: {
|
||||||
|
label: 'Task Batch Status',
|
||||||
|
form: 'Please enter task batch status',
|
||||||
|
items: {
|
||||||
|
waiting: 'Waiting',
|
||||||
|
running: 'Running',
|
||||||
|
success: 'Success',
|
||||||
|
fail: 'Fail',
|
||||||
|
stop: 'Stop',
|
||||||
|
cancel: 'Cancel'
|
||||||
|
}
|
||||||
|
},
|
||||||
taskStatus: {
|
taskStatus: {
|
||||||
label: 'Task Status',
|
label: 'Task Status',
|
||||||
form: 'Please enter task status',
|
form: 'Please enter task status',
|
||||||
@ -718,7 +730,7 @@ const local: App.I18n.Schema = {
|
|||||||
sceneName2: 'Scene name: 1~64 characters. allowing: digit, letters, underscore or hyphens..',
|
sceneName2: 'Scene name: 1~64 characters. allowing: digit, letters, underscore or hyphens..',
|
||||||
cbTriggerType: 'Please select the retry trigger time',
|
cbTriggerType: 'Please select the retry trigger time',
|
||||||
cbTriggerInterval: 'Please enter trigger interval',
|
cbTriggerInterval: 'Please enter trigger interval',
|
||||||
cbMaxCount: 'Please enter Maximum number of callback',
|
cbMaxCount: 'Please enter Maximum number of callback'
|
||||||
},
|
},
|
||||||
addScene: 'Add Scenes',
|
addScene: 'Add Scenes',
|
||||||
editScene: 'Add Scenes',
|
editScene: 'Add Scenes',
|
||||||
|
@ -176,6 +176,18 @@ const local: App.I18n.Schema = {
|
|||||||
skip: '跳过'
|
skip: '跳过'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
retryTaskStatus: {
|
||||||
|
label: '执行状态',
|
||||||
|
form: '请选择执行状态',
|
||||||
|
items: {
|
||||||
|
waiting: '待处理',
|
||||||
|
running: '运行中',
|
||||||
|
success: '处理成功',
|
||||||
|
fail: '处理失败',
|
||||||
|
stop: '任务停止',
|
||||||
|
cancel: '取消'
|
||||||
|
}
|
||||||
|
},
|
||||||
taskStatus: {
|
taskStatus: {
|
||||||
label: '状态',
|
label: '状态',
|
||||||
form: '请选择状态',
|
form: '请选择状态',
|
||||||
|
@ -7,7 +7,7 @@ export * from './notify';
|
|||||||
export * from './group';
|
export * from './group';
|
||||||
export * from './retry';
|
export * from './retry';
|
||||||
export * from './retry-scene';
|
export * from './retry-scene';
|
||||||
export * from './retry-log';
|
export * from './retry-task';
|
||||||
export * from './retry-dead-letter';
|
export * from './retry-dead-letter';
|
||||||
export * from './workflow';
|
export * from './workflow';
|
||||||
export * from './job';
|
export * from './job';
|
||||||
|
@ -13,7 +13,7 @@ export function fetchJobLogList(params?: Api.JobLog.JobLogSearchParams, controll
|
|||||||
/** get Retry Log List */
|
/** get Retry Log List */
|
||||||
export function fetchRetryLogList(params?: Api.JobLog.RetryLogSearchParams) {
|
export function fetchRetryLogList(params?: Api.JobLog.RetryLogSearchParams) {
|
||||||
return request<Api.JobLog.JobLogList>({
|
return request<Api.JobLog.JobLogList>({
|
||||||
url: '/retry-task-log/message/list',
|
url: '/retry-task/message/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { request } from '../request';
|
import { request } from '../request';
|
||||||
|
|
||||||
/** get retry log list */
|
/** get retry log list */
|
||||||
export function fetchRetryLogPageList(params?: Api.RetryLog.RetryTaskSearchParams) {
|
export function fetchRetryLogPageList(params?: Api.RetryTask.RetryTaskSearchParams) {
|
||||||
return request<Api.RetryLog.RetryLogList>({
|
return request<Api.RetryTask.RetryTaskList>({
|
||||||
url: '/retry-task/list',
|
url: '/retry-task/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
@ -11,7 +11,7 @@ export function fetchRetryLogPageList(params?: Api.RetryLog.RetryTaskSearchParam
|
|||||||
|
|
||||||
/** get retry log list */
|
/** get retry log list */
|
||||||
export function fetchRetryLogById(id: string) {
|
export function fetchRetryLogById(id: string) {
|
||||||
return request<Api.RetryLog.RetryLog>({
|
return request<Api.RetryTask.RetryTask>({
|
||||||
url: `/retry-task/${id}`,
|
url: `/retry-task/${id}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
@ -1,8 +1,8 @@
|
|||||||
import { request } from '../request';
|
import { request } from '../request';
|
||||||
|
|
||||||
/** get retryTask list */
|
/** get retryTask list */
|
||||||
export function fetchGetRetryTaskList(params?: Api.RetryTask.RetryTaskSearchParams) {
|
export function fetchGetRetryTaskList(params?: Api.Retry.RetrySearchParams) {
|
||||||
return request<Api.RetryTask.RetryTaskList>({
|
return request<Api.Retry.RetryList>({
|
||||||
url: '/retry/list',
|
url: '/retry/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
@ -11,14 +11,14 @@ export function fetchGetRetryTaskList(params?: Api.RetryTask.RetryTaskSearchPara
|
|||||||
|
|
||||||
/** get retryTask */
|
/** get retryTask */
|
||||||
export function fetchGetRetryTaskById(id: string, groupName: string) {
|
export function fetchGetRetryTaskById(id: string, groupName: string) {
|
||||||
return request<Api.RetryTask.RetryTask>({
|
return request<Api.Retry.Retry>({
|
||||||
url: `/retry/${id}?groupName=${groupName}`,
|
url: `/retry/${id}?groupName=${groupName}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** add retryTask */
|
/** add retryTask */
|
||||||
export function fetchAddRetryTask(data: Api.RetryTask.RetryTask) {
|
export function fetchAddRetryTask(data: Api.Retry.Retry) {
|
||||||
return request<boolean>({
|
return request<boolean>({
|
||||||
url: '/retry',
|
url: '/retry',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -27,7 +27,7 @@ export function fetchAddRetryTask(data: Api.RetryTask.RetryTask) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** batch add retryTask */
|
/** batch add retryTask */
|
||||||
export function fetchBatchAddRetryTask(data: Api.RetryTask.RetryTaskBatchAdd) {
|
export function fetchBatchAddRetryTask(data: Api.Retry.RetryTaskBatchAdd) {
|
||||||
return request<boolean>({
|
return request<boolean>({
|
||||||
url: '/retry/batch',
|
url: '/retry/batch',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -36,7 +36,7 @@ export function fetchBatchAddRetryTask(data: Api.RetryTask.RetryTaskBatchAdd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** edit retryTask */
|
/** edit retryTask */
|
||||||
export function fetchEditRetryTask(data: Api.RetryTask.RetryTask) {
|
export function fetchEditRetryTask(data: Api.Retry.Retry) {
|
||||||
return request<boolean>({
|
return request<boolean>({
|
||||||
url: '/retry',
|
url: '/retry',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
@ -45,7 +45,7 @@ export function fetchEditRetryTask(data: Api.RetryTask.RetryTask) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** update retryTask status */
|
/** update retryTask status */
|
||||||
export function fetchUpdateRetryTaskStatus(data: Api.RetryTask.RetryTaskUpdateStatusRequest) {
|
export function fetchUpdateRetryTaskStatus(data: Api.Retry.RetryTaskUpdateStatusRequest) {
|
||||||
return request<boolean>({
|
return request<boolean>({
|
||||||
url: '/retry/status',
|
url: '/retry/status',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
@ -54,7 +54,7 @@ export function fetchUpdateRetryTaskStatus(data: Api.RetryTask.RetryTaskUpdateSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** manual execute retryTask */
|
/** manual execute retryTask */
|
||||||
export function fetchExecuteRetryTask(data: Api.RetryTask.ManualTriggerTaskRequestVO) {
|
export function fetchExecuteRetryTask(data: Api.Retry.ManualTriggerTaskRequestVO) {
|
||||||
return request<boolean>({
|
return request<boolean>({
|
||||||
url: '/retry/manual/trigger/retry/task',
|
url: '/retry/manual/trigger/retry/task',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -63,7 +63,7 @@ export function fetchExecuteRetryTask(data: Api.RetryTask.ManualTriggerTaskReque
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** manual execute callbackTask */
|
/** manual execute callbackTask */
|
||||||
export function fetchExecuteCallbackTask(data: Api.RetryTask.ManualTriggerTaskRequestVO) {
|
export function fetchExecuteCallbackTask(data: Api.Retry.ManualTriggerTaskRequestVO) {
|
||||||
return request<boolean>({
|
return request<boolean>({
|
||||||
url: '/retry/manual/trigger/callback/task',
|
url: '/retry/manual/trigger/callback/task',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -72,7 +72,7 @@ export function fetchExecuteCallbackTask(data: Api.RetryTask.ManualTriggerTaskRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** batch delete retryTask */
|
/** batch delete retryTask */
|
||||||
export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTaskVO) {
|
export function fetchBatchDeleteRetryTask(data: Api.Retry.BatchDeleteRetryTaskVO) {
|
||||||
return request<number>({
|
return request<number>({
|
||||||
url: '/retry/batch',
|
url: '/retry/batch',
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
@ -81,7 +81,7 @@ export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** generate retryTask idempotent id */
|
/** generate retryTask idempotent id */
|
||||||
export function fetchIdempotentIdGenerate(data: Api.RetryTask.GenerateRetryIdempotentIdVO) {
|
export function fetchIdempotentIdGenerate(data: Api.Retry.GenerateRetryIdempotentIdVO) {
|
||||||
return request<string>({
|
return request<string>({
|
||||||
url: '/retry/generate/idempotent-id',
|
url: '/retry/generate/idempotent-id',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
29
src/typings/api.d.ts
vendored
29
src/typings/api.d.ts
vendored
@ -742,7 +742,7 @@ declare namespace Api {
|
|||||||
*
|
*
|
||||||
* backend api module: "retryTask"
|
* backend api module: "retryTask"
|
||||||
*/
|
*/
|
||||||
namespace RetryTask {
|
namespace Retry {
|
||||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'page' | 'size'>;
|
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'page' | 'size'>;
|
||||||
|
|
||||||
type RetryStatusType = 0 | 1 | 2 | 3;
|
type RetryStatusType = 0 | 1 | 2 | 3;
|
||||||
@ -752,9 +752,7 @@ declare namespace Api {
|
|||||||
type TaskType = 1 | 2;
|
type TaskType = 1 | 2;
|
||||||
|
|
||||||
/** RetryTask */
|
/** RetryTask */
|
||||||
type RetryTask = Common.CommonRecord<{
|
type Retry = Common.CommonRecord<{
|
||||||
/** UniqueId */
|
|
||||||
uniqueId?: string;
|
|
||||||
/** 组名称 */
|
/** 组名称 */
|
||||||
groupName: string;
|
groupName: string;
|
||||||
/** 场景名称 */
|
/** 场景名称 */
|
||||||
@ -799,7 +797,7 @@ declare namespace Api {
|
|||||||
|
|
||||||
type ManualTriggerTaskRequestVO = {
|
type ManualTriggerTaskRequestVO = {
|
||||||
groupName: string;
|
groupName: string;
|
||||||
uniqueIds: string[];
|
retryIds: number[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type BatchDeleteRetryTaskVO = {
|
type BatchDeleteRetryTaskVO = {
|
||||||
@ -819,13 +817,12 @@ declare namespace Api {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** RetryTask search params */
|
/** RetryTask search params */
|
||||||
type RetryTaskSearchParams = CommonType.RecordNullable<
|
type RetrySearchParams = CommonType.RecordNullable<
|
||||||
Pick<Api.RetryTask.RetryTask, 'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'retryStatus'> &
|
Pick<Api.Retry.Retry, 'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'retryStatus'> & CommonSearchParams
|
||||||
CommonSearchParams
|
|
||||||
>;
|
>;
|
||||||
|
|
||||||
/** RetryTask list */
|
/** RetryTask list */
|
||||||
type RetryTaskList = Common.PaginatingQueryRecord<RetryTask>;
|
type RetryList = Common.PaginatingQueryRecord<Retry>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1223,13 +1220,13 @@ declare namespace Api {
|
|||||||
*
|
*
|
||||||
* backend api module: "retryLog"
|
* backend api module: "retryLog"
|
||||||
*/
|
*/
|
||||||
namespace RetryLog {
|
namespace RetryTask {
|
||||||
import TaskType = Api.RetryTask.TaskType;
|
import TaskType = Api.Retry.TaskType;
|
||||||
import RetryTaskStatusType = Api.RetryTask.RetryTaskStatusType;
|
import RetryTaskStatusType = Api.Retry.RetryTaskStatusType;
|
||||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'page' | 'size'>;
|
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'page' | 'size'>;
|
||||||
|
|
||||||
/** retryLog */
|
/** retryLog */
|
||||||
type RetryLog = Common.CommonRecord<{
|
type RetryTask = Common.CommonRecord<{
|
||||||
/** UniqueId */
|
/** UniqueId */
|
||||||
retryId: string;
|
retryId: string;
|
||||||
/** 组名称 */
|
/** 组名称 */
|
||||||
@ -1250,12 +1247,12 @@ declare namespace Api {
|
|||||||
|
|
||||||
/** retryLog search params */
|
/** retryLog search params */
|
||||||
type RetryTaskSearchParams = CommonType.RecordNullable<
|
type RetryTaskSearchParams = CommonType.RecordNullable<
|
||||||
Pick<Api.RetryLog.RetryLog, 'retryId' | 'groupName' | 'sceneName' | 'taskStatus' | 'operationReason'> &
|
Pick<Api.RetryTask.RetryTask, 'retryId' | 'groupName' | 'sceneName' | 'taskStatus' | 'operationReason'> &
|
||||||
CommonSearchParams & { datetimeRange?: [string, string] }
|
CommonSearchParams & { datetimeRange?: [string, string] }
|
||||||
>;
|
>;
|
||||||
|
|
||||||
/** retryLog list */
|
/** retryLog list */
|
||||||
type RetryLogList = Common.PaginatingQueryRecord<RetryLog>;
|
type RetryTaskList = Common.PaginatingQueryRecord<RetryTask>;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* namespace UserManager
|
* namespace UserManager
|
||||||
@ -1323,7 +1320,7 @@ declare namespace Api {
|
|||||||
|
|
||||||
type RetryLogSearchParams = {
|
type RetryLogSearchParams = {
|
||||||
groupName: string;
|
groupName: string;
|
||||||
uniqueId: string;
|
retryTaskId: string;
|
||||||
} & LogSearchParams;
|
} & LogSearchParams;
|
||||||
|
|
||||||
type LogSearchParams = {
|
type LogSearchParams = {
|
||||||
|
12
src/typings/app.d.ts
vendored
12
src/typings/app.d.ts
vendored
@ -457,6 +457,18 @@ declare namespace App {
|
|||||||
skip: string;
|
skip: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
retryTaskStatus: {
|
||||||
|
label: string;
|
||||||
|
form: string;
|
||||||
|
items: {
|
||||||
|
waiting: string;
|
||||||
|
running: string;
|
||||||
|
success: string;
|
||||||
|
fail: string;
|
||||||
|
stop: string;
|
||||||
|
cancel: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
taskStatus: {
|
taskStatus: {
|
||||||
label: string;
|
label: string;
|
||||||
form: string;
|
form: string;
|
||||||
|
@ -14,7 +14,7 @@ import RetryLogDetailDrawer from './modules/retry-log-detail-drawer.vue';
|
|||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
/** 详情页属性数据 */
|
/** 详情页属性数据 */
|
||||||
const detailData = ref<Api.RetryLog.RetryLog | null>();
|
const detailData = ref<Api.RetryTask.RetryTask | null>();
|
||||||
/** 详情页可见状态 */
|
/** 详情页可见状态 */
|
||||||
const { bool: detailVisible, setTrue: openDetail } = useBoolean(false);
|
const { bool: detailVisible, setTrue: openDetail } = useBoolean(false);
|
||||||
const taskStatus = history.state.taskStatus;
|
const taskStatus = history.state.taskStatus;
|
||||||
@ -155,9 +155,9 @@ async function handleDelete(id: any) {
|
|||||||
onDeleted();
|
onDeleted();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadRetryInfo(row: Api.RetryLog.RetryLog) {
|
async function loadRetryInfo(row: Api.RetryTask.RetryTask) {
|
||||||
const res = await fetchRetryLogById(row.id!);
|
const res = await fetchRetryLogById(row.id!);
|
||||||
detailData.value = (res.data as Api.RetryLog.RetryLog) || null;
|
detailData.value = (res.data as Api.RetryTask.RetryTask) || null;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { tagColor } from '@/utils/common';
|
import { tagColor } from '@/utils/common';
|
||||||
import { retryStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
import { retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'SceneDetailDrawer'
|
name: 'SceneDetailDrawer'
|
||||||
@ -9,7 +9,7 @@ defineOptions({
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** row data */
|
/** row data */
|
||||||
rowData?: Api.RetryLog.RetryLog | null;
|
rowData?: Api.RetryTask.RetryTask | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineProps<Props>();
|
defineProps<Props>();
|
||||||
@ -24,9 +24,6 @@ const visible = defineModel<boolean>('visible', {
|
|||||||
<NTabs type="segment" animated>
|
<NTabs type="segment" animated>
|
||||||
<NTabPane :name="0" :tab="$t('page.log.info')">
|
<NTabPane :name="0" :tab="$t('page.log.info')">
|
||||||
<NDescriptions label-placement="top" bordered :column="2">
|
<NDescriptions label-placement="top" bordered :column="2">
|
||||||
<NDescriptionsItem :label="$t('page.retryLog.UniqueId')" :span="2">
|
|
||||||
{{ rowData?.uniqueId }}
|
|
||||||
</NDescriptionsItem>
|
|
||||||
<NDescriptionsItem :label="$t('page.retryLog.groupName')" :span="2">
|
<NDescriptionsItem :label="$t('page.retryLog.groupName')" :span="2">
|
||||||
{{ rowData?.groupName }}
|
{{ rowData?.groupName }}
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
@ -34,21 +31,13 @@ const visible = defineModel<boolean>('visible', {
|
|||||||
{{ rowData?.sceneName }}
|
{{ rowData?.sceneName }}
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
<NDescriptionsItem :label="$t('page.retryLog.retryStatus')" :span="1">
|
<NDescriptionsItem :label="$t('page.retryLog.retryStatus')" :span="1">
|
||||||
<NTag :type="tagColor(rowData?.retryStatus!)">
|
<NTag :type="tagColor(rowData?.taskStatus!)">
|
||||||
{{ $t(retryStatusTypeRecord[rowData?.retryStatus!]) }}
|
{{ $t(retryTaskStatusTypeRecord[rowData?.taskStatus!]) }}
|
||||||
</NTag>
|
</NTag>
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
<NDescriptionsItem :label="$t('page.retryLog.taskType')" :span="1">
|
<NDescriptionsItem :label="$t('page.retryLog.taskType')" :span="1">
|
||||||
<NTag :type="tagColor(rowData?.taskType!)">{{ $t(retryTaskTypeRecord[rowData?.taskType!]) }}</NTag>
|
<NTag :type="tagColor(rowData?.taskType!)">{{ $t(retryTaskTypeRecord[rowData?.taskType!]) }}</NTag>
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
<NDescriptionsItem :label="$t('page.retryLog.bizNo')" :span="2">{{ rowData?.bizNo }}</NDescriptionsItem>
|
|
||||||
<NDescriptionsItem :label="$t('page.retryLog.idempotentId')" :span="2">
|
|
||||||
{{ rowData?.idempotentId }}
|
|
||||||
</NDescriptionsItem>
|
|
||||||
<NDescriptionsItem :label="$t('page.retryTask.executorName')" :span="2">
|
|
||||||
{{ rowData?.executorName }}
|
|
||||||
</NDescriptionsItem>
|
|
||||||
<NDescriptionsItem :label="$t('page.retryTask.argsStr')" :span="2">{{ rowData?.argsStr }}</NDescriptionsItem>
|
|
||||||
<NDescriptionsItem :label="$t('common.createDt')">{{ rowData?.createDt }}</NDescriptionsItem>
|
<NDescriptionsItem :label="$t('common.createDt')">{{ rowData?.createDt }}</NDescriptionsItem>
|
||||||
</NDescriptions>
|
</NDescriptions>
|
||||||
</NTabPane>
|
</NTabPane>
|
||||||
|
@ -17,7 +17,7 @@ interface Emits {
|
|||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const model = defineModel<Api.RetryLog.RetryTaskSearchParams>('model', { required: true });
|
const model = defineModel<Api.RetryTask.RetryTaskSearchParams>('model', { required: true });
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
emit('reset');
|
emit('reset');
|
||||||
@ -36,18 +36,18 @@ function search() {
|
|||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.sceneName')" path="sceneName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.sceneName')" path="sceneName" class="pr-24px">
|
||||||
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" clearable />
|
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" clearable />
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.UniqueId')" path="UniqueId" class="pr-24px">-->
|
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.UniqueId')" path="UniqueId" class="pr-24px">-->
|
||||||
<!-- <NInput v-model:value="model.uniqueId" :placeholder="$t('page.retryLog.form.UniqueId')" clearable />-->
|
<!-- <NInput v-model:value="model.uniqueId" :placeholder="$t('page.retryLog.form.UniqueId')" clearable />-->
|
||||||
<!-- </NFormItemGi>-->
|
<!-- </NFormItemGi>-->
|
||||||
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.idempotentId')" path="idempotentId" class="pr-24px">-->
|
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.idempotentId')" path="idempotentId" class="pr-24px">-->
|
||||||
<!-- <NInput v-model:value="model.idempotentId" :placeholder="$t('page.retryLog.form.idempotentId')" clearable />-->
|
<!-- <NInput v-model:value="model.idempotentId" :placeholder="$t('page.retryLog.form.idempotentId')" clearable />-->
|
||||||
<!-- </NFormItemGi>-->
|
<!-- </NFormItemGi>-->
|
||||||
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.bizNo')" path="bizNo" class="pr-24px">-->
|
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.bizNo')" path="bizNo" class="pr-24px">-->
|
||||||
<!-- <NInput v-model:value="model.bizNo" :placeholder="$t('page.retryLog.form.bizNo')" clearable />-->
|
<!-- <NInput v-model:value="model.bizNo" :placeholder="$t('page.retryLog.form.bizNo')" clearable />-->
|
||||||
<!-- </NFormItemGi>-->
|
<!-- </NFormItemGi>-->
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.retryStatus')" path="taskBatchStatus" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.retryStatus')" path="taskBatchStatus" class="pr-24px">
|
||||||
<NSelect
|
<NSelect
|
||||||
v-model:value="model.retryStatus"
|
v-model:value="model.taskStatus"
|
||||||
:placeholder="$t('page.retryTask.form.retryStatus')"
|
:placeholder="$t('page.retryTask.form.retryStatus')"
|
||||||
:options="translateOptions(retryStatusTypeOptions)"
|
:options="translateOptions(retryStatusTypeOptions)"
|
||||||
clearable
|
clearable
|
||||||
|
@ -22,7 +22,7 @@ import RetryTaskSearch from './modules/retry-task-search.vue';
|
|||||||
import RetryTaskDetailDrawerVue from './modules/retry-task-detail-drawer.vue';
|
import RetryTaskDetailDrawerVue from './modules/retry-task-detail-drawer.vue';
|
||||||
|
|
||||||
/** 详情页属性数据 */
|
/** 详情页属性数据 */
|
||||||
const detailData = ref<Api.RetryTask.RetryTask | null>();
|
const detailData = ref<Api.Retry.Retry | null>();
|
||||||
/** 详情页可见状态 */
|
/** 详情页可见状态 */
|
||||||
const { bool: detailVisible, setTrue: openDetail } = useBoolean(false);
|
const { bool: detailVisible, setTrue: openDetail } = useBoolean(false);
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
key: 'id',
|
key: 'id',
|
||||||
title: $t('common.index'),
|
title: $t('common.index'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 64,
|
width: 128,
|
||||||
render: row => {
|
render: row => {
|
||||||
async function showDetailDrawer() {
|
async function showDetailDrawer() {
|
||||||
await loadRetryInfo(row);
|
await loadRetryInfo(row);
|
||||||
@ -115,7 +115,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
if (row.taskType === null) {
|
if (row.taskType === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const tagMap: Record<Api.RetryTask.TaskType, NaiveUI.ThemeColor> = {
|
const tagMap: Record<Api.Retry.TaskType, NaiveUI.ThemeColor> = {
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'error'
|
2: 'error'
|
||||||
};
|
};
|
||||||
@ -151,7 +151,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
{/* 非[完成,最大次数], 显示[执行]按钮 */}
|
||||||
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
{row.retryStatus !== 1 && row.retryStatus !== 2 ? (
|
||||||
<>
|
<>
|
||||||
<NPopconfirm onPositiveClick={() => handleExecute(row.groupName!, row.uniqueId!, row.taskType!)}>
|
<NPopconfirm onPositiveClick={() => handleExecute(row.groupName!, row.id! as any, row.taskType!)}>
|
||||||
{{
|
{{
|
||||||
default: () => $t('common.confirmExecute'),
|
default: () => $t('common.confirmExecute'),
|
||||||
trigger: () => (
|
trigger: () => (
|
||||||
@ -256,9 +256,9 @@ async function handleDelete(groupName: string, id: string) {
|
|||||||
onDeleted();
|
onDeleted();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadRetryInfo(row: Api.RetryTask.RetryTask) {
|
async function loadRetryInfo(row: Api.Retry.Retry) {
|
||||||
const res = await fetchGetRetryTaskById(row.id!, row.groupName!);
|
const res = await fetchGetRetryTaskById(row.id!, row.groupName!);
|
||||||
detailData.value = (res.data as Api.RetryLog.RetryLog) || null;
|
detailData.value = (res.data as Api.Retry.Retry) || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleBatchDelete() {
|
async function handleBatchDelete() {
|
||||||
@ -274,14 +274,14 @@ function handleBatchAdd() {
|
|||||||
openBatchAddDrawer();
|
openBatchAddDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleExecute(groupName: string, uniqueId: string, type: Api.RetryTask.TaskType) {
|
function handleExecute(groupName: string, retryId: number, type: Api.Retry.TaskType) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
fetchExecuteRetryTask({ groupName, uniqueIds: [uniqueId] });
|
fetchExecuteRetryTask({ groupName, retryIds: [retryId] });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
fetchExecuteCallbackTask({ groupName, uniqueIds: [uniqueId] });
|
fetchExecuteCallbackTask({ groupName, retryIds: [retryId] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ function handleFinish(id: number, groupName: string) {
|
|||||||
updateRetryTaskStatus(id, groupName, 1);
|
updateRetryTaskStatus(id, groupName, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateRetryTaskStatus(id: number, groupName: string, retryStatus: Api.RetryTask.RetryStatusType) {
|
async function updateRetryTaskStatus(id: number, groupName: string, retryStatus: Api.Retry.RetryStatusType) {
|
||||||
const { error } = await fetchUpdateRetryTaskStatus({ id, groupName, retryStatus });
|
const { error } = await fetchUpdateRetryTaskStatus({ id, groupName, retryStatus });
|
||||||
if (error) return;
|
if (error) return;
|
||||||
window.$message?.success($t('common.updateSuccess'));
|
window.$message?.success($t('common.updateSuccess'));
|
||||||
|
@ -25,7 +25,7 @@ const visible = defineModel<boolean>('visible', {
|
|||||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||||
const { defaultRequiredRule } = useFormRules();
|
const { defaultRequiredRule } = useFormRules();
|
||||||
|
|
||||||
type Model = Pick<Api.RetryTask.RetryTaskBatchAdd, 'groupName' | 'retryStatus' | 'logStr'>;
|
type Model = Pick<Api.Retry.RetryTaskBatchAdd, 'groupName' | 'retryStatus' | 'logStr'>;
|
||||||
|
|
||||||
const model: Model = reactive(createDefaultModel());
|
const model: Model = reactive(createDefaultModel());
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ defineOptions({
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** row data */
|
/** row data */
|
||||||
rowData?: Api.RetryTask.RetryTask | null;
|
rowData?: Api.Retry.Retry | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
const props = defineProps<Props>();
|
||||||
@ -30,7 +30,7 @@ let fromIndex: number = 0;
|
|||||||
async function getLogList() {
|
async function getLogList() {
|
||||||
const { data: logData, error } = await fetchRetryLogList({
|
const { data: logData, error } = await fetchRetryLogList({
|
||||||
groupName: props.rowData!.groupName,
|
groupName: props.rowData!.groupName,
|
||||||
uniqueId: props.rowData!.uniqueId!,
|
retryTaskId: props.rowData!.id! as any,
|
||||||
startId,
|
startId,
|
||||||
fromIndex,
|
fromIndex,
|
||||||
size: 50
|
size: 50
|
||||||
@ -73,9 +73,6 @@ onBeforeUnmount(() => {
|
|||||||
<NTabs type="segment" animated @update:value="handleUpdateTab">
|
<NTabs type="segment" animated @update:value="handleUpdateTab">
|
||||||
<NTabPane :name="0" :tab="$t('page.log.info')">
|
<NTabPane :name="0" :tab="$t('page.log.info')">
|
||||||
<NDescriptions label-placement="top" bordered :column="2">
|
<NDescriptions label-placement="top" bordered :column="2">
|
||||||
<NDescriptionsItem :label="$t('page.retryTask.uniqueId')" :span="2">
|
|
||||||
{{ rowData?.uniqueId }}
|
|
||||||
</NDescriptionsItem>
|
|
||||||
<NDescriptionsItem :label="$t('page.retryTask.groupName')" :span="2">
|
<NDescriptionsItem :label="$t('page.retryTask.groupName')" :span="2">
|
||||||
{{ rowData?.groupName }}
|
{{ rowData?.groupName }}
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
@ -108,9 +105,6 @@ onBeforeUnmount(() => {
|
|||||||
<NDescriptionsItem :label="$t('common.updateDt')" :span="1">{{ rowData?.updateDt }}</NDescriptionsItem>
|
<NDescriptionsItem :label="$t('common.updateDt')" :span="1">{{ rowData?.updateDt }}</NDescriptionsItem>
|
||||||
</NDescriptions>
|
</NDescriptions>
|
||||||
</NTabPane>
|
</NTabPane>
|
||||||
<NTabPane :name="1" :tab="$t('page.log.title')" display-directive="if">
|
|
||||||
<LogDrawer :drawer="false" type="retry" :task-data="rowData!" />
|
|
||||||
</NTabPane>
|
|
||||||
</NTabs>
|
</NTabs>
|
||||||
</OperateDrawer>
|
</OperateDrawer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -18,7 +18,7 @@ interface Props {
|
|||||||
/** the type of operation */
|
/** the type of operation */
|
||||||
operateType: NaiveUI.TableOperateType;
|
operateType: NaiveUI.TableOperateType;
|
||||||
/** the edit row data */
|
/** the edit row data */
|
||||||
rowData?: Api.RetryTask.RetryTask | null;
|
rowData?: Api.Retry.Retry | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
const props = defineProps<Props>();
|
||||||
@ -46,7 +46,7 @@ const title = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
type Model = Pick<
|
type Model = Pick<
|
||||||
Api.RetryTask.RetryTask,
|
Api.Retry.Retry,
|
||||||
'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'executorName' | 'argsStr' | 'retryStatus'
|
'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'executorName' | 'argsStr' | 'retryStatus'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ interface Emits {
|
|||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
const model = defineModel<Api.RetryTask.RetryTaskSearchParams>('model', { required: true });
|
const model = defineModel<Api.Retry.RetrySearchParams>('model', { required: true });
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
emit('reset');
|
emit('reset');
|
||||||
@ -35,9 +35,9 @@ function search() {
|
|||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryTask.sceneName')" path="sceneName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryTask.sceneName')" path="sceneName" class="pr-24px">
|
||||||
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" clearable />
|
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" clearable />
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryTask.uniqueId')" path="uniqueId" class="pr-24px">-->
|
<!-- <NFormItemGi span="24 s:12 m:6" :label="$t('page.retryTask.uniqueId')" path="uniqueId" class="pr-24px">-->
|
||||||
<!-- <NInput v-model:value="model.uniqueId" :placeholder="$t('page.retryTask.form.uniqueId')" clearable />-->
|
<!-- <NInput v-model:value="model.uniqueId" :placeholder="$t('page.retryTask.form.uniqueId')" clearable />-->
|
||||||
<!-- </NFormItemGi>-->
|
<!-- </NFormItemGi>-->
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryTask.idempotentId')" path="idempotentId" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryTask.idempotentId')" path="idempotentId" class="pr-24px">
|
||||||
<NInput v-model:value="model.idempotentId" :placeholder="$t('page.retryTask.form.idempotentId')" clearable />
|
<NInput v-model:value="model.idempotentId" :placeholder="$t('page.retryTask.form.idempotentId')" clearable />
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
|
Loading…
Reference in New Issue
Block a user