Add lightweight AI admin dashboard
This commit is contained in:
@@ -16,6 +16,7 @@ const forbiddenComponent = () => import('#/views/_core/fallback/forbidden.vue');
|
||||
const lightMenuNames = new Set([
|
||||
'AIAgent',
|
||||
'AIKnowledgeDetail',
|
||||
'AIModelConfig',
|
||||
'AIPlatform',
|
||||
'AIWorkflow',
|
||||
'AIWorkflowRuns',
|
||||
@@ -82,8 +83,8 @@ function normalizeBackendRoute<
|
||||
if (route.name !== 'ControlCenter') return route;
|
||||
|
||||
const normalized = { ...route };
|
||||
normalized.path = '/page-render/main_home';
|
||||
normalized.component = 'online-dev/page-render/index';
|
||||
normalized.path = '/dashboard';
|
||||
normalized.component = 'dashboard/index';
|
||||
normalized.query = undefined;
|
||||
return normalized;
|
||||
}
|
||||
@@ -158,7 +159,7 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
|
||||
'../views/ai-platform/workflow/editor/index.vue',
|
||||
'../views/ai-platform/workflow/index.vue',
|
||||
'../views/ai-platform/workflow-runs/index.vue',
|
||||
'../views/online-dev/page-render/index.vue',
|
||||
'../views/dashboard/index.vue',
|
||||
]);
|
||||
|
||||
const layoutMap: ComponentRecordType = {
|
||||
|
||||
@@ -191,7 +191,7 @@ function setupAccessGuard(router: Router) {
|
||||
|
||||
if (to.path === subAppRootPath) {
|
||||
const defaultHome =
|
||||
preferences.app.defaultHomePath || '/page-render/main_home';
|
||||
preferences.app.defaultHomePath || '/dashboard';
|
||||
// 确保路径包含子应用前缀
|
||||
const subAppTargetPath = defaultHome.startsWith(subAppRootPath)
|
||||
? defaultHome
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
meta: { hideInMenu: true },
|
||||
name: 'LegacyMainHomeRedirect',
|
||||
path: '/page-render/main_home',
|
||||
redirect: '/dashboard',
|
||||
},
|
||||
{
|
||||
meta: { hideInMenu: true },
|
||||
name: 'AIKnowledgeLegacyRedirect',
|
||||
path: '/ai-platform/knowledge',
|
||||
redirect: '/ai-platform/knowledge-base',
|
||||
},
|
||||
{
|
||||
meta: {
|
||||
hideInMenu: true,
|
||||
title: '模型配置',
|
||||
},
|
||||
name: 'AIModelConfig',
|
||||
path: '/ai-platform/model',
|
||||
component: () => import('#/views/ai-platform/model/index.vue'),
|
||||
},
|
||||
{
|
||||
meta: { hideInMenu: true },
|
||||
name: 'AIKnowledgeLegacyDetailRedirect',
|
||||
|
||||
Reference in New Issue
Block a user