功能:完善通用云管工作台、审计与诊断能力

This commit is contained in:
songyiming committed 2026-11-11 18:46:16 +08:00
1 parent 5ac692724d
commit 9f05aa20ea
225 files changed
+14266 -141

No files matched your search

@@ -0,0 +1,19 @@
# 日志与诊断验收证据
日期:2026-11-11。真实服务:本机 5182。
| 文件 | 范围 |
| --- | --- |
| `live-verification.json` | 采集前真实设备/桌面查询、全分页与导出一致、三角色和未登录权限 |
| `browser-verification.json` | 真实两版入口、查询/详情/筛选/下载、角色守卫及深浅窄屏 |
| `state-verification.json` | 第一阶段只读验收及临时账号清理后,配置一致、任务仍为 63 |
| `collection-verification.json` | 随后通过真实页面提交一次日志采集,设备成功回执、展示及下载 |
| `collection-state-verification.json` | 采集后唯一新增任务与原配置一致性、ZIP 含实际日志 |
| `deployment.json` / `manifest.json` | 备份、镜像、基线二进制校验及隔离发布文件 |
| `live-*.png` | 真实页面,日志原文收起;较早的总览图中日志数为采集前的 0 |
各核验 JSON 的时间戳标明先后阶段:只读阶段没有提交业务命令,随后采集阶段新增一条 `collect-logs`,不是相互矛盾的任务计数。原始诊断 ZIP 仅保存在被忽略的 `.local/diagnostics-review/`,未将设备原始日志纳入公共证据。
隔离测试结果:后端 6 项专项、Go 全量/vet;前端检查、6 项单元测试、生产构建;诊断 9 项/版本 12 项/GPU 4 项共 25 项浏览器测试通过。浏览器原始结果位于 `.local/diagnostics-review/e2e-final/`,视觉复验位于 `e2e-visual/`;用例源代码见 `console/e2e/diagnostics.spec.ts`,后端见 `platform/internal/server/diagnostics_test.go`。
测试数据库使用 `127.0.0.1:55441` 一次性容器;不使用真实业务库。现场验收没有发电源、GPU、重启或重置会话命令。功能范围与未实现项见[实施说明](../../cloud-diagnostics-20261111.md)。
@@ -0,0 +1,26 @@
{
"time": "2026-11-11T09:52:22.239Z",
"realAPI": true,
"defaultCommonNavigationEntries": 5,
"advancedOperatorNavigationEntries": 14,
"terminalAndDesktopDeepLinks": true,
"actualPageTwoRead": true,
"detailsExpanded": true,
"actualZIPDownload": true,
"filterChangesInvalidateOldResults": true,
"viewerNavigationHiddenAndDeepLinkForbidden": true,
"themes": [
"dark",
"light"
],
"viewportWidths": [
1440,
390
],
"scriptErrors": [],
"failedAPIResponses": [],
"blockedBusinessWrites": [],
"terminalCommandsSubmitted": 0,
"vmPowerActionsSubmitted": 0,
"gpuSwitchesSubmitted": 0
}
@@ -0,0 +1,8 @@
{
"time": "2026-11-11T10:00:00.705662+00:00",
"temporaryDatabaseAndAnonymousVolumeRemoved": true,
"temporaryVite5183Stopped": true,
"temporaryAdministratorsAndSessionsRemoved": true,
"privateAccountCredentialFilesRemoved": true,
"sourceFilesMatchReleaseManifest": true
}
@@ -0,0 +1,19 @@
{
"time": "2026-11-11T09:57:30.567493+00:00",
"collectedZIPContainsDeviceReceipt": true,
"logsInArchive": 1,
"logTailCharacters": 11981,
"knownConfiguredSecretsAbsent": true,
"businessIdentityConfigurationAndBindingsStillUnchanged": true,
"alertRulesStillUnchanged": true,
"onlyAddedTaskIsSuccessfulLogCollection": true,
"newTasks": [
{
"id": "task_f4e4f72e2303be996e6c8bf75303c01c",
"kind": "terminal",
"action": "collect-logs",
"status": "success"
}
],
"rawZIPKeptPrivate": true
}
@@ -0,0 +1,30 @@
{
"time": "2026-11-11T09:56:38.177Z",
"realTerminal": true,
"submittedViaBrowser": true,
"confirmedBeforeSubmission": true,
"actualDeviceReceipt": "success",
"taskId": "task_f4e4f72e2303be996e6c8bf75303c01c",
"terminalAgentVersion": "qt-platform/0.4.0",
"logSourceVisible": true,
"deviceMetadataExpanded": true,
"actualCollectedZIPDownload": true,
"submittedCommands": [
"collect-logs"
],
"commandCount": 1,
"vmPowerActionsSubmitted": 0,
"gpuSwitchesSubmitted": 0,
"sessionResetCommandsSubmitted": 0,
"scriptErrors": [],
"failedAPIResponses": [],
"blockedBusinessWrites": [],
"beforeCounts": {
"tasks": 63,
"snapshots": 0
},
"afterCounts": {
"tasks": 64,
"snapshots": 0
}
}
@@ -0,0 +1,20 @@
{
"deployedAt": "2026-11-11T09:48:30.313383+00:00",
"backup": ".local\\live\\backups\\before-diagnostics-20261111-174813.dump",
"backupBytes": 285675,
"oldImageTag": "before-diagnostics-20261111-174813",
"oldImages": {
"api": "sha256:106f7df40c654b281650a0011e39c365e7b7e8c6a1fae56eea8b81a4e5d164ca",
"console": "sha256:2859db73b4eb6531549ee67e288d1d84ffd9e68d7b8beaefc9000d1ec1911069"
},
"newImages": {
"api": "sha256:00b12a4ba144776b53a33bcc39f8eddae9639f3cd711b38faf0c4327b93d40fb",
"console": "sha256:7e54468e502d50b945fc8d9abb787bf10efb1233bdbb092366f70ccfebe818ec"
},
"baselineBinarySHA256": "d195f248d7393f35321f1b0d4d92cda4a14abcf73ea92a6bb0223ed6ff37a034",
"databaseRestarted": false,
"databaseSchemaChanged": false,
"terminalFilesIncluded": false,
"sourceBaseline": ".local/editions-review/release",
"overlayManifest": ".local/diagnostics-review/manifest.json"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

@@ -0,0 +1,74 @@
{
"time": "2026-11-11T09:49:33.002253+00:00",
"realDatabase": true,
"realAPI": true,
"targets": [
{
"kind": "terminal",
"total": 352,
"counts": {
"alerts": 5,
"audits": 55,
"logs": 0,
"sessions": 182,
"tasks": 110
},
"archiveBytes": 15237,
"allPagesEqualExport": true
},
{
"kind": "desktop",
"total": 182,
"counts": {
"alerts": 2,
"audits": 30,
"logs": 0,
"sessions": 90,
"tasks": 60
},
"archiveBytes": 8705,
"allPagesEqualExport": true
},
{
"kind": "desktop",
"total": 65,
"counts": {
"alerts": 2,
"audits": 10,
"logs": 0,
"sessions": 33,
"tasks": 20
},
"archiveBytes": 4495,
"allPagesEqualExport": true
},
{
"kind": "desktop",
"total": 106,
"counts": {
"alerts": 2,
"audits": 15,
"logs": 0,
"sessions": 59,
"tasks": 30
},
"archiveBytes": 5943,
"allPagesEqualExport": true
}
],
"roleChecks": {
"super_admin": "read/export allowed",
"operator": "read/export allowed",
"viewer": "both 403",
"anonymous": "both 401"
},
"databasePaginationAndSourceFilters": true,
"zipCompleteTwoFilesAndAuditRecorded": true,
"subjectAndDetailsWhitelisted": true,
"knownConfiguredSecretsAbsent": true,
"businessIdentityAndAuthorizationUnchangedBeforeTests": true,
"vmPowerActionsSubmitted": 0,
"gpuSwitchesSubmitted": 0,
"terminalCommandsSubmitted": 0,
"temporaryAccountsRemovedAfterBrowserCheck": true
}
@@ -0,0 +1,70 @@
[
{
"path": "tools/generate-platform-openapi.mjs",
"sha256": "91f1ae26bf9ee4c87f884e61b53569dcbe31d72e087566b8da4731ffdae47190"
},
{
"path": "platform/internal/server/admin.go",
"sha256": "7028dca5236de2238ada6c27fca34f66228e5588d215acee0253186b0c5767e2"
},
{
"path": "platform/internal/server/server.go",
"sha256": "9e4c9c487f154c018f31ed1f266703de017767d071ac9de93bad9ff1cef40d42"
},
{
"path": "docs/openapi/platform.v1.json",
"sha256": "4da7ace4959419d05a8cf60f821da64af5f60b31e53c81eb5a8f2c84dd2b7d12"
},
{
"path": "console/src/api/audit-labels.ts",
"sha256": "632f6895d6fb4f1b93e8bd2f0cce88ae0565a98cca0e860fdd192aa8f7fc9f4b"
},
{
"path": "console/src/api/index.ts",
"sha256": "59e8195ab5f00ef1cc2dc932527766f482063e11800ab49b010ea987ddd01b4a"
},
{
"path": "console/src/api/schema.d.ts",
"sha256": "c532951545d9259e738e198deb237c67a225e3201ce0124951829e1166be1f9e"
},
{
"path": "console/src/components/TaskHistory.vue",
"sha256": "fd3ed85e0c319816731609afad4b8d79aea9e08658ffb57b0b58de37402b7348"
},
{
"path": "console/src/layouts/ConsoleLayout.vue",
"sha256": "98dab479e76de2fd288cc70da642dd1f7916e061e09270084ef05e9859b2f14e"
},
{
"path": "console/src/router/index.ts",
"sha256": "25b0229cc0ebbf5d86fa61014c2b6f3afb510edd16384b4e0cb283e654f04ba2"
},
{
"path": "console/src/views/Desktops.vue",
"sha256": "dc20e3589a2bcb31d910c0c794758ddb172ba10a21d1579a69564ce18fca0c4e"
},
{
"path": "console/src/views/Settings.vue",
"sha256": "935456d69378c23ffb7ccbda06d231bec819ea6e4a7f330bade57682c9cb3019"
},
{
"path": "console/src/views/Terminals.vue",
"sha256": "596c2ae31d57a34d41e273dcfb4efa6d84b4c1564d761315656a63bac9bfe499"
},
{
"path": "platform/internal/server/diagnostics.go",
"sha256": "c87778e8901670d096fda36ecae629fbe75ce0f4e3456004a880d2cd66aaeae7"
},
{
"path": "platform/internal/server/diagnostics_test.go",
"sha256": "c477fc4b8efe5a003b75a6cfc7576f3ccc8162407750c43fefa96e104b2ba11a"
},
{
"path": "console/src/views/Diagnostics.vue",
"sha256": "272481cd97c5fe4378937a40f21eb06ff473bf882aea92db78dd345bcc36785a"
},
{
"path": "console/e2e/diagnostics.spec.ts",
"sha256": "1f603315ae0440f52976af34e8b5e183b165a57e98262855917fc54c42945f9c"
}
]
@@ -0,0 +1,19 @@
{
"time": "2026-11-11T09:54:41.570631+00:00",
"existingAdministratorPasswordsRolesAndStatesUnchanged": true,
"existingUsersBindingsDesktopConnectionAndDeviceIdentityUnchanged": true,
"alertRulesUnchanged": true,
"temporaryAdministratorsAndSessionsRemoved": true,
"databaseFsync": "on",
"beforeCounts": {
"tasks": 63,
"snapshots": 0
},
"afterCounts": {
"tasks": 63,
"snapshots": 0
},
"noBusinessTasksSubmitted": true,
"deployedImagesStillMatchRelease": true,
"databaseNotRestarted": true
}