1. json/downapp.json: 添加更新和删除工具栏按钮,移除noedit限制 2. wwwroot/update_apikey.dspy: 查询并返回预填充的更新表单 3. wwwroot/do_update_apikey.dspy: 处理更新表单提交 4. wwwroot/delete_apikey.dspy: 删除API Key及关联应用 5. wwwroot/apikey_manage.ui: 独立API Key管理页面 6. scripts/load_path.py: 使用通配符%/dapi/%注册所有路径
104 lines
3.7 KiB
XML
104 lines
3.7 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "DataViewer",
|
|
"options": {
|
|
"title": "API Key管理",
|
|
"data_url": "{{entire_url('/dapi/downapps.dspy')}}",
|
|
"data_field": "apikeys",
|
|
"pageSize": 20,
|
|
"fields": [
|
|
{"name": "id", "title": "应用ID", "width": "200px"},
|
|
{"name": "name", "title": "应用名称", "width": "200px"},
|
|
{"name": "apikeyid", "title": "API Key ID", "width": "200px"}
|
|
],
|
|
"toolbar": {
|
|
"tools": [
|
|
{
|
|
"name": "create_apikey",
|
|
"label": "创建API Key",
|
|
"icon": "{{entire_url('/imgs/newkey.svg')}}"
|
|
},
|
|
{
|
|
"name": "copy_apikey",
|
|
"label": "复制API Key",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/imgs/copy.svg')}}"
|
|
},
|
|
{
|
|
"name": "update_apikey",
|
|
"label": "更新API Key",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/imgs/edit.svg')}}"
|
|
},
|
|
{
|
|
"name": "delete_apikey",
|
|
"label": "删除API Key",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/imgs/delete.svg')}}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "create_apikey",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"width": "50%",
|
|
"height": "50%",
|
|
"archor": "cr"
|
|
},
|
|
"options": {
|
|
"url": "{{entire_url('/dapi/create_apikey.ui')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "copy_apikey",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"width": "50%",
|
|
"height": "50%",
|
|
"archor": "cr"
|
|
},
|
|
"options": {
|
|
"url": "{{entire_url('/dapi/copy_apikey.dspy')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "update_apikey",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"width": "50%",
|
|
"height": "50%",
|
|
"archor": "cr"
|
|
},
|
|
"options": {
|
|
"url": "{{entire_url('/dapi/update_apikey.dspy')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "delete_apikey",
|
|
"actiontype": "urlwidget",
|
|
"target": "self",
|
|
"options": {
|
|
"url": "{{entire_url('/dapi/delete_apikey.dspy')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|