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