llmage/wwwroot/llm_api_map_manage.ui
yumoqing 1060cac2de feat: llm_api_map CRUD management and ownerid-based data isolation
- Update json/llm.json subtable from llm_catelog_rel to llm_api_map
- Rewrite json/llm_api_map.json as standard CRUD format (tblname+params)
- Add models/llm_api_map.json table definition (summary/fields/indexes/codes)
- Add independent management UI (llm_api_map_manage.ui)
- Add CRUD DSPY APIs (list/create/delete/options) with ownerid filtering
- All operations verify l.ownerid for data isolation
- Add uapi_options.dspy for API selection dropdown
2026-05-20 17:29:27 +08:00

182 lines
5.5 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"spacing": 16
},
"subwidgets": [
{
"widgettype": "Title2",
"options": {
"text": "模型能力映射管理",
"halign": "left"
}
},
{
"widgettype": "VBox",
"options": {
"width": "calc(100% - 40px)",
"margin": "0 20px",
"padding": "16px",
"bgcolor": "#f5f5f5",
"spacing": 12
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "添加新映射",
"fontSize": "16px",
"fontWeight": "bold"
}
},
{
"widgettype": "Form",
"id": "add_form",
"options": {
"layout": "horizontal",
"cols": 3,
"fields": [
{
"name": "llmid",
"label": "选择模型",
"uitype": "select",
"dataurl": "{{entire_url('./api/llm_api_map_options.dspy')}}",
"data_field": "llms",
"placeholder": "请选择模型"
},
{
"name": "llmcatelogid",
"label": "选择分类",
"uitype": "select",
"dataurl": "{{entire_url('./api/llm_api_map_options.dspy')}}",
"data_field": "catelogs",
"placeholder": "请选择分类"
},
{
"name": "apiname",
"label": "API接口",
"uitype": "select",
"dataurl": "{{entire_url('./api/llm_api_map_options.dspy')}}",
"data_field": "apis",
"placeholder": "请选择API接口"
},
{
"name": "query_apiname",
"label": "查询API",
"uitype": "text",
"placeholder": "异步查询API名多个用逗号分隔"
},
{
"name": "query_period",
"label": "查询间隔(秒)",
"uitype": "number",
"placeholder": "默认30"
},
{
"name": "ppid",
"label": "计费项目",
"uitype": "select",
"dataurl": "{{entire_url('./api/llm_api_map_options.dspy')}}",
"data_field": "ppids",
"placeholder": "请选择计费项目"
}
],
"buttons": [
{
"name": "add_btn",
"label": "添加映射",
"variant": "primary"
}
]
},
"binds": [
{
"wid": "add_btn",
"event": "click",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {"archor": "cc", "width": "30%", "height": "20%"},
"options": {
"url": "{{entire_url('./api/llm_api_map_create.dspy')}}",
"params": {
"llmid": "$[add_form.llmid]$",
"llmcatelogid": "$[add_form.llmcatelogid]$",
"apiname": "$[add_form.apiname]$",
"query_apiname": "$[add_form.query_apiname]$",
"query_period": "$[add_form.query_period]$",
"ppid": "$[add_form.ppid]$"
}
}
}
]
}
]
},
{
"widgettype": "VBox",
"options": {
"width": "calc(100% - 40px)",
"margin": "0 20px",
"spacing": 12
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "当前映射列表",
"fontSize": "16px",
"fontWeight": "bold"
}
},
{
"widgettype": "Tabular",
"id": "map_table",
"options": {
"width": "100%",
"height": "400px",
"data_url": "{{entire_url('./api/llm_api_map_list.dspy')}}",
"data_method": "GET",
"page_rows": 20,
"row_options": {
"fields": [
{"name": "llm_name", "title": "模型名称", "width": 180},
{"name": "catelog_name", "title": "分类", "width": 120},
{"name": "apiname", "title": "API接口", "width": 150},
{"name": "query_apiname", "title": "查询API", "width": 180},
{"name": "query_period", "title": "间隔(秒)", "width": 80},
{"name": "ppid_name", "title": "计费项目", "width": 150},
{
"name": "actions",
"title": "操作",
"width": 100,
"uitype": "button",
"data": [
{"text": "删除", "event": "delete_map"}
]
}
]
}
},
"binds": [
{
"wid": "self",
"event": "delete_map",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {"archor": "cc", "width": "30%", "height": "20%"},
"options": {
"url": "{{entire_url('./api/llm_api_map_delete.dspy')}}",
"params": {
"id": "$[event.params.id]$"
}
}
}
]
}
]
}
]
}