feat(1.4.0-beta1): 1. 修改retry-log改为 retry-task 2. 调试重试任务列表

This commit is contained in:
opensnail 2025-02-18 23:00:33 +08:00
parent c9d5cc8fba
commit 27546ed6bb
18 changed files with 117 additions and 101 deletions

View File

@ -25,7 +25,7 @@ interface Props {
title?: string;
drawer?: boolean;
type?: 'job' | 'retry';
taskData?: Api.Job.JobTask | Api.RetryLog.RetryLog | Api.RetryTask.RetryTask;
taskData?: Api.Job.JobTask | Api.RetryTask.RetryTask;
modelValue?: Api.JobLog.JobMessage[];
}
@ -90,10 +90,10 @@ async function getLogList() {
}
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({
groupName: taskData.groupName,
uniqueId: taskData.uniqueId!,
retryTaskId: taskData.id!,
startId,
fromIndex,
size: 50
@ -208,8 +208,8 @@ function openNewTab() {
if (props.type === 'retry') {
query = {
type: props.type,
groupName: (props.taskData as Api.RetryLog.RetryLog | Api.RetryTask.RetryTask).groupName,
uniqueId: (props.taskData as Api.RetryLog.RetryLog | Api.RetryTask.RetryTask).uniqueId
groupName: (props.taskData as Api.RetryTask.RetryTask | Api.Retry.Retry).groupName,
retryTaskId: (props.taskData as Api.RetryTask.RetryTask).id
};
}
const url = router.resolve({ path: '/log', query });

View File

@ -89,7 +89,7 @@ export const groupConfigYesOrNoRecord: Record<Api.GroupConfig.YesOrNoType, App.I
};
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',
1: 'page.retryTask.retryStatusType.finished',
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 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 retryTaskStatusTypeRecord: Record<Api.Retry.RetryTaskStatusType, App.I18n.I18nKey> = {
1: 'common.retryTaskStatus.items.waiting',
2: 'common.retryTaskStatus.items.running',
3: 'common.retryTaskStatus.items.success',
4: 'common.retryTaskStatus.items.fail',
5: 'common.retryTaskStatus.items.stop',
6: 'common.retryTaskStatus.items.cancel'
};
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',
2: 'page.retryTask.taskTypeDict.callback'
};

View File

@ -176,6 +176,18 @@ const local: App.I18n.Schema = {
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: {
label: '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..',
cbTriggerType: 'Please select the retry trigger time',
cbTriggerInterval: 'Please enter trigger interval',
cbMaxCount: 'Please enter Maximum number of callback',
cbMaxCount: 'Please enter Maximum number of callback'
},
addScene: 'Add Scenes',
editScene: 'Add Scenes',

View File

@ -176,6 +176,18 @@ const local: App.I18n.Schema = {
skip: '跳过'
}
},
retryTaskStatus: {
label: '执行状态',
form: '请选择执行状态',
items: {
waiting: '待处理',
running: '运行中',
success: '处理成功',
fail: '处理失败',
stop: '任务停止',
cancel: '取消'
}
},
taskStatus: {
label: '状态',
form: '请选择状态',

View File

@ -7,7 +7,7 @@ export * from './notify';
export * from './group';
export * from './retry';
export * from './retry-scene';
export * from './retry-log';
export * from './retry-task';
export * from './retry-dead-letter';
export * from './workflow';
export * from './job';

View File

@ -13,7 +13,7 @@ export function fetchJobLogList(params?: Api.JobLog.JobLogSearchParams, controll
/** get Retry Log List */
export function fetchRetryLogList(params?: Api.JobLog.RetryLogSearchParams) {
return request<Api.JobLog.JobLogList>({
url: '/retry-task-log/message/list',
url: '/retry-task/message/list',
method: 'get',
params
});

View File

@ -1,8 +1,8 @@
import { request } from '../request';
/** get retry log list */
export function fetchRetryLogPageList(params?: Api.RetryLog.RetryTaskSearchParams) {
return request<Api.RetryLog.RetryLogList>({
export function fetchRetryLogPageList(params?: Api.RetryTask.RetryTaskSearchParams) {
return request<Api.RetryTask.RetryTaskList>({
url: '/retry-task/list',
method: 'get',
params
@ -11,7 +11,7 @@ export function fetchRetryLogPageList(params?: Api.RetryLog.RetryTaskSearchParam
/** get retry log list */
export function fetchRetryLogById(id: string) {
return request<Api.RetryLog.RetryLog>({
return request<Api.RetryTask.RetryTask>({
url: `/retry-task/${id}`,
method: 'get'
});

View File

@ -1,8 +1,8 @@
import { request } from '../request';
/** get retryTask list */
export function fetchGetRetryTaskList(params?: Api.RetryTask.RetryTaskSearchParams) {
return request<Api.RetryTask.RetryTaskList>({
export function fetchGetRetryTaskList(params?: Api.Retry.RetrySearchParams) {
return request<Api.Retry.RetryList>({
url: '/retry/list',
method: 'get',
params
@ -11,14 +11,14 @@ export function fetchGetRetryTaskList(params?: Api.RetryTask.RetryTaskSearchPara
/** get retryTask */
export function fetchGetRetryTaskById(id: string, groupName: string) {
return request<Api.RetryTask.RetryTask>({
return request<Api.Retry.Retry>({
url: `/retry/${id}?groupName=${groupName}`,
method: 'get'
});
}
/** add retryTask */
export function fetchAddRetryTask(data: Api.RetryTask.RetryTask) {
export function fetchAddRetryTask(data: Api.Retry.Retry) {
return request<boolean>({
url: '/retry',
method: 'post',
@ -27,7 +27,7 @@ export function fetchAddRetryTask(data: Api.RetryTask.RetryTask) {
}
/** batch add retryTask */
export function fetchBatchAddRetryTask(data: Api.RetryTask.RetryTaskBatchAdd) {
export function fetchBatchAddRetryTask(data: Api.Retry.RetryTaskBatchAdd) {
return request<boolean>({
url: '/retry/batch',
method: 'post',
@ -36,7 +36,7 @@ export function fetchBatchAddRetryTask(data: Api.RetryTask.RetryTaskBatchAdd) {
}
/** edit retryTask */
export function fetchEditRetryTask(data: Api.RetryTask.RetryTask) {
export function fetchEditRetryTask(data: Api.Retry.Retry) {
return request<boolean>({
url: '/retry',
method: 'put',
@ -45,7 +45,7 @@ export function fetchEditRetryTask(data: Api.RetryTask.RetryTask) {
}
/** update retryTask status */
export function fetchUpdateRetryTaskStatus(data: Api.RetryTask.RetryTaskUpdateStatusRequest) {
export function fetchUpdateRetryTaskStatus(data: Api.Retry.RetryTaskUpdateStatusRequest) {
return request<boolean>({
url: '/retry/status',
method: 'put',
@ -54,7 +54,7 @@ export function fetchUpdateRetryTaskStatus(data: Api.RetryTask.RetryTaskUpdateSt
}
/** manual execute retryTask */
export function fetchExecuteRetryTask(data: Api.RetryTask.ManualTriggerTaskRequestVO) {
export function fetchExecuteRetryTask(data: Api.Retry.ManualTriggerTaskRequestVO) {
return request<boolean>({
url: '/retry/manual/trigger/retry/task',
method: 'post',
@ -63,7 +63,7 @@ export function fetchExecuteRetryTask(data: Api.RetryTask.ManualTriggerTaskReque
}
/** manual execute callbackTask */
export function fetchExecuteCallbackTask(data: Api.RetryTask.ManualTriggerTaskRequestVO) {
export function fetchExecuteCallbackTask(data: Api.Retry.ManualTriggerTaskRequestVO) {
return request<boolean>({
url: '/retry/manual/trigger/callback/task',
method: 'post',
@ -72,7 +72,7 @@ export function fetchExecuteCallbackTask(data: Api.RetryTask.ManualTriggerTaskRe
}
/** batch delete retryTask */
export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTaskVO) {
export function fetchBatchDeleteRetryTask(data: Api.Retry.BatchDeleteRetryTaskVO) {
return request<number>({
url: '/retry/batch',
method: 'delete',
@ -81,7 +81,7 @@ export function fetchBatchDeleteRetryTask(data: Api.RetryTask.BatchDeleteRetryTa
}
/** generate retryTask idempotent id */
export function fetchIdempotentIdGenerate(data: Api.RetryTask.GenerateRetryIdempotentIdVO) {
export function fetchIdempotentIdGenerate(data: Api.Retry.GenerateRetryIdempotentIdVO) {
return request<string>({
url: '/retry/generate/idempotent-id',
method: 'post',

29
src/typings/api.d.ts vendored
View File

@ -742,7 +742,7 @@ declare namespace Api {
*
* backend api module: "retryTask"
*/
namespace RetryTask {
namespace Retry {
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'page' | 'size'>;
type RetryStatusType = 0 | 1 | 2 | 3;
@ -752,9 +752,7 @@ declare namespace Api {
type TaskType = 1 | 2;
/** RetryTask */
type RetryTask = Common.CommonRecord<{
/** UniqueId */
uniqueId?: string;
type Retry = Common.CommonRecord<{
/** 组名称 */
groupName: string;
/** 场景名称 */
@ -799,7 +797,7 @@ declare namespace Api {
type ManualTriggerTaskRequestVO = {
groupName: string;
uniqueIds: string[];
retryIds: number[];
};
type BatchDeleteRetryTaskVO = {
@ -819,13 +817,12 @@ declare namespace Api {
};
/** RetryTask search params */
type RetryTaskSearchParams = CommonType.RecordNullable<
Pick<Api.RetryTask.RetryTask, 'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'retryStatus'> &
CommonSearchParams
type RetrySearchParams = CommonType.RecordNullable<
Pick<Api.Retry.Retry, 'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'retryStatus'> & CommonSearchParams
>;
/** RetryTask list */
type RetryTaskList = Common.PaginatingQueryRecord<RetryTask>;
type RetryList = Common.PaginatingQueryRecord<Retry>;
}
/**
@ -1223,13 +1220,13 @@ declare namespace Api {
*
* backend api module: "retryLog"
*/
namespace RetryLog {
import TaskType = Api.RetryTask.TaskType;
import RetryTaskStatusType = Api.RetryTask.RetryTaskStatusType;
namespace RetryTask {
import TaskType = Api.Retry.TaskType;
import RetryTaskStatusType = Api.Retry.RetryTaskStatusType;
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'page' | 'size'>;
/** retryLog */
type RetryLog = Common.CommonRecord<{
type RetryTask = Common.CommonRecord<{
/** UniqueId */
retryId: string;
/** 组名称 */
@ -1250,12 +1247,12 @@ declare namespace Api {
/** retryLog search params */
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] }
>;
/** retryLog list */
type RetryLogList = Common.PaginatingQueryRecord<RetryLog>;
type RetryTaskList = Common.PaginatingQueryRecord<RetryTask>;
}
/**
* namespace UserManager
@ -1323,7 +1320,7 @@ declare namespace Api {
type RetryLogSearchParams = {
groupName: string;
uniqueId: string;
retryTaskId: string;
} & LogSearchParams;
type LogSearchParams = {

12
src/typings/app.d.ts vendored
View File

@ -457,6 +457,18 @@ declare namespace App {
skip: string;
};
};
retryTaskStatus: {
label: string;
form: string;
items: {
waiting: string;
running: string;
success: string;
fail: string;
stop: string;
cancel: string;
};
};
taskStatus: {
label: string;
form: string;

View File

@ -14,7 +14,7 @@ import RetryLogDetailDrawer from './modules/retry-log-detail-drawer.vue';
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 taskStatus = history.state.taskStatus;
@ -155,9 +155,9 @@ async function handleDelete(id: any) {
onDeleted();
}
async function loadRetryInfo(row: Api.RetryLog.RetryLog) {
async function loadRetryInfo(row: Api.RetryTask.RetryTask) {
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>

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { $t } from '@/locales';
import { tagColor } from '@/utils/common';
import { retryStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
import { retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
defineOptions({
name: 'SceneDetailDrawer'
@ -9,7 +9,7 @@ defineOptions({
interface Props {
/** row data */
rowData?: Api.RetryLog.RetryLog | null;
rowData?: Api.RetryTask.RetryTask | null;
}
defineProps<Props>();
@ -24,9 +24,6 @@ const visible = defineModel<boolean>('visible', {
<NTabs type="segment" animated>
<NTabPane :name="0" :tab="$t('page.log.info')">
<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">
{{ rowData?.groupName }}
</NDescriptionsItem>
@ -34,21 +31,13 @@ const visible = defineModel<boolean>('visible', {
{{ rowData?.sceneName }}
</NDescriptionsItem>
<NDescriptionsItem :label="$t('page.retryLog.retryStatus')" :span="1">
<NTag :type="tagColor(rowData?.retryStatus!)">
{{ $t(retryStatusTypeRecord[rowData?.retryStatus!]) }}
<NTag :type="tagColor(rowData?.taskStatus!)">
{{ $t(retryTaskStatusTypeRecord[rowData?.taskStatus!]) }}
</NTag>
</NDescriptionsItem>
<NDescriptionsItem :label="$t('page.retryLog.taskType')" :span="1">
<NTag :type="tagColor(rowData?.taskType!)">{{ $t(retryTaskTypeRecord[rowData?.taskType!]) }}</NTag>
</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>
</NDescriptions>
</NTabPane>

View File

@ -17,7 +17,7 @@ interface 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() {
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">
<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"
v-model:value="model.taskStatus"
:placeholder="$t('page.retryTask.form.retryStatus')"
:options="translateOptions(retryStatusTypeOptions)"
clearable

View File

@ -22,7 +22,7 @@ import RetryTaskSearch from './modules/retry-task-search.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);
@ -50,7 +50,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
key: 'id',
title: $t('common.index'),
align: 'center',
width: 64,
width: 128,
render: row => {
async function showDetailDrawer() {
await loadRetryInfo(row);
@ -115,7 +115,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
if (row.taskType === null) {
return null;
}
const tagMap: Record<Api.RetryTask.TaskType, NaiveUI.ThemeColor> = {
const tagMap: Record<Api.Retry.TaskType, NaiveUI.ThemeColor> = {
1: 'warning',
2: 'error'
};
@ -151,7 +151,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
{/* 非[完成,最大次数], 显示[执行]按钮 */}
{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'),
trigger: () => (
@ -256,9 +256,9 @@ async function handleDelete(groupName: string, id: string) {
onDeleted();
}
async function loadRetryInfo(row: Api.RetryTask.RetryTask) {
async function loadRetryInfo(row: Api.Retry.Retry) {
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() {
@ -274,14 +274,14 @@ function handleBatchAdd() {
openBatchAddDrawer();
}
function handleExecute(groupName: string, uniqueId: string, type: Api.RetryTask.TaskType) {
function handleExecute(groupName: string, retryId: number, type: Api.Retry.TaskType) {
if (type === 1) {
fetchExecuteRetryTask({ groupName, uniqueIds: [uniqueId] });
fetchExecuteRetryTask({ groupName, retryIds: [retryId] });
return;
}
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);
}
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 });
if (error) return;
window.$message?.success($t('common.updateSuccess'));

View File

@ -25,7 +25,7 @@ const visible = defineModel<boolean>('visible', {
const { formRef, validate, restoreValidation } = useNaiveForm();
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());

View File

@ -11,7 +11,7 @@ defineOptions({
interface Props {
/** row data */
rowData?: Api.RetryTask.RetryTask | null;
rowData?: Api.Retry.Retry | null;
}
const props = defineProps<Props>();
@ -30,7 +30,7 @@ let fromIndex: number = 0;
async function getLogList() {
const { data: logData, error } = await fetchRetryLogList({
groupName: props.rowData!.groupName,
uniqueId: props.rowData!.uniqueId!,
retryTaskId: props.rowData!.id! as any,
startId,
fromIndex,
size: 50
@ -73,9 +73,6 @@ onBeforeUnmount(() => {
<NTabs type="segment" animated @update:value="handleUpdateTab">
<NTabPane :name="0" :tab="$t('page.log.info')">
<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">
{{ rowData?.groupName }}
</NDescriptionsItem>
@ -108,9 +105,6 @@ onBeforeUnmount(() => {
<NDescriptionsItem :label="$t('common.updateDt')" :span="1">{{ rowData?.updateDt }}</NDescriptionsItem>
</NDescriptions>
</NTabPane>
<NTabPane :name="1" :tab="$t('page.log.title')" display-directive="if">
<LogDrawer :drawer="false" type="retry" :task-data="rowData!" />
</NTabPane>
</NTabs>
</OperateDrawer>
</template>

View File

@ -18,7 +18,7 @@ interface Props {
/** the type of operation */
operateType: NaiveUI.TableOperateType;
/** the edit row data */
rowData?: Api.RetryTask.RetryTask | null;
rowData?: Api.Retry.Retry | null;
}
const props = defineProps<Props>();
@ -46,7 +46,7 @@ const title = computed(() => {
});
type Model = Pick<
Api.RetryTask.RetryTask,
Api.Retry.Retry,
'groupName' | 'sceneName' | 'idempotentId' | 'bizNo' | 'executorName' | 'argsStr' | 'retryStatus'
>;

View File

@ -16,7 +16,7 @@ interface 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() {
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">
<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>