feat(sj_1.0.0_beta3): 优化定时任务时间单位和重试场景单位

This commit is contained in:
opensnail 2024-05-28 22:26:14 +08:00
parent 40c289b725
commit 61e24330b6
7 changed files with 50 additions and 34 deletions

View File

@ -64,7 +64,7 @@ watch(
<div>
<NInputGroup v-if="triggerType === 2">
<NInputNumber v-model:value="interval" :placeholder="$t('page.jobTask.form.triggerInterval')" />
<NInputGroupLabel></NInputGroupLabel>
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
</NInputGroup>
<CronInput
v-else-if="triggerType === 3"

View File

@ -2,6 +2,7 @@
import { ref, watch } from 'vue';
import CronInput from '@sa/cron-input';
import { useAppStore } from '@/store/modules/app';
import { $t } from '@/locales';
defineOptions({
name: 'SceneTriggerInterval'
@ -62,12 +63,11 @@ watch(
<template>
<CronInput v-if="backOff === 3" v-model="cron" :lang="app.locale" />
<NInputNumber
v-else-if="backOff === 2 || backOff === 4"
v-model:value="interval"
:placeholder="$t('page.retryScene.form.triggerInterval')"
clearable
/>
<NInputGroup v-else-if="backOff === 2 || backOff === 4">
<NInputNumber v-model:value="interval" :placeholder="$t('page.retryScene.form.triggerInterval')" clearable />
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
</NInputGroup>
</template>
<style scoped></style>

View File

@ -25,6 +25,8 @@ const local: App.I18n.Schema = {
deleteSuccess: 'Delete Success',
confirmDelete: 'Are you sure you want to delete?',
checkUploadType: 'Only JSON format files can be uploaded, please re-upload',
second: 's',
millisecond: 'ms',
import: 'import',
export: 'export',
batchCopy: 'BatchCopy',
@ -865,9 +867,9 @@ const local: App.I18n.Schema = {
sceneStatus: 'State',
backOff: 'Backoff strategy',
maxRetryCount: 'Maximum number of retries',
triggerInterval: 'Intervals(s)',
deadlineRequest: 'Call chain timeout(ms)',
executorTimeout: 'Overtime time(s)',
triggerInterval: 'Intervals',
deadlineRequest: 'Call chain timeout',
executorTimeout: 'Overtime time',
createDt: 'Creation time',
updateDt: 'Update time',
description: 'Describe',

View File

@ -25,6 +25,8 @@ const local: App.I18n.Schema = {
deleteSuccess: '删除成功',
confirmDelete: '确认删除吗?',
checkUploadType: '只能上传json格式的文件请重新上传',
second: '秒',
millisecond: '毫秒',
import: '导入',
export: '导出',
batchCopy: '批量复制',
@ -872,9 +874,9 @@ const local: App.I18n.Schema = {
sceneStatus: '状态',
backOff: '退避策略',
maxRetryCount: '最大重试次数',
triggerInterval: '间隔时间(秒)',
deadlineRequest: '调用链超时时间(毫秒)',
executorTimeout: '超时时间(秒)',
triggerInterval: '间隔时间',
deadlineRequest: '调用链超时时间',
executorTimeout: '超时时间',
createDt: '创建时间',
updateDt: '更新时间',
description: '描述',

View File

@ -275,6 +275,8 @@ declare namespace App {
deleteSuccess: string;
confirmDelete: string;
checkUploadType: string;
second: string;
millisecond: string;
import: string;
export: string;
batchCopy: string;

View File

@ -371,6 +371,7 @@ watch(visible, () => {
:placeholder="$t('page.jobTask.form.executorTimeout')"
clearable
/>
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
</NInputGroup>
</NFormItem>
</NGi>
@ -389,13 +390,16 @@ watch(visible, () => {
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
<NGi>
<NFormItem :label="$t('page.jobTask.retryInterval')" path="retryInterval">
<NInputNumber
v-model:value="model.retryInterval"
:min="1"
:max="99999999"
:placeholder="$t('page.jobTask.form.retryInterval')"
clearable
/>
<NInputGroup>
<NInputNumber
v-model:value="model.retryInterval"
:min="1"
:max="99999999"
:placeholder="$t('page.jobTask.form.retryInterval')"
clearable
/>
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
</NInputGroup>
</NFormItem>
</NGi>
<NGi>

View File

@ -330,24 +330,30 @@ watch(
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
<NGi>
<NFormItem :label="$t('page.retryScene.executorTimeout')" path="executorTimeout">
<NInputNumber
v-model:value="model.executorTimeout"
:min="1"
:max="60"
:placeholder="$t('page.retryScene.form.executorTimeout')"
clearable
/>
<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">
<NInputNumber
v-model:value="model.deadlineRequest"
:min="100"
:max="60000"
:placeholder="$t('page.retryScene.form.deadlineRequest')"
clearable
/>
<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>