refactor: 模型上线检查UI改为VScrollPanel+HBox按钮布局

- UI: 检查结果区域改为VScrollPanel(filler),两个按钮用HBox并排
- check_pricing_program.dspy: 优先显示display_text字段,回退到name字段
This commit is contained in:
Hermes Agent 2026-06-18 16:26:51 +08:00
parent 5ab8171552
commit 2efb1268b7
2 changed files with 99 additions and 77 deletions

View File

@ -19,7 +19,11 @@ else:
pregs = await psor.sqlExe(
"select * from pricing_program where id=${ppid}$", {'ppid': ppid})
if pregs:
text = f"✅ 定价项目(pricing_program): {pregs[0].name} (id={ppid})"
p = pregs[0]
display_name = getattr(p, 'display_text', '') or getattr(p, 'name', '')
text = f"✅ 定价项目(pricing_program): {display_name}"
if hasattr(p, 'id'):
text += f" (id={p.id})"
else:
text = f"❌ 定价项目(pricing_program): ppid={ppid} 未找到"

View File

@ -16,101 +16,119 @@
}
},
{
"widgettype": "Text",
"widgettype": "VScrollPanel",
"options": {
"name": "check_status",
"text": "检查中...",
"i18n": false
}
},
{
"widgettype": "VBox",
"options": {
"name": "checks_list",
"spacing": 5
"css": "filler",
"width": "100%"
},
"subwidgets": [
{
"widgettype": "urlwidget",
"widgettype": "Text",
"options": {
"url": "/llmage/check_model_record.dspy?llmid={{llmid}}"
"name": "check_status",
"text": "检查中...",
"i18n": false
}
},
{
"widgettype": "urlwidget",
"widgettype": "VBox",
"options": {
"url": "/llmage/check_date_status.dspy?llmid={{llmid}}"
"name": "checks_list",
"spacing": 5
},
"subwidgets": [
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_model_record.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_date_status.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_upapp.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_uapi.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_uapiio.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_llm_api_map.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_pricing_program.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_pricing_data.dspy?llmid={{llmid}}"
}
}
]
},
{
"widgettype": "Text",
"options": {
"name": "test_result",
"text": "",
"i18n": false
}
},
{
"widgettype": "urlwidget",
"widgettype": "Text",
"options": {
"url": "/llmage/check_upapp.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_uapi.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_uapiio.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_llm_api_map.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_pricing_program.dspy?llmid={{llmid}}"
}
},
{
"widgettype": "urlwidget",
"options": {
"url": "/llmage/check_pricing_data.dspy?llmid={{llmid}}"
"name": "charge_result",
"text": "",
"i18n": false
}
}
]
},
{
"widgettype": "Button",
"widgettype": "HBox",
"options": {
"name": "test_btn",
"label": "体验一次",
"i18n": false
}
},
{
"widgettype": "Text",
"options": {
"name": "test_result",
"text": "",
"i18n": false
}
},
{
"widgettype": "Button",
"options": {
"name": "charge_btn",
"label": "检查计费",
"i18n": false
}
},
{
"widgettype": "Text",
"options": {
"name": "charge_result",
"text": "",
"i18n": false
}
"spacing": 10,
"alignItems": "center"
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"name": "test_btn",
"label": "体验一次",
"i18n": false
}
},
{
"widgettype": "Button",
"options": {
"name": "charge_btn",
"label": "检查计费",
"i18n": false
}
}
]
}
],
"binds": [