feat(sj_1.0.0): 优化间隔时间展示
This commit is contained in:
parent
c9ba6efc47
commit
a2f92b03b7
@ -663,22 +663,22 @@ const local: App.I18n.Schema = {
|
|||||||
sceneStatus: 'State',
|
sceneStatus: 'State',
|
||||||
backOff: 'Backoff strategy',
|
backOff: 'Backoff strategy',
|
||||||
maxRetryCount: 'Maximum number of retries',
|
maxRetryCount: 'Maximum number of retries',
|
||||||
triggerInterval: 'Intervals',
|
triggerInterval: 'Intervals(s)',
|
||||||
deadlineRequest: 'Call chain timeout',
|
deadlineRequest: 'Call chain timeout(ms)',
|
||||||
executorTimeout: 'Overtime time',
|
executorTimeout: 'Overtime time(s)',
|
||||||
createDt: 'Creation time',
|
createDt: 'Creation time',
|
||||||
updateDt: 'Update time',
|
updateDt: 'Update time',
|
||||||
description: 'Describe',
|
description: 'Describe',
|
||||||
routeKey: 'Routing strategy',
|
routeKey: 'Routing strategy',
|
||||||
form: {
|
form: {
|
||||||
maxRetryCount: 'Please enter Maximum number of retries',
|
maxRetryCount: 'Please enter Maximum number of retries',
|
||||||
triggerInterval: 'Please enter Intervals',
|
triggerInterval: 'Please enter Intervals(s)',
|
||||||
groupName: 'Please enter Group name',
|
groupName: 'Please enter Group name',
|
||||||
description: 'Please enter Describe',
|
description: 'Please enter Describe',
|
||||||
executorTimeout: 'Please enter Overtime time',
|
executorTimeout: 'Please enter Overtime time(s)',
|
||||||
sceneName: 'Please enter Scene name',
|
sceneName: 'Please enter Scene name',
|
||||||
sceneStatus: 'Please enter State',
|
sceneStatus: 'Please enter State',
|
||||||
deadlineRequest: 'Please enter Call chain timeout',
|
deadlineRequest: 'Please enter Call chain timeout(ms)',
|
||||||
routeKey: 'Please enter Routing strategy',
|
routeKey: 'Please enter Routing strategy',
|
||||||
backOff: 'Please enter Backoff strategy',
|
backOff: 'Please enter Backoff strategy',
|
||||||
sceneName2: '场景名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线。'
|
sceneName2: '场景名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线。'
|
||||||
|
@ -659,22 +659,22 @@ const local: App.I18n.Schema = {
|
|||||||
sceneStatus: '状态',
|
sceneStatus: '状态',
|
||||||
backOff: '退避策略',
|
backOff: '退避策略',
|
||||||
maxRetryCount: '最大重试次数',
|
maxRetryCount: '最大重试次数',
|
||||||
triggerInterval: '间隔时间',
|
triggerInterval: '间隔时间(秒)',
|
||||||
deadlineRequest: '调用链超时时间',
|
deadlineRequest: '调用链超时时间(毫秒)',
|
||||||
executorTimeout: '超时时间',
|
executorTimeout: '超时时间(秒)',
|
||||||
createDt: '创建时间',
|
createDt: '创建时间',
|
||||||
updateDt: '更新时间',
|
updateDt: '更新时间',
|
||||||
description: '描述',
|
description: '描述',
|
||||||
routeKey: '路由策略',
|
routeKey: '路由策略',
|
||||||
form: {
|
form: {
|
||||||
maxRetryCount: '请输入最大重试次数',
|
maxRetryCount: '请输入最大重试次数',
|
||||||
triggerInterval: '请输入间隔时间',
|
triggerInterval: '请输入间隔时间(秒)',
|
||||||
groupName: '请输入组名',
|
groupName: '请输入组名',
|
||||||
description: '请输入描述',
|
description: '请输入描述',
|
||||||
executorTimeout: '请输入超时时间',
|
executorTimeout: '请输入超时时间(秒)',
|
||||||
sceneName: '请输入场景名',
|
sceneName: '请输入场景名',
|
||||||
sceneStatus: '请输入状态',
|
sceneStatus: '请输入状态',
|
||||||
deadlineRequest: '请输入调用链超时时间',
|
deadlineRequest: '请输入调用链超时时间(毫秒)',
|
||||||
routeKey: '请输入路由策略',
|
routeKey: '请输入路由策略',
|
||||||
backOff: '请输入退避策略',
|
backOff: '请输入退避策略',
|
||||||
sceneName2: '场景名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线。'
|
sceneName2: '场景名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线。'
|
||||||
|
@ -27,6 +27,7 @@ interface Props {
|
|||||||
|
|
||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const groupNameList = ref<string[]>([]);
|
const groupNameList = ref<string[]>([]);
|
||||||
|
const delayLevelDesc = ref<string>('10s');
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
const props = defineProps<Props>();
|
||||||
|
|
||||||
@ -205,12 +206,30 @@ async function handleSubmit() {
|
|||||||
emit('submitted');
|
emit('submitted');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function maxRetryCountUpdate(maxRetryCount: number) {
|
||||||
|
if (model.backOff !== 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let desc = '';
|
||||||
|
for (let i = 1; i <= maxRetryCount; i += 1) {
|
||||||
|
desc += `,${DelayLevel[i as keyof typeof DelayLevel]}`;
|
||||||
|
}
|
||||||
|
delayLevelDesc.value = desc.substring(1, desc.length);
|
||||||
|
}
|
||||||
|
|
||||||
watch(visible, () => {
|
watch(visible, () => {
|
||||||
if (visible.value) {
|
if (visible.value) {
|
||||||
handleUpdateModelWhenEdit();
|
handleUpdateModelWhenEdit();
|
||||||
restoreValidation();
|
restoreValidation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => model.maxRetryCount,
|
||||||
|
() => {
|
||||||
|
maxRetryCountUpdate(model.maxRetryCount);
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -270,15 +289,8 @@ watch(visible, () => {
|
|||||||
:placeholder="$t('page.retryScene.form.triggerInterval')"
|
:placeholder="$t('page.retryScene.form.triggerInterval')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
<div v-else>
|
|
||||||
<NCollapse>
|
<NInput v-else v-model:value="delayLevelDesc" disabled />
|
||||||
<NCollapseItem title="间隔时间详情" name="1">
|
|
||||||
<p v-for="(item, index) in model.maxRetryCount" :key="index">
|
|
||||||
第{{ item }}次: {{ DelayLevel[item as keyof typeof DelayLevel] }}
|
|
||||||
</p>
|
|
||||||
</NCollapseItem>
|
|
||||||
</NCollapse>
|
|
||||||
</div>
|
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem :label="$t('page.retryScene.maxRetryCount')" path="maxRetryCount">
|
<NFormItem :label="$t('page.retryScene.maxRetryCount')" path="maxRetryCount">
|
||||||
<NInputNumber
|
<NInputNumber
|
||||||
@ -293,7 +305,7 @@ watch(visible, () => {
|
|||||||
<NInputNumber
|
<NInputNumber
|
||||||
v-model:value="model.executorTimeout"
|
v-model:value="model.executorTimeout"
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="3600"
|
:max="60"
|
||||||
:placeholder="$t('page.retryScene.form.executorTimeout')"
|
:placeholder="$t('page.retryScene.form.executorTimeout')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user