Align control center menu source

This commit is contained in:
2026-06-10 19:57:22 +08:00
parent 4caf55d60d
commit 16e84c6991
3 changed files with 9 additions and 1170 deletions
+5 -4
View File
@@ -17,7 +17,7 @@ from core.menu.schema import MenuCreate, MenuUpdate
menu_cache = CacheManager(prefix="menu:") menu_cache = CacheManager(prefix="menu:")
# 缓存key # 缓存key
AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v5" AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v6"
MENU_TREE_CACHE_KEY = f"tree:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}" MENU_TREE_CACHE_KEY = f"tree:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}"
USER_ROUTE_CACHE_PREFIX = f"user_route:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}:" USER_ROUTE_CACHE_PREFIX = f"user_route:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}:"
@@ -36,6 +36,7 @@ AI_AGENT_ADMIN_MENU_NAMES = {
"SystemMenu", "SystemMenu",
"SystemRole", "SystemRole",
"Message", "Message",
"MessageList",
"AnnouncementList", "AnnouncementList",
"AnnouncementManage", "AnnouncementManage",
} }
@@ -50,10 +51,10 @@ def _filter_ai_agent_admin_menus(menus: List[Menu]) -> List[Menu]:
def _normalize_ai_agent_admin_menu(menu: Menu) -> None: def _normalize_ai_agent_admin_menu(menu: Menu) -> None:
"""Route legacy low-code home to a lightweight static dashboard.""" """Route the retained control center to the original rendered dashboard."""
if menu.name == "ControlCenter": if menu.name == "ControlCenter":
menu.path = "/control-center" menu.path = "/page-render/main_home"
menu.component = "_core/control-center/index" menu.component = "online-dev/page-render/index"
menu.query = None menu.query = None
+4 -4
View File
@@ -7038,9 +7038,9 @@
"name": "ControlCenter", "name": "ControlCenter",
"title": "menu-title.controlCenter", "title": "menu-title.controlCenter",
"authCode": null, "authCode": null,
"path": "/control-center", "path": "/page-render/main_home",
"type": "menu", "type": "menu",
"component": "_core/control-center/index", "component": "online-dev/page-render/index",
"redirect": null, "redirect": null,
"activePath": null, "activePath": null,
"query": null, "query": null,
@@ -9341,7 +9341,7 @@
"fields": { "fields": {
"application_id": "23CFVEUHdZcOQyku1mbIO", "application_id": "23CFVEUHdZcOQyku1mbIO",
"config_key": "frontend_preferences", "config_key": "frontend_preferences",
"config_value": "{\"app\":{\"defaultHomePath\":\"/control-center\"}}", "config_value": "{\"app\":{\"defaultHomePath\":\"/page-render/main_home\"}}",
"config_type": "preferences", "config_type": "preferences",
"description": "子应用UI偏好配置", "description": "子应用UI偏好配置",
"status": true, "status": true,
@@ -9361,7 +9361,7 @@
"fields": { "fields": {
"application_id": "uRFPsrZ0BSJodp-qesFq6", "application_id": "uRFPsrZ0BSJodp-qesFq6",
"config_key": "frontend_preferences", "config_key": "frontend_preferences",
"config_value": "{\"app\":{\"defaultHomePath\":\"/control-center\"}}", "config_value": "{\"app\":{\"defaultHomePath\":\"/page-render/main_home\"}}",
"config_type": "preferences", "config_type": "preferences",
"description": "子应用UI偏好配置", "description": "子应用UI偏好配置",
"status": true, "status": true,
File diff suppressed because it is too large Load Diff