@whyour/qinglong 2.21.0-8 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +13 -0
- package/.env.example +7 -0
- package/AGENTS.md +2 -2
- package/README-en.md +24 -0
- package/README.md +24 -0
- package/back/protos/api.proto +6 -1
- package/back/protos/cron.proto +4 -1
- package/docker/Dockerfile +31 -12
- package/docker/Dockerfile.310 +31 -12
- package/docker/Dockerfile.debian +22 -14
- package/docker/Dockerfile.debian310 +24 -14
- package/docker/build-manifest.cjs +28 -0
- package/docker/verify-build.cjs +49 -0
- package/docs/releases/2.22.0-validation.md +49 -0
- package/docs/releases/2.22.0.md +54 -0
- package/ecosystem.config.js +10 -1
- package/package.json +11 -6
- package/sample/config.sample.sh +10 -0
- package/sample/notify.js +54 -0
- package/sample/notify.py +37 -0
- package/scripts/benchmark-execution.cjs +96 -0
- package/scripts/write-build-info.cjs +27 -0
- package/shell/api.sh +34 -13
- package/shell/check.sh +59 -19
- package/shell/lang/en.sh +6 -0
- package/shell/lang/zh.sh +6 -0
- package/shell/node_path_cache.sh +128 -0
- package/shell/otask.sh +7 -1
- package/shell/preload/sitecustomize.js +5 -1
- package/shell/share.sh +25 -8
- package/shell/start.sh +6 -3
- package/shell/task.sh +13 -3
- package/shell/update.sh +65 -4
- package/static/build/api/clientIp.js +42 -0
- package/static/build/api/config.js +8 -16
- package/static/build/api/cron.js +38 -2
- package/static/build/api/dashboard.js +37 -0
- package/static/build/api/health.js +2 -2
- package/static/build/api/index.js +4 -0
- package/static/build/api/log.js +30 -19
- package/static/build/api/retention.js +63 -0
- package/static/build/api/script.js +23 -22
- package/static/build/api/subscription.js +16 -2
- package/static/build/api/system.js +25 -2
- package/static/build/api/user.js +75 -15
- package/static/build/app.js +54 -45
- package/static/build/bootstrap/database.js +51 -0
- package/static/build/config/const.js +1 -0
- package/static/build/config/share.js +5 -4
- package/static/build/config/util.js +133 -38
- package/static/build/data/cron.js +1 -0
- package/static/build/data/notify.js +11 -1
- package/static/build/loaders/app.js +2 -0
- package/static/build/loaders/db.js +3 -33
- package/static/build/loaders/deps.js +29 -0
- package/static/build/loaders/express.js +30 -21
- package/static/build/loaders/initData.js +10 -7
- package/static/build/loaders/sock.js +72 -6
- package/static/build/middlewares/monitoring.js +12 -33
- package/static/build/middlewares/protectedPathCase.js +17 -0
- package/static/build/protos/api.js +56 -2
- package/static/build/protos/cron.js +21 -4
- package/static/build/protos/health.js +1 -1
- package/static/build/schedule/addCron.js +9 -0
- package/static/build/schedule/api.js +5 -2
- package/static/build/schedule/client.js +38 -6
- package/static/build/schedule/health.js +72 -7
- package/static/build/services/config.js +5 -42
- package/static/build/services/cron.js +338 -199
- package/static/build/services/dependence.js +47 -0
- package/static/build/services/grpc.js +1 -1
- package/static/build/services/health.js +4 -7
- package/static/build/services/http.js +8 -2
- package/static/build/services/log.js +2 -3
- package/static/build/services/metrics.js +46 -14
- package/static/build/services/notify.js +26 -0
- package/static/build/services/retention.js +123 -0
- package/static/build/services/schedule.js +57 -33
- package/static/build/services/script.js +4 -5
- package/static/build/services/subscription.js +55 -34
- package/static/build/services/system.js +37 -9
- package/static/build/services/user.js +213 -25
- package/static/build/shared/auth.js +18 -5
- package/static/build/shared/authMutation.js +17 -0
- package/static/build/shared/childProcess.js +82 -0
- package/static/build/shared/clientIp.js +27 -0
- package/static/build/shared/errors.js +9 -0
- package/static/build/shared/fileAccess.js +60 -0
- package/static/build/shared/i18n.js +12 -5
- package/static/build/shared/logReader.js +85 -0
- package/static/build/shared/logStreamManager.js +80 -60
- package/static/build/shared/password.js +30 -0
- package/static/build/shared/retention.js +58 -0
- package/static/build/shared/runCron.js +28 -15
- package/static/build/shared/schedulerMutationLock.js +44 -0
- package/static/build/shared/schedulerReadiness.js +82 -0
- package/static/build/shared/schemaMigrations.js +58 -0
- package/static/build/shared/startupProcess.js +48 -0
- package/static/build/shared/store.js +7 -0
- package/static/build/shared/trustProxy.js +119 -0
- package/static/build/validation/schedule.js +3 -3
- package/static/dist/{1885.e1ea09f6.async.js → 1885.b8f427bf.async.js} +1 -1
- package/static/dist/2031.6af40025.async.js +1 -0
- package/static/dist/2693.51c2636b.async.js +1 -0
- package/static/dist/{2890.9e373f5b.async.js → 2890.add55e85.async.js} +1 -1
- package/static/dist/2901.2ca95295.async.js +1 -0
- package/static/dist/445.a65ff63b.async.js +1 -0
- package/static/dist/4736.1d2b5cb6.async.js +1 -0
- package/static/dist/{4859.6592cebb.async.js → 4859.97d6653c.async.js} +1 -1
- package/static/dist/{6013.4e38de36.async.js → 6013.db535339.async.js} +1 -1
- package/static/dist/6212.9e6d9913.async.js +1 -0
- package/static/dist/{6339.ab305e96.async.js → 6431.4603ad0e.async.js} +1 -1
- package/static/dist/{6872.42f939f1.async.js → 6872.a503ef55.async.js} +1 -1
- package/static/dist/7231.f7e5b668.async.js +1 -0
- package/static/dist/{7355.f9f263d8.async.js → 7355.fca746f5.async.js} +1 -1
- package/static/dist/{7508.7dcee91c.async.js → 7508.d90eac63.async.js} +1 -1
- package/static/dist/{7984.594296a5.async.js → 7984.eaac7402.async.js} +1 -1
- package/static/dist/8844.a0fef08e.async.js +1 -0
- package/static/dist/index.html +2 -2
- package/static/dist/layouts__index.633d3553.async.js +1 -0
- package/static/dist/preload_helper.cf7de3fa.js +1 -0
- package/static/dist/{src__pages__config__index.a22ff7dc.async.js → src__pages__config__index.9aba4054.async.js} +1 -1
- package/static/dist/src__pages__crontab__detail.86b2eebb.async.js +1 -0
- package/static/dist/src__pages__crontab__index.ae4e06f2.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.831d5e4b.async.js → src__pages__crontab__logModal.930535e2.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.a2c8fdcc.async.js +1 -0
- package/static/dist/src__pages__crontab__viewCreateModal.7b4f9cbe.async.js +1 -0
- package/static/dist/src__pages__crontab__viewManageModal.cd454ea0.async.js +1 -0
- package/static/dist/src__pages__dashboard__index.243c5a35.async.js +1 -0
- package/static/dist/src__pages__dashboard__taskResultModal.7795d6e1.async.js +1 -0
- package/static/dist/src__pages__dependence__index.874d501f.async.js +1 -0
- package/static/dist/src__pages__dependence__logModal.154efe7a.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.a29c1a0f.async.js +1 -0
- package/static/dist/{src__pages__diff__index.013b7c75.async.js → src__pages__diff__index.1714b941.async.js} +1 -1
- package/static/dist/src__pages__env__editNameModal.c13d47d2.async.js +1 -0
- package/static/dist/src__pages__env__index.fd6fd2b0.async.js +1 -0
- package/static/dist/src__pages__env__modal.4d71adb3.async.js +1 -0
- package/static/dist/src__pages__error__index.aae50c94.async.js +1 -0
- package/static/dist/src__pages__initialization__index.82a2e967.async.js +1 -0
- package/static/dist/src__pages__log__index.71250e0d.async.js +1 -0
- package/static/dist/{src__pages__login__index.8c813eb1.async.js → src__pages__login__index.a0fd5ed8.async.js} +1 -1
- package/static/dist/src__pages__script__editModal.22acdf7c.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.1a521cc0.async.js +1 -0
- package/static/dist/src__pages__script__index.a18b2692.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.0ab029e7.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.8965b74c.async.js +1 -0
- package/static/dist/src__pages__script__setting.35ad4f02.async.js +1 -0
- package/static/dist/src__pages__setting__appModal.7eaeb9d3.async.js +1 -0
- package/static/dist/{src__pages__setting__checkUpdate.34d773f2.async.js → src__pages__setting__checkUpdate.d175b154.async.js} +1 -1
- package/static/dist/src__pages__setting__clientIp.3a8711ed.async.js +1 -0
- package/static/dist/src__pages__setting__dependence.9c0f749b.async.js +1 -0
- package/static/dist/src__pages__setting__index.cb397741.async.js +1 -0
- package/static/dist/src__pages__setting__loginLog.e0a1f54d.async.js +1 -0
- package/static/dist/src__pages__setting__notification.2ffe4e5a.async.js +1 -0
- package/static/dist/src__pages__setting__other.3d0b8492.async.js +1 -0
- package/static/dist/{src__pages__setting__progress.8823ac90.async.js → src__pages__setting__progress.2ccae3d7.async.js} +1 -1
- package/static/dist/src__pages__setting__security.e2d71ebb.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.b3046955.async.js +1 -0
- package/static/dist/src__pages__subscription__index.43086a06.async.js +1 -0
- package/static/dist/src__pages__subscription__logModal.cdba5139.async.js +1 -0
- package/static/dist/src__pages__subscription__modal.38991e1e.async.js +1 -0
- package/static/dist/{umi.a54a59f6.js → umi.fc019050.js} +1 -1
- package/test/back/auth-security.test.cjs +74 -0
- package/test/back/build-provenance.test.cjs +150 -0
- package/test/back/cron-log-name.test.cjs +110 -0
- package/test/back/cron-validation.test.cjs +45 -0
- package/test/back/dashboard-failures.test.cjs +173 -0
- package/test/back/database-bootstrap.test.cjs +193 -0
- package/test/back/dependence-cache-status.test.cjs +125 -0
- package/test/back/deprecated-file-routes.test.cjs +82 -0
- package/test/back/ecosystem.test.cjs +28 -0
- package/test/back/env-name-parsing.test.cjs +96 -0
- package/test/back/execution-lifecycle.test.cjs +236 -0
- package/test/back/file-access-security.test.cjs +47 -0
- package/test/back/fileTreeListing.test.cjs +57 -0
- package/test/back/grpc-cron-response.test.cjs +60 -0
- package/test/back/http-exclusive-listen.test.cjs +31 -0
- package/test/back/http-security.test.cjs +213 -0
- package/test/back/listen-security.test.cjs +67 -0
- package/test/back/log-path-security.test.cjs +158 -0
- package/test/back/logReader.test.cjs +72 -0
- package/test/back/manual-execution.test.cjs +85 -0
- package/test/back/manual-stop-claim.test.cjs +220 -0
- package/test/back/metrics.test.cjs +34 -0
- package/test/back/monitoring.test.cjs +73 -0
- package/test/back/node-path-cache.test.cjs +173 -0
- package/test/back/node-path-lock.test.cjs +178 -0
- package/test/back/npm-publication.test.cjs +70 -0
- package/test/back/primary-apm.test.cjs +24 -0
- package/test/back/process-exit-state.test.cjs +81 -0
- package/test/back/process-stop-signal.test.cjs +77 -0
- package/test/back/protected-path-case.test.cjs +58 -0
- package/test/back/qlServiceLogCommand.test.cjs +128 -0
- package/test/back/retention.test.cjs +131 -0
- package/test/back/role-loading.test.cjs +118 -0
- package/test/back/schedule-health.test.cjs +86 -0
- package/test/back/scheduler-file-lock.test.cjs +51 -0
- package/test/back/scheduler-mutation.test.cjs +312 -0
- package/test/back/scheduler-readiness.test.cjs +85 -0
- package/test/back/scheduler-reconciliation.test.cjs +152 -0
- package/test/back/scheduler-rpc-timeout.test.cjs +49 -0
- package/test/back/schema-migrations.test.cjs +127 -0
- package/test/back/shell-api-parsing.test.cjs +184 -0
- package/test/back/sock-polling.test.cjs +297 -0
- package/test/back/sock-security.test.cjs +72 -0
- package/test/back/start-env-preservation.test.cjs +53 -0
- package/test/back/stop-failure-feedback.test.cjs +158 -0
- package/test/back/stop-race.test.cjs +167 -0
- package/test/back/subscription-cleanup.test.cjs +53 -0
- package/test/back/subscription-stop-state.test.cjs +66 -0
- package/test/back/system-dependence-cache.test.cjs +126 -0
- package/test/back/task-time.test.cjs +116 -0
- package/test/back/user-api.test.cjs +99 -0
- package/test/back/user-security.test.cjs +248 -0
- package/test/back/worker-apm.test.cjs +84 -0
- package/test/back/wpush-grpc.test.cjs +115 -0
- package/test/front/cron-log-pagination.test.cjs +214 -0
- package/test/front/http-auth.test.cjs +152 -0
- package/test/front/http-error.test.cjs +29 -0
- package/test/helpers/load-security-module.cjs +42 -0
- package/version.yaml +19 -34
- package/CLAUDE.md +0 -43
- package/static/dist/1147.62793604.async.js +0 -1
- package/static/dist/134.54df9e38.async.js +0 -1
- package/static/dist/2208.85285476.async.js +0 -1
- package/static/dist/2286.f371c743.async.js +0 -1
- package/static/dist/3191.545ab873.async.js +0 -1
- package/static/dist/4902.555f92ab.async.js +0 -1
- package/static/dist/5520.ff2cfd6b.async.js +0 -1
- package/static/dist/6431.c50479be.async.js +0 -1
- package/static/dist/8826.db34ad8d.async.js +0 -1
- package/static/dist/layouts__index.a7a2bfe0.async.js +0 -1
- package/static/dist/preload_helper.3048fe5b.js +0 -1
- package/static/dist/src__pages__crontab__detail.b98f0084.async.js +0 -1
- package/static/dist/src__pages__crontab__index.68e78a33.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.f7041c7c.async.js +0 -1
- package/static/dist/src__pages__crontab__viewCreateModal.4d589f66.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.0e317746.async.js +0 -1
- package/static/dist/src__pages__dashboard__index.58177357.async.js +0 -1
- package/static/dist/src__pages__dependence__index.b7bbc795.async.js +0 -1
- package/static/dist/src__pages__dependence__logModal.0681830b.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.f7bb47ba.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.48715576.async.js +0 -1
- package/static/dist/src__pages__env__index.452cdc47.async.js +0 -1
- package/static/dist/src__pages__env__modal.e1234834.async.js +0 -1
- package/static/dist/src__pages__error__index.dedb2b90.async.js +0 -1
- package/static/dist/src__pages__initialization__index.22620a77.async.js +0 -1
- package/static/dist/src__pages__log__index.9c66639f.async.js +0 -1
- package/static/dist/src__pages__script__editModal.cbf4ec0e.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.532a3044.async.js +0 -1
- package/static/dist/src__pages__script__index.1fc20f22.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.5cdde919.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.5ffed35f.async.js +0 -1
- package/static/dist/src__pages__script__setting.1a82c6d7.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.43b7758a.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.9c04c79a.async.js +0 -1
- package/static/dist/src__pages__setting__index.7e070838.async.js +0 -1
- package/static/dist/src__pages__setting__loginLog.cea6056c.async.js +0 -1
- package/static/dist/src__pages__setting__notification.bac481c2.async.js +0 -1
- package/static/dist/src__pages__setting__other.707cfafe.async.js +0 -1
- package/static/dist/src__pages__setting__security.b7235753.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.b81a8c1d.async.js +0 -1
- package/static/dist/src__pages__subscription__index.d0ab2abc.async.js +0 -1
- package/static/dist/src__pages__subscription__logModal.3864b37f.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.562448e2.async.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whyour/qinglong",
|
|
3
3
|
"packageManager": "pnpm@8.3.1",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.22.0",
|
|
5
5
|
"description": "Timed task management platform supporting Python3, JavaScript, Shell, Typescript",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -13,17 +13,22 @@
|
|
|
13
13
|
"url": "https://github.com/whyour/qinglong/issues"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
+
"build:cli": "node cli/scripts/build.cjs",
|
|
17
|
+
"check:cli": "npm --prefix cli run check",
|
|
18
|
+
"test:cli": "npm run build:cli && node cli/scripts/test.cjs",
|
|
19
|
+
"cli": "node cli/dist/index.js",
|
|
16
20
|
"start": "concurrently -n w: npm:start:*",
|
|
17
21
|
"start:back": "nodemon ./back/app.ts",
|
|
18
22
|
"start:front": "max dev",
|
|
19
23
|
"build:front": "max build",
|
|
20
24
|
"build:back": "tsc -p back/tsconfig.json",
|
|
25
|
+
"test": "TS_NODE_PROJECT=back/tsconfig.json node -r ts-node/register/transpile-only --test test/back/*.test.cjs test/front/*.test.cjs",
|
|
26
|
+
"benchmark:execution": "TS_NODE_PROJECT=back/tsconfig.json node -r ts-node/register/transpile-only scripts/benchmark-execution.cjs",
|
|
27
|
+
"build:info": "node scripts/write-build-info.cjs",
|
|
21
28
|
"panel": "npm run build:back && node static/build/app.js",
|
|
22
29
|
"gen:proto": "protoc --experimental_allow_proto3_optional --plugin=./node_modules/.bin/protoc-gen-ts_proto ./back/protos/*.proto --ts_proto_out=./ --ts_proto_opt=outputServices=grpc-js,env=node,esModuleInterop=true,snakeToCamel=false",
|
|
23
30
|
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
|
|
24
|
-
"postinstall": "max setup 2>/dev/null || true"
|
|
25
|
-
"test": "umi-test",
|
|
26
|
-
"test:coverage": "umi-test --coverage"
|
|
31
|
+
"postinstall": "max setup 2>/dev/null || true"
|
|
27
32
|
},
|
|
28
33
|
"gitHooks": {
|
|
29
34
|
"pre-commit": "lint-staged"
|
|
@@ -67,7 +72,7 @@
|
|
|
67
72
|
}
|
|
68
73
|
},
|
|
69
74
|
"overrides": {
|
|
70
|
-
"sqlite3": "
|
|
75
|
+
"sqlite3": "npm:@whyour/sqlite3@1.1.2",
|
|
71
76
|
"@codemirror/state": "6.5.4",
|
|
72
77
|
"@codemirror/view": "6.39.16"
|
|
73
78
|
}
|
|
@@ -111,7 +116,7 @@
|
|
|
111
116
|
"request-ip": "3.3.0",
|
|
112
117
|
"sequelize": "^6.37.5",
|
|
113
118
|
"sockjs": "^0.3.24",
|
|
114
|
-
"sqlite3": "
|
|
119
|
+
"sqlite3": "npm:@whyour/sqlite3@1.1.2",
|
|
115
120
|
"toad-scheduler": "^3.0.1",
|
|
116
121
|
"typedi": "^0.10.0",
|
|
117
122
|
"undici": "^7.9.0",
|
package/sample/config.sample.sh
CHANGED
|
@@ -276,3 +276,13 @@ export OPENILINK_HUB_URL=""
|
|
|
276
276
|
export OPENILINK_CONTEXT_TOKEN=""
|
|
277
277
|
|
|
278
278
|
## 其他需要的变量,脚本中需要的变量使用 export 变量名= 声明即可
|
|
279
|
+
|
|
280
|
+
## 23. WPUSH
|
|
281
|
+
## 官方文档: https://wpush.cn/docs
|
|
282
|
+
## WPUSH_APIKEY (必填) 在 https://wpush.cn/settings 获取,以 WPUSH 开头
|
|
283
|
+
export WPUSH_APIKEY=""
|
|
284
|
+
## 推送渠道,支持 wechat/app/sms/mail/webhook/dingtalk/feishu/wechat_work/clawbot/qqbot,默认 wechat
|
|
285
|
+
export WPUSH_CHANNEL="wechat"
|
|
286
|
+
## 可选,Topic 广播编码;填写后按 Topic 推送
|
|
287
|
+
export WPUSH_TOPIC_CODE=""
|
|
288
|
+
|
package/sample/notify.js
CHANGED
|
@@ -162,6 +162,11 @@ const push_config = {
|
|
|
162
162
|
OPENILINK_APP_TOKEN: '', // OpeniLink 的 app_token,在 OpeniLink Hub 后台安装 App 后获取
|
|
163
163
|
OPENILINK_HUB_URL: '', // OpeniLink Hub 地址,默认为 https://hub.openilink.com,自建 Hub 时填写自己的地址
|
|
164
164
|
OPENILINK_CONTEXT_TOKEN: '', // OpeniLink 的 context_token,用于标识消息会话上下文,可从消息事件中获取
|
|
165
|
+
|
|
166
|
+
// WPUSH 官方文档: https://wpush.cn/docs
|
|
167
|
+
WPUSH_APIKEY: '', // WPUSH 的 API Key,在 https://wpush.cn/settings 获取
|
|
168
|
+
WPUSH_CHANNEL: 'wechat', // 推送渠道,支持 wechat/app/sms/mail/webhook/dingtalk/feishu/wechat_work/clawbot/qqbot
|
|
169
|
+
WPUSH_TOPIC_CODE: '', // 可选,Topic 广播编码
|
|
165
170
|
};
|
|
166
171
|
|
|
167
172
|
for (const key in push_config) {
|
|
@@ -1494,6 +1499,54 @@ function wxPusherSptNotify(text, desp) {
|
|
|
1494
1499
|
});
|
|
1495
1500
|
}
|
|
1496
1501
|
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
function wpushNotify(text, desp) {
|
|
1505
|
+
return new Promise((resolve) => {
|
|
1506
|
+
const { WPUSH_APIKEY, WPUSH_CHANNEL, WPUSH_TOPIC_CODE } = push_config;
|
|
1507
|
+
if (WPUSH_APIKEY) {
|
|
1508
|
+
const body = {
|
|
1509
|
+
apikey: `${WPUSH_APIKEY}`,
|
|
1510
|
+
title: `${text}`,
|
|
1511
|
+
content: `${desp}`,
|
|
1512
|
+
channel: `${WPUSH_CHANNEL || 'wechat'}`,
|
|
1513
|
+
};
|
|
1514
|
+
if (WPUSH_TOPIC_CODE) {
|
|
1515
|
+
body.topic_code = WPUSH_TOPIC_CODE;
|
|
1516
|
+
}
|
|
1517
|
+
const options = {
|
|
1518
|
+
url: `https://api.wpush.cn/api/v1/send`,
|
|
1519
|
+
body: JSON.stringify(body),
|
|
1520
|
+
headers: {
|
|
1521
|
+
'Content-Type': 'application/json',
|
|
1522
|
+
},
|
|
1523
|
+
timeout,
|
|
1524
|
+
};
|
|
1525
|
+
$.post(options, (err, resp, data) => {
|
|
1526
|
+
try {
|
|
1527
|
+
if (err) {
|
|
1528
|
+
console.log('WPUSH 发送通知消息失败!\n', err);
|
|
1529
|
+
} else {
|
|
1530
|
+
if (data.code === 0) {
|
|
1531
|
+
console.log('WPUSH 发送通知消息成功!');
|
|
1532
|
+
} else {
|
|
1533
|
+
console.log(
|
|
1534
|
+
`WPUSH 发送通知消息异常:${data.message || JSON.stringify(data)}`,
|
|
1535
|
+
);
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
} catch (e) {
|
|
1539
|
+
$.logErr(e, resp);
|
|
1540
|
+
} finally {
|
|
1541
|
+
resolve(data);
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
} else {
|
|
1545
|
+
resolve();
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1497
1550
|
function openiLinkNotify(text, desp) {
|
|
1498
1551
|
return new Promise((resolve) => {
|
|
1499
1552
|
const { OPENILINK_APP_TOKEN, OPENILINK_HUB_URL, OPENILINK_CONTEXT_TOKEN } =
|
|
@@ -1674,6 +1727,7 @@ async function sendNotify(text, desp, params = {}) {
|
|
|
1674
1727
|
wxPusherNotify(text, desp), // wxpusher
|
|
1675
1728
|
wxPusherSptNotify(text, desp), // wxpusher SPT
|
|
1676
1729
|
openiLinkNotify(text, desp), // OpeniLink
|
|
1730
|
+
wpushNotify(text, desp), // WPUSH
|
|
1677
1731
|
]);
|
|
1678
1732
|
}
|
|
1679
1733
|
|
package/sample/notify.py
CHANGED
|
@@ -147,6 +147,11 @@ push_config = {
|
|
|
147
147
|
'OPENILINK_APP_TOKEN': '', # OpeniLink 的 app_token,在 OpeniLink Hub 后台安装 App 后获取 官方文档: https://openilink.com/docs/hub/apps
|
|
148
148
|
'OPENILINK_HUB_URL': '', # OpeniLink Hub 地址,默认为 https://hub.openilink.com,自建 Hub 时填写自己的地址
|
|
149
149
|
'OPENILINK_CONTEXT_TOKEN': '', # OpeniLink 的 context_token,用于标识消息会话上下文,可从消息事件中获取
|
|
150
|
+
|
|
151
|
+
# WPUSH 官方文档: https://wpush.cn/docs
|
|
152
|
+
'WPUSH_APIKEY': '', # WPUSH 的 API Key,在 https://wpush.cn/settings 获取
|
|
153
|
+
'WPUSH_CHANNEL': 'wechat', # 推送渠道,支持 wechat/app/sms/mail/webhook/dingtalk/feishu/wechat_work/clawbot/qqbot
|
|
154
|
+
'WPUSH_TOPIC_CODE': '', # 可选,Topic 广播编码
|
|
150
155
|
}
|
|
151
156
|
# fmt: on
|
|
152
157
|
|
|
@@ -956,6 +961,36 @@ def wxpusher_spt(title: str, content: str) -> None:
|
|
|
956
961
|
print(f"wxpusher SPT 推送失败!错误信息:{response.get('msg')}")
|
|
957
962
|
|
|
958
963
|
|
|
964
|
+
|
|
965
|
+
def wpush(title: str, content: str) -> None:
|
|
966
|
+
"""
|
|
967
|
+
通过 WPUSH 推送消息。
|
|
968
|
+
官方文档: https://wpush.cn/docs
|
|
969
|
+
"""
|
|
970
|
+
if not push_config.get("WPUSH_APIKEY"):
|
|
971
|
+
return
|
|
972
|
+
|
|
973
|
+
print("WPUSH 服务启动")
|
|
974
|
+
|
|
975
|
+
url = "https://api.wpush.cn/api/v1/send"
|
|
976
|
+
data = {
|
|
977
|
+
"apikey": push_config.get("WPUSH_APIKEY"),
|
|
978
|
+
"title": title,
|
|
979
|
+
"content": content,
|
|
980
|
+
"channel": push_config.get("WPUSH_CHANNEL") or "wechat",
|
|
981
|
+
}
|
|
982
|
+
if push_config.get("WPUSH_TOPIC_CODE"):
|
|
983
|
+
data["topic_code"] = push_config.get("WPUSH_TOPIC_CODE")
|
|
984
|
+
|
|
985
|
+
headers = {"Content-Type": "application/json"}
|
|
986
|
+
response = requests.post(url=url, json=data, headers=headers, timeout=15).json()
|
|
987
|
+
|
|
988
|
+
if response.get("code") == 0:
|
|
989
|
+
print("WPUSH 推送成功!")
|
|
990
|
+
else:
|
|
991
|
+
print(f'WPUSH 推送失败!错误信息:{response.get("message") or response}')
|
|
992
|
+
|
|
993
|
+
|
|
959
994
|
def openilink(title: str, content: str) -> None:
|
|
960
995
|
"""
|
|
961
996
|
通过 OpeniLink 推送消息。
|
|
@@ -1162,6 +1197,8 @@ def add_notify_function():
|
|
|
1162
1197
|
notify_function.append(wxpusher_spt)
|
|
1163
1198
|
if push_config.get("OPENILINK_APP_TOKEN"):
|
|
1164
1199
|
notify_function.append(openilink)
|
|
1200
|
+
if push_config.get("WPUSH_APIKEY"):
|
|
1201
|
+
notify_function.append(wpush)
|
|
1165
1202
|
if not notify_function:
|
|
1166
1203
|
print(f"无推送渠道,请检查通知变量是否正确")
|
|
1167
1204
|
return notify_function
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Microbenchmark of the process observer, not a container or scheduler benchmark.
|
|
2
|
+
const fs = require('node:fs');
|
|
3
|
+
const os = require('node:os');
|
|
4
|
+
const crypto = require('node:crypto');
|
|
5
|
+
const { spawn, execFileSync } = require('node:child_process');
|
|
6
|
+
const { performance } = require('node:perf_hooks');
|
|
7
|
+
const { observeChildProcess } = require('../back/shared/childProcess');
|
|
8
|
+
|
|
9
|
+
const args = process.argv.slice(2).filter((arg) => arg !== '--');
|
|
10
|
+
const runsArg = args.find((arg) => arg.startsWith('--runs='));
|
|
11
|
+
const runs = runsArg ? Number(runsArg.slice(7)) : 30;
|
|
12
|
+
if (!Number.isInteger(runs) || runs < 3 || runs > 10000)
|
|
13
|
+
throw new Error('runs must be between 3 and 10000');
|
|
14
|
+
const output = args.find((arg) => arg.startsWith('--output='))?.slice(9);
|
|
15
|
+
const git = (...args) => execFileSync('git', args, { encoding: 'utf8' }).trim();
|
|
16
|
+
const scenarios = [
|
|
17
|
+
{ name: 'empty-node', command: '' },
|
|
18
|
+
{
|
|
19
|
+
name: 'log-1MiB',
|
|
20
|
+
command: 'process.stdout.write("x".repeat(1024 * 1024))',
|
|
21
|
+
bytes: 1024 * 1024,
|
|
22
|
+
},
|
|
23
|
+
{ name: 'spawn-failure', shell: '/nonexistent-ql-benchmark-shell' },
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
(async () => {
|
|
27
|
+
const report = {
|
|
28
|
+
schema: 1,
|
|
29
|
+
observerSha256: crypto
|
|
30
|
+
.createHash('sha256')
|
|
31
|
+
.update(fs.readFileSync('back/shared/childProcess.ts'))
|
|
32
|
+
.digest('hex'),
|
|
33
|
+
benchmarkSha256: crypto
|
|
34
|
+
.createHash('sha256')
|
|
35
|
+
.update(fs.readFileSync(__filename))
|
|
36
|
+
.digest('hex'),
|
|
37
|
+
scope:
|
|
38
|
+
'local process observer only; parent CPU excludes child CPU; no panel/container load measured',
|
|
39
|
+
sourceCommit: git('rev-parse', 'HEAD'),
|
|
40
|
+
dirty: git('status', '--porcelain') !== '',
|
|
41
|
+
lockfileSha256: crypto
|
|
42
|
+
.createHash('sha256')
|
|
43
|
+
.update(fs.readFileSync('pnpm-lock.yaml'))
|
|
44
|
+
.digest('hex'),
|
|
45
|
+
node: process.version,
|
|
46
|
+
platform: process.platform,
|
|
47
|
+
arch: process.arch,
|
|
48
|
+
cpu: os.cpus()[0]?.model,
|
|
49
|
+
cores: os.cpus().length,
|
|
50
|
+
timestamp: new Date().toISOString(),
|
|
51
|
+
runs,
|
|
52
|
+
scenarios: [],
|
|
53
|
+
};
|
|
54
|
+
for (const scenario of scenarios) {
|
|
55
|
+
const samples = [];
|
|
56
|
+
const cpuStart = process.cpuUsage();
|
|
57
|
+
for (let index = 0; index < runs; index++) {
|
|
58
|
+
const start = performance.now();
|
|
59
|
+
let bytes = 0;
|
|
60
|
+
const child = scenario.shell
|
|
61
|
+
? spawn('true', { shell: scenario.shell })
|
|
62
|
+
: spawn(process.execPath, ['-e', scenario.command]);
|
|
63
|
+
const result = await observeChildProcess(child, {
|
|
64
|
+
onStdout: async (chunk) => {
|
|
65
|
+
bytes += Buffer.byteLength(chunk);
|
|
66
|
+
},
|
|
67
|
+
}).completed;
|
|
68
|
+
if (scenario.shell ? !result.error : result.error || result.code !== 0)
|
|
69
|
+
throw new Error(`Unexpected result: ${scenario.name}`);
|
|
70
|
+
if (bytes !== (scenario.bytes || 0))
|
|
71
|
+
throw new Error(`Output loss: ${scenario.name}`);
|
|
72
|
+
samples.push({
|
|
73
|
+
wallMs: performance.now() - start,
|
|
74
|
+
bytes,
|
|
75
|
+
code: result.code,
|
|
76
|
+
error: result.error?.message,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const sorted = samples.map((sample) => sample.wallMs).sort((a, b) => a - b);
|
|
80
|
+
const percentile = (p) => sorted[Math.ceil(sorted.length * p) - 1];
|
|
81
|
+
report.scenarios.push({
|
|
82
|
+
name: scenario.name,
|
|
83
|
+
parentCpuMicros: process.cpuUsage(cpuStart),
|
|
84
|
+
p50Ms: percentile(0.5),
|
|
85
|
+
p95Ms: percentile(0.95),
|
|
86
|
+
...(runs >= 100 ? { p99Ms: percentile(0.99) } : {}),
|
|
87
|
+
samples,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const json = JSON.stringify(report, null, 2) + '\n';
|
|
91
|
+
if (output) fs.writeFileSync(output, json);
|
|
92
|
+
else process.stdout.write(json);
|
|
93
|
+
})().catch((error) => {
|
|
94
|
+
console.error(error);
|
|
95
|
+
process.exitCode = 1;
|
|
96
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
const crypto = require('node:crypto');
|
|
4
|
+
const { execFileSync } = require('node:child_process');
|
|
5
|
+
const { collectBuildFiles } = require('../docker/build-manifest.cjs');
|
|
6
|
+
|
|
7
|
+
const root = process.cwd();
|
|
8
|
+
for (const output of ['static/build/app.js', 'static/dist/index.html']) {
|
|
9
|
+
if (!fs.existsSync(path.join(root, output)))
|
|
10
|
+
throw new Error(`Missing build output: ${output}`);
|
|
11
|
+
}
|
|
12
|
+
const git = (...args) =>
|
|
13
|
+
execFileSync('git', args, { cwd: root, encoding: 'utf8' }).trim();
|
|
14
|
+
const manifest = {
|
|
15
|
+
version: 1,
|
|
16
|
+
files: collectBuildFiles(),
|
|
17
|
+
sourceCommit: git('rev-parse', 'HEAD'),
|
|
18
|
+
dirty: git('status', '--porcelain', '--untracked-files=all') !== '',
|
|
19
|
+
lockfileSha256: crypto
|
|
20
|
+
.createHash('sha256')
|
|
21
|
+
.update(fs.readFileSync('pnpm-lock.yaml'))
|
|
22
|
+
.digest('hex'),
|
|
23
|
+
};
|
|
24
|
+
fs.writeFileSync(
|
|
25
|
+
'static/build-info.json',
|
|
26
|
+
JSON.stringify(manifest, null, 2) + '\n',
|
|
27
|
+
);
|
package/shell/api.sh
CHANGED
|
@@ -10,16 +10,39 @@ create_token() {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
get_token() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
local token_data expiration token_value
|
|
14
|
+
local currentTimeStamp=${EPOCHSECONDS:-$(date +%s)}
|
|
15
|
+
if [[ -f "$file_auth_token" ]] && token_data=$(jq -er \
|
|
16
|
+
'select((.expiration | type) == "number" and (.value | type) == "string" and (.value | length) > 0 and (.value | test("[\r\n]") | not)) | .expiration, .value' \
|
|
17
|
+
"$file_auth_token" 2>/dev/null); then
|
|
18
|
+
expiration=${token_data%%$'\n'*}
|
|
19
|
+
token_value=${token_data#*$'\n'}
|
|
20
|
+
if [[ "$expiration" =~ ^[1-9][0-9]{0,10}$ && -n "$token_value" && "$token_value" != *$'\n'* && "$token_value" != *$'\r'* ]] && \
|
|
21
|
+
(( currentTimeStamp < expiration )); then
|
|
22
|
+
__ql_token__=$token_value
|
|
23
|
+
return 0
|
|
19
24
|
fi
|
|
20
|
-
else
|
|
21
|
-
create_token
|
|
22
25
|
fi
|
|
26
|
+
create_token
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Read the status response once; preserve multiline error messages and the
|
|
30
|
+
# legacy code/message variables used by the shell API callers.
|
|
31
|
+
ql_parse_status_response() {
|
|
32
|
+
# Both task status and statistics endpoints normally return this exact body.
|
|
33
|
+
# Match the whole document; all other JSON and malformed responses still
|
|
34
|
+
# use jq. Keep its missing-message result for existing callers.
|
|
35
|
+
if [[ "$1" == '{"code":200}' ]]; then
|
|
36
|
+
code=200
|
|
37
|
+
message=null
|
|
38
|
+
return 0
|
|
39
|
+
fi
|
|
40
|
+
local parsed
|
|
41
|
+
code=""
|
|
42
|
+
message=""
|
|
43
|
+
parsed=$(jq -r '.code, .message' <<< "$1") || return $?
|
|
44
|
+
code=${parsed%%$'\n'*}
|
|
45
|
+
message=${parsed#*$'\n'}
|
|
23
46
|
}
|
|
24
47
|
|
|
25
48
|
add_cron_api() {
|
|
@@ -142,7 +165,7 @@ update_cron() {
|
|
|
142
165
|
local lastExecutingTime="${5:-0}"
|
|
143
166
|
local runningTime="${6:-0}"
|
|
144
167
|
local exitCode="${7:-}"
|
|
145
|
-
local currentTimeStamp=$(date +%s)
|
|
168
|
+
local currentTimeStamp=${EPOCHSECONDS:-$(date +%s)}
|
|
146
169
|
local dataRaw="{\"ids\":[$ids],\"status\":\"$status\",\"pid\":\"$pid\",\"log_path\":\"$logPath\",\"last_execution_time\":$lastExecutingTime,\"last_running_time\":$runningTime"
|
|
147
170
|
if [[ -n $exitCode ]]; then
|
|
148
171
|
dataRaw="${dataRaw},\"exit_code\":$exitCode"
|
|
@@ -156,8 +179,7 @@ update_cron() {
|
|
|
156
179
|
--data-raw "$dataRaw" \
|
|
157
180
|
--compressed
|
|
158
181
|
)
|
|
159
|
-
|
|
160
|
-
message=$(echo "$api" | jq -r .message)
|
|
182
|
+
ql_parse_status_response "$api" || true
|
|
161
183
|
if [[ $code != 200 ]]; then
|
|
162
184
|
if [[ ! $message ]]; then
|
|
163
185
|
message="$api"
|
|
@@ -240,8 +262,7 @@ record_cron_stat() {
|
|
|
240
262
|
--data-raw "{\"ref_id\":$ref_id,\"code\":$exit_code,\"elapsed\":$elapsed}" \
|
|
241
263
|
--compressed
|
|
242
264
|
)
|
|
243
|
-
|
|
244
|
-
message=$(echo "$api" | jq -r .message)
|
|
265
|
+
ql_parse_status_response "$api" || true
|
|
245
266
|
if [[ $code != 200 ]]; then
|
|
246
267
|
if [[ ! $message ]]; then
|
|
247
268
|
message="$api"
|
package/shell/check.sh
CHANGED
|
@@ -23,50 +23,90 @@ copy_dep() {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
pm2_log() {
|
|
26
|
-
t '--->
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
t '---> 服务诊断信息'
|
|
27
|
+
pm2 status || true
|
|
28
|
+
|
|
29
|
+
local systemLogDir="$dir_data/syslog"
|
|
30
|
+
local latestSystemLog
|
|
31
|
+
latestSystemLog=$(find "$systemLogDir" -maxdepth 1 -type f -name '*.log' 2>/dev/null | sort | tail -n 1)
|
|
32
|
+
if [[ -n "$latestSystemLog" ]]; then
|
|
33
|
+
t '---> 最近的系统日志: %s' "$latestSystemLog"
|
|
34
|
+
tail -n 300 "$latestSystemLog"
|
|
35
|
+
else
|
|
36
|
+
t '---> 未找到系统日志: %s' "$systemLogDir"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
if [[ "$QL_CONTAINER" == "true" ]]; then
|
|
40
|
+
t '---> 容器内 PM2 日志不落盘;早期启动错误请执行 docker logs --tail 300 <容器名>'
|
|
41
|
+
return
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
local pm2Home="${PM2_HOME:-$HOME/.pm2}"
|
|
45
|
+
local panelOut="$pm2Home/logs/qinglong-out.log"
|
|
46
|
+
local panelError="$pm2Home/logs/qinglong-error.log"
|
|
47
|
+
[[ -f "$panelOut" ]] && tail -n 300 "$panelOut"
|
|
48
|
+
[[ -f "$panelError" ]] && tail -n 300 "$panelError"
|
|
31
49
|
}
|
|
32
50
|
|
|
33
51
|
check_ql() {
|
|
34
|
-
local
|
|
52
|
+
local basePath="${ql_base_url%/}"
|
|
53
|
+
local api
|
|
54
|
+
local attempt
|
|
55
|
+
for ((attempt = 1; attempt <= 10; attempt++)); do
|
|
56
|
+
api=$(curl -s --max-time 2 --noproxy "*" "http://localhost:${ql_port}${basePath}/")
|
|
57
|
+
[[ $api =~ "<div id=\"root\"></div>" ]] && break
|
|
58
|
+
sleep 1
|
|
59
|
+
done
|
|
35
60
|
t '\n=====> 检测面板'
|
|
36
61
|
echo -e "\n\n$api\n"
|
|
37
62
|
if [[ $api =~ "<div id=\"root\"></div>" ]]; then
|
|
38
63
|
t '=====> 面板服务启动正常\n'
|
|
64
|
+
else
|
|
65
|
+
t '=====> 面板服务启动异常,请检查上方诊断信息\n'
|
|
66
|
+
return 1
|
|
39
67
|
fi
|
|
40
68
|
}
|
|
41
69
|
|
|
42
70
|
check_pm2() {
|
|
43
|
-
pm2_log
|
|
44
71
|
local currentTimeStamp=$(date +%s)
|
|
45
|
-
local
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
local basePath="${ql_base_url%/}"
|
|
73
|
+
local api
|
|
74
|
+
local attempt
|
|
75
|
+
for ((attempt = 1; attempt <= 10; attempt++)); do
|
|
76
|
+
api=$(
|
|
77
|
+
curl -s --max-time 2 --noproxy "*" "http://localhost:${ql_port}${basePath}/api/health?t=$currentTimeStamp" \
|
|
78
|
+
-H 'Accept: */*' \
|
|
79
|
+
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36' \
|
|
80
|
+
-H "Referer: http://localhost:${ql_port}/crontab" \
|
|
81
|
+
-H 'Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7' \
|
|
82
|
+
--compressed
|
|
83
|
+
)
|
|
84
|
+
[[ $api == *'"code":200'* && $api == *'"status":"ok"'* ]] && break
|
|
85
|
+
sleep 1
|
|
86
|
+
done
|
|
53
87
|
t '\n=====> 检测后台'
|
|
54
88
|
echo -e "\n\n$api\n"
|
|
55
|
-
if [[ $api
|
|
89
|
+
if [[ $api == *'"code":200'* && $api == *'"status":"ok"'* ]]; then
|
|
56
90
|
t '=====> 后台服务启动正常\n'
|
|
91
|
+
else
|
|
92
|
+
pm2_log
|
|
93
|
+
t '=====> 后台服务启动异常,请检查上方诊断信息\n'
|
|
94
|
+
return 1
|
|
57
95
|
fi
|
|
58
96
|
}
|
|
59
97
|
|
|
60
98
|
main() {
|
|
61
99
|
t '=====> 开始检测'
|
|
62
|
-
npm i -g pnpm@8.3.1 pm2 ts-node
|
|
100
|
+
npm i -g pnpm@8.3.1 pm2 ts-node typescript@5
|
|
63
101
|
|
|
64
102
|
reset_env
|
|
65
103
|
copy_dep
|
|
66
|
-
check_ql
|
|
67
|
-
check_pm2
|
|
68
104
|
reload_pm2
|
|
105
|
+
local checkStatus=0
|
|
106
|
+
check_ql || checkStatus=1
|
|
107
|
+
check_pm2 || checkStatus=1
|
|
69
108
|
t '\n=====> 检测结束\n'
|
|
109
|
+
return $checkStatus
|
|
70
110
|
}
|
|
71
111
|
|
|
72
112
|
main
|
package/shell/lang/en.sh
CHANGED
|
@@ -82,10 +82,16 @@ declare -gA LANG_MESSAGES=(
|
|
|
82
82
|
['---> 复制一份 %s 为 %s\n']='---> Copying %s to %s\n'
|
|
83
83
|
['---> 通知文件复制完成\n']='---> Notification files copied\n'
|
|
84
84
|
['---> pm2日志']='---> pm2 log'
|
|
85
|
+
['---> 服务诊断信息']='---> Service diagnostics'
|
|
86
|
+
['---> 最近的系统日志: %s']='---> Recent system log: %s'
|
|
87
|
+
['---> 未找到系统日志: %s']='---> No system log found: %s'
|
|
88
|
+
['---> 容器内 PM2 日志不落盘;早期启动错误请执行 docker logs --tail 300 <容器名>']='---> PM2 logs are not persisted in containers; run docker logs --tail 300 <container> for early startup errors'
|
|
85
89
|
['\n=====> 检测面板']='\n=====> Checking panel'
|
|
86
90
|
['=====> 面板服务启动正常\n']='=====> Panel service running normally\n'
|
|
91
|
+
['=====> 面板服务启动异常,请检查上方诊断信息\n']='=====> Panel failed to start; check the diagnostics above\n'
|
|
87
92
|
['\n=====> 检测后台']='\n=====> Checking backend'
|
|
88
93
|
['=====> 后台服务启动正常\n']='=====> Backend service running normally\n'
|
|
94
|
+
['=====> 后台服务启动异常,请检查上方诊断信息\n']='=====> Backend failed to start; check the diagnostics above\n'
|
|
89
95
|
['=====> 开始检测']='=====> Starting check'
|
|
90
96
|
['\n=====> 检测结束\n']='\n=====> Check complete\n'
|
|
91
97
|
# rmlog.sh
|
package/shell/lang/zh.sh
CHANGED
|
@@ -82,10 +82,16 @@ declare -gA LANG_MESSAGES=(
|
|
|
82
82
|
['---> 复制一份 %s 为 %s\n']='---> 复制一份 %s 为 %s\n'
|
|
83
83
|
['---> 通知文件复制完成\n']='---> 通知文件复制完成\n'
|
|
84
84
|
['---> pm2日志']='---> pm2日志'
|
|
85
|
+
['---> 服务诊断信息']='---> 服务诊断信息'
|
|
86
|
+
['---> 最近的系统日志: %s']='---> 最近的系统日志: %s'
|
|
87
|
+
['---> 未找到系统日志: %s']='---> 未找到系统日志: %s'
|
|
88
|
+
['---> 容器内 PM2 日志不落盘;早期启动错误请执行 docker logs --tail 300 <容器名>']='---> 容器内 PM2 日志不落盘;早期启动错误请执行 docker logs --tail 300 <容器名>'
|
|
85
89
|
['\n=====> 检测面板']='\n=====> 检测面板'
|
|
86
90
|
['=====> 面板服务启动正常\n']='=====> 面板服务启动正常\n'
|
|
91
|
+
['=====> 面板服务启动异常,请检查上方诊断信息\n']='=====> 面板服务启动异常,请检查上方诊断信息\n'
|
|
87
92
|
['\n=====> 检测后台']='\n=====> 检测后台'
|
|
88
93
|
['=====> 后台服务启动正常\n']='=====> 后台服务启动正常\n'
|
|
94
|
+
['=====> 后台服务启动异常,请检查上方诊断信息\n']='=====> 后台服务启动异常,请检查上方诊断信息\n'
|
|
89
95
|
['=====> 开始检测']='=====> 开始检测'
|
|
90
96
|
['\n=====> 检测结束\n']='\n=====> 检测结束\n'
|
|
91
97
|
# rmlog.sh
|