From 57e68b85cb9340870e598acc1d413f1141973cb9 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Tue, 30 Jun 2026 18:42:22 +0800 Subject: [PATCH] fix: complete operation logs --- agent/cmd/server/docs/x-log.json | 87 ++++++++++++++-------------- core/cmd/server/docs/docs.go | 42 +++++++++++++- core/cmd/server/docs/swagger.json | 40 ++++++++++++- core/cmd/server/docs/x-log.json | 87 ++++++++++++++-------------- frontend/src/lang/modules/en.ts | 1 + frontend/src/lang/modules/es-es.ts | 1 + frontend/src/lang/modules/fa.ts | 1 + frontend/src/lang/modules/ja.ts | 1 + frontend/src/lang/modules/ko.ts | 1 + frontend/src/lang/modules/ms.ts | 1 + frontend/src/lang/modules/pt-br.ts | 1 + frontend/src/lang/modules/ru.ts | 1 + frontend/src/lang/modules/tr.ts | 1 + frontend/src/lang/modules/zh-Hant.ts | 1 + frontend/src/lang/modules/zh.ts | 1 + 15 files changed, 180 insertions(+), 87 deletions(-) diff --git a/agent/cmd/server/docs/x-log.json b/agent/cmd/server/docs/x-log.json index 8f798f312cf4..9b3522cce98f 100644 --- a/agent/cmd/server/docs/x-log.json +++ b/agent/cmd/server/docs/x-log.json @@ -1395,13 +1395,14 @@ "/core/enterprise/skills-hub/import": { "bodyKeys": [ "type", + "version", "repoURL", "packageURL" ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "导入 Skills Hub 技能 [type]", - "formatEN": "import Skills Hub skill [type]" + "formatZH": "导入 Skills Hub 技能版本 [version]", + "formatEN": "import Skills Hub skill version [version]" }, "/core/enterprise/skills-hub/status": { "bodyKeys": [ @@ -1505,11 +1506,13 @@ "formatEN": "update Skills Hub install target [name]" }, "/core/enterprise/skills-hub/upload": { - "bodyKeys": [], + "bodyKeys": [ + "version" + ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "上传 Skills Hub 技能包", - "formatEN": "upload Skills Hub package" + "formatZH": "上传 Skills Hub 技能包版本 [version]", + "formatEN": "upload Skills Hub package version [version]" }, "/core/enterprise/users": { "bodyKeys": [ @@ -1520,6 +1523,25 @@ "formatZH": "添加用户 [name]", "formatEN": "add user [name]" }, + "/core/enterprise/users/api/update": { + "bodyKeys": [ + "id", + "ipWhiteList" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "users", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "更新用户 [name] API 接口配置 =\u003e IP 白名单: [ipWhiteList]", + "formatEN": "update user [name] api config =\u003e IP White List: [ipWhiteList]" + }, "/core/enterprise/users/del": { "bodyKeys": [ "ids" @@ -1890,6 +1912,20 @@ "formatZH": "交换文件 [sourcePath] 到 [targetPath]", "formatEN": "exchange file [sourcePath] to [targetPath]" }, + "/core/xpack/exchange/image": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步节点镜像", + "formatEN": "sync images" + }, + "/core/xpack/exchange/ssl": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步节点 SSL 证书", + "formatEN": "sync SSL certificates" + }, "/core/xpack/nodes": { "bodyKeys": [ "name" @@ -2227,15 +2263,11 @@ "formatEN": "update xpack setting [key]" }, "/core/xpack/sync/app": { - "bodyKeys": [ - "sourceNode", - "targetNodes", - "appInstallID" - ], + "bodyKeys": [], "paramKeys": [], "beforeFunctions": [], - "formatZH": "同步应用 [appInstallID] 到节点 [targetNodes]", - "formatEN": "sync app [appInstallID] to nodes [targetNodes]" + "formatZH": "同步节点应用", + "formatEN": "sync app" }, "/core/xpack/sync/ssl": { "bodyKeys": [ @@ -2385,26 +2417,6 @@ "formatZH": "更新应用镜像前缀 [imagePrefix]", "formatEN": "update app image prefix [imagePrefix]" }, - "/custom/app/install": { - "bodyKeys": [ - "name", - "appKey" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "从节点安装应用 [name]", - "formatEN": "install app [name] from node" - }, - "/custom/app/install/check": { - "bodyKeys": [ - "name", - "appKey" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "检查应用安装 [name]", - "formatEN": "check app install [name]" - }, "/custom/app/sync": { "bodyKeys": [], "paramKeys": [], @@ -2412,15 +2424,6 @@ "formatZH": "同步自定义应用商店", "formatEN": "sync custom app store" }, - "/custom/app/sync/backup": { - "bodyKeys": [ - "appInstallID" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "创建应用同步备份 [appInstallID]", - "formatEN": "create app sync backup [appInstallID]" - }, "/dashboard/app/launcher/show": { "bodyKeys": [ "key", @@ -5152,4 +5155,4 @@ "formatZH": "从主节点同步设置", "formatEN": "sync settings from master" } -} +} \ No newline at end of file diff --git a/core/cmd/server/docs/docs.go b/core/cmd/server/docs/docs.go index e43ef0592023..dff723b9cb2d 100644 --- a/core/cmd/server/docs/docs.go +++ b/core/cmd/server/docs/docs.go @@ -74,6 +74,7 @@ const docTemplate = `{ "description": "OK", "schema": { "additionalProperties": { + "format": "int64", "type": "integer" }, "type": "object" @@ -28517,6 +28518,12 @@ const docTemplate = `{ "cpuQuota": { "type": "number" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "dockerCompose": { "type": "string" }, @@ -28890,6 +28897,12 @@ const docTemplate = `{ "cpuQuota": { "type": "number" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "dockerCompose": { "type": "string" }, @@ -29464,6 +29477,12 @@ const docTemplate = `{ "createdAt": { "type": "string" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "id": { "type": "integer" }, @@ -29565,6 +29584,12 @@ const docTemplate = `{ "browserEnabled": { "type": "boolean" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "npmRegistry": { "type": "string" }, @@ -29582,6 +29607,12 @@ const docTemplate = `{ "browserEnabled": { "type": "boolean" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "npmRegistry": { "type": "string" }, @@ -34635,6 +34666,9 @@ const docTemplate = `{ "es-es": { "type": "string" }, + "fa": { + "type": "string" + }, "ja": { "type": "string" }, @@ -34692,7 +34726,8 @@ const docTemplate = `{ "ms", "pt-BR", "tr", - "es-ES" + "es-ES", + "fa" ], "type": "string" }, @@ -42980,6 +43015,9 @@ const docTemplate = `{ "pushNode": { "type": "boolean" }, + "sync": { + "type": "boolean" + }, "taskID": { "type": "string" } @@ -45456,4 +45494,4 @@ var SwaggerInfo = &swag.Spec{ func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) -} +} \ No newline at end of file diff --git a/core/cmd/server/docs/swagger.json b/core/cmd/server/docs/swagger.json index ee24e0486aa1..89c1857d23e3 100644 --- a/core/cmd/server/docs/swagger.json +++ b/core/cmd/server/docs/swagger.json @@ -70,6 +70,7 @@ "description": "OK", "schema": { "additionalProperties": { + "format": "int64", "type": "integer" }, "type": "object" @@ -28513,6 +28514,12 @@ "cpuQuota": { "type": "number" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "dockerCompose": { "type": "string" }, @@ -28886,6 +28893,12 @@ "cpuQuota": { "type": "number" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "dockerCompose": { "type": "string" }, @@ -29460,6 +29473,12 @@ "createdAt": { "type": "string" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "id": { "type": "integer" }, @@ -29561,6 +29580,12 @@ "browserEnabled": { "type": "boolean" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "npmRegistry": { "type": "string" }, @@ -29578,6 +29603,12 @@ "browserEnabled": { "type": "boolean" }, + "dashboardPassword": { + "type": "string" + }, + "dashboardUsername": { + "type": "string" + }, "npmRegistry": { "type": "string" }, @@ -34631,6 +34662,9 @@ "es-es": { "type": "string" }, + "fa": { + "type": "string" + }, "ja": { "type": "string" }, @@ -34688,7 +34722,8 @@ "ms", "pt-BR", "tr", - "es-ES" + "es-ES", + "fa" ], "type": "string" }, @@ -42976,6 +43011,9 @@ "pushNode": { "type": "boolean" }, + "sync": { + "type": "boolean" + }, "taskID": { "type": "string" } diff --git a/core/cmd/server/docs/x-log.json b/core/cmd/server/docs/x-log.json index 8f798f312cf4..9b3522cce98f 100644 --- a/core/cmd/server/docs/x-log.json +++ b/core/cmd/server/docs/x-log.json @@ -1395,13 +1395,14 @@ "/core/enterprise/skills-hub/import": { "bodyKeys": [ "type", + "version", "repoURL", "packageURL" ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "导入 Skills Hub 技能 [type]", - "formatEN": "import Skills Hub skill [type]" + "formatZH": "导入 Skills Hub 技能版本 [version]", + "formatEN": "import Skills Hub skill version [version]" }, "/core/enterprise/skills-hub/status": { "bodyKeys": [ @@ -1505,11 +1506,13 @@ "formatEN": "update Skills Hub install target [name]" }, "/core/enterprise/skills-hub/upload": { - "bodyKeys": [], + "bodyKeys": [ + "version" + ], "paramKeys": [], "beforeFunctions": [], - "formatZH": "上传 Skills Hub 技能包", - "formatEN": "upload Skills Hub package" + "formatZH": "上传 Skills Hub 技能包版本 [version]", + "formatEN": "upload Skills Hub package version [version]" }, "/core/enterprise/users": { "bodyKeys": [ @@ -1520,6 +1523,25 @@ "formatZH": "添加用户 [name]", "formatEN": "add user [name]" }, + "/core/enterprise/users/api/update": { + "bodyKeys": [ + "id", + "ipWhiteList" + ], + "paramKeys": [], + "beforeFunctions": [ + { + "input_column": "id", + "input_value": "id", + "isList": false, + "db": "users", + "output_column": "name", + "output_value": "name" + } + ], + "formatZH": "更新用户 [name] API 接口配置 =\u003e IP 白名单: [ipWhiteList]", + "formatEN": "update user [name] api config =\u003e IP White List: [ipWhiteList]" + }, "/core/enterprise/users/del": { "bodyKeys": [ "ids" @@ -1890,6 +1912,20 @@ "formatZH": "交换文件 [sourcePath] 到 [targetPath]", "formatEN": "exchange file [sourcePath] to [targetPath]" }, + "/core/xpack/exchange/image": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步节点镜像", + "formatEN": "sync images" + }, + "/core/xpack/exchange/ssl": { + "bodyKeys": [], + "paramKeys": [], + "beforeFunctions": [], + "formatZH": "同步节点 SSL 证书", + "formatEN": "sync SSL certificates" + }, "/core/xpack/nodes": { "bodyKeys": [ "name" @@ -2227,15 +2263,11 @@ "formatEN": "update xpack setting [key]" }, "/core/xpack/sync/app": { - "bodyKeys": [ - "sourceNode", - "targetNodes", - "appInstallID" - ], + "bodyKeys": [], "paramKeys": [], "beforeFunctions": [], - "formatZH": "同步应用 [appInstallID] 到节点 [targetNodes]", - "formatEN": "sync app [appInstallID] to nodes [targetNodes]" + "formatZH": "同步节点应用", + "formatEN": "sync app" }, "/core/xpack/sync/ssl": { "bodyKeys": [ @@ -2385,26 +2417,6 @@ "formatZH": "更新应用镜像前缀 [imagePrefix]", "formatEN": "update app image prefix [imagePrefix]" }, - "/custom/app/install": { - "bodyKeys": [ - "name", - "appKey" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "从节点安装应用 [name]", - "formatEN": "install app [name] from node" - }, - "/custom/app/install/check": { - "bodyKeys": [ - "name", - "appKey" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "检查应用安装 [name]", - "formatEN": "check app install [name]" - }, "/custom/app/sync": { "bodyKeys": [], "paramKeys": [], @@ -2412,15 +2424,6 @@ "formatZH": "同步自定义应用商店", "formatEN": "sync custom app store" }, - "/custom/app/sync/backup": { - "bodyKeys": [ - "appInstallID" - ], - "paramKeys": [], - "beforeFunctions": [], - "formatZH": "创建应用同步备份 [appInstallID]", - "formatEN": "create app sync backup [appInstallID]" - }, "/dashboard/app/launcher/show": { "bodyKeys": [ "key", @@ -5152,4 +5155,4 @@ "formatZH": "从主节点同步设置", "formatEN": "sync settings from master" } -} +} \ No newline at end of file diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 3a2668cffb9d..e56febf5f1a6 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -2056,6 +2056,7 @@ const message = { roles: 'Role', auth: 'Login Authentication', alert: 'Alert Notifications', + sync: 'Resource Sync', }, websiteLog: 'Website logs', runLog: 'Run logs', diff --git a/frontend/src/lang/modules/es-es.ts b/frontend/src/lang/modules/es-es.ts index a5fd8613688a..1e05337e2175 100644 --- a/frontend/src/lang/modules/es-es.ts +++ b/frontend/src/lang/modules/es-es.ts @@ -2099,6 +2099,7 @@ const message = { roles: 'Rol', auth: 'Autenticación de inicio de sesión', alert: 'Notificaciones de alerta', + sync: 'Sincronización de Recursos', }, websiteLog: 'Logs de sitio web', runLog: 'Logs de ejecución', diff --git a/frontend/src/lang/modules/fa.ts b/frontend/src/lang/modules/fa.ts index f38416f67d3f..503b2fb470b6 100644 --- a/frontend/src/lang/modules/fa.ts +++ b/frontend/src/lang/modules/fa.ts @@ -2045,6 +2045,7 @@ const message = { roles: 'نقش', auth: 'احراز هویت ورود', alert: 'هشدارها', + sync: 'همگام‌سازی منابع', }, websiteLog: 'لاگ وب‌سایت', runLog: 'لاگ اجرا', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 9390ea0236c3..cbfd3d8969db 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -2067,6 +2067,7 @@ const message = { roles: 'ロール', auth: 'ログイン認証', alert: 'アラート通知', + sync: 'リソース同期', }, websiteLog: 'ウェブサイトログ', runLog: 'ログを実行します', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index d79139acc156..80f04e7a175a 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -2025,6 +2025,7 @@ const message = { roles: '역할', auth: '로그인 인증', alert: '경고 알림', + sync: '리소스 동기화', }, websiteLog: '웹사이트 로그', runLog: '실행 로그', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 166529dee4a0..b591507708a6 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -2093,6 +2093,7 @@ const message = { roles: 'Peranan', auth: 'Pengesahan log masuk', alert: 'Pemberitahuan amaran', + sync: 'Penyegerakan Sumber', }, websiteLog: 'Log Laman Web', runLog: 'Log Jalankan', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index d117c209c2f5..681cf3499631 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -2209,6 +2209,7 @@ const message = { roles: 'Função', auth: 'Autenticação de login', alert: 'Notificações de alerta', + sync: 'Sincronização de Recursos', }, websiteLog: 'Logs do website', runLog: 'Logs de execução', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index 386b67a7804a..327760510a43 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -2082,6 +2082,7 @@ const message = { roles: 'Роль', auth: 'Аутентификация входа', alert: 'Уведомления о тревогах', + sync: 'Синхронизация ресурсов', }, websiteLog: 'Логи веб-сайта', runLog: 'Логи выполнения', diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts index 05f24c93d7ac..2626f33ad273 100644 --- a/frontend/src/lang/modules/tr.ts +++ b/frontend/src/lang/modules/tr.ts @@ -2091,6 +2091,7 @@ const message = { roles: 'Rol', auth: 'Giriş kimlik doğrulaması', alert: 'Uyarı bildirimleri', + sync: 'Kaynak Senkronizasyonu', }, websiteLog: 'Website logları', runLog: 'Çalıştırma logları', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index 90c927ef1a77..186d90da9cdb 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -1936,6 +1936,7 @@ const message = { roles: '角色', auth: '登入認證', alert: '告警通知', + sync: '資源同步', }, websiteLog: '網站日誌', runLog: '執行日誌', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index e3890e65c002..9d19ae675b75 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1933,6 +1933,7 @@ const message = { roles: '角色', auth: '登陆认证', alert: '告警通知', + sync: '资源同步', }, websiteLog: '网站日志', runLog: '运行日志',