From 66e7181b39ba2d6e732d5786adb17c63b5c1c407 Mon Sep 17 00:00:00 2001 From: p Date: Fri, 14 Aug 2026 13:37:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=9C=E7=A8=8B=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B5=E6=8C=89=E9=92=AE=E6=94=B9=E7=94=A8?= =?UTF-8?q?=20show=5Fmessage/show=5Ferror?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/sd_org_remote/index.ui | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wwwroot/sd_org_remote/index.ui b/wwwroot/sd_org_remote/index.ui index 911dc53..99a89df 100644 --- a/wwwroot/sd_org_remote/index.ui +++ b/wwwroot/sd_org_remote/index.ui @@ -85,7 +85,7 @@ "options": {"label": "保存配置"}, "binds": [{ "wid": "self", "event": "click", "actiontype": "script", "target": "self", - "script": "var f=bricks.getWidgetById('remote_form',bricks.app);var v=f?f.getValue():{};var body=new URLSearchParams();body.append('action','set');body.append('owner_type','org');body.append('mode',v.mode||'local');body.append('remote_host',v.remote_host||'');body.append('remote_port',v.remote_port||'22');body.append('remote_user',v.remote_user||'');body.append('remote_dir',v.remote_dir||'');fetch('/pipeline-sdlc/api/work_env.dspy',{method:'POST',body:body}).then(function(r){return r.json()}).then(function(d){var m=new bricks.Message({title:d.ok?'成功':'失败',message:d.ok?'远程空间配置已保存':(d.error||'未知错误')});m.open();});" + "script": "var f=bricks.getWidgetById('remote_form',bricks.app);var v=f?f.getValue():{};var body=new URLSearchParams();body.append('action','set');body.append('owner_type','org');body.append('mode',v.mode||'local');body.append('remote_host',v.remote_host||'');body.append('remote_port',v.remote_port||'22');body.append('remote_user',v.remote_user||'');body.append('remote_dir',v.remote_dir||'');fetch('/pipeline-sdlc/api/work_env.dspy',{method:'POST',body:body}).then(function(r){return r.json()}).then(function(d){if(d.ok){bricks.show_message({title:'成功',message:'远程空间配置已保存'});}else{bricks.show_error({title:'失败',message:d.error||'未知错误'});}});" }] }, { @@ -94,7 +94,7 @@ "options": {"label": "测试远程连接"}, "binds": [{ "wid": "self", "event": "click", "actiontype": "script", "target": "self", - "script": "var f=bricks.getWidgetById('remote_form',bricks.app);var v=f?f.getValue():{};var body=new URLSearchParams();body.append('action','ensure_remote_bwrap');body.append('remote_host',v.remote_host||'');body.append('remote_port',v.remote_port||'22');body.append('remote_user',v.remote_user||'');fetch('/pipeline-sdlc/api/work_env.dspy',{method:'POST',body:body}).then(function(r){return r.json()}).then(function(d){var m=new bricks.Message({title:d.ok?'连接成功':'连接失败',message:d.ok?('远程 bwrap 位置: '+(d.location||'unknown')):(d.error||'未知错误')});m.open();});" + "script": "var f=bricks.getWidgetById('remote_form',bricks.app);var v=f?f.getValue():{};var body=new URLSearchParams();body.append('action','ensure_remote_bwrap');body.append('remote_host',v.remote_host||'');body.append('remote_port',v.remote_port||'22');body.append('remote_user',v.remote_user||'');fetch('/pipeline-sdlc/api/work_env.dspy',{method:'POST',body:body}).then(function(r){return r.json()}).then(function(d){if(d.ok){bricks.show_message({title:'连接成功',message:'远程 bwrap 位置: '+(d.location||'unknown')});}else{bricks.show_error({title:'连接失败',message:d.error||'未知错误'});}});" }] }, { @@ -103,7 +103,7 @@ "options": {"label": "获取机构公钥"}, "binds": [{ "wid": "self", "event": "click", "actiontype": "script", "target": "self", - "script": "fetch('/pipeline-sdlc/api/work_env.dspy?action=get_org_pubkey').then(function(r){return r.json()}).then(function(d){if(d.ok){var t=bricks.getWidgetById('pubkey_text',bricks.app);if(t)t.set_text('机构公钥(复制到远程主机 ~/.ssh/authorized_keys):\\n'+d.pubkey);}else{var m=new bricks.Message({title:'失败',message:d.error||'未知错误'});m.open();}});" + "script": "fetch('/pipeline-sdlc/api/work_env.dspy?action=get_org_pubkey').then(function(r){return r.json()}).then(function(d){if(d.ok){var t=bricks.getWidgetById('pubkey_text',bricks.app);if(t)t.set_text('机构公钥(复制到远程主机 ~/.ssh/authorized_keys):\\n'+d.pubkey);}else{bricks.show_error({title:'失败',message:d.error||'未知错误'});}});" }] } ]