分表参数

This commit is contained in:
2025-08-02 20:47:18 +08:00
parent 5d61060a72
commit 8faaabe3ba

View File

@@ -407,7 +407,24 @@ async function loadConfigGroupById(groupId) {
// 更新下拉框选中状态
document.getElementById('configGroupSelect').value = groupId;
// 加载分表配置
if (config.sharding_config) {
// 设置分表启用状态
document.getElementById('enableSharding').checked = config.sharding_config.enabled || false;
toggleShardingMode();
// 填充分表配置
document.getElementById('use_sharding_for_pro').checked = config.sharding_config.use_sharding_for_pro || false;
document.getElementById('use_sharding_for_test').checked = config.sharding_config.use_sharding_for_test || false;
document.getElementById('pro_interval_seconds').value = config.sharding_config.interval_seconds || 604800;
document.getElementById('pro_table_count').value = config.sharding_config.table_count || 14;
document.getElementById('test_interval_seconds').value = config.sharding_config.interval_seconds || 604800;
document.getElementById('test_table_count').value = config.sharding_config.table_count || 14;
} else {
// 禁用分表模式
document.getElementById('enableSharding').checked = false;
toggleShardingMode();
}
// 关闭管理modal
const modal = bootstrap.Modal.getInstance(document.getElementById('manageConfigModal'));
modal.hide();