fix: 菜单按钮 url 用 entire_url 生成绝对路径,避免前端 absurl 相对路径拼接错误
agent_menus.dspy 按钮 url 原用相对路径(/pipeline_core/api/...),前端 absurl 对 以 / 开头的 url 拼接产生 /pipeline_core/api//pipeline-sdlc/... 双斜杠错误。 改用 entire_url() 生成绝对 URL(与 agent/index.ui 的 ability_menu 一致)。
This commit is contained in:
parent
08f628dba1
commit
34f4c5b79c
@ -49,7 +49,7 @@ buttons.append({
|
||||
"options": {"label": "🗂 工作空间", "css": "small", "id": "menu_btn_ws"},
|
||||
"binds": [{
|
||||
"wid": "self", "event": "click", "actiontype": "urlwidget",
|
||||
"target": "self", "options": {"url": "/pipeline-sdlc/api/workspace_popup.dspy"},
|
||||
"target": "self", "options": {"url": entire_url("/pipeline-sdlc/api/workspace_popup.dspy")},
|
||||
}],
|
||||
})
|
||||
|
||||
@ -61,7 +61,7 @@ for i, m in enumerate(menus):
|
||||
width = str(m.get("width", "85%") or "85%")
|
||||
height = str(m.get("height", "80%") or "80%")
|
||||
query = _urlparse.urlencode({"url": url, "title": label, "width": width, "height": height})
|
||||
open_url = "/pipeline_core/api/agent_menu_open.dspy?" + query
|
||||
open_url = entire_url("/pipeline_core/api/agent_menu_open.dspy") + "?" + query
|
||||
buttons.append({
|
||||
"widgettype": "Button",
|
||||
"options": {"label": label, "css": "small", "id": "menu_btn_%d" % i},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user