feat(1.4.0-beta1): 1.新增回调配置
This commit is contained in:
parent
fe035218ba
commit
c9d5cc8fba
@ -89,12 +89,22 @@ export const groupConfigYesOrNoRecord: Record<Api.GroupConfig.YesOrNoType, App.I
|
||||
};
|
||||
export const groupConfigYesOrNoOptions = transformRecordToNumberOption(groupConfigYesOrNoRecord, true);
|
||||
|
||||
export const retryTaskStatusTypeRecord: Record<Api.RetryTask.RetryStatusType, App.I18n.I18nKey> = {
|
||||
export const retryStatusTypeRecord: Record<Api.RetryTask.RetryStatusType, App.I18n.I18nKey> = {
|
||||
0: 'page.retryTask.retryStatusType.retrying',
|
||||
1: 'page.retryTask.retryStatusType.finished',
|
||||
2: 'page.retryTask.retryStatusType.maxRetry',
|
||||
3: 'page.retryTask.retryStatusType.paused'
|
||||
};
|
||||
export const retryStatusTypeOptions = transformRecordToNumberOption(retryStatusTypeRecord);
|
||||
|
||||
export const retryTaskStatusTypeRecord: Record<Api.RetryTask.RetryTaskStatusType, App.I18n.I18nKey> = {
|
||||
1: 'page.retryTask.retryStatusType.finished',
|
||||
2: 'page.retryTask.retryStatusType.maxRetry',
|
||||
3: 'page.retryTask.retryStatusType.paused',
|
||||
4: 'page.retryTask.retryStatusType.paused',
|
||||
5: 'page.retryTask.retryStatusType.paused',
|
||||
6: 'page.retryTask.retryStatusType.paused'
|
||||
};
|
||||
export const retryTaskStatusTypeOptions = transformRecordToNumberOption(retryTaskStatusTypeRecord);
|
||||
|
||||
export const retryTaskTypeRecord: Record<Api.RetryTask.TaskType, App.I18n.I18nKey> = {
|
||||
|
||||
@ -684,6 +684,8 @@ const local: App.I18n.Schema = {
|
||||
retryScene: {
|
||||
title: 'Scene List',
|
||||
detail: 'Scene Detail',
|
||||
baseConfig: 'Base Config',
|
||||
cbConfig: 'Callback Config',
|
||||
groupName: 'Group name',
|
||||
sceneName: 'Scene name',
|
||||
notifyName: 'Notify name',
|
||||
@ -697,9 +699,13 @@ const local: App.I18n.Schema = {
|
||||
updateDt: 'Update time',
|
||||
description: 'Describe',
|
||||
routeKey: 'Routing strategy',
|
||||
cbStatus: 'Callback status',
|
||||
cbTriggerType: 'Callback TriggerType',
|
||||
cbTriggerInterval: 'Callback Trigger Interval',
|
||||
cbMaxCount: 'Callback Max Count',
|
||||
form: {
|
||||
maxRetryCount: 'Please enter Maximum number of retries',
|
||||
notifyName: 'Plase enter Notify name',
|
||||
notifyName: 'Please enter Notify name',
|
||||
triggerInterval: 'Please enter Intervals(s)',
|
||||
groupName: 'Please enter Group name',
|
||||
description: 'Please enter Describe',
|
||||
@ -709,7 +715,10 @@ const local: App.I18n.Schema = {
|
||||
deadlineRequest: 'Please enter Call chain timeout(ms)',
|
||||
routeKey: 'Please enter Routing strategy',
|
||||
backOff: 'Please enter Backoff strategy',
|
||||
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',
|
||||
cbTriggerInterval: 'Please enter trigger interval',
|
||||
cbMaxCount: 'Please enter Maximum number of callback',
|
||||
},
|
||||
addScene: 'Add Scenes',
|
||||
editScene: 'Add Scenes',
|
||||
|
||||
@ -692,6 +692,8 @@ const local: App.I18n.Schema = {
|
||||
retryScene: {
|
||||
title: '场景列表',
|
||||
detail: '场景详情',
|
||||
baseConfig: '基础配置',
|
||||
cbConfig: '回调配置',
|
||||
groupName: '组名',
|
||||
sceneName: '场景名',
|
||||
notifyName: '告警通知',
|
||||
@ -705,6 +707,10 @@ const local: App.I18n.Schema = {
|
||||
updateDt: '更新时间',
|
||||
description: '描述',
|
||||
routeKey: '路由策略',
|
||||
cbStatus: '回调开关',
|
||||
cbTriggerType: '回调触发类型',
|
||||
cbTriggerInterval: '回调触发间隔',
|
||||
cbMaxCount: '最大回调执行次数',
|
||||
form: {
|
||||
notifyName: '请选择告警通知名称',
|
||||
maxRetryCount: '请输入最大重试次数',
|
||||
@ -717,7 +723,10 @@ const local: App.I18n.Schema = {
|
||||
deadlineRequest: '请输入调用链超时时间(毫秒)',
|
||||
routeKey: '请输入路由策略',
|
||||
backOff: '请输入退避策略',
|
||||
sceneName2: '场景名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线和中横线。'
|
||||
sceneName2: '场景名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线和中横线。',
|
||||
cbTriggerType: '请选择回调触发类型',
|
||||
cbTriggerInterval: '请输入触发间隔',
|
||||
cbMaxCount: '请输入回调次数'
|
||||
},
|
||||
addScene: '新增场景',
|
||||
editScene: '编辑场景',
|
||||
|
||||
@ -5,7 +5,7 @@ export * from './dashboard';
|
||||
export * from './namespace';
|
||||
export * from './notify';
|
||||
export * from './group';
|
||||
export * from './retry-task';
|
||||
export * from './retry';
|
||||
export * from './retry-scene';
|
||||
export * from './retry-log';
|
||||
export * from './retry-dead-letter';
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { request } from '../request';
|
||||
|
||||
/** get retry log list */
|
||||
export function fetchRetryLogPageList(params?: Api.RetryLog.RetryLogSearchParams) {
|
||||
export function fetchRetryLogPageList(params?: Api.RetryLog.RetryTaskSearchParams) {
|
||||
return request<Api.RetryLog.RetryLogList>({
|
||||
url: '/retry-task-log/list',
|
||||
url: '/retry-task/list',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
@ -12,7 +12,7 @@ export function fetchRetryLogPageList(params?: Api.RetryLog.RetryLogSearchParams
|
||||
/** get retry log list */
|
||||
export function fetchRetryLogById(id: string) {
|
||||
return request<Api.RetryLog.RetryLog>({
|
||||
url: `/retry-task-log/${id}`,
|
||||
url: `/retry-task/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -20,7 +20,7 @@ export function fetchRetryLogById(id: string) {
|
||||
/** delete retry log */
|
||||
export function fetchDeleteRetryLog(id: number) {
|
||||
return request<boolean>({
|
||||
url: `/retry-task-log/${id}`,
|
||||
url: `/retry-task/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
@ -28,7 +28,7 @@ export function fetchDeleteRetryLog(id: number) {
|
||||
/** delete retry log */
|
||||
export function fetchBatchDeleteRetryLog(ids: number[]) {
|
||||
return request<boolean>({
|
||||
url: `/retry-task-log/ids`,
|
||||
url: `/retry-task/ids`,
|
||||
method: 'delete',
|
||||
data: ids
|
||||
});
|
||||
|
||||
@ -3,7 +3,7 @@ import { request } from '../request';
|
||||
/** get retryTask list */
|
||||
export function fetchGetRetryTaskList(params?: Api.RetryTask.RetryTaskSearchParams) {
|
||||
return request<Api.RetryTask.RetryTaskList>({
|
||||
url: '/retry-task/list',
|
||||
url: '/retry/list',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
@ -12,7 +12,7 @@ export function fetchGetRetryTaskList(params?: Api.RetryTask.RetryTaskSearchPara
|
||||
/** get retryTask */
|
||||
export function fetchGetRetryTaskById(id: string, groupName: string) {
|
||||
return request<Api.RetryTask.RetryTask>({
|
||||
url: `/retry-task/${id}?groupName=${groupName}`,
|
||||
url: `/retry/${id}?groupName=${groupName}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -20,7 +20,7 @@ export function fetchGetRetryTaskById(id: string, groupName: string) {
|
||||
/** add retryTask */
|
||||
export function fetchAddRetryTask(data: Api.RetryTask.RetryTask) {
|
||||
return request<boolean>({
|
||||
url: '/retry-task',
|
||||
url: '/retry',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
@ -29,7 +29,7 @@ export function fetchAddRetryTask(data: Api.RetryTask.RetryTask) {
|
||||
/** batch add retryTask */
|
||||
export function fetchBatchAddRetryTask(data: Api.RetryTask.RetryTaskBatchAdd) {
|
||||
return request<boolean>({
|
||||
url: '/retry-task/batch',
|
||||
url: '/retry/batch',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
@ -38,7 +38,7 @@ export function fetchBatchAddRetryTask(data: Api.RetryTask.RetryTaskBatchAdd) {
|
||||
/** edit retryTask */
|
||||
export function fetchEditRetryTask(data: Api.RetryTask.RetryTask) {
|
||||
return request<boolean>({
|
||||
url: '/retry-task',
|
||||
url: '/retry',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
@ -47,7 +47,7 @@ export function fetchEditRetryTask(data: Api.RetryTask.RetryTask) {
|
||||
/** update retryTask status */
|
||||
export function fetchUpdateRetryTaskStatus(data: Api.RetryTask.RetryTaskUpdateStatusRequest) {
|
||||
return request<boolean>({
|
||||
url: '/retry-task/status',
|
||||
url: '/retry/status',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
@ -56,7 +56,7 @@ export function fetchUpdateRetryTaskStatus(data: Api.RetryTask.RetryTaskUpdateSt
|
||||
/** manual execute retryTask */
|
||||
export function fetchExecuteRetryTask(data: Api.RetryTask.ManualTriggerTaskRequestVO) {
|
||||
return request<boolean>({
|
||||
url: '/retry-task/manual/trigger/retry/task',
|
||||
url: '/retry/manual/trigger/retry/task',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
@ -65,7 +65,7 @@ export function fetchExecuteRetryTask(data: Api.RetryTask.ManualTriggerTaskReque
|
||||
/** manual execute callbackTask */
|
||||
export function fetchExecuteCallbackTask(data: Api.RetryTask.ManualTriggerTaskRequestVO) {
|
||||
return request<boolean>({
|
||||
url: '/retry-task/manual/trigger/callback/task',
|
||||
url: '/retry/manual/trigger/callback/task',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
@ -74,7 +74,7 @@ export function fetchExecuteCallbackTask(data: Api.RetryTask.ManualTriggerTaskRe
|
||||
/** batch delete retryTask */
|
||||
export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTaskVO) {
|
||||
return request<number>({
|
||||
url: '/retry-task/batch',
|
||||
url: '/retry/batch',
|
||||
method: 'delete',
|
||||
data
|
||||
});
|
||||
@ -83,7 +83,7 @@ export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTa
|
||||
/** generate retryTask idempotent id */
|
||||
export function fetchIdempotentIdGenerate(data: Api.RetryTask.GenerateRetryIdempotentIdVO) {
|
||||
return request<string>({
|
||||
url: '/retry-task/generate/idempotent-id',
|
||||
url: '/retry/generate/idempotent-id',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
40
src/typings/api.d.ts
vendored
40
src/typings/api.d.ts
vendored
@ -747,6 +747,8 @@ declare namespace Api {
|
||||
|
||||
type RetryStatusType = 0 | 1 | 2 | 3;
|
||||
|
||||
type RetryTaskStatusType = 1 | 2 | 3 | 4 | 5 | 6;
|
||||
|
||||
type TaskType = 1 | 2;
|
||||
|
||||
/** RetryTask */
|
||||
@ -818,7 +820,7 @@ declare namespace Api {
|
||||
|
||||
/** RetryTask search params */
|
||||
type RetryTaskSearchParams = CommonType.RecordNullable<
|
||||
Pick<Api.RetryTask.RetryTask, 'uniqueId' | 'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'retryStatus'> &
|
||||
Pick<Api.RetryTask.RetryTask, 'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'retryStatus'> &
|
||||
CommonSearchParams
|
||||
>;
|
||||
|
||||
@ -859,6 +861,14 @@ declare namespace Api {
|
||||
executorTimeout: number;
|
||||
/** 描述 */
|
||||
description: string;
|
||||
/** 回调状态 0、不开启 1、开启 */
|
||||
cbStatus: EnableStatusNumber;
|
||||
/** 触发类型 */
|
||||
cbTriggerType: BackOff;
|
||||
/** 回调间隔时间 */
|
||||
cbTriggerInterval: string;
|
||||
/** 回调的最大执行次数 */
|
||||
cbMaxCount: number;
|
||||
}>;
|
||||
|
||||
/** scene search params */
|
||||
@ -1214,43 +1224,33 @@ declare namespace Api {
|
||||
* backend api module: "retryLog"
|
||||
*/
|
||||
namespace RetryLog {
|
||||
import RetryStatusType = Api.RetryTask.RetryStatusType;
|
||||
import TaskType = Api.RetryTask.TaskType;
|
||||
import RetryTaskStatusType = Api.RetryTask.RetryTaskStatusType;
|
||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'page' | 'size'>;
|
||||
|
||||
/** retryLog */
|
||||
type RetryLog = Common.CommonRecord<{
|
||||
/** UniqueId */
|
||||
uniqueId: string;
|
||||
retryId: string;
|
||||
/** 组名称 */
|
||||
groupName: string;
|
||||
/** 场景名称 */
|
||||
sceneName: string;
|
||||
/** 重试状态 */
|
||||
retryStatus: RetryStatusType;
|
||||
taskStatus: RetryTaskStatusType;
|
||||
/** 任务类型 */
|
||||
taskType: TaskType;
|
||||
/** 幂等id */
|
||||
idempotentId: string;
|
||||
/** 业务编号 */
|
||||
bizNo: string;
|
||||
/** 创建时间 */
|
||||
createDt: string;
|
||||
/** 执行器名称 */
|
||||
executorName: string;
|
||||
/** 执行方法参数 */
|
||||
argsStr: string;
|
||||
/** 扩展字段 */
|
||||
extAttrs?: string;
|
||||
/** 下次触发时间 */
|
||||
nextTriggerAt?: string;
|
||||
/** 重试次数 */
|
||||
retryCount?: number;
|
||||
/** 客户端信息 */
|
||||
clientInfo: string;
|
||||
/** 失败原因 */
|
||||
operationReason: Common.OperationReason;
|
||||
}>;
|
||||
|
||||
/** retryLog search params */
|
||||
type RetryLogSearchParams = CommonType.RecordNullable<
|
||||
Pick<Api.RetryLog.RetryLog, 'uniqueId' | 'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'retryStatus'> &
|
||||
type RetryTaskSearchParams = CommonType.RecordNullable<
|
||||
Pick<Api.RetryLog.RetryLog, 'retryId' | 'groupName' | 'sceneName' | 'taskStatus' | 'operationReason'> &
|
||||
CommonSearchParams & { datetimeRange?: [string, string] }
|
||||
>;
|
||||
|
||||
|
||||
9
src/typings/app.d.ts
vendored
9
src/typings/app.d.ts
vendored
@ -892,6 +892,8 @@ declare namespace App {
|
||||
retryScene: {
|
||||
title: string;
|
||||
detail: string;
|
||||
baseConfig: string;
|
||||
cbConfig: string;
|
||||
groupName: string;
|
||||
sceneName: string;
|
||||
notifyName: string;
|
||||
@ -905,6 +907,10 @@ declare namespace App {
|
||||
updateDt: string;
|
||||
description: string;
|
||||
routeKey: string;
|
||||
cbStatus: string;
|
||||
cbTriggerType: string;
|
||||
cbTriggerInterval: string;
|
||||
cbMaxCount: string;
|
||||
form: {
|
||||
notifyName: string;
|
||||
maxRetryCount: string;
|
||||
@ -918,6 +924,9 @@ declare namespace App {
|
||||
routeKey: string;
|
||||
backOff: string;
|
||||
sceneName2: string;
|
||||
cbTriggerType: string;
|
||||
cbTriggerInterval: string;
|
||||
cbMaxCount: string;
|
||||
};
|
||||
addScene: string;
|
||||
editScene: string;
|
||||
|
||||
@ -243,13 +243,13 @@ async function handleCopy(source: string) {
|
||||
</NFormItem>
|
||||
</NCollapseItem>
|
||||
<NCollapseItem :title="$t('page.groupConfig.retryConfig')" name="2">
|
||||
<NFormItem :label="$t('page.groupConfig.idGeneratorMode')" path="idGeneratorMode">
|
||||
<NSelect
|
||||
v-model:value="model.idGeneratorMode"
|
||||
:placeholder="$t('page.groupConfig.form.idGeneratorMode')"
|
||||
:options="translateOptions(groupConfigIdModeOptions)"
|
||||
/>
|
||||
</NFormItem>
|
||||
<!-- <NFormItem :label="$t('page.groupConfig.idGeneratorMode')" path="idGeneratorMode">-->
|
||||
<!-- <NSelect-->
|
||||
<!-- v-model:value="model.idGeneratorMode"-->
|
||||
<!-- :placeholder="$t('page.groupConfig.form.idGeneratorMode')"-->
|
||||
<!-- :options="translateOptions(groupConfigIdModeOptions)"-->
|
||||
<!-- />-->
|
||||
<!-- </NFormItem>-->
|
||||
<NFormItem :label="$t('page.groupConfig.initScene')" path="initScene">
|
||||
<NRadioGroup v-model:value="model.initScene" name="initScene">
|
||||
<NSpace>
|
||||
@ -262,13 +262,13 @@ async function handleCopy(source: string) {
|
||||
</NSpace>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.groupConfig.groupPartition')" path="groupPartition">
|
||||
<NSelect
|
||||
v-model:value="model.groupPartition"
|
||||
:placeholder="$t('page.groupConfig.form.groupPartition')"
|
||||
:options="translateOptions2(partitionList)"
|
||||
/>
|
||||
</NFormItem>
|
||||
<!-- <NFormItem :label="$t('page.groupConfig.groupPartition')" path="groupPartition">-->
|
||||
<!-- <NSelect-->
|
||||
<!-- v-model:value="model.groupPartition"-->
|
||||
<!-- :placeholder="$t('page.groupConfig.form.groupPartition')"-->
|
||||
<!-- :options="translateOptions2(partitionList)"-->
|
||||
<!-- />-->
|
||||
<!-- </NFormItem>-->
|
||||
</NCollapseItem>
|
||||
</NCollapse>
|
||||
</NForm>
|
||||
|
||||
@ -17,7 +17,7 @@ const appStore = useAppStore();
|
||||
const detailData = ref<Api.RetryLog.RetryLog | null>();
|
||||
/** 详情页可见状态 */
|
||||
const { bool: detailVisible, setTrue: openDetail } = useBoolean(false);
|
||||
const retryStatus = history.state.retryStatus;
|
||||
const taskStatus = history.state.taskStatus;
|
||||
|
||||
const { columns, columnChecks, data, getData, loading, mobilePagination, searchParams, resetSearchParams } = useTable({
|
||||
apiFn: fetchRetryLogPageList,
|
||||
@ -26,35 +26,26 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
size: 10,
|
||||
// if you want to use the searchParams in Form, you need to define the following properties, and the value is null
|
||||
// the value can not be undefined, otherwise the property in Form will not be reactive
|
||||
uniqueId: null,
|
||||
groupName: null,
|
||||
sceneName: null,
|
||||
idempotentId: null,
|
||||
bizNo: null,
|
||||
retryStatus: null,
|
||||
taskStatus: null,
|
||||
datetimeRange: monthRangeISO8601()
|
||||
},
|
||||
searchParams: {
|
||||
retryStatus
|
||||
taskStatus
|
||||
},
|
||||
columns: () => [
|
||||
{
|
||||
type: 'selection',
|
||||
align: 'center',
|
||||
width: 48,
|
||||
disabled: row => row.retryStatus === 0
|
||||
disabled: row => row.taskStatus === 1
|
||||
},
|
||||
{
|
||||
key: 'id',
|
||||
title: $t('common.index'),
|
||||
align: 'center',
|
||||
width: 64
|
||||
},
|
||||
{
|
||||
key: 'uniqueId',
|
||||
title: $t('page.retryLog.UniqueId'),
|
||||
align: 'left',
|
||||
minWidth: 120,
|
||||
width: 64,
|
||||
render: row => {
|
||||
async function showDetailDrawer() {
|
||||
await loadRetryInfo(row);
|
||||
@ -63,7 +54,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
|
||||
return (
|
||||
<n-button text tag="a" type="primary" onClick={showDetailDrawer} class="ws-normal">
|
||||
{row.uniqueId}
|
||||
{row.id}
|
||||
</n-button>
|
||||
);
|
||||
}
|
||||
@ -81,17 +72,26 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'retryStatus',
|
||||
key: 'taskStatus',
|
||||
title: $t('page.retryLog.retryStatus'),
|
||||
align: 'left',
|
||||
minWidth: 120,
|
||||
render: row => {
|
||||
if (row.retryStatus === null) {
|
||||
if (row.taskStatus === null) {
|
||||
return null;
|
||||
}
|
||||
const label = $t(retryTaskStatusTypeRecord[row.retryStatus!]);
|
||||
const tagMap: Record<number, NaiveUI.ThemeColor> = {
|
||||
1: 'info',
|
||||
2: 'info',
|
||||
3: 'info',
|
||||
4: 'error',
|
||||
5: 'error',
|
||||
6: 'error'
|
||||
};
|
||||
|
||||
return <NTag type={tagColor(row.retryStatus!)}>{label}</NTag>;
|
||||
const label = $t(retryTaskStatusTypeRecord[row.taskStatus!]);
|
||||
|
||||
return <NTag type={tagMap[row.taskStatus!]}>{label}</NTag>;
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -108,18 +108,6 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
return <NTag type={tagColor(row.taskType!)}>{label}</NTag>;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'idempotentId',
|
||||
title: $t('page.retryLog.idempotentId'),
|
||||
align: 'left',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'bizNo',
|
||||
title: $t('page.retryLog.bizNo'),
|
||||
align: 'left',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
key: 'createDt',
|
||||
title: $t('page.retryLog.createDt'),
|
||||
@ -133,7 +121,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
width: 80,
|
||||
render: row => (
|
||||
<div class="flex-center gap-8px">
|
||||
{row.retryStatus === 1 || row.retryStatus === 2 ? (
|
||||
{row.taskStatus === 1 || row.taskStatus === 2 ? (
|
||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id)}>
|
||||
{{
|
||||
default: () => $t('common.confirmDelete'),
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@/locales';
|
||||
import { tagColor } from '@/utils/common';
|
||||
import { retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||
import { retryStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||
|
||||
defineOptions({
|
||||
name: 'SceneDetailDrawer'
|
||||
@ -35,7 +35,7 @@ const visible = defineModel<boolean>('visible', {
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryLog.retryStatus')" :span="1">
|
||||
<NTag :type="tagColor(rowData?.retryStatus!)">
|
||||
{{ $t(retryTaskStatusTypeRecord[rowData?.retryStatus!]) }}
|
||||
{{ $t(retryStatusTypeRecord[rowData?.retryStatus!]) }}
|
||||
</NTag>
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryLog.taskType')" :span="1">
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@/locales';
|
||||
import { translateOptions } from '@/utils/common';
|
||||
import { retryTaskStatusTypeOptions } from '@/constants/business';
|
||||
import { retryStatusTypeOptions } from '@/constants/business';
|
||||
import SelectGroup from '@/components/common/select-group.vue';
|
||||
import SelectScene from '@/components/common/select-scene.vue';
|
||||
import DatetimeRange from '@/components/common/datetime-range.vue';
|
||||
@ -17,7 +17,7 @@ interface Emits {
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const model = defineModel<Api.RetryLog.RetryLogSearchParams>('model', { required: true });
|
||||
const model = defineModel<Api.RetryLog.RetryTaskSearchParams>('model', { required: true });
|
||||
|
||||
function reset() {
|
||||
emit('reset');
|
||||
@ -36,20 +36,20 @@ function search() {
|
||||
<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 />
|
||||
</NFormItemGi>
|
||||
<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 />
|
||||
</NFormItemGi>
|
||||
<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 />
|
||||
</NFormItemGi>
|
||||
<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 />
|
||||
</NFormItemGi>
|
||||
<!-- <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 />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<!-- <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 />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<!-- <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 />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.retryStatus')" path="taskBatchStatus" class="pr-24px">
|
||||
<NSelect
|
||||
v-model:value="model.retryStatus"
|
||||
:placeholder="$t('page.retryTask.form.retryStatus')"
|
||||
:options="translateOptions(retryTaskStatusTypeOptions)"
|
||||
:options="translateOptions(retryStatusTypeOptions)"
|
||||
clearable
|
||||
/>
|
||||
</NFormItemGi>
|
||||
|
||||
@ -5,7 +5,12 @@ import OperateDrawer from '@/components/common/operate-drawer.vue';
|
||||
import RouteKey from '@/components/common/route-key.vue';
|
||||
import { $t } from '@/locales';
|
||||
import { fetchAddRetryScene, fetchEditRetryScene, fetchGetNotifyConfigSystemTaskTypeList } from '@/service/api';
|
||||
import { DelayLevel, backOffRecordOptions, enableStatusNumberOptions } from '@/constants/business';
|
||||
import {
|
||||
DelayLevel,
|
||||
backOffRecordOptions,
|
||||
enableStatusNumberOptions,
|
||||
groupConfigYesOrNoOptions
|
||||
} from '@/constants/business';
|
||||
import { isNotNull, translateOptions } from '@/utils/common';
|
||||
|
||||
defineOptions({
|
||||
@ -59,6 +64,10 @@ type Model = Pick<
|
||||
| 'executorTimeout'
|
||||
| 'description'
|
||||
| 'routeKey'
|
||||
| 'cbStatus'
|
||||
| 'cbTriggerType'
|
||||
| 'cbTriggerInterval'
|
||||
| 'cbMaxCount'
|
||||
>;
|
||||
|
||||
onMounted(() => {
|
||||
@ -86,7 +95,11 @@ function createDefaultModel(): Model {
|
||||
deadlineRequest: 60000,
|
||||
executorTimeout: 60,
|
||||
description: '',
|
||||
routeKey: 4
|
||||
routeKey: 4,
|
||||
cbStatus: 0,
|
||||
cbTriggerType: 2,
|
||||
cbTriggerInterval: '60',
|
||||
cbMaxCount: 16
|
||||
};
|
||||
}
|
||||
|
||||
@ -101,6 +114,10 @@ type RuleKey = Extract<
|
||||
| 'deadlineRequest'
|
||||
| 'executorTimeout'
|
||||
| 'routeKey'
|
||||
| 'cbStatus'
|
||||
| 'cbTriggerType'
|
||||
| 'cbTriggerInterval'
|
||||
| 'cbMaxCount'
|
||||
>;
|
||||
|
||||
const rules = {
|
||||
@ -122,7 +139,13 @@ const rules = {
|
||||
],
|
||||
deadlineRequest: [defaultRequiredRule],
|
||||
executorTimeout: [defaultRequiredRule],
|
||||
routeKey: [defaultRequiredRule]
|
||||
routeKey: [defaultRequiredRule],
|
||||
cbStatus: [defaultRequiredRule],
|
||||
cbTriggerType: [defaultRequiredRule],
|
||||
cbMaxCount: [defaultRequiredRule],
|
||||
cbTriggerInterval: [
|
||||
{ ...defaultRequiredRule, validator: () => isNotNull(model.cbTriggerInterval) || model.cbTriggerType === 1 }
|
||||
]
|
||||
} satisfies Record<RuleKey, App.Global.FormRule[]>;
|
||||
|
||||
function handleUpdateModelWhenEdit() {
|
||||
@ -155,7 +178,11 @@ async function handleSubmit() {
|
||||
deadlineRequest,
|
||||
executorTimeout,
|
||||
routeKey,
|
||||
description
|
||||
description,
|
||||
cbStatus,
|
||||
cbTriggerType,
|
||||
cbTriggerInterval,
|
||||
cbMaxCount
|
||||
} = model;
|
||||
const { error } = await fetchAddRetryScene({
|
||||
groupName,
|
||||
@ -168,7 +195,11 @@ async function handleSubmit() {
|
||||
deadlineRequest,
|
||||
executorTimeout,
|
||||
routeKey,
|
||||
description
|
||||
description,
|
||||
cbStatus,
|
||||
cbTriggerType,
|
||||
cbTriggerInterval,
|
||||
cbMaxCount
|
||||
});
|
||||
if (error) return;
|
||||
window.$message?.success($t('common.addSuccess'));
|
||||
@ -187,7 +218,11 @@ async function handleSubmit() {
|
||||
deadlineRequest,
|
||||
executorTimeout,
|
||||
routeKey,
|
||||
description
|
||||
description,
|
||||
cbStatus,
|
||||
cbTriggerType,
|
||||
cbTriggerInterval,
|
||||
cbMaxCount
|
||||
} = model;
|
||||
const { error } = await fetchEditRetryScene({
|
||||
id,
|
||||
@ -201,7 +236,11 @@ async function handleSubmit() {
|
||||
deadlineRequest,
|
||||
executorTimeout,
|
||||
routeKey,
|
||||
description
|
||||
description,
|
||||
cbStatus,
|
||||
cbTriggerType,
|
||||
cbTriggerInterval,
|
||||
cbMaxCount
|
||||
});
|
||||
if (error) return;
|
||||
window.$message?.success($t('common.updateSuccess'));
|
||||
@ -238,149 +277,226 @@ watch(
|
||||
<template>
|
||||
<OperateDrawer v-model="visible" :title="title" :min-size="480" @handle-submit="handleSubmit">
|
||||
<NForm ref="formRef" :model="model" :rules="rules">
|
||||
<NFormItem :label="$t('page.retryScene.sceneName')" path="sceneName">
|
||||
<NInput
|
||||
v-model:value="model.sceneName"
|
||||
:disabled="props.operateType === 'edit'"
|
||||
:maxlength="64"
|
||||
show-count
|
||||
:placeholder="$t('page.retryScene.form.sceneName')"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryScene.groupName')" path="groupName">
|
||||
<SelectGroup v-model:value="model.groupName" :disabled="props.operateType === 'edit'" />
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryScene.sceneStatus')" path="sceneStatus">
|
||||
<NRadioGroup v-model:value="model.sceneStatus" name="sceneStatus">
|
||||
<NSpace>
|
||||
<NRadio
|
||||
v-for="item in enableStatusNumberOptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="$t(item.label)"
|
||||
<NCollapse :default-expanded-names="['1', '2']">
|
||||
<NCollapseItem :title="$t('page.retryScene.baseConfig')" name="1">
|
||||
<NFormItem :label="$t('page.retryScene.sceneName')" path="sceneName">
|
||||
<NInput
|
||||
v-model:value="model.sceneName"
|
||||
:disabled="props.operateType === 'edit'"
|
||||
:maxlength="64"
|
||||
show-count
|
||||
:placeholder="$t('page.retryScene.form.sceneName')"
|
||||
/>
|
||||
</NSpace>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||
<NGi>
|
||||
<NFormItem :label="$t('common.routeKey.routeLabel')" path="routeKey">
|
||||
<RouteKey v-model:value="model.routeKey" />
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.maxRetryCount')" path="maxRetryCount">
|
||||
<NFormItem :label="$t('page.retryScene.groupName')" path="groupName">
|
||||
<SelectGroup v-model:value="model.groupName" :disabled="props.operateType === 'edit'" />
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryScene.sceneStatus')" path="sceneStatus">
|
||||
<NRadioGroup v-model:value="model.sceneStatus" name="sceneStatus">
|
||||
<NSpace>
|
||||
<NRadio
|
||||
v-for="item in enableStatusNumberOptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="$t(item.label)"
|
||||
/>
|
||||
</NSpace>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||
<NGi>
|
||||
<NFormItem :label="$t('common.routeKey.routeLabel')" path="routeKey">
|
||||
<RouteKey v-model:value="model.routeKey" />
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.maxRetryCount')" path="maxRetryCount">
|
||||
<NInputNumber
|
||||
v-model:value="model.maxRetryCount"
|
||||
:min="1"
|
||||
:max="model.backOff === 1 ? 26 : 9999999"
|
||||
:placeholder="$t('page.retryScene.form.maxRetryCount')"
|
||||
clearable
|
||||
/>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.backOff')" path="backOff">
|
||||
<NSelect
|
||||
v-model:value="model.backOff"
|
||||
:placeholder="$t('page.retryScene.form.backOff')"
|
||||
:options="translateOptions(backOffRecordOptions)"
|
||||
clearable
|
||||
/>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NFormItem path="triggerInterval">
|
||||
<SceneTriggerInterval
|
||||
v-if="model.backOff !== 1"
|
||||
v-model="model.triggerInterval"
|
||||
:back-off="model.backOff"
|
||||
/>
|
||||
<NInput
|
||||
v-else
|
||||
v-model:value="delayLevelDesc"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 1, maxRows: 3 }"
|
||||
readonly
|
||||
/>
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
{{ $t('page.retryScene.triggerInterval') }}
|
||||
<NTooltip v-if="model.backOff === 1" trigger="hover">
|
||||
<template #trigger>
|
||||
<NButton text class="ml-6px">
|
||||
<SvgIcon icon="ant-design:info-circle-outlined" class="mb-1px text-16px" />
|
||||
</NButton>
|
||||
</template>
|
||||
延迟等级是参考RocketMQ的messageDelayLevel设计实现,具体延迟时间如下:
|
||||
【10s,15s,30s,35s,40s,50s,1m,2m,4m,6m,8m,10m,20m,40m,1h,2h,3h,4h,5h,6h,7h,8h,9h,10h,11h,12h】
|
||||
<br />
|
||||
<NText strong>执行逻辑:</NText>
|
||||
<NUl align-text>
|
||||
<NLi>第一次执行间隔10s</NLi>
|
||||
<NLi>第二次执行间隔15s</NLi>
|
||||
<NLi>l第二次执行间隔30s</NLi>
|
||||
<NLi>........... 依次类推</NLi>
|
||||
</NUl>
|
||||
</NTooltip>
|
||||
</div>
|
||||
</template>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.executorTimeout')" path="executorTimeout">
|
||||
<NInputGroup>
|
||||
<NInputNumber
|
||||
v-model:value="model.executorTimeout"
|
||||
:min="1"
|
||||
:max="60"
|
||||
:placeholder="$t('page.retryScene.form.executorTimeout')"
|
||||
clearable
|
||||
/>
|
||||
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||
</NInputGroup>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.deadlineRequest')" path="deadlineRequest">
|
||||
<NInputGroup>
|
||||
<NInputNumber
|
||||
v-model:value="model.deadlineRequest"
|
||||
:min="100"
|
||||
:max="60000"
|
||||
:placeholder="$t('page.retryScene.form.deadlineRequest')"
|
||||
clearable
|
||||
/>
|
||||
<NInputGroupLabel>{{ $t('common.millisecond') }}</NInputGroupLabel>
|
||||
</NInputGroup>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NFormItem :label="$t('page.retryScene.notifyName')" path="notifyIds">
|
||||
<NSelect
|
||||
v-model:value="model.notifyIds"
|
||||
value-field="id"
|
||||
label-field="notifyName"
|
||||
:placeholder="$t('page.retryScene.form.notifyName')"
|
||||
:options="notifyNameList"
|
||||
clearable
|
||||
multiple
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryScene.description')" path="description">
|
||||
<NInput
|
||||
v-model:value="model.description"
|
||||
type="textarea"
|
||||
:maxlength="256"
|
||||
:placeholder="$t('page.retryScene.form.description')"
|
||||
show-count
|
||||
clearable
|
||||
/>
|
||||
</NFormItem>
|
||||
</NCollapseItem>
|
||||
<NCollapseItem :title="$t('page.retryScene.cbConfig')" name="2">
|
||||
<NFormItem :label="$t('page.retryScene.cbStatus')" path="cbStatus">
|
||||
<NRadioGroup v-model:value="model.cbStatus" name="cbStatus">
|
||||
<NSpace>
|
||||
<NRadio
|
||||
v-for="item in groupConfigYesOrNoOptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="$t(item.label)"
|
||||
/>
|
||||
</NSpace>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.cbTriggerType')" path="cbTriggerType">
|
||||
<NSelect
|
||||
v-model:value="model.cbTriggerType"
|
||||
:placeholder="$t('page.retryScene.form.cbTriggerType')"
|
||||
:options="translateOptions(backOffRecordOptions)"
|
||||
clearable
|
||||
/>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NFormItem path="cbTriggerInterval">
|
||||
<SceneTriggerInterval
|
||||
v-if="model.cbTriggerType !== 1"
|
||||
v-model="model.cbTriggerInterval"
|
||||
:back-off="model.cbTriggerType"
|
||||
/>
|
||||
<NInput
|
||||
v-else
|
||||
v-model:value="delayLevelDesc"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 1, maxRows: 3 }"
|
||||
readonly
|
||||
/>
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
{{ $t('page.retryScene.cbTriggerInterval') }}
|
||||
<NTooltip v-if="model.cbTriggerType === 1" trigger="hover">
|
||||
<template #trigger>
|
||||
<NButton text class="ml-6px">
|
||||
<SvgIcon icon="ant-design:info-circle-outlined" class="mb-1px text-16px" />
|
||||
</NButton>
|
||||
</template>
|
||||
延迟等级是参考RocketMQ的messageDelayLevel设计实现,具体延迟时间如下:
|
||||
【10s,15s,30s,35s,40s,50s,1m,2m,4m,6m,8m,10m,20m,40m,1h,2h,3h,4h,5h,6h,7h,8h,9h,10h,11h,12h】
|
||||
<br />
|
||||
<NText strong>执行逻辑:</NText>
|
||||
<NUl align-text>
|
||||
<NLi>第一次执行间隔10s</NLi>
|
||||
<NLi>第二次执行间隔15s</NLi>
|
||||
<NLi>l第二次执行间隔30s</NLi>
|
||||
<NLi>........... 依次类推</NLi>
|
||||
</NUl>
|
||||
</NTooltip>
|
||||
</div>
|
||||
</template>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NFormItem :label="$t('page.retryScene.cbMaxCount')" path="cbMaxCount">
|
||||
<NInputNumber
|
||||
v-model:value="model.maxRetryCount"
|
||||
v-model:value="model.cbMaxCount"
|
||||
:min="1"
|
||||
:max="model.backOff === 1 ? 26 : 9999999"
|
||||
:placeholder="$t('page.retryScene.form.maxRetryCount')"
|
||||
:placeholder="$t('page.retryScene.form.cbMaxCount')"
|
||||
clearable
|
||||
/>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.backOff')" path="backOff">
|
||||
<NSelect
|
||||
v-model:value="model.backOff"
|
||||
:placeholder="$t('page.retryScene.form.backOff')"
|
||||
:options="translateOptions(backOffRecordOptions)"
|
||||
clearable
|
||||
/>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NFormItem path="triggerInterval">
|
||||
<SceneTriggerInterval
|
||||
v-if="model.backOff !== 1"
|
||||
v-model="model.triggerInterval"
|
||||
:back-off="model.backOff"
|
||||
/>
|
||||
<NInput
|
||||
v-else
|
||||
v-model:value="delayLevelDesc"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 1, maxRows: 3 }"
|
||||
readonly
|
||||
/>
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
{{ $t('page.retryScene.triggerInterval') }}
|
||||
<NTooltip v-if="model.backOff === 1" trigger="hover">
|
||||
<template #trigger>
|
||||
<NButton text class="ml-6px">
|
||||
<SvgIcon icon="ant-design:info-circle-outlined" class="mb-1px text-16px" />
|
||||
</NButton>
|
||||
</template>
|
||||
延迟等级是参考RocketMQ的messageDelayLevel设计实现,具体延迟时间如下:
|
||||
【10s,15s,30s,35s,40s,50s,1m,2m,4m,6m,8m,10m,20m,40m,1h,2h,3h,4h,5h,6h,7h,8h,9h,10h,11h,12h】
|
||||
<br />
|
||||
<NText strong>执行逻辑:</NText>
|
||||
<NUl align-text>
|
||||
<NLi>第一次执行间隔10s</NLi>
|
||||
<NLi>第二次执行间隔15s</NLi>
|
||||
<NLi>l第二次执行间隔30s</NLi>
|
||||
<NLi>........... 依次类推</NLi>
|
||||
</NUl>
|
||||
</NTooltip>
|
||||
</div>
|
||||
</template>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.executorTimeout')" path="executorTimeout">
|
||||
<NInputGroup>
|
||||
<NInputNumber
|
||||
v-model:value="model.executorTimeout"
|
||||
:min="1"
|
||||
:max="60"
|
||||
:placeholder="$t('page.retryScene.form.executorTimeout')"
|
||||
clearable
|
||||
/>
|
||||
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||
</NInputGroup>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NFormItem :label="$t('page.retryScene.deadlineRequest')" path="deadlineRequest">
|
||||
<NInputGroup>
|
||||
<NInputNumber
|
||||
v-model:value="model.deadlineRequest"
|
||||
:min="100"
|
||||
:max="60000"
|
||||
:placeholder="$t('page.retryScene.form.deadlineRequest')"
|
||||
clearable
|
||||
/>
|
||||
<NInputGroupLabel>{{ $t('common.millisecond') }}</NInputGroupLabel>
|
||||
</NInputGroup>
|
||||
</NFormItem>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
<NFormItem :label="$t('page.retryScene.notifyName')" path="notifyIds">
|
||||
<NSelect
|
||||
v-model:value="model.notifyIds"
|
||||
value-field="id"
|
||||
label-field="notifyName"
|
||||
:placeholder="$t('page.retryScene.form.notifyName')"
|
||||
:options="notifyNameList"
|
||||
clearable
|
||||
multiple
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryScene.description')" path="description">
|
||||
<NInput
|
||||
v-model:value="model.description"
|
||||
type="textarea"
|
||||
:maxlength="256"
|
||||
:placeholder="$t('page.retryScene.form.description')"
|
||||
show-count
|
||||
clearable
|
||||
/>
|
||||
</NFormItem>
|
||||
</NCollapseItem>
|
||||
</NCollapse>
|
||||
</NForm>
|
||||
<template #footer>
|
||||
<NSpace :size="16">
|
||||
|
||||
@ -14,7 +14,7 @@ import {
|
||||
import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||
import { retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||
import { retryStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||
import { tagColor } from '@/utils/common';
|
||||
import RetryTaskOperateDrawer from './modules/retry-task-operate-drawer.vue';
|
||||
import RetryTaskBatchAddDrawer from './modules/retry-task-batch-add-drawer.vue';
|
||||
@ -33,7 +33,6 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
apiParams: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
uniqueId: null,
|
||||
groupName: null,
|
||||
sceneName: null,
|
||||
idempotentId: null,
|
||||
@ -51,14 +50,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
key: 'id',
|
||||
title: $t('common.index'),
|
||||
align: 'center',
|
||||
width: 64
|
||||
},
|
||||
{
|
||||
key: 'uniqueId',
|
||||
title: $t('page.retryTask.uniqueId'),
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
minWidth: 120,
|
||||
width: 64,
|
||||
render: row => {
|
||||
async function showDetailDrawer() {
|
||||
await loadRetryInfo(row);
|
||||
@ -67,7 +59,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
|
||||
return (
|
||||
<n-button text tag="a" type="primary" onClick={showDetailDrawer} class="ws-normal">
|
||||
{row.uniqueId}
|
||||
{row.id}
|
||||
</n-button>
|
||||
);
|
||||
}
|
||||
@ -109,7 +101,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
if (row.retryStatus === null) {
|
||||
return null;
|
||||
}
|
||||
const label = $t(retryTaskStatusTypeRecord[row.retryStatus!]);
|
||||
const label = $t(retryStatusTypeRecord[row.retryStatus!]);
|
||||
|
||||
return <NTag type={tagColor(row.retryStatus!)}>{label}</NTag>;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import OperateDrawer from '@/components/common/operate-drawer.vue';
|
||||
import { $t } from '@/locales';
|
||||
import { fetchBatchAddRetryTask } from '@/service/api';
|
||||
import { translateOptions } from '@/utils/common';
|
||||
import { retryTaskStatusTypeOptions } from '@/constants/business';
|
||||
import { retryStatusTypeOptions } from '@/constants/business';
|
||||
import SelectGroup from '@/components/common/select-group.vue';
|
||||
|
||||
defineOptions({
|
||||
@ -78,7 +78,7 @@ watch(visible, () => {
|
||||
<NSelect
|
||||
v-model:value="model.retryStatus"
|
||||
:placeholder="$t('page.retryTask.form.retryStatus')"
|
||||
:options="translateOptions(retryTaskStatusTypeOptions)"
|
||||
:options="translateOptions(retryStatusTypeOptions)"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryTask.form.logStr')" path="logStr">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import { onBeforeUnmount, ref } from 'vue';
|
||||
import { $t } from '@/locales';
|
||||
import { tagColor } from '@/utils/common';
|
||||
import { retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||
import { retryStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||
import { fetchRetryLogList } from '@/service/api/log';
|
||||
|
||||
defineOptions({
|
||||
@ -90,7 +90,7 @@ onBeforeUnmount(() => {
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.retryStatus')" :span="1">
|
||||
<NTag :type="tagColor(rowData?.retryStatus!)">
|
||||
{{ $t(retryTaskStatusTypeRecord[rowData?.retryStatus!]) }}
|
||||
{{ $t(retryStatusTypeRecord[rowData?.retryStatus!]) }}
|
||||
</NTag>
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.retryTask.taskType')" :span="1">
|
||||
|
||||
@ -5,7 +5,7 @@ import OperateDrawer from '@/components/common/operate-drawer.vue';
|
||||
import { $t } from '@/locales';
|
||||
import { fetchAddRetryTask, fetchIdempotentIdGenerate } from '@/service/api';
|
||||
import { translateOptions } from '@/utils/common';
|
||||
import { retryTaskStatusTypeOptions } from '@/constants/business';
|
||||
import { retryStatusTypeOptions } from '@/constants/business';
|
||||
import CodeMirror from '@/components/common/code-mirror.vue';
|
||||
import SelectGroup from '@/components/common/select-group.vue';
|
||||
import SelectScene from '@/components/common/select-scene.vue';
|
||||
@ -224,7 +224,7 @@ async function setIdempotentId() {
|
||||
<NSelect
|
||||
v-model:value="model.retryStatus"
|
||||
:placeholder="$t('page.retryTask.form.retryStatus')"
|
||||
:options="translateOptions(retryTaskStatusTypeOptions)"
|
||||
:options="translateOptions(retryStatusTypeOptions)"
|
||||
/>
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@/locales';
|
||||
import { translateOptions } from '@/utils/common';
|
||||
import { retryTaskStatusTypeOptions } from '@/constants/business';
|
||||
import { retryStatusTypeOptions } from '@/constants/business';
|
||||
import SelectGroup from '@/components/common/select-group.vue';
|
||||
import SelectScene from '@/components/common/select-scene.vue';
|
||||
|
||||
@ -35,9 +35,9 @@ function search() {
|
||||
<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 />
|
||||
</NFormItemGi>
|
||||
<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 />
|
||||
</NFormItemGi>
|
||||
<!-- <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 />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<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 />
|
||||
</NFormItemGi>
|
||||
@ -48,7 +48,7 @@ function search() {
|
||||
<NSelect
|
||||
v-model:value="model.retryStatus"
|
||||
:placeholder="$t('page.retryTask.form.retryStatus')"
|
||||
:options="translateOptions(retryTaskStatusTypeOptions)"
|
||||
:options="translateOptions(retryStatusTypeOptions)"
|
||||
clearable
|
||||
/>
|
||||
</NFormItemGi>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user