fix(log): F6 polish — log datasource create error log + schema patches for auth_type/token/headers + ES default index sync on datasource select

This commit is contained in:
attacker committed 2026-06-28 06:04:18 +08:00
1 parent 6bba6144f3
commit 5fb74a787a
3 files changed
+17 -6

No files matched your search

@@ -176,19 +176,15 @@ export function UnifiedQueryPanel({ engine, onRuleCreated }: Props) {
const [saveMenuOpen, setSaveMenuOpen] = useState(false);
const [hasQueried, setHasQueried] = useState(false);
// 数据源加载后选中默认或首个(无源时保持空)// Logan.Li
// 数据源加载后选中默认或首个(无源时保持空),并同步 ES 默认索引 // Logan.Li
useEffect(() => {
if (sources.length > 0) {
const def = sources.find(s => s.is_default) || sources[0];
setDsId(String(def.id));
setEsIndex(def.default_index || '');
}
}, [sources]);
// 当前数据源变化时,同步 ES 临时索引框为数据源的默认索引 // Logan.Li
useEffect(() => {
setEsIndex(currentSource?.default_index || '');
}, [currentSource]);
const currentSource = sources.find(s => String(s.id) === dsId);
const fields = useMemo(() => extractFields(entries), [entries]);