feat(sj_1.1.0-beta2): 阻塞策略添加恢复类型

This commit is contained in:
opensnail 2024-06-26 18:05:15 +08:00
parent 932f68f8ca
commit 530ecf79c7
6 changed files with 11 additions and 6 deletions

View File

@ -120,7 +120,8 @@ export const routeKeyRecordOptions = transformRecordToNumberOption(routeKeyRecor
export const blockStrategyRecord: Record<Api.Common.BlockStrategy, App.I18n.I18nKey> = {
1: 'common.blockStrategy.items.discard',
2: 'common.blockStrategy.items.overwrite',
3: 'common.blockStrategy.items.parallel'
3: 'common.blockStrategy.items.parallel',
4: 'common.blockStrategy.items.recovery'
};
export const blockStrategyRecordOptions = transformRecordToNumberOption(blockStrategyRecord);

View File

@ -115,7 +115,8 @@ const local: App.I18n.Schema = {
items: {
discard: 'Discard',
overwrite: 'Overwrite',
parallel: 'Parallel'
parallel: 'Parallel',
recovery: 'Recovery'
}
},
failStrategy: {

View File

@ -115,7 +115,8 @@ const local: App.I18n.Schema = {
items: {
discard: '丢弃',
overwrite: '覆盖',
parallel: '并行'
parallel: '并行',
recovery: '恢复'
}
},
failStrategy: {

View File

@ -73,8 +73,8 @@ declare namespace Api {
/** 1: 一致性Hash 2: 随机 3: LRU 4: 轮询 */
type RouteKey = 1 | 2 | 3 | 4;
/** 阻塞策略 1:丢弃 2:覆盖 3:并行 */
type BlockStrategy = 1 | 2 | 3;
/** 阻塞策略 1:丢弃 2:覆盖 3:并行 4:恢复 */
type BlockStrategy = 1 | 2 | 3 | 4;
/** 失败策略 1:跳过 2:阻塞 */
type FailStrategy = 1 | 2;

View File

@ -368,6 +368,7 @@ declare namespace App {
discard: string;
overwrite: string;
parallel: string;
recovery: string;
};
};
failStrategy: {

View File

@ -153,7 +153,8 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
const tagMap: Record<Api.Common.BlockStrategy, NaiveUI.ThemeColor> = {
1: 'info',
2: 'success',
3: 'error'
3: 'error',
4: 'warning'
};
const label = $t(blockStrategyRecord[row.blockStrategy!]);