32 lines
1.6 KiB
JSON
32 lines
1.6 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "nodes",
|
|
"title": "节点管理",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "节点ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "host", "title": "主机地址", "type": "str", "length": 255, "nullable": "no"},
|
|
{"name": "name", "title": "节点名称", "type": "str", "length": 128},
|
|
{"name": "ip", "title": "IP地址", "type": "str", "length": 64},
|
|
{"name": "ssh_port", "title": "SSH端口", "type": "int", "nullable": "no", "default": "22"},
|
|
{"name": "ssh_user", "title": "SSH用户", "type": "str", "length": 64, "default": "root"},
|
|
{"name": "role", "title": "角色", "type": "str", "length": 16},
|
|
{"name": "status", "title": "在线状态", "type": "str", "length": 16, "nullable": "no", "default": "offline"},
|
|
{"name": "agent_version", "title": "Agent版本", "type": "str", "length": 32},
|
|
{"name": "last_heartbeat", "title": "最后心跳", "type": "datetime"},
|
|
{"name": "created_at", "title": "创建时间", "type": "datetime"},
|
|
{"name": "updated_at", "title": "更新时间", "type": "datetime"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_nodes_host", "idxtype": "unique", "idxfields": ["host"]}
|
|
],
|
|
"codes": [
|
|
{"field": "role", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='node_role'"},
|
|
{"field": "status", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='node_status'"}
|
|
]
|
|
}
|