mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-06-26 02:01:59 +08:00
发布 0.15.0: - 新增内核版本兼容层、特性门控、低版本阻断和升级提示 - 新增 PATH 中 OpenClaw CLI 冲突检测、隔离与恢复 - 修复 Hermes Gateway loopback 自动拉起与 /v1/runs 诊断 - 修复 standalone 一键安装包在 About/仪表盘显示未知版本 - 同步 OpenClaw 2026.5.6 推荐版本和热更新 minAppVersion - 补齐本地 JS/Rust 测试与发布前检查说明 验证: - npm run build - node --test tests/*.test.js - node --check src/scripts JS 文件 - cargo fmt --all -- --check - cargo check - cargo clippy --all-targets -- -D warnings - cargo test
31 lines
836 B
JavaScript
31 lines
836 B
JavaScript
export const DOCKER_TASK_TIMEOUT_MS = 10 * 60 * 1000
|
|
|
|
export function buildDockerDispatchTargets(containers = []) {
|
|
return containers.map(container => ({
|
|
containerId: container.id,
|
|
containerName: container.name,
|
|
nodeId: container.nodeId,
|
|
}))
|
|
}
|
|
|
|
export function buildDockerInstanceSwitchContext(container = {}) {
|
|
const containerId = String(container.containerId || container.id || '')
|
|
const port = Number(container.port)
|
|
const gatewayPort = Number(container.gatewayPort)
|
|
const instanceId = `docker-${containerId.slice(0, 12)}`
|
|
|
|
return {
|
|
instanceId,
|
|
reloadRoute: true,
|
|
registration: {
|
|
name: container.name,
|
|
type: 'docker',
|
|
endpoint: `http://127.0.0.1:${port}`,
|
|
gatewayPort,
|
|
containerId,
|
|
nodeId: container.nodeId,
|
|
note: 'Added from Docker page',
|
|
},
|
|
}
|
|
}
|