fix: replace wwwroot/pipeline_core dir with symlink to pkgs/pipeline_core/wwwroot; delete old CRUD files

This commit is contained in:
yumoqing 2026-08-01 12:21:15 +08:00
parent 0b01c58534
commit 941c3c838e
22 changed files with 14 additions and 394 deletions

5
load_path.sh Normal file
View File

@ -0,0 +1,5 @@
for s in $(ls ls pkgs/*/scripts/load_path.py)
do
echo $s
python $s
done

1
wwwroot/appbase Symbolic link
View File

@ -0,0 +1 @@
../pkgs/appbase/wwwroot

1
wwwroot/pipeline-sdlc Symbolic link
View File

@ -0,0 +1 @@
../pkgs/pipeline-sdlc/wwwroot

1
wwwroot/pipeline_core Symbolic link
View File

@ -0,0 +1 @@
/d/apitest/pipeline-app/pkgs/pipeline_core/wwwroot

View File

@ -1,89 +0,0 @@
{
"widgettype": "VBox",
"options": {
"width": "100%",
"padding": "32px",
"spacing": "24px"
},
"subwidgets": [
{
"widgettype": "Title2",
"options": {
"text": "产线管理"
}
},
{
"widgettype": "Text",
"options": {
"text": "产线定义、步骤配置与发布管理",
"cfontsize": 1.2
}
},
{
"widgettype": "ResponsableBox",
"options": {
"gap": "16px",
"minWidth": "250px"
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"label": "产线定义",
"css": "card",
"cwidth": 23,
"cheight": 8
},
"binds": [{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "-main_content",
"options": {
"url": "{{entire_url('pipelines/')}}"
},
"mode": "replace"
}]
},
{
"widgettype": "Button",
"options": {
"label": "产线步骤",
"css": "card",
"cwidth": 23,
"cheight": 8
},
"binds": [{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "-main_content",
"options": {
"url": "{{entire_url('pipeline_steps/')}}"
},
"mode": "replace"
}]
},
{
"widgettype": "Button",
"options": {
"label": "发布记录",
"css": "card",
"cwidth": 23,
"cheight": 8
},
"binds": [{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "-main_content",
"options": {
"url": "{{entire_url('pipeline_versions/')}}"
},
"mode": "replace"
}]
}
]
}
]
}

View File

@ -1,5 +0,0 @@
func = create_llm
if func is None:
return json.dumps({'status': 'error', 'message': 'function not found'})
result = await func(params_kw)
return result

View File

@ -1,5 +0,0 @@
func = delete_llm
if func is None:
return json.dumps({'status': 'error', 'message': 'function not found'})
result = await func(params_kw)
return result

View File

@ -1,11 +0,0 @@
from sqlor.dbpools import DBPools
async def main():
dbname = get_module_dbname('pipeline_core')
async with DBPools().sqlorContext(dbname) as sor:
recs = await sor.R('llm', {'status': 'active'})
if not recs:
recs = await sor.R('llm', {})
if not recs:
recs = []
return recs

View File

@ -1,187 +0,0 @@
{
"widgettype":"VBox",
"options":{"height":"100%","width":"100%"},
"subwidgets":[
{
"id":"llm_tbl",
"widgettype":"Tabular",
"options":{
"width":"100%",
"height":"100%",
"title":"大语言模型表",
"css":"card",
"editable":{
"new_data_url": "{{entire_url('./add_llm.dspy')}}",
"delete_data_url": "{{entire_url('./delete_llm.dspy')}}",
"update_data_url": "{{entire_url('./update_llm.dspy')}}"
},
"data_url":"{{entire_url('./get_llm.dspy')}}",
"data_method":"GET",
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
"row_options":{
"browserfields": {
"exclouded": [
"id",
"api_key"
],
"cwidth": {}
},
"editexclouded":[
"id",
"created_at",
"updated_at"
],
"fields":[
{
"name": "id",
"title": "主键",
"type": "str",
"length": 32,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "主键"
},
{
"name": "name",
"title": "模型名称",
"type": "str",
"length": 100,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "模型名称"
},
{
"name": "provider",
"title": "供应商",
"type": "str",
"length": 50,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "供应商"
},
{
"name": "model_id",
"title": "模型标识",
"type": "str",
"length": 100,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "模型标识"
},
{
"name": "api_base",
"title": "API地址",
"type": "str",
"length": 500,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "API地址"
},
{
"name": "api_key",
"title": "API密钥",
"type": "str",
"length": 500,
"cwidth": 18,
"uitype": "password",
"datatype": "str",
"label": "API密钥"
},
{
"name": "max_tokens",
"title": "最大Token",
"type": "int",
"default": "8192",
"length": 0,
"uitype": "int",
"datatype": "int",
"label": "最大Token"
},
{
"name": "status",
"title": "状态",
"type": "str",
"length": 20,
"default": "active",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "状态"
},
{
"name": "description",
"title": "描述",
"type": "text",
"length": 0,
"uitype": "text",
"datatype": "text",
"label": "描述"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp",
"length": 0,
"uitype": "str",
"datatype": "timestamp",
"label": "创建时间"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp",
"length": 0,
"uitype": "str",
"datatype": "timestamp",
"label": "更新时间"
}
]
},
"page_rows":160,
"cache_limit":5
}
,"binds":[]
}]
}

View File

@ -1,5 +0,0 @@
func = update_llm
if func is None:
return json.dumps({'status': 'error', 'message': 'function not found'})
result = await func(params_kw)
return result

View File

@ -1,5 +0,0 @@
func = create_pipeline
if func is None:
return json.dumps({'status': 'error', 'message': 'function not found'})
result = await func(params_kw)
return result

View File

@ -1,5 +0,0 @@
func = delete_pipeline
if func is None:
return json.dumps({'status': 'error', 'message': 'function not found'})
result = await func(params_kw)
return result

View File

@ -1,8 +0,0 @@
from sqlor.dbpools import DBPools
async def main():
dbname = get_module_dbname('pipeline_core')
async with DBPools().sqlorContext(dbname) as sor:
recs = await sor.R('llm', {'status': 'active'})
result = [{'value': r.api_base or '', 'text': r.name, 'api_base': r.api_base or '', 'name': r.name, 'provider': r.provider} for r in recs]
return json.dumps(result)

View File

@ -1,11 +0,0 @@
from sqlor.dbpools import DBPools
async def main():
dbname = get_module_dbname('pipeline_core')
async with DBPools().sqlorContext(dbname) as sor:
recs = await sor.R('pipelines', {'status': 'published'})
if not recs:
recs = await sor.R('pipelines', {})
if not recs:
recs = []
return recs

View File

@ -1,58 +0,0 @@
{
"widgettype": "Tabular",
"id": "pipelines_tbl",
"options": {
"width": "100%",
"title": "产线定义",
"css": "card",
"data_url": "{{entire_url('./get_pipelines.dspy')}}",
"data_method": "GET",
"editable": {
"new_data_url": "{{entire_url('./create_pipeline.dspy')}}",
"update_data_url": "{{entire_url('./update_pipeline.dspy')}}",
"delete_data_url": "{{entire_url('./delete_pipeline.dspy')}}"
},
"browserfields": {
"exclouded": ["id", "model_api_key", "pipeline_config"],
"alters": {
"pipeline_type": {
"uitype": "code",
"data": [
{"value": "dev", "text": "开发"},
{"value": "test", "text": "测试"},
{"value": "ktv", "text": "KTV"},
{"value": "deploy", "text": "部署"},
{"value": "ops", "text": "运维"}
]
},
"status": {
"uitype": "code",
"data": [
{"value": "draft", "text": "草稿"},
{"value": "published", "text": "已发布"},
{"value": "archived", "text": "已归档"}
]
},
"model_api_url": {
"uitype": "code",
"dataurl": "{{entire_url('./get_llm_list.dspy')}}",
"valueField": "api_base",
"textField": "name"
}
}
},
"editexclouded": ["id", "created_at", "updated_at"],
"fields": [
{"name": "id", "title": "ID", "type": "str", "cwidth": 0},
{"name": "name", "title": "产线名称", "type": "str", "cwidth": 18},
{"name": "description", "title": "描述", "type": "str", "cwidth": 18},
{"name": "pipeline_type", "title": "产线类型", "type": "str", "cwidth": 12},
{"name": "version", "title": "版本", "type": "str", "cwidth": 10},
{"name": "status", "title": "状态", "type": "str", "cwidth": 10},
{"name": "org_id", "title": "所属机构", "type": "str", "cwidth": 10},
{"name": "created_by", "title": "创建人", "type": "str", "cwidth": 10},
{"name": "created_at", "title": "创建时间", "type": "str", "cwidth": 14},
{"name": "updated_at", "title": "更新时间", "type": "str", "cwidth": 14}
]
}
}

View File

@ -1,5 +0,0 @@
func = update_pipeline
if func is None:
return json.dumps({'status': 'error', 'message': 'function not found'})
result = await func(params_kw)
return result

1
wwwroot/pipeline_sdlc Symbolic link
View File

@ -0,0 +1 @@
pipeline-sdlc

1
wwwroot/pipeline_task Symbolic link
View File

@ -0,0 +1 @@
/d/apitest/pipeline-app/pkgs/pipeline-task/wwwroot

View File

@ -0,0 +1 @@
{"widgettype":"VBox","options":{"padding":"24px"},"subwidgets":[{"widgettype":"Title2","options":{"text":"任务中心"}},{"widgettype":"Text","options":{"text":"查看和管理产线任务执行情况","cfontsize":1.1,"color":"#888"}}]}

1
wwwroot/rbac Symbolic link
View File

@ -0,0 +1 @@
../pkgs/rbac/wwwroot

1
wwwroot/showcase Symbolic link
View File

@ -0,0 +1 @@
../pkgs/showcase/wwwroot

1
wwwroot/tenant Symbolic link
View File

@ -0,0 +1 @@
../pkgs/tenant/wwwroot