Просмотр исходного кода

chore: document blocked ECharts migration

彭峰 1 месяц назад
Родитель
Сommit
66b3db357a

+ 1 - 0
docs/migration/admin-migration-status.md

@@ -25,6 +25,7 @@
 - 旧 `GetMDFile` 的固定空响应、`Content_API.duptitle` 与 `ContentManage_Refresh` 已由 `legacyContentUtility/contentBatch` 等价迁移;Angular 内容页增加重复标题检查、单条/批量时间刷新和八列 CSV 安全导出。旧 XLSX 格式暂为部分迁移;专题关系、定时发布、静态 HTML、采集和 Markdown 因物理数据或旧运行时缺失均返回明确 `migration_blocked`。
 - `Design/Counter` 与 `Extend/Counter` 共 14 个访问统计动作已完成数据审计:目标全部 Schema 不含旧 `ZL_Com_VisitCount` 或等价访问明细,无法还原 InfoID、日期、地域、浏览器、系统和来源聚合;全站统计代码还缺少 `SiteInfo.AllSiteJS` 注入运行时。对应云函数统一返回细分 `migration_blocked`,不会以 `SysLog` 或问卷 `SurveyLog` 伪造访问统计。
 - CRM 中仍有真实数据的 `CType/CTypeAdd/CType_Add/CType_Del` 已迁为 `crmClientTypes/saveCrmClientType/crmClientTypeBatch` 与 Angular“CRM 客户类型”页面:只管理 `CRMSAttr.ztype=ctype`,按帐套隔离、名称防重并通过 PostgreSQL 事务锁原子分配旧字符串编号。旧 `CRMS_Client`、`CRMS_Contact`、`IServer`、经销商申请和 Licence/PDF 链均未进入目标 Schema;`ContactInfo` 是企业微信联系人,未被错误当作 CRM 联系人复用。
+- 旧 `ECharts/ECharts` 六个动作依赖 `Content_Chart` 的 TName/ChartTitle/ToolBox/Package/option/SType/Tag 数据、七类 .NET 配置生成器、`SiteInfo.SiteUrl` 与 `/Common/ShowM` 渲染页;目标 Schema 中不存在任何 chart/echart/graph 数据类。所有动作通过 `legacyEChartsBlocker` 返回逐项原因,不用问卷统计或普通 Angular 图表冒充旧图表编辑器。
 - 旧 `NodeAdd_Submit`、`Node_API` 与 `UnionNode_Move` 的核心栏目生命周期已迁为专用 `saveNode/nodeBatch`:新增栏目以临时来源键完成 Parse 初始写入,再使用 PostgreSQL 事务锁原子分配 `nodeId/orderId` 并替换为旧 `sourceKey`;保存会校验同级名称/目录重复、父栏目帐套和回收状态,移动会阻断自身/下级循环并递归修正所有后代深度。回收、恢复和每批 1–100 个栏目迁移已接入 Angular;永久删除仅在没有内容、下级栏目、节点权限和模型模板引用时开放,通用保存与删除不能绕过。
 - 旧 `SpecialAdd_Save` 与 `UnionSpecial_Move` 已迁为专用 `saveSpecial/specialBatch`:新增专题使用临时来源键和 PostgreSQL 事务锁原子分配 `specId/orderId`,保存时校验全帐套名称/目录唯一、父专题归属与层级循环;删除会拒绝仍有下级专题的记录。旧 `UnionSpecial_Merge` 被明确列为数据阻塞:`CommonModel.specialId` 只存在于 Parse Schema、PostgreSQL 物理列缺失,商品主表也未迁移,无法安全改写内容/商品专题关系。
 - 旧 `ModelManage/Field/Order_Submit` 的安全部分已迁为 `saveModelMetadata/saveModelFieldMetadata/modelFieldOrder`:现有模型可编辑名称、条目文案、图标、说明和内容模板元数据,现有字段可编辑别名、提示、显示/搜索配置,并可在同模型内批量排序;`modelId/modelType/tableName/fieldId/modelId/fieldName/fieldType/sourceKey` 等结构字段通用只读。新增、复制、删除模型或字段会显式返回 501,因为旧实现同时执行 PostgreSQL 建表/改列、标签生成和模板文件写入,目标托管环境没有该 DDL/旧模板运行时。

+ 10 - 0
scripts/deploy-admin-functions.mjs

@@ -1317,6 +1317,16 @@ async function handler(request, response) {
         'Extend/Channel': '目标缺少访问来源渠道与 Referer 明细'
       }; if (!Object.prototype.hasOwnProperty.call(blockers, action)) fail(400, '不支持的旧访问统计动作'); fail(501, 'migration_blocked: ' + blockers[action]);
     }
+    if (operation === 'legacyEChartsBlocker') {
+      const action = String(input.action || ''); const blockers = {
+        EChartList: '目标 Schema 缺少旧 Content_Chart 图表定义主表与历史图表',
+        ChartCite: '目标缺少图表名称、站点 SiteUrl 和 /Common/ShowM 公开渲染链,无法生成旧 iframe/Markdown 引用',
+        ShowM: '目标没有 Content_Chart option/package 数据与旧 ECharts ShowM 渲染页面',
+        AddChart: '目标缺少 Content_Chart 持久层和旧 Bar/Pie/Dash/Funnel/Scatter/Circle/Map 配置生成运行时',
+        AddChart_Submit: '目标无法持久化 TName、ChartTitle、ToolBox、Package、option、SType 与 Tag 图表定义',
+        Default: '目标没有可按 SType 筛选分页的旧 Content_Chart 记录'
+      }; if (!Object.prototype.hasOwnProperty.call(blockers, action)) fail(400, '不支持的旧 ECharts 动作'); fail(501, 'migration_blocked: ' + blockers[action]);
+    }
     if (operation === 'legacyChatBlocker') {
       const action = String(input.action || ''); const blockers = {
         Default: '目标 Schema 缺少 ChatMsg 消息表,无法还原用户消息数列表',

+ 6 - 0
scripts/generate-admin-coverage.mjs

@@ -93,6 +93,12 @@ const explicit = new Map([
   ['CRM/BecomeCustomerDetail', ['blocked-data', '目标缺少经销商申请、申请用户和资质详情数据']],
   ['CRM/BecomeCustomerDetailUpdate', ['blocked-data', '目标没有可更新的经销商申请 Info1/AdminRemind 记录']],
   ['CRM/BecomeCustomer_API', ['blocked-infrastructure', '目标缺少申请、LicenceFiles/LicenceUserSign、CRM 客户及 PDF 文件运行时,无法执行审核链']],
+  ['ECharts / ECharts/EChartList', ['blocked-data', '目标 Schema 缺少旧 Content_Chart 图表定义主表与历史图表']],
+  ['ECharts / ECharts/ChartCite', ['blocked-infrastructure', '目标缺少图表名称、站点 SiteUrl 和 /Common/ShowM 公开渲染链,无法生成旧 iframe/Markdown 引用']],
+  ['ECharts / ECharts/ShowM', ['blocked-infrastructure', '目标没有 Content_Chart option/package 数据与旧 ECharts ShowM 渲染页面']],
+  ['ECharts / ECharts/AddChart', ['blocked-infrastructure', '目标缺少 Content_Chart 持久层和旧七类图表配置生成运行时']],
+  ['ECharts / ECharts/AddChart_Submit', ['blocked-data', '目标无法持久化 TName、ChartTitle、ToolBox、Package、option、SType 与 Tag 图表定义']],
+  ['ECharts / ECharts/Default', ['blocked-data', '目标没有可按 SType 筛选分页的旧 Content_Chart 记录']],
   ['Content / Node/NodeManage', ['implemented', '已由 Node 资源列表、分页与专用结构操作替代']],
   ['Content / Node/NodeSearch', ['implemented', '已覆盖按栏目名称搜索并保持帐套隔离']],
   ['Content / Node/NodeAdd', ['implemented', '已由 Node 动态表单与父节点结构控件替代']],

+ 3 - 0
scripts/smoke-admin-functions.mjs

@@ -647,6 +647,9 @@ try {
   for (const action of ['Index','ClientList','ClientView','ClientAdd','BiServer_Del','Client_Add','ClientImport','Import_DownTlp','Import_Client','AddServiceRecord','AddServiceRecord_Submit','ServiceRecord_List','Contact','ContactAdd','Contact_Add','ContactImport','ContactImport_Down','ContactImport_Upload','BecomeCustomerList','BecomeCustomerDetail','BecomeCustomerDetailUpdate','BecomeCustomer_API']) {
     const blocked = await callFunctionError('xiaoshu/admin/gateway', login.sessionToken, { operation: 'legacyCrmBlocker', action }, 501); if (!String(blocked.message).includes('migration_blocked')) throw new Error(`旧 CRM 动作 ${action} 未返回明确迁移阻塞`);
   }
+  for (const action of ['EChartList','ChartCite','ShowM','AddChart','AddChart_Submit','Default']) {
+    const blocked = await callFunctionError('xiaoshu/admin/gateway', login.sessionToken, { operation: 'legacyEChartsBlocker', action }, 501); if (!String(blocked.message).includes('migration_blocked')) throw new Error(`旧 ECharts 动作 ${action} 未返回明确迁移阻塞`);
+  }
   await callFunction('xiaoshu/admin/gateway', login.sessionToken, { operation: 'contentBatch', className: 'CommonModel', action: 'status', objectIds: [temporaryAppointmentCommonObjectId], status: 99 });
 
   const page = await callFunction('xiaoshu/admin/gateway', login.sessionToken, { operation: 'list', className: 'CourseAppointment', page: 1, pageSize: 2 });

+ 12 - 12
src/app/admin/legacy-admin-coverage.generated.ts

@@ -1868,43 +1868,43 @@ export const LEGACY_ADMIN_COVERAGE: readonly LegacyAdminCoverageEntry[] = [
     "module": "ECharts / ECharts",
     "action": "EChartList",
     "occurrence": 1,
-    "status": "pending",
-    "reason": "尚未逐项迁移或完成等价性核验"
+    "status": "blocked-data",
+    "reason": "目标 Schema 缺少旧 Content_Chart 图表定义主表与历史图表"
   },
   {
     "module": "ECharts / ECharts",
     "action": "ChartCite",
     "occurrence": 1,
-    "status": "pending",
-    "reason": "尚未逐项迁移或完成等价性核验"
+    "status": "blocked-infrastructure",
+    "reason": "目标缺少图表名称、站点 SiteUrl 和 /Common/ShowM 公开渲染链,无法生成旧 iframe/Markdown 引用"
   },
   {
     "module": "ECharts / ECharts",
     "action": "ShowM",
     "occurrence": 1,
-    "status": "pending",
-    "reason": "尚未逐项迁移或完成等价性核验"
+    "status": "blocked-infrastructure",
+    "reason": "目标没有 Content_Chart option/package 数据与旧 ECharts ShowM 渲染页面"
   },
   {
     "module": "ECharts / ECharts",
     "action": "AddChart",
     "occurrence": 1,
-    "status": "pending",
-    "reason": "尚未逐项迁移或完成等价性核验"
+    "status": "blocked-infrastructure",
+    "reason": "目标缺少 Content_Chart 持久层和旧七类图表配置生成运行时"
   },
   {
     "module": "ECharts / ECharts",
     "action": "AddChart_Submit",
     "occurrence": 1,
-    "status": "pending",
-    "reason": "尚未逐项迁移或完成等价性核验"
+    "status": "blocked-data",
+    "reason": "目标无法持久化 TName、ChartTitle、ToolBox、Package、option、SType 与 Tag 图表定义"
   },
   {
     "module": "ECharts / ECharts",
     "action": "Default",
     "occurrence": 1,
-    "status": "pending",
-    "reason": "尚未逐项迁移或完成等价性核验"
+    "status": "blocked-data",
+    "reason": "目标没有可按 SType 筛选分页的旧 Content_Chart 记录"
   },
   {
     "module": "Exam",