fix: 完善自定义分钟数据源配置与异常处理

- 补齐资产类型和周期参数在 API、YAML 与前端编辑器中的保存回读

- 权限判断和分时监控统一复用安全的数据源解析边界

- 增加配置往返及解析异常回归测试
This commit is contained in:
shy3130
2026-07-19 17:01:33 +08:00
parent b1b2494db9
commit 4df3062002
9 changed files with 122 additions and 14 deletions
+2
View File
@@ -821,6 +821,8 @@ export interface DatasetConfig {
symbols_param?: string
start_param?: string
end_param?: string
asset_type_param?: string | null
freq_param?: string | null
}
export interface AuthConfig {
@@ -395,6 +395,27 @@ function DatasetDetail({
</Field>
</div>
{datasetKey === 'minute' && (
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
<Field label="资产类型参数">
<input
value={cfg.asset_type_param ?? ''}
onChange={e => onUpdate({ asset_type_param: e.target.value || null })}
placeholder="asset_type"
className={`${INPUT_CLS} w-full`}
/>
</Field>
<Field label="周期参数">
<input
value={cfg.freq_param ?? ''}
onChange={e => onUpdate({ freq_param: e.target.value || null })}
placeholder="period"
className={`${INPUT_CLS} w-full`}
/>
</Field>
</div>
)}
<div>
<div className="flex items-center justify-between mb-2">
<div className="text-[10px] uppercase tracking-widest text-muted"></div>