81 lines
3.4 KiB
JavaScript
81 lines
3.4 KiB
JavaScript
|
|
/**
|
|||
|
|
* 外部系统集成框架 - 三级导航配置
|
|||
|
|
*
|
|||
|
|
* 单一数据源,供 GroupNav 侧边栏与 PageContainer 面包屑共享。
|
|||
|
|
* 结构对齐原型图 §1.5.1 菜单层级树:
|
|||
|
|
* 一级「外部系统集成」→ 二级「业务域分组」→ 三级「功能页面」
|
|||
|
|
*/
|
|||
|
|
import { Server, Activity, ShieldCheck, Settings } from 'lucide-vue-next'
|
|||
|
|
|
|||
|
|
export const ES_NAVIGATION = [
|
|||
|
|
{
|
|||
|
|
key: 'asset-management',
|
|||
|
|
label: '资产管理',
|
|||
|
|
icon: Server,
|
|||
|
|
modules: [
|
|||
|
|
{ label: '系统管理', path: '/external-systems/asset-management/systems' },
|
|||
|
|
{ label: '工具管理', path: '/external-systems/asset-management/tools' },
|
|||
|
|
{ label: '环境管理', path: '/external-systems/asset-management/environments' },
|
|||
|
|
{ label: '适配器资产', path: '/external-systems/asset-management/assets' },
|
|||
|
|
{ label: '导入导出', path: '/external-systems/asset-management/import-export' }
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
key: 'runtime-monitoring',
|
|||
|
|
label: '运行监控',
|
|||
|
|
icon: Activity,
|
|||
|
|
modules: [
|
|||
|
|
{ label: '执行记录', path: '/external-systems/runtime-monitoring/executions' },
|
|||
|
|
{ label: '健康检查', path: '/external-systems/runtime-monitoring/health-checks' },
|
|||
|
|
{ label: '指标查询', path: '/external-systems/runtime-monitoring/metrics' },
|
|||
|
|
{ label: '审计日志', path: '/external-systems/runtime-monitoring/audit-logs' },
|
|||
|
|
{ label: 'Token 管理', path: '/external-systems/runtime-monitoring/tokens' }
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
key: 'governance-control',
|
|||
|
|
label: '治理管控',
|
|||
|
|
icon: ShieldCheck,
|
|||
|
|
modules: [
|
|||
|
|
{ label: '配额管理', path: '/external-systems/governance-control/quotas' },
|
|||
|
|
{ label: '告警事件', path: '/external-systems/governance-control/alerts' },
|
|||
|
|
{ label: '密钥轮换', path: '/external-systems/governance-control/secret-rotations' },
|
|||
|
|
{ label: '访问规则', path: '/external-systems/governance-control/access-rules' },
|
|||
|
|
{ label: '测试用例', path: '/external-systems/governance-control/test-cases' }
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
key: 'integration-config',
|
|||
|
|
label: '集成配置',
|
|||
|
|
icon: Settings,
|
|||
|
|
modules: [
|
|||
|
|
{ label: 'Webhook 订阅', path: '/external-systems/integration-config/webhooks/subscriptions' },
|
|||
|
|
{ label: 'Webhook 事件', path: '/external-systems/integration-config/webhooks/events' },
|
|||
|
|
{ label: '厂商集成目录', path: '/external-systems/integration-config/vendor-integrations' },
|
|||
|
|
{ label: '集成生成器', path: '/external-systems/integration-config/integration-generator' },
|
|||
|
|
{ label: '通知渠道', path: '/external-systems/integration-config/notification-channels' },
|
|||
|
|
{ label: '认证插件', path: '/external-systems/integration-config/auth-plugins' },
|
|||
|
|
{ label: '适配器元数据', path: '/external-systems/integration-config/adapter-metadata' },
|
|||
|
|
{ label: '回收站', path: '/external-systems/integration-config/recycle-bin' }
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 根据当前路由路径查找所属分组与模块
|
|||
|
|
* 匹配规则:路径等于模块路径,或以模块路径 + '/' 开头(详情页)
|
|||
|
|
*
|
|||
|
|
* @param {string} path - 当前路由 path
|
|||
|
|
* @returns {{ group: object, module: object } | null}
|
|||
|
|
*/
|
|||
|
|
export function findActiveModule(path) {
|
|||
|
|
for (const group of ES_NAVIGATION) {
|
|||
|
|
for (const module of group.modules) {
|
|||
|
|
if (path === module.path || path.startsWith(module.path + '/')) {
|
|||
|
|
return { group, module }
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
return null
|
|||
|
|
}
|