plugin-cluster-manager 1.1.11 → 1.1.15
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/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/914.c0bce51908fd81d7.js +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/externalVersion.js +6 -5
- package/dist/locale/en-US.json +138 -124
- package/dist/locale/vi-VN.json +139 -125
- package/dist/locale/zh-CN.json +140 -125
- package/dist/server/actions/cluster-nodes.js +2 -6
- package/dist/server/actions/doctor.js +1 -5
- package/dist/server/actions/orchestrator.js +37 -0
- package/dist/server/actions/queue-mappings.js +107 -0
- package/dist/server/collections/worker-queue-mappings.js +106 -0
- package/dist/server/orchestrator/PackageManager.js +1 -8
- package/dist/server/orchestrator/docker-adapter.js +49 -27
- package/dist/server/plugin.js +10 -8
- package/dist/server/queue-scanner.js +141 -0
- package/dist/server/utils/node.js +30 -2
- package/package.json +46 -42
- package/src/client/AclCacheManager.tsx +292 -287
- package/src/client/CacheMonitor.tsx +2 -2
- package/src/client/ClusterManagerLayout.tsx +6 -0
- package/src/client/ClusterNodes.tsx +11 -4
- package/src/client/ContainerOrchestrator.tsx +186 -104
- package/src/client/Doctor.tsx +2 -2
- package/src/client/EventQueueMonitor.tsx +2 -2
- package/src/client/LockMonitor.tsx +2 -2
- package/src/client/NginxCacheManager.tsx +2 -2
- package/src/client/PackageInstaller.tsx +2 -2
- package/src/client/PluginOperations.tsx +2 -2
- package/src/client/QueueAssignment.tsx +355 -0
- package/src/client/RedisMonitor.tsx +3 -3
- package/src/client/TaskManager.tsx +194 -187
- package/src/client/WorkflowExecutions.tsx +243 -238
- package/src/client/utils.ts +1 -1
- package/src/client-v2/plugin.tsx +24 -0
- package/src/locale/en-US.json +138 -124
- package/src/locale/vi-VN.json +139 -125
- package/src/locale/zh-CN.json +140 -125
- package/src/server/actions/cluster-nodes.ts +4 -7
- package/src/server/actions/doctor.ts +11 -9
- package/src/server/actions/orchestrator.ts +54 -2
- package/src/server/actions/queue-mappings.ts +94 -0
- package/src/server/adapters/redis-node-registry.ts +126 -131
- package/src/server/collections/worker-queue-mappings.ts +85 -0
- package/src/server/orchestrator/PackageManager.ts +2 -10
- package/src/server/orchestrator/docker-adapter.ts +74 -37
- package/src/server/plugin.ts +15 -12
- package/src/server/queue-scanner.ts +154 -0
- package/src/server/utils/node.ts +48 -0
- package/dist/client/AclCacheManager.d.ts +0 -2
- package/dist/client/CacheMonitor.d.ts +0 -2
- package/dist/client/ClusterManagerLayout.d.ts +0 -2
- package/dist/client/ClusterNodes.d.ts +0 -2
- package/dist/client/ContainerOrchestrator.d.ts +0 -2
- package/dist/client/Doctor.d.ts +0 -2
- package/dist/client/EventQueueMonitor.d.ts +0 -2
- package/dist/client/LockMonitor.d.ts +0 -2
- package/dist/client/NginxCacheManager.d.ts +0 -2
- package/dist/client/PackageInstaller.d.ts +0 -2
- package/dist/client/PluginOperations.d.ts +0 -2
- package/dist/client/RedisMonitor.d.ts +0 -2
- package/dist/client/TaskManager.d.ts +0 -2
- package/dist/client/WorkflowExecutions.d.ts +0 -2
- package/dist/client/index.d.ts +0 -5
- package/dist/client/utils/clientSafeCache.d.ts +0 -3
- package/dist/client/utils/requestDedupInterceptor.d.ts +0 -2
- package/dist/client/utils.d.ts +0 -12
- package/dist/index.d.ts +0 -2
- package/dist/server/actions/acl-cache.d.ts +0 -53
- package/dist/server/actions/cache-monitor.d.ts +0 -33
- package/dist/server/actions/cluster-nodes.d.ts +0 -64
- package/dist/server/actions/doctor.d.ts +0 -82
- package/dist/server/actions/event-queue-monitor.d.ts +0 -13
- package/dist/server/actions/lock-monitor.d.ts +0 -19
- package/dist/server/actions/orchestrator.d.ts +0 -58
- package/dist/server/actions/package-manager.d.ts +0 -6
- package/dist/server/actions/plugin-operations.d.ts +0 -6
- package/dist/server/actions/redis-monitor.d.ts +0 -12
- package/dist/server/actions/tasks.d.ts +0 -7
- package/dist/server/actions/workflow-executions.d.ts +0 -7
- package/dist/server/adapters/redis-lock-adapter.d.ts +0 -15
- package/dist/server/adapters/redis-node-registry.d.ts +0 -12
- package/dist/server/adapters/redis-pubsub-adapter.d.ts +0 -16
- package/dist/server/collections/app.d.ts +0 -8
- package/dist/server/collections/cluster-manager-acl-cache.d.ts +0 -22
- package/dist/server/collections/cluster-manager-cache-mgr.d.ts +0 -22
- package/dist/server/collections/cluster-manager-cluster.d.ts +0 -22
- package/dist/server/collections/cluster-manager-doctor-runs.d.ts +0 -3
- package/dist/server/collections/cluster-manager-doctor.d.ts +0 -18
- package/dist/server/collections/cluster-manager-lock.d.ts +0 -22
- package/dist/server/collections/cluster-manager-plugins.d.ts +0 -18
- package/dist/server/collections/cluster-manager-queue.d.ts +0 -22
- package/dist/server/collections/cluster-manager-redis.d.ts +0 -22
- package/dist/server/collections/cluster-manager-workflow.d.ts +0 -22
- package/dist/server/collections/cluster-manager.d.ts +0 -22
- package/dist/server/collections/orchestrator-settings.d.ts +0 -59
- package/dist/server/collections/orchestrator-stacks.d.ts +0 -102
- package/dist/server/collections/worker-orchestrator.d.ts +0 -22
- package/dist/server/collections/worker-packages-configs.d.ts +0 -3
- package/dist/server/collections/worker-packages.d.ts +0 -22
- package/dist/server/hooks/cacheInvalidationHooks.d.ts +0 -1
- package/dist/server/middlewares/listMetaCacheMiddleware.d.ts +0 -2
- package/dist/server/orchestrator/PackageManager.d.ts +0 -39
- package/dist/server/orchestrator/docker-adapter.d.ts +0 -41
- package/dist/server/orchestrator/index.d.ts +0 -4
- package/dist/server/orchestrator/k8s-adapter.d.ts +0 -50
- package/dist/server/orchestrator/leader-election.d.ts +0 -48
- package/dist/server/orchestrator/types.d.ts +0 -84
- package/dist/server/plugin.d.ts +0 -26
- package/dist/server/utils/node.d.ts +0 -6
- package/dist/server/utils/redis.d.ts +0 -29
- package/dist/server/utils/versionManager.d.ts +0 -10
- package/dist/shared/packages.d.ts +0 -23
- /package/{dist/server/index.d.ts → src/client-v2/index.tsx} +0 -0
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"Cluster Manager": "集群管理",
|
|
2
|
+
"Cluster Manager": "集群管理",
|
|
3
3
|
"Async Tasks": "异步任务",
|
|
4
4
|
"Workflow Executions": "工作流执行",
|
|
5
5
|
"Redis Monitor": "Redis 监控",
|
|
@@ -66,127 +66,142 @@
|
|
|
66
66
|
"This will clear all cached data across all stores.": "这将清除所有存储中的缓存数据。",
|
|
67
67
|
"All caches flushed": "所有缓存已清空",
|
|
68
68
|
"Failed to flush caches": "清空缓存失败",
|
|
69
|
-
"Sync Messages": "同步消息",
|
|
70
|
-
"Subscribers": "订阅者",
|
|
71
|
-
"Plugins": "插件",
|
|
72
|
-
"Plugin": "插件",
|
|
73
|
-
"Enabled": "已启用",
|
|
74
|
-
"Disabled": "已禁用",
|
|
75
|
-
"Installed": "已安装",
|
|
76
|
-
"Not installed": "未安装",
|
|
77
|
-
"Loaded": "已加载",
|
|
78
|
-
"Not loaded": "未加载",
|
|
79
|
-
"Protected": "受保护",
|
|
80
|
-
"Description": "描述",
|
|
81
|
-
"Force disable": "强制禁用",
|
|
82
|
-
"Force remove": "强制移除",
|
|
83
|
-
"Force disable this plugin?": "强制禁用此插件?",
|
|
84
|
-
"Force remove this plugin?": "强制移除此插件?",
|
|
85
|
-
"This updates the plugin registry directly. Restart or reload is required to fully unload runtime hooks.": "此操作会直接更新插件注册表。需要重启或重新加载后才能完全卸载运行时钩子。",
|
|
86
|
-
"This removes the plugin registry record. Package files are not deleted. Restart or reload is required.": "此操作会移除插件注册记录。不会删除 package 文件。需要重启或重新加载。",
|
|
87
|
-
"Force operations bypass plugin lifecycle hooks": "强制操作会绕过插件生命周期钩子",
|
|
88
|
-
"Use this only when the normal plugin manager cannot disable or remove a broken plugin. Restart or reload the app after a successful operation.": "仅在普通插件管理器无法禁用或移除异常插件时使用。操作成功后请重启或重新加载应用。",
|
|
89
|
-
"Search plugins": "搜索插件",
|
|
90
|
-
"Plugin force disabled": "插件已强制禁用",
|
|
91
|
-
"Plugin force removed": "插件已强制移除",
|
|
92
|
-
"Failed to load plugins": "加载插件失败",
|
|
93
|
-
"Failed to force disable plugin": "强制禁用插件失败",
|
|
94
|
-
"Failed to force remove plugin": "强制移除插件失败",
|
|
95
|
-
"Nginx Cache": "Nginx 缓存",
|
|
96
|
-
"Nginx configuration file found at": "已找到 Nginx 配置文件于",
|
|
97
|
-
"Nginx cache paths detected": "检测到的 Nginx 缓存路径",
|
|
98
|
-
"Nginx is not detected on this node. You can still input a custom cache directory.": "此节点未检测到 Nginx。您仍可以输入自定义缓存目录。",
|
|
99
|
-
"Clearing Method": "清除方式",
|
|
100
|
-
"Physical Files": "物理文件",
|
|
101
|
-
"HTTP Purge Request": "HTTP Purge 请求",
|
|
102
|
-
"Select Cache Path": "选择缓存路径",
|
|
103
|
-
"Custom Path": "自定义路径",
|
|
104
|
-
"Purge URL": "Purge URL",
|
|
105
|
-
"Headers (JSON)": "Headers (JSON)",
|
|
106
|
-
"Clear Nginx Cache": "清除 Nginx 缓存",
|
|
107
|
-
"Are you sure you want to clear Nginx cache? This will permanently delete all files in this directory.": "确定要清除 Nginx 缓存吗?这将永久删除该目录下的所有文件。",
|
|
108
|
-
"Cache cleared successfully. Cleared {count} items.": "缓存清除成功。已清除 {count} 项。",
|
|
109
|
-
"HTTP Purge request completed. Status: {status}": "HTTP Purge 请求已完成。状态:{status}",
|
|
110
|
-
"Custom Cache Path": "自定义缓存路径",
|
|
111
|
-
"HTTP Method": "HTTP 方法",
|
|
112
|
-
"Send Purge Request": "发送 Purge 请求",
|
|
113
|
-
"Please select or enter a cache path": "请选择或输入缓存路径",
|
|
114
|
-
"Please enter a valid Purge URL": "请输入有效的 Purge URL",
|
|
115
|
-
"Nginx cache path is required": "必须提供 Nginx 缓存路径",
|
|
116
|
-
"Invalid headers JSON structure": "Headers JSON 结构无效",
|
|
117
|
-
"Nginx Cache Status": "Nginx 缓存状态",
|
|
118
|
-
"Nginx is installed": "Nginx 已安装",
|
|
119
|
-
"Nginx is NOT installed": "Nginx 未安装",
|
|
120
|
-
"Nginx cache clearing method": "Nginx 缓存清除方式",
|
|
121
|
-
"Execution Logs": "执行日志",
|
|
122
|
-
"Clear Nginx Cache?": "清除 Nginx 缓存?"
|
|
123
|
-
,
|
|
124
|
-
"Rolling Restart": "Rolling Restart",
|
|
125
|
-
"Worker nodes only": "Worker nodes only",
|
|
126
|
-
"App nodes only": "App nodes only",
|
|
127
|
-
"Sandbox nodes only": "Sandbox nodes only",
|
|
128
|
-
"All nodes": "All nodes",
|
|
129
|
-
"Soft restart": "Soft restart",
|
|
130
|
-
"Hard restart": "Hard restart",
|
|
131
|
-
"Start rolling restart?": "Start rolling restart?",
|
|
132
|
-
"Nodes will receive restart commands one-by-one with the configured delay.": "Nodes will receive restart commands one-by-one with the configured delay.",
|
|
133
|
-
"Start": "Start",
|
|
134
|
-
"Rolling restart dispatched for {count} node(s)": "Rolling restart dispatched for {count} node(s)",
|
|
135
|
-
"Failed to dispatch rolling restart": "Failed to dispatch rolling restart",
|
|
136
|
-
"Cluster Drift": "Cluster Drift",
|
|
137
|
-
"No cluster drift detected": "No cluster drift detected",
|
|
138
|
-
"Cluster drift detected": "Cluster drift detected",
|
|
139
|
-
"Reference version": "Reference version",
|
|
140
|
-
"No reference version available": "No reference version available",
|
|
141
|
-
"Checked Nodes": "Checked Nodes",
|
|
142
|
-
"Version Drift": "Version Drift",
|
|
143
|
-
"Runtime Drift": "Runtime Drift",
|
|
144
|
-
"Package Drift": "Package Drift",
|
|
145
|
-
"Runtime": "Runtime",
|
|
146
|
-
"Role": "Role",
|
|
147
|
-
"Expected": "Expected",
|
|
148
|
-
"Actual": "Actual",
|
|
149
|
-
"Package Status": "Package Status",
|
|
150
|
-
"Missing Packages": "Missing Packages",
|
|
151
|
-
"No missing packages": "No missing packages",
|
|
152
|
-
"Legacy Multi-app Diagnostics": "Legacy Multi-app Diagnostics",
|
|
153
|
-
"No legacy multi-app risk detected": "No legacy multi-app risk detected",
|
|
154
|
-
"Legacy multi-app risk detected": "Legacy multi-app risk detected",
|
|
155
|
-
"Legacy app records": "Legacy app records",
|
|
156
|
-
"Deprecated multi-app manager is active. It runs apps in shared process memory and should not be used for production cluster isolation.": "Deprecated multi-app manager is active. It runs apps in shared process memory and should not be used for production cluster isolation.",
|
|
157
|
-
"Deprecated multi-app share collection is active. Avoid schema/table sharing for new cluster deployments.": "Deprecated multi-app share collection is active. Avoid schema/table sharing for new cluster deployments.",
|
|
158
|
-
"{count} legacy application record(s) were found in the applications collection.": "{count} legacy application record(s) were found in the applications collection.",
|
|
159
|
-
"App Supervisor is not enabled. Use it for new multi-application management instead of deprecated multi-app plugins.": "App Supervisor is not enabled. Use it for new multi-application management instead of deprecated multi-app plugins.",
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"Diagnostic
|
|
167
|
-
"
|
|
168
|
-
"Failed to
|
|
169
|
-
"Failed to
|
|
170
|
-
"Failed to
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
|
|
69
|
+
"Sync Messages": "同步消息",
|
|
70
|
+
"Subscribers": "订阅者",
|
|
71
|
+
"Plugins": "插件",
|
|
72
|
+
"Plugin": "插件",
|
|
73
|
+
"Enabled": "已启用",
|
|
74
|
+
"Disabled": "已禁用",
|
|
75
|
+
"Installed": "已安装",
|
|
76
|
+
"Not installed": "未安装",
|
|
77
|
+
"Loaded": "已加载",
|
|
78
|
+
"Not loaded": "未加载",
|
|
79
|
+
"Protected": "受保护",
|
|
80
|
+
"Description": "描述",
|
|
81
|
+
"Force disable": "强制禁用",
|
|
82
|
+
"Force remove": "强制移除",
|
|
83
|
+
"Force disable this plugin?": "强制禁用此插件?",
|
|
84
|
+
"Force remove this plugin?": "强制移除此插件?",
|
|
85
|
+
"This updates the plugin registry directly. Restart or reload is required to fully unload runtime hooks.": "此操作会直接更新插件注册表。需要重启或重新加载后才能完全卸载运行时钩子。",
|
|
86
|
+
"This removes the plugin registry record. Package files are not deleted. Restart or reload is required.": "此操作会移除插件注册记录。不会删除 package 文件。需要重启或重新加载。",
|
|
87
|
+
"Force operations bypass plugin lifecycle hooks": "强制操作会绕过插件生命周期钩子",
|
|
88
|
+
"Use this only when the normal plugin manager cannot disable or remove a broken plugin. Restart or reload the app after a successful operation.": "仅在普通插件管理器无法禁用或移除异常插件时使用。操作成功后请重启或重新加载应用。",
|
|
89
|
+
"Search plugins": "搜索插件",
|
|
90
|
+
"Plugin force disabled": "插件已强制禁用",
|
|
91
|
+
"Plugin force removed": "插件已强制移除",
|
|
92
|
+
"Failed to load plugins": "加载插件失败",
|
|
93
|
+
"Failed to force disable plugin": "强制禁用插件失败",
|
|
94
|
+
"Failed to force remove plugin": "强制移除插件失败",
|
|
95
|
+
"Nginx Cache": "Nginx 缓存",
|
|
96
|
+
"Nginx configuration file found at": "已找到 Nginx 配置文件于",
|
|
97
|
+
"Nginx cache paths detected": "检测到的 Nginx 缓存路径",
|
|
98
|
+
"Nginx is not detected on this node. You can still input a custom cache directory.": "此节点未检测到 Nginx。您仍可以输入自定义缓存目录。",
|
|
99
|
+
"Clearing Method": "清除方式",
|
|
100
|
+
"Physical Files": "物理文件",
|
|
101
|
+
"HTTP Purge Request": "HTTP Purge 请求",
|
|
102
|
+
"Select Cache Path": "选择缓存路径",
|
|
103
|
+
"Custom Path": "自定义路径",
|
|
104
|
+
"Purge URL": "Purge URL",
|
|
105
|
+
"Headers (JSON)": "Headers (JSON)",
|
|
106
|
+
"Clear Nginx Cache": "清除 Nginx 缓存",
|
|
107
|
+
"Are you sure you want to clear Nginx cache? This will permanently delete all files in this directory.": "确定要清除 Nginx 缓存吗?这将永久删除该目录下的所有文件。",
|
|
108
|
+
"Cache cleared successfully. Cleared {count} items.": "缓存清除成功。已清除 {count} 项。",
|
|
109
|
+
"HTTP Purge request completed. Status: {status}": "HTTP Purge 请求已完成。状态:{status}",
|
|
110
|
+
"Custom Cache Path": "自定义缓存路径",
|
|
111
|
+
"HTTP Method": "HTTP 方法",
|
|
112
|
+
"Send Purge Request": "发送 Purge 请求",
|
|
113
|
+
"Please select or enter a cache path": "请选择或输入缓存路径",
|
|
114
|
+
"Please enter a valid Purge URL": "请输入有效的 Purge URL",
|
|
115
|
+
"Nginx cache path is required": "必须提供 Nginx 缓存路径",
|
|
116
|
+
"Invalid headers JSON structure": "Headers JSON 结构无效",
|
|
117
|
+
"Nginx Cache Status": "Nginx 缓存状态",
|
|
118
|
+
"Nginx is installed": "Nginx 已安装",
|
|
119
|
+
"Nginx is NOT installed": "Nginx 未安装",
|
|
120
|
+
"Nginx cache clearing method": "Nginx 缓存清除方式",
|
|
121
|
+
"Execution Logs": "执行日志",
|
|
122
|
+
"Clear Nginx Cache?": "清除 Nginx 缓存?"
|
|
123
|
+
,
|
|
124
|
+
"Rolling Restart": "Rolling Restart",
|
|
125
|
+
"Worker nodes only": "Worker nodes only",
|
|
126
|
+
"App nodes only": "App nodes only",
|
|
127
|
+
"Sandbox nodes only": "Sandbox nodes only",
|
|
128
|
+
"All nodes": "All nodes",
|
|
129
|
+
"Soft restart": "Soft restart",
|
|
130
|
+
"Hard restart": "Hard restart",
|
|
131
|
+
"Start rolling restart?": "Start rolling restart?",
|
|
132
|
+
"Nodes will receive restart commands one-by-one with the configured delay.": "Nodes will receive restart commands one-by-one with the configured delay.",
|
|
133
|
+
"Start": "Start",
|
|
134
|
+
"Rolling restart dispatched for {count} node(s)": "Rolling restart dispatched for {count} node(s)",
|
|
135
|
+
"Failed to dispatch rolling restart": "Failed to dispatch rolling restart",
|
|
136
|
+
"Cluster Drift": "Cluster Drift",
|
|
137
|
+
"No cluster drift detected": "No cluster drift detected",
|
|
138
|
+
"Cluster drift detected": "Cluster drift detected",
|
|
139
|
+
"Reference version": "Reference version",
|
|
140
|
+
"No reference version available": "No reference version available",
|
|
141
|
+
"Checked Nodes": "Checked Nodes",
|
|
142
|
+
"Version Drift": "Version Drift",
|
|
143
|
+
"Runtime Drift": "Runtime Drift",
|
|
144
|
+
"Package Drift": "Package Drift",
|
|
145
|
+
"Runtime": "Runtime",
|
|
146
|
+
"Role": "Role",
|
|
147
|
+
"Expected": "Expected",
|
|
148
|
+
"Actual": "Actual",
|
|
149
|
+
"Package Status": "Package Status",
|
|
150
|
+
"Missing Packages": "Missing Packages",
|
|
151
|
+
"No missing packages": "No missing packages",
|
|
152
|
+
"Legacy Multi-app Diagnostics": "Legacy Multi-app Diagnostics",
|
|
153
|
+
"No legacy multi-app risk detected": "No legacy multi-app risk detected",
|
|
154
|
+
"Legacy multi-app risk detected": "Legacy multi-app risk detected",
|
|
155
|
+
"Legacy app records": "Legacy app records",
|
|
156
|
+
"Deprecated multi-app manager is active. It runs apps in shared process memory and should not be used for production cluster isolation.": "Deprecated multi-app manager is active. It runs apps in shared process memory and should not be used for production cluster isolation.",
|
|
157
|
+
"Deprecated multi-app share collection is active. Avoid schema/table sharing for new cluster deployments.": "Deprecated multi-app share collection is active. Avoid schema/table sharing for new cluster deployments.",
|
|
158
|
+
"{count} legacy application record(s) were found in the applications collection.": "{count} legacy application record(s) were found in the applications collection.",
|
|
159
|
+
"App Supervisor is not enabled. Use it for new multi-application management instead of deprecated multi-app plugins.": "App Supervisor is not enabled. Use it for new multi-application management instead of deprecated multi-app plugins.",
|
|
160
|
+
"License": "License",
|
|
161
|
+
"Doctor": "诊断",
|
|
162
|
+
"Duration": "Duration",
|
|
163
|
+
"Start Doctor": "Start Doctor",
|
|
164
|
+
"Stop Doctor": "Stop Doctor",
|
|
165
|
+
"Download Report": "Download Report",
|
|
166
|
+
"Diagnostic session started": "Diagnostic session started",
|
|
167
|
+
"Diagnostic report is ready": "Diagnostic report is ready",
|
|
168
|
+
"Failed to load diagnostic status": "Failed to load diagnostic status",
|
|
169
|
+
"Failed to start diagnostic session": "Failed to start diagnostic session",
|
|
170
|
+
"Failed to stop diagnostic session": "Failed to stop diagnostic session",
|
|
171
|
+
"Failed to download diagnostic report": "Failed to download diagnostic report",
|
|
172
|
+
"Running": "Running",
|
|
173
|
+
"Run ID": "Run ID",
|
|
174
|
+
"Started At": "Started At",
|
|
175
|
+
"Finished At": "Finished At",
|
|
176
|
+
"Finish Reason": "Finish Reason",
|
|
177
|
+
"Report Status": "Report Status",
|
|
178
|
+
"Nodes": "Nodes",
|
|
179
|
+
"Errors": "Errors",
|
|
180
|
+
"Warnings": "Warnings",
|
|
181
|
+
"Plugin Drift": "Plugin Drift",
|
|
182
|
+
"Findings": "Findings",
|
|
183
|
+
"Node Log Distribution": "Node Log Distribution",
|
|
184
|
+
"Top Error Signatures": "Top Error Signatures",
|
|
185
|
+
"Level": "Level",
|
|
186
|
+
"Count": "Count",
|
|
187
|
+
"Signature": "Signature",
|
|
188
|
+
"Node": "Node",
|
|
189
|
+
"Log Files": "Log Files",
|
|
190
|
+
"Package": "Package",
|
|
191
|
+
"DB Version": "DB Version",
|
|
192
|
+
"Runtime Versions": "Runtime Versions",
|
|
193
|
+
"Queue Assignment": "队列分配",
|
|
194
|
+
"Queue Name": "队列名称",
|
|
195
|
+
"Map queues to worker stacks. Unassigned queues run on all workers.": "将队列映射到工作节点栈。未分配的队列将在所有工作节点上运行。",
|
|
196
|
+
"Scan Queues": "扫描队列",
|
|
197
|
+
"Auto-map ({count})": "自动映射 ({count})",
|
|
198
|
+
"Register": "注册",
|
|
199
|
+
"Unregister": "注销",
|
|
200
|
+
"Assigned Stack": "分配栈",
|
|
201
|
+
"All (default)": "全部(默认)",
|
|
202
|
+
"Delete this mapping?": "删除此映射?",
|
|
203
|
+
"No queues discovered. Click \"Scan Queues\" to detect registered queues.": "未发现队列。点击\"扫描队列\"以检测已注册的队列。",
|
|
204
|
+
"Auto-mapped {count} queue(s)": "已自动映射 {count} 个队列",
|
|
205
|
+
"Queue Assignment updated": "队列分配已更新",
|
|
206
|
+
"Unassigned (worker runs all queues)": "未分配(工作节点运行所有队列)"
|
|
207
|
+
}
|
|
@@ -130,11 +130,7 @@ function getErrorMessage(error) {
|
|
|
130
130
|
return error instanceof Error ? error.message : String(error);
|
|
131
131
|
}
|
|
132
132
|
function getNodeRole(node) {
|
|
133
|
-
|
|
134
|
-
return "sandbox";
|
|
135
|
-
}
|
|
136
|
-
const workerMode = node.workerMode || "main";
|
|
137
|
-
return workerMode === "worker" || workerMode === "task" || workerMode === "*" ? "worker" : "app";
|
|
133
|
+
return (0, import_node.getNodeRoleFrom)({ workerMode: node.workerMode, isSandbox: node.isSandbox });
|
|
138
134
|
}
|
|
139
135
|
function getReferenceVersion(nodes) {
|
|
140
136
|
var _a;
|
|
@@ -246,7 +242,7 @@ const clusterActions = {
|
|
|
246
242
|
async current(ctx, next) {
|
|
247
243
|
var _a, _b;
|
|
248
244
|
const currentMode = process.env.WORKER_MODE || "main";
|
|
249
|
-
const isApp =
|
|
245
|
+
const isApp = !(0, import_node.isWorkerMode)(process.env.WORKER_MODE);
|
|
250
246
|
if (isApp) {
|
|
251
247
|
const mem = process.memoryUsage();
|
|
252
248
|
ctx.body = {
|
|
@@ -154,11 +154,7 @@ function countPackages(packages) {
|
|
|
154
154
|
return packages.apt.length + packages.npm.length + packages.python.length;
|
|
155
155
|
}
|
|
156
156
|
function getNodeRole(node) {
|
|
157
|
-
|
|
158
|
-
return "sandbox";
|
|
159
|
-
}
|
|
160
|
-
const workerMode = node.workerMode || "main";
|
|
161
|
-
return workerMode === "worker" || workerMode === "task" || workerMode === "*" ? "worker" : "app";
|
|
157
|
+
return (0, import_node.getNodeRoleFrom)({ workerMode: node.workerMode, isSandbox: node.isSandbox });
|
|
162
158
|
}
|
|
163
159
|
function getSafeEnv() {
|
|
164
160
|
return {
|
|
@@ -122,6 +122,10 @@ const orchestratorActions = {
|
|
|
122
122
|
* POST /workerOrchestrator:scale
|
|
123
123
|
* Body: { stackId: 1, replicas: 3 }
|
|
124
124
|
* Leader-only
|
|
125
|
+
*
|
|
126
|
+
* Before scaling, resolves queue-to-stack mappings and injects
|
|
127
|
+
* WORKER_MODE into the stack's envVars so new containers only
|
|
128
|
+
* process assigned queues.
|
|
125
129
|
*/
|
|
126
130
|
async scale(ctx, next) {
|
|
127
131
|
assertLeader(ctx);
|
|
@@ -130,6 +134,39 @@ const orchestratorActions = {
|
|
|
130
134
|
if (replicas === void 0 || replicas === null) ctx.throw(400, "replicas is required");
|
|
131
135
|
if (replicas < 0 || replicas > 20) ctx.throw(400, "replicas must be between 0 and 20");
|
|
132
136
|
const stack = await getStack(ctx, stackId);
|
|
137
|
+
try {
|
|
138
|
+
const mappingsRepo = ctx.db.getRepository("workerQueueMappings");
|
|
139
|
+
if (mappingsRepo) {
|
|
140
|
+
const assigned = await mappingsRepo.find({
|
|
141
|
+
filter: {
|
|
142
|
+
stackId: stack.id,
|
|
143
|
+
enabled: true
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const queueNames = assigned.map((m) => m.get("queueName")).filter(Boolean);
|
|
147
|
+
if (queueNames.length > 0) {
|
|
148
|
+
const workerMode = queueNames.join(",");
|
|
149
|
+
ctx.app.logger.info(
|
|
150
|
+
`[Orchestrator] Injecting WORKER_MODE=${workerMode} for stack "${stack.name}" (${queueNames.length} queue(s) assigned)`
|
|
151
|
+
);
|
|
152
|
+
stack.envVars = {
|
|
153
|
+
...stack.envVars || {},
|
|
154
|
+
WORKER_MODE: workerMode
|
|
155
|
+
};
|
|
156
|
+
} else {
|
|
157
|
+
stack.envVars = {
|
|
158
|
+
...stack.envVars || {},
|
|
159
|
+
WORKER_MODE: "*"
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
} catch (err) {
|
|
164
|
+
ctx.app.logger.debug(`[Orchestrator] Queue mappings not available: ${err.message}`);
|
|
165
|
+
stack.envVars = {
|
|
166
|
+
...stack.envVars || {},
|
|
167
|
+
WORKER_MODE: "*"
|
|
168
|
+
};
|
|
169
|
+
}
|
|
133
170
|
const result = await adapter.scale(stack, Number(replicas));
|
|
134
171
|
const repo = ctx.db.getRepository("orchestratorStacks");
|
|
135
172
|
await repo.update({
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var queue_mappings_exports = {};
|
|
28
|
+
__export(queue_mappings_exports, {
|
|
29
|
+
queueMappingsActions: () => queueMappingsActions
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(queue_mappings_exports);
|
|
32
|
+
var import_queue_scanner = require("../queue-scanner");
|
|
33
|
+
const queueMappingsActions = {
|
|
34
|
+
/**
|
|
35
|
+
* GET /workerQueueMappings:scanQueues
|
|
36
|
+
* Scans all registered queues (EventQueue + Redis) and merges with existing mappings.
|
|
37
|
+
*/
|
|
38
|
+
async scanQueues(ctx, next) {
|
|
39
|
+
const result = await (0, import_queue_scanner.scanQueues)(ctx.app);
|
|
40
|
+
const repo = ctx.db.getRepository("workerQueueMappings");
|
|
41
|
+
let existingMappings = [];
|
|
42
|
+
try {
|
|
43
|
+
existingMappings = await repo.find();
|
|
44
|
+
} catch {
|
|
45
|
+
}
|
|
46
|
+
const mappedNames = new Set(existingMappings.map((m) => m.get("queueName")));
|
|
47
|
+
ctx.body = {
|
|
48
|
+
discovered: result.queues,
|
|
49
|
+
total: result.total,
|
|
50
|
+
registered: existingMappings.map((m) => ({
|
|
51
|
+
id: m.get("id"),
|
|
52
|
+
queueName: m.get("queueName"),
|
|
53
|
+
label: m.get("label"),
|
|
54
|
+
stackId: m.get("stackId"),
|
|
55
|
+
enabled: m.get("enabled"),
|
|
56
|
+
type: m.get("type")
|
|
57
|
+
})),
|
|
58
|
+
unmapped: result.queues.filter((q) => !mappedNames.has(q.name)).map((q) => ({
|
|
59
|
+
name: q.name,
|
|
60
|
+
type: q.type,
|
|
61
|
+
label: q.label,
|
|
62
|
+
description: q.description
|
|
63
|
+
}))
|
|
64
|
+
};
|
|
65
|
+
await next();
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* POST /workerQueueMappings:autoMap
|
|
69
|
+
* Auto-create mappings for any discovered queues that don't have one yet.
|
|
70
|
+
* Body: { stackId?: number } — optional default stack for new mappings
|
|
71
|
+
*/
|
|
72
|
+
async autoMap(ctx, next) {
|
|
73
|
+
const { stackId } = ctx.action.params.values || {};
|
|
74
|
+
const result = await (0, import_queue_scanner.scanQueues)(ctx.app);
|
|
75
|
+
const repo = ctx.db.getRepository("workerQueueMappings");
|
|
76
|
+
let existingMappings = [];
|
|
77
|
+
try {
|
|
78
|
+
existingMappings = await repo.find();
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
const mappedNames = new Set(existingMappings.map((m) => m.get("queueName")));
|
|
82
|
+
const created = [];
|
|
83
|
+
for (const q of result.queues) {
|
|
84
|
+
if (mappedNames.has(q.name)) continue;
|
|
85
|
+
await repo.create({
|
|
86
|
+
values: {
|
|
87
|
+
queueName: q.name,
|
|
88
|
+
label: q.label,
|
|
89
|
+
description: q.description,
|
|
90
|
+
type: q.type,
|
|
91
|
+
stackId: stackId || null,
|
|
92
|
+
enabled: true
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
created.push(q.name);
|
|
96
|
+
}
|
|
97
|
+
ctx.body = {
|
|
98
|
+
created,
|
|
99
|
+
count: created.length
|
|
100
|
+
};
|
|
101
|
+
await next();
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
105
|
+
0 && (module.exports = {
|
|
106
|
+
queueMappingsActions
|
|
107
|
+
});
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var worker_queue_mappings_exports = {};
|
|
28
|
+
__export(worker_queue_mappings_exports, {
|
|
29
|
+
default: () => worker_queue_mappings_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(worker_queue_mappings_exports);
|
|
32
|
+
var worker_queue_mappings_default = {
|
|
33
|
+
name: "workerQueueMappings",
|
|
34
|
+
autoGenId: true,
|
|
35
|
+
createdAt: true,
|
|
36
|
+
updatedAt: true,
|
|
37
|
+
fields: [
|
|
38
|
+
{
|
|
39
|
+
name: "queueName",
|
|
40
|
+
type: "string",
|
|
41
|
+
unique: true,
|
|
42
|
+
interface: "input",
|
|
43
|
+
uiSchema: {
|
|
44
|
+
title: "Queue Name",
|
|
45
|
+
"x-component": "Input",
|
|
46
|
+
required: true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "label",
|
|
51
|
+
type: "string",
|
|
52
|
+
interface: "input",
|
|
53
|
+
uiSchema: {
|
|
54
|
+
title: "Label",
|
|
55
|
+
"x-component": "Input",
|
|
56
|
+
description: "Human-readable display name"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "description",
|
|
61
|
+
type: "text",
|
|
62
|
+
interface: "textarea",
|
|
63
|
+
uiSchema: {
|
|
64
|
+
title: "Description",
|
|
65
|
+
"x-component": "Input.TextArea"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "type",
|
|
70
|
+
type: "string",
|
|
71
|
+
interface: "select",
|
|
72
|
+
defaultValue: "event-queue",
|
|
73
|
+
uiSchema: {
|
|
74
|
+
title: "Source Type",
|
|
75
|
+
"x-component": "Select",
|
|
76
|
+
enum: [
|
|
77
|
+
{ value: "event-queue", label: "EventQueue" },
|
|
78
|
+
{ value: "redis-list", label: "Redis List" }
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "stackId",
|
|
84
|
+
type: "integer",
|
|
85
|
+
interface: "select",
|
|
86
|
+
uiSchema: {
|
|
87
|
+
title: "Assigned Stack",
|
|
88
|
+
"x-component": "Select",
|
|
89
|
+
"x-component-props": {
|
|
90
|
+
allowClear: true,
|
|
91
|
+
placeholder: "Unassigned (worker runs all queues)"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "enabled",
|
|
97
|
+
type: "boolean",
|
|
98
|
+
defaultValue: true,
|
|
99
|
+
interface: "checkbox",
|
|
100
|
+
uiSchema: {
|
|
101
|
+
title: "Enabled",
|
|
102
|
+
"x-component": "Checkbox"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
};
|
|
@@ -85,14 +85,7 @@ function redactUrl(value) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
function getCurrentRole() {
|
|
88
|
-
|
|
89
|
-
return process.env.APP_ROLE;
|
|
90
|
-
}
|
|
91
|
-
if (process.env.SKILL_HUB_SANDBOX === "true") {
|
|
92
|
-
return "sandbox";
|
|
93
|
-
}
|
|
94
|
-
const workerMode = process.env.WORKER_MODE || "main";
|
|
95
|
-
return workerMode === "worker" || workerMode === "task" || workerMode === "*" ? "worker" : "app";
|
|
88
|
+
return (0, import_node.getLocalRole)();
|
|
96
89
|
}
|
|
97
90
|
function formatCommand(command, args) {
|
|
98
91
|
return [command, ...args].map((part) => {
|