From 73b0a78b988d5f32d8804e483782da262893a925 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 22 Jul 2026 16:01:00 +0800 Subject: [PATCH] fix: DataViewer pages + remove _list from gitignore --- .gitignore | 1 - wwwroot/documents_list/index.ui | 22 ++++++++++++++++++++++ wwwroot/engine_configs_list/index.ui | 22 ++++++++++++++++++++++ wwwroot/knowledge_bases_list/index.ui | 22 ++++++++++++++++++++++ wwwroot/subscriptions_list/index.ui | 22 ++++++++++++++++++++++ 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 wwwroot/documents_list/index.ui create mode 100644 wwwroot/engine_configs_list/index.ui create mode 100644 wwwroot/knowledge_bases_list/index.ui create mode 100644 wwwroot/subscriptions_list/index.ui diff --git a/.gitignore b/.gitignore index a73bb5f..aabb69e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ __pycache__/ # Build artifacts wwwroot/bricks/ -wwwroot/*_list/ mysql.ddl.sql models/mysql.ddl.sql diff --git a/wwwroot/documents_list/index.ui b/wwwroot/documents_list/index.ui new file mode 100644 index 0000000..a42b925 --- /dev/null +++ b/wwwroot/documents_list/index.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "VBox", + "options": { + "cheight": 40, + "width": "100%" + }, + "subwidgets": [ + { + "widgettype": "DataViewer", + "options": { + "data_url": "{{entire_url('/api/kb/list')}}", + "columns": [ + {"field": "file_name", "title": "文件名", "width": "30%"}, + {"field": "file_type", "title": "类型", "width": "15%"}, + {"field": "file_size", "title": "大小", "width": "15%"}, + {"field": "status", "title": "状态", "width": "15%"}, + {"field": "created_at", "title": "上传时间", "width": "25%"} + ] + } + } + ] +} diff --git a/wwwroot/engine_configs_list/index.ui b/wwwroot/engine_configs_list/index.ui new file mode 100644 index 0000000..4601c74 --- /dev/null +++ b/wwwroot/engine_configs_list/index.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "VBox", + "options": { + "cheight": 40, + "width": "100%" + }, + "subwidgets": [ + { + "widgettype": "DataViewer", + "options": { + "data_url": "{{entire_url('/api/engines')}}", + "columns": [ + {"field": "engine_type", "title": "引擎类型", "width": "20%"}, + {"field": "engine_name", "title": "名称", "width": "20%"}, + {"field": "endpoint_url", "title": "服务地址", "width": "30%"}, + {"field": "model_name", "title": "模型", "width": "15%"}, + {"field": "status", "title": "状态", "width": "15%"} + ] + } + } + ] +} diff --git a/wwwroot/knowledge_bases_list/index.ui b/wwwroot/knowledge_bases_list/index.ui new file mode 100644 index 0000000..8bac0bf --- /dev/null +++ b/wwwroot/knowledge_bases_list/index.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "VBox", + "options": { + "cheight": 40, + "width": "100%" + }, + "subwidgets": [ + { + "widgettype": "DataViewer", + "options": { + "data_url": "{{entire_url('/api/kb/list')}}", + "columns": [ + {"field": "name", "title": "名称", "width": "25%"}, + {"field": "description", "title": "描述", "width": "35%"}, + {"field": "doc_count", "title": "文档数", "width": "10%"}, + {"field": "embedding_engine", "title": "向量引擎", "width": "15%"}, + {"field": "created_at", "title": "创建时间", "width": "15%"} + ] + } + } + ] +} diff --git a/wwwroot/subscriptions_list/index.ui b/wwwroot/subscriptions_list/index.ui new file mode 100644 index 0000000..ac91c33 --- /dev/null +++ b/wwwroot/subscriptions_list/index.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "VBox", + "options": { + "cheight": 40, + "width": "100%" + }, + "subwidgets": [ + { + "widgettype": "DataViewer", + "options": { + "data_url": "{{entire_url('/api/kb/list')}}", + "columns": [ + {"field": "plan_name", "title": "套餐", "width": "20%"}, + {"field": "disk_quota_bytes", "title": "磁盘配额", "width": "20%"}, + {"field": "disk_used_bytes", "title": "已用磁盘", "width": "20%"}, + {"field": "doc_used", "title": "文档数", "width": "20%"}, + {"field": "status", "title": "状态", "width": "20%"} + ] + } + } + ] +}