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( pregs = await psor.sqlExe(
"select * from pricing_program where id=${ppid}$", {'ppid': ppid}) "select * from pricing_program where id=${ppid}$", {'ppid': ppid})
if pregs: 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: else:
text = f"❌ 定价项目(pricing_program): ppid={ppid} 未找到" text = f"❌ 定价项目(pricing_program): ppid={ppid} 未找到"

View File

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