@@ -158,6 +213,29 @@ export function SourceSettingsCard({
)
}
+export function SourceManagementDetails({
+ connections,
+ onSourcesChanged,
+}: {
+ connections: SourceConnectionListItem[]
+ onSourcesChanged: () => void
+}) {
+ const [policyOpen, setPolicyOpen] = useState(false)
+ const [auditOpen, setAuditOpen] = useState(false)
+ return (
+
+ setPolicyOpen(event.currentTarget.open)}>
+ 刷新设置
+ {policyOpen ? : null}
+
+ setAuditOpen(event.currentTarget.open)}>
+ 数据源设置审计
+ {auditOpen ? : null}
+
+
+ )
+}
+
export function SourceRefreshPolicy({
connections,
onSourcesChanged,
diff --git a/web/src/SystemSettings.tsx b/web/src/SystemSettings.tsx
index a29e668..1853e39 100644
--- a/web/src/SystemSettings.tsx
+++ b/web/src/SystemSettings.tsx
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useState } from 'react'
import { BackupScheduleSection } from './BackupScheduleSection'
import { QAModelSettings } from './QAModelSettings'
import { MembersSection } from './MembersSection'
-import { DingtalkAccountStatus, SourceRefreshPolicy, SourceSettingsAudit, SourceSettingsCard } from './SourceManagement'
+import { DingtalkAccountStatus, SourceManagementDetails, SourceSettingsCard } from './SourceManagement'
import { RoutingBindingsSection } from './RoutingBindingsSection'
import { ProductionBindingsSection } from './ProductionBindingsSection'
import { SourceWizard } from './SourceWizard'
@@ -44,8 +44,7 @@ interface Props {
initialSection?: SectionKey
}
-type SectionKey =
- 'sources' | 'services' | 'bindings' | 'production-bindings' | 'storage' | 'refresh' | 'members' | 'source-audit'
+type SectionKey = 'sources' | 'services' | 'bindings' | 'production-bindings' | 'storage' | 'refresh' | 'members'
const sections: { key: SectionKey; label: string; adminOnly?: boolean }[] = [
{ key: 'sources', label: '数据源配置' },
@@ -55,7 +54,6 @@ const sections: { key: SectionKey; label: string; adminOnly?: boolean }[] = [
{ key: 'storage', label: '存储与备份' },
{ key: 'refresh', label: '刷新策略' },
{ key: 'members', label: '成员与角色', adminOnly: true },
- { key: 'source-audit', label: '数据源设置审计' },
] as { key: SectionKey; label: string; adminOnly?: boolean }[]
const sourceTypeLabels: Record
= {
@@ -256,6 +254,7 @@ export function SystemSettingsView({
还没有已接入的来源:用上面的「+ 添加数据源」加入。
)}
) : null}
{section === 'services' ? (
@@ -397,10 +396,8 @@ export function SystemSettingsView({
{section === 'production-bindings' ?