refactor(settings): AI 模型接入拆为独立 tab 页(/settings/ai)
系统设置分组 tab 顺序:通用配置 → 用户管理 → 审计日志 → LDAP 接入 → AI 模型接入 → 默认镜像源;设置主页去掉内嵌卡片,子页复用 AiModelSection
This commit is contained in:
1 parent
6923a12dd9
commit
37a610b603
5 files changed
+22
-3
No files matched your search
@@ -19,6 +19,7 @@ export default {
|
||||
analysis: 'Log analysis',
|
||||
settings: 'General',
|
||||
ldap: 'LDAP',
|
||||
aiModel: 'AI Model',
|
||||
registry: 'Image Registry',
|
||||
users: 'Users',
|
||||
audit: 'Audit Log',
|
||||
|
||||
@@ -19,6 +19,7 @@ export default {
|
||||
analysis: '日志分析',
|
||||
settings: '通用配置',
|
||||
ldap: 'LDAP 接入',
|
||||
aiModel: 'AI 模型接入',
|
||||
registry: '默认镜像源',
|
||||
users: '用户管理',
|
||||
audit: '审计日志',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { memo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { PageContainer } from '@/components/PageContainer'
|
||||
import { AiModelSection } from './components/AiModelSection'
|
||||
|
||||
/** AI 模型接入:系统设置分组的一个 tab(原设置页通用配置内的卡片拆出) */
|
||||
const AiModelPage = memo(function AiModelPage() {
|
||||
const { t } = useTranslation('aiops')
|
||||
return (
|
||||
<PageContainer title={t('config.sectionTitle')}>
|
||||
<AiModelSection />
|
||||
</PageContainer>
|
||||
)
|
||||
})
|
||||
|
||||
export default AiModelPage
|
||||
@@ -13,7 +13,6 @@ import { PageContainer } from '@/components/PageContainer'
|
||||
import { ThemeSection } from './components/ThemeSection'
|
||||
import { RetentionSection } from './components/RetentionSection'
|
||||
import { LicenseSection } from './components/LicenseSection'
|
||||
import { AiModelSection } from './components/AiModelSection'
|
||||
import { LanguageSection } from '@/i18n/LanguageSection'
|
||||
import { Palette } from 'lucide-react'
|
||||
|
||||
@@ -72,7 +71,6 @@ const SettingsPage = memo(function SettingsPage() {
|
||||
return (
|
||||
<PageContainer title={t('title')}>
|
||||
<LicenseSection />
|
||||
<AiModelSection />
|
||||
{/* 不再有内层 tab:LDAP / 镜像源 已拆成独立路由,
|
||||
由左侧「系统设置」分组的顶层 tab 切换(单层 tab 更好理解)。 */}
|
||||
<div className="space-y-6">
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
Boxes,
|
||||
ShieldCheck,
|
||||
Container,
|
||||
Bot,
|
||||
} from 'lucide-react';
|
||||
import type { AppRoute, MenuItem, RouteMeta } from '@/types/router';
|
||||
|
||||
@@ -32,6 +33,7 @@ const Collectors = lazy(() => import('@/pages/collectors'));
|
||||
const SettingsPage = lazy(() => import('@/pages/settings'));
|
||||
const LdapPage = lazy(() => import('@/pages/settings/ldap'));
|
||||
const RegistryPage = lazy(() => import('@/pages/settings/registry'));
|
||||
const AiModelPage = lazy(() => import('@/pages/settings/ai'));
|
||||
const NotFound = lazy(() => import('@/pages/not-found'));
|
||||
const WizardPage = lazy(() => import('@/pages/wizard'));
|
||||
const LogsPage = lazy(() => import('@/pages/logs'));
|
||||
@@ -88,7 +90,8 @@ export const routes: AppRoute[] = [
|
||||
},
|
||||
{ path: '/audit', component: AuditPage, auth: true, meta: { title: 'menu.audit', icon: History, order: 10, adminOnly: true, groupKey: 'system', proOnly: true } },
|
||||
{ path: '/settings/ldap', component: LdapPage, auth: true, meta: { title: 'menu.ldap', icon: ShieldCheck, order: 11, adminOnly: true, groupKey: 'system' } },
|
||||
{ path: '/settings/registry', component: RegistryPage, auth: true, meta: { title: 'menu.registry', icon: Container, order: 12, adminOnly: true, groupKey: 'system' } },
|
||||
{ path: '/settings/registry', component: RegistryPage, auth: true, meta: { title: 'menu.registry', icon: Container, order: 13, adminOnly: true, groupKey: 'system' } },
|
||||
{ path: '/settings/ai', component: AiModelPage, auth: true, meta: { title: 'menu.aiModel', icon: Bot, order: 12, adminOnly: true, groupKey: 'system' } },
|
||||
// 系统设置放回侧栏,并作为「系统设置」分组的 tab 起点(order 最小 = 排在第一个)
|
||||
{
|
||||
path: '/settings', component: SettingsPage, auth: true,
|
||||
|
||||
Reference in new issue
Block a user