31 lines
1.6 KiB
JSON
31 lines
1.6 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "clusters",
|
|
"title": "集群定义",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "集群ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "name", "title": "集群名称", "type": "str", "length": 128, "nullable": "no"},
|
|
{"name": "description", "title": "集群描述", "type": "str", "length": 512},
|
|
{"name": "master_node_id", "title": "主机节点", "type": "str", "length": 32},
|
|
{"name": "standby_node_id", "title": "备机节点", "type": "str", "length": 32},
|
|
{"name": "check_interval", "title": "检测间隔(秒)", "type": "int", "nullable": "no", "default": "10"},
|
|
{"name": "failover_threshold", "title": "故障判定阈值(次)", "type": "int", "nullable": "no", "default": "3"},
|
|
{"name": "status", "title": "集群状态", "type": "str", "length": 32, "nullable": "no", "default": "stopped"},
|
|
{"name": "created_at", "title": "创建时间", "type": "datetime"},
|
|
{"name": "updated_at", "title": "更新时间", "type": "datetime"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_clusters_name", "idxtype": "unique", "idxfields": ["name"]}
|
|
],
|
|
"codes": [
|
|
{"field": "status", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='cluster_status'"},
|
|
{"field": "master_node_id", "table": "nodes", "valuefield": "id", "textfield": "host"},
|
|
{"field": "standby_node_id", "table": "nodes", "valuefield": "id", "textfield": "host"}
|
|
]
|
|
}
|