业务全部在独立模块仓库(foms / dbbackup / filesync / hostwatch), 本仓只做:入口组装、build、conf、start/stop、首页、RBAC 权限注册。 内容: · app/foms.py 入口,按序 load 全部模块 · app/global_func.py get_module_dbname(统一库 foms) · build.sh clone+安装全部模块、生成 DDL/CRUD、挂载 wwwroot · conf/config.json website.paths:foms 根路径 + 三模块前缀 · init/data.yaml 全部 codes(含拆分后新增的 codes) · scripts/load_path.py 重写为新 URL 布局 · wwwroot/index.ui 首页(指向各模块前缀路径) 从 foms 仓库迁出的应用层文件(app/build/conf/start/stop/index.ui/data.yaml/ init_rbac/load_path)在 foms 侧已删除。
97 lines
6.3 KiB
XML
97 lines
6.3 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {"width": "100%", "height": "100%", "padding": "24px", "backgroundColor": "#F5F7FA"},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {"text": "FOMS — 主备切换管理系统", "fontSize": "28px", "fontWeight": "bold", "marginBottom": "8px"}
|
|
},
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {"text": "Failover Management System · 实时监控 · 自动切换 · 数据同步", "fontSize": "14px", "color": "#666", "marginBottom": "24px"}
|
|
},
|
|
{
|
|
"widgettype": "ResponsableBox",
|
|
"options": {"gap": "16px", "minWidth": "220px", "marginBottom": "24px"},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"backgroundColor": "#FFFFFF", "padding": "20px", "borderRadius": "8px", "cursor": "pointer"},
|
|
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.foms_content", "options": {"url": "{{entire_url('clusters_list')}}"}, "mode": "replace"}],
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "集群管理", "fontSize": "16px", "fontWeight": "bold", "marginBottom": "8px"}},
|
|
{"widgettype": "RefreshWidget", "options": {"interval": 30000, "data_url": "{{entire_url('api/dashboard_stats.dspy')}}"},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "{{data.total_clusters}} 个集群", "fontSize": "14px", "color": "#666"}}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"backgroundColor": "#FFFFFF", "padding": "20px", "borderRadius": "8px", "cursor": "pointer"},
|
|
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.foms_content", "options": {"url": "{{entire_url('nodes_list')}}"}, "mode": "replace"}],
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "节点管理", "fontSize": "16px", "fontWeight": "bold", "marginBottom": "8px"}},
|
|
{"widgettype": "RefreshWidget", "options": {"interval": 30000, "data_url": "{{entire_url('api/dashboard_stats.dspy')}}"},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "{{data.nodes_online}} 在线 / {{data.nodes_offline}} 离线", "fontSize": "14px", "color": "#666"}}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"backgroundColor": "#FFFFFF", "padding": "20px", "borderRadius": "8px", "cursor": "pointer"},
|
|
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.foms_content", "options": {"url": "{{entire_url('dbbackup/dbbackup_replications_list')}}"}, "mode": "replace"}],
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "数据库备份/同步", "fontSize": "16px", "fontWeight": "bold", "marginBottom": "8px"}},
|
|
{"widgettype": "RefreshWidget", "options": {"interval": 30000, "data_url": "{{entire_url('api/dashboard_stats.dspy')}}"},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "{{data.dbs_synced}} 正常 / {{data.dbs_error}} 异常", "fontSize": "14px", "color": "#666"}}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"backgroundColor": "#FFFFFF", "padding": "20px", "borderRadius": "8px", "cursor": "pointer"},
|
|
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.foms_content", "options": {"url": "{{entire_url('filesync/filesync_directories_list')}}"}, "mode": "replace"}],
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "文件同步", "fontSize": "16px", "fontWeight": "bold", "marginBottom": "8px"}},
|
|
{"widgettype": "RefreshWidget", "options": {"interval": 30000, "data_url": "{{entire_url('api/dashboard_stats.dspy')}}"},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "{{data.dirs_synced}} 同步正常", "fontSize": "14px", "color": "#666"}}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"backgroundColor": "#FFFFFF", "padding": "20px", "borderRadius": "8px", "cursor": "pointer"},
|
|
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.foms_content", "options": {"url": "{{entire_url('hostwatch/hostwatch_logs_list')}}"}, "mode": "replace"}],
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "日志监控/分析", "fontSize": "16px", "fontWeight": "bold", "marginBottom": "8px"}},
|
|
{"widgettype": "Text", "options": {"text": "日志采集 · 规则告警 · 指标", "fontSize": "14px", "color": "#666"}}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"id": "foms_content",
|
|
"options": {"width": "100%", "flex": "1", "backgroundColor": "#FFFFFF", "borderRadius": "8px", "padding": "20px", "minHeight": "400px"},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {"text": "欢迎使用 FOMS 主备切换管理系统", "fontSize": "18px", "color": "#999", "textAlign": "center", "marginTop": "80px"}
|
|
},
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {"text": "点击上方卡片进入各功能模块", "fontSize": "14px", "color": "#BBB", "textAlign": "center"}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|