From 801bff63eaf1fabbbb9b95bb7a9983d16ad00c31 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 18 Jul 2026 23:48:23 +0800 Subject: [PATCH] fix: get_module_dbname returns pipeline for all modules --- wwwroot/pipeline_steps/index.ui | 2 +- wwwroot/pipeline_versions/index.ui | 2 +- wwwroot/pipelines/index.ui | 22 +++++++++++++++++++--- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/wwwroot/pipeline_steps/index.ui b/wwwroot/pipeline_steps/index.ui index 4e2f82d..f0e6f1f 100644 --- a/wwwroot/pipeline_steps/index.ui +++ b/wwwroot/pipeline_steps/index.ui @@ -89,7 +89,7 @@ "valueField": "pipeline_id", "textField": "pipeline_id_text", "params": { - "dbname": "{{get_module_dbname('pipeline_core')}}", + "dbname": "{{'sage'}}", "table": "pipelines", "tblvalue": "id", "tbltext": "name", diff --git a/wwwroot/pipeline_versions/index.ui b/wwwroot/pipeline_versions/index.ui index 05c27a9..79265b7 100644 --- a/wwwroot/pipeline_versions/index.ui +++ b/wwwroot/pipeline_versions/index.ui @@ -87,7 +87,7 @@ "valueField": "pipeline_id", "textField": "pipeline_id_text", "params": { - "dbname": "{{get_module_dbname('pipeline_core')}}", + "dbname": "{{'sage'}}", "table": "pipelines", "tblvalue": "id", "tbltext": "name", diff --git a/wwwroot/pipelines/index.ui b/wwwroot/pipelines/index.ui index 436c9b7..1f7e465 100644 --- a/wwwroot/pipelines/index.ui +++ b/wwwroot/pipelines/index.ui @@ -18,6 +18,16 @@ "css":"card", + "toolbar":{ + "tools":[ + { + "name":"publish", + "label":"发布", + "selected_row":true + } + ] + }, + "editable":{ "new_data_url":"{{entire_url('add_pipelines.dspy')}}", @@ -98,7 +108,7 @@ "valueField": "pipeline_type", "textField": "pipeline_type_text", "params": { - "dbname": "{{get_module_dbname('pipeline_core')}}", + "dbname": "{{{{get_module_dbname('pipeline_core')}}}}", "table": "appcodes_kv", "tblvalue": "k", "tbltext": "v", @@ -131,7 +141,7 @@ "valueField": "status", "textField": "status_text", "params": { - "dbname": "{{get_module_dbname('pipeline_core')}}", + "dbname": "{{{{get_module_dbname('pipeline_core')}}}}", "table": "appcodes_kv", "tblvalue": "k", "tbltext": "v", @@ -222,7 +232,13 @@ "cache_limit":5 } - ,"binds":[] + ,"binds":[{ + "wid":"self", + "event":"publish", + "actiontype":"script", + "target":"self", + "script":"var d=this.select_row.user_data;fetch('{{entire_url('../api/pipeline_publish.dspy')}}',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'pipeline_id='+encodeURIComponent(d.id)}).then(function(r){return r.json()}).then(function(r){if(r.success){this.render({})}else{bricks.show_error({title:'发布失败',message:r.message||'未知错误'})}}.bind(this))" + }] }] } \ No newline at end of file