fix(cockpit): remove entire_url from script to fix Jinja2 500, cockpit now default for pipeline-sdlc
This commit is contained in:
parent
eb6674f884
commit
757cfe510b
640
wwwroot/index.ui
640
wwwroot/index.ui
@ -1,495 +1,161 @@
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"padding": "0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"alignItems": "center",
|
||||
"padding": "24px 24px 12px 24px",
|
||||
"cheight": 6
|
||||
},
|
||||
"subwidgets": [
|
||||
"height": "100%",
|
||||
"padding": "0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title2",
|
||||
"options": {
|
||||
"text": "开发产线"
|
||||
}
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"alignItems": "center",
|
||||
"padding": "16px 24px 8px 24px",
|
||||
"cheight": 6,
|
||||
"gap": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{ "widgettype": "Title2", "options": { "text": "开发产线驾驶舱" } },
|
||||
{ "widgettype": "Text", "options": { "text": "AI驱动的对话式开发", "cfontsize": 0.9, "color": "#94a3b8" } },
|
||||
{ "widgettype": "Filler" },
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": { "name": "refresh", "label": "刷新", "css": "small" },
|
||||
"binds": [{
|
||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||
"script": "var c=bricks.getWidgetById('chat_scroll');if(c)c.render({});var s=bricks.getWidgetById('stats_row');if(s)s.render({});"
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Filler"
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"padding": "8px 24px 8px 24px",
|
||||
"cheight": 4,
|
||||
"gap": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "urlwidget",
|
||||
"id": "stats_row",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/api/cockpit_stats.dspy')}}",
|
||||
"method": "GET"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "项目管理、迭代跟踪、测试与部署",
|
||||
"cfontsize": 1.2
|
||||
}
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "filler",
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"padding": "0 24px 0 24px",
|
||||
"gap": "0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VScrollPanel",
|
||||
"id": "chat_scroll",
|
||||
"options": {
|
||||
"css": "filler",
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"bgcolor": "#f8fafc",
|
||||
"border": "1px solid #e2e8f0",
|
||||
"borderBottom": "none",
|
||||
"borderRadius": "8px 8px 0 0",
|
||||
"padding": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": { "alignItems": "center", "padding": "40px 0", "gap": "12px" },
|
||||
"subwidgets": [
|
||||
{ "widgettype": "Text", "options": { "text": "选择一个迭代后,在下方输入你的需求。", "cfontsize": 1, "color": "#64748b" } },
|
||||
{ "widgettype": "Text", "options": { "text": "Agent 将自动分析需求、生成设计、驱动产线执行。", "cfontsize": 0.85, "color": "#94a3b8" } }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"bgcolor": "#fff",
|
||||
"border": "1px solid #e2e8f0",
|
||||
"borderTop": "none",
|
||||
"borderRadius": "0 0 8px 8px",
|
||||
"padding": "10px 14px 10px 14px",
|
||||
"gap": "6px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"id": "file_list",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"wrap": "wrap",
|
||||
"gap": "4px",
|
||||
"minHeight": "0"
|
||||
},
|
||||
"subwidgets": []
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"id": "uitext_wrapper",
|
||||
"options": {
|
||||
"width": "100%"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "render",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "if(!this._built){this._built=true;var c=this.dom_element;var ut=new bricks.UiText({name:'cockpit_input',placeholder:'输入需求或回复 Agent...'});ut.dom_element.style.cssText='width:100%;min-height:44px;max-height:160px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:14px;font-family:inherit;resize:none;outline:none;box-sizing:border-box;line-height:1.5';c.appendChild(ut.dom_element);ut.handleInput();this._uitext=ut;}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"alignItems": "center",
|
||||
"gap": "8px",
|
||||
"padding": "4px 0 0 0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": { "name": "attach_btn", "label": "添加文件" },
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||
"script": "var inp=document.createElement('input');inp.type='file';inp.multiple=true;inp.onchange=function(){var list=document.getElementById('cockpit_file_bag');if(!list){list=document.createElement('div');list.id='cockpit_file_bag';list.style.cssText='display:flex;flex-wrap:wrap;gap:4px';var fl=bricks.getWidgetById('file_list');if(fl)fl.dom_element.appendChild(list);}for(var i=0;i<this.files.length;i++){var n=this.files[i].name;if(list.querySelector('[data-fn=\"'+n.replace(/\"/g,'')+'\"]'))continue;var chip=document.createElement('span');chip.setAttribute('data-fn',n);chip.style.cssText='display:inline-flex;align-items:center;gap:3px;background:#e8f0fe;color:#1e40af;padding:2px 8px;border-radius:12px;font-size:12px;max-width:200px';chip.innerHTML='<span style=\"overflow:hidden;text-overflow:ellipsis;white-space:nowrap\">'+n+'</span><span style=\"cursor:pointer;font-weight:bold;color:#ef4444;margin-left:2px\" onclick=\"this.parentElement.remove()\">×</span>';list.appendChild(chip);}};inp.click();"
|
||||
}
|
||||
]
|
||||
},
|
||||
{ "widgettype": "Filler" },
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": { "name": "send_btn", "label": "发送", "css": "primary" },
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||
"script": "var ut=document.getElementsByName('cockpit_input')[0];var msg=ut?ut.value.trim():'';if(!msg){bricks.show_error({title:'提示',message:'请输入内容'});return;}var iter=bricks.getWidgetById('current_iteration_id');var iid=iter?iter.options.value:'';if(!iid){bricks.show_error({title:'提示',message:'请先选择迭代'});return;}var files=[];var bag=document.getElementById('cockpit_file_bag');if(bag){var chips=bag.querySelectorAll('[data-fn]');for(var j=0;j<chips.length;j++)files.push(chips[j].getAttribute('data-fn'));}var body='message_text='+encodeURIComponent(msg)+'&iteration_id='+encodeURIComponent(iid)+'&action=send_message&file_paths='+encodeURIComponent(JSON.stringify(files));fetch('/pipeline-sdlc/api/cockpit_chat.dspy',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:body}).then(function(r){return r.json()}).then(function(r){if(r.success||r.error){ut.value='';ut.dispatchEvent(new Event('input',{bubbles:true}));if(bag)bag.innerHTML='';var c=bricks.getWidgetById('chat_scroll');if(c)c.render({});}});"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"padding": "12px 24px 12px 24px",
|
||||
"cheight": 18
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "ResponsableBox",
|
||||
"options": {
|
||||
"gap": "24px",
|
||||
"minWidth": "260px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"cwidth": 23,
|
||||
"cheight": 12,
|
||||
"padding": "24px",
|
||||
"cursor": "pointer",
|
||||
"bgcolor": "#1e293b",
|
||||
"border": "1px solid #6366f1",
|
||||
"borderRadius": "12px"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "app.main_content",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/sd_cockpit/')}}"
|
||||
},
|
||||
"mode": "replace"
|
||||
}
|
||||
],
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "44px",
|
||||
"height": "44px",
|
||||
"bgcolor": "#312e81",
|
||||
"borderRadius": "12px",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center",
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Svg",
|
||||
"options": {
|
||||
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#818cf8\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 6v6l4 2\"/></svg>",
|
||||
"width": "24px",
|
||||
"height": "24px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Title3",
|
||||
"options": {
|
||||
"text": "驾驶舱",
|
||||
"marginBottom": "4px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "AI驱动的对话式开发",
|
||||
"cfontsize": 0.9,
|
||||
"color": "#94a3b8"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"cwidth": 23,
|
||||
"cheight": 12,
|
||||
"padding": "24px",
|
||||
"cursor": "pointer",
|
||||
"bgcolor": "#fff"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "app.main_content",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/sd_projects/')}}"
|
||||
},
|
||||
"mode": "replace"
|
||||
}
|
||||
],
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "44px",
|
||||
"height": "44px",
|
||||
"bgcolor": "#EFF6FF",
|
||||
"borderRadius": "12px",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center",
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Svg",
|
||||
"options": {
|
||||
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#3B82F6\" stroke-width=\"2\"><path d=\"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z\"/></svg>",
|
||||
"width": "24px",
|
||||
"height": "24px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Title3",
|
||||
"options": {
|
||||
"text": "项目管理",
|
||||
"marginBottom": "4px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "创建与管理软件项目",
|
||||
"cfontsize": 1.2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"cwidth": 23,
|
||||
"cheight": 12,
|
||||
"padding": "24px",
|
||||
"cursor": "pointer",
|
||||
"bgcolor": "#fff"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "app.main_content",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/sd_iterations/')}}"
|
||||
},
|
||||
"mode": "replace"
|
||||
}
|
||||
],
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "44px",
|
||||
"height": "44px",
|
||||
"bgcolor": "#F0FDF4",
|
||||
"borderRadius": "12px",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center",
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Svg",
|
||||
"options": {
|
||||
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#22C55E\" stroke-width=\"2\"><polyline points=\"23 4 23 10 17 10\"/><path d=\"M20.49 15a9 9 0 11-2.12-9.36L23 10\"/></svg>",
|
||||
"width": "24px",
|
||||
"height": "24px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Title3",
|
||||
"options": {
|
||||
"text": "迭代管理",
|
||||
"marginBottom": "4px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "规划Sprint与迭代周期",
|
||||
"cfontsize": 1.2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"cwidth": 23,
|
||||
"cheight": 12,
|
||||
"padding": "24px",
|
||||
"cursor": "pointer",
|
||||
"bgcolor": "#fff"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "app.main_content",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/sd_test_plans/')}}"
|
||||
},
|
||||
"mode": "replace"
|
||||
}
|
||||
],
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "44px",
|
||||
"height": "44px",
|
||||
"bgcolor": "#F5F3FF",
|
||||
"borderRadius": "12px",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center",
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Svg",
|
||||
"options": {
|
||||
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#8B5CF6\" stroke-width=\"2\"><path d=\"M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2\"/><rect x=\"8\" y=\"2\" width=\"8\" height=\"4\" rx=\"1\"/></svg>",
|
||||
"width": "24px",
|
||||
"height": "24px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Title3",
|
||||
"options": {
|
||||
"text": "测试计划",
|
||||
"marginBottom": "4px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "制定与跟踪测试计划",
|
||||
"cfontsize": 1.2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"cwidth": 23,
|
||||
"cheight": 12,
|
||||
"padding": "24px",
|
||||
"cursor": "pointer",
|
||||
"bgcolor": "#fff"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "app.main_content",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/sd_test_cases/')}}"
|
||||
},
|
||||
"mode": "replace"
|
||||
}
|
||||
],
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "44px",
|
||||
"height": "44px",
|
||||
"bgcolor": "#FFF7ED",
|
||||
"borderRadius": "12px",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center",
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Svg",
|
||||
"options": {
|
||||
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F97316\" stroke-width=\"2\"><path d=\"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z\"/><polyline points=\"14 2 14 8 20 8\"/><line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"/><line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"/></svg>",
|
||||
"width": "24px",
|
||||
"height": "24px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Title3",
|
||||
"options": {
|
||||
"text": "测试用例",
|
||||
"marginBottom": "4px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "编写与管理测试用例",
|
||||
"cfontsize": 1.2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"cwidth": 23,
|
||||
"cheight": 12,
|
||||
"padding": "24px",
|
||||
"cursor": "pointer",
|
||||
"bgcolor": "#fff"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "app.main_content",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/sd_bugs/')}}"
|
||||
},
|
||||
"mode": "replace"
|
||||
}
|
||||
],
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "44px",
|
||||
"height": "44px",
|
||||
"bgcolor": "#FEF2F2",
|
||||
"borderRadius": "12px",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center",
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Svg",
|
||||
"options": {
|
||||
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#EF4444\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"/><line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\"/></svg>",
|
||||
"width": "24px",
|
||||
"height": "24px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Title3",
|
||||
"options": {
|
||||
"text": "Bug管理",
|
||||
"marginBottom": "4px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "跟踪与修复项目缺陷",
|
||||
"cfontsize": 1.2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"cwidth": 23,
|
||||
"cheight": 12,
|
||||
"padding": "24px",
|
||||
"cursor": "pointer",
|
||||
"bgcolor": "#fff"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "app.main_content",
|
||||
"options": {
|
||||
"url": "{{entire_url('/pipeline-sdlc/sd_deploy_envs/')}}"
|
||||
},
|
||||
"mode": "replace"
|
||||
}
|
||||
],
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "44px",
|
||||
"height": "44px",
|
||||
"bgcolor": "#F0FDFA",
|
||||
"borderRadius": "12px",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center",
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Svg",
|
||||
"options": {
|
||||
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#14B8A6\" stroke-width=\"2\"><rect x=\"2\" y=\"2\" width=\"20\" height=\"8\" rx=\"2\"/><rect x=\"2\" y=\"14\" width=\"20\" height=\"8\" rx=\"2\"/><line x1=\"6\" y1=\"6\" x2=\"6.01\" y2=\"6\"/><line x1=\"6\" y1=\"18\" x2=\"6.01\" y2=\"18\"/></svg>",
|
||||
"width": "24px",
|
||||
"height": "24px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Title3",
|
||||
"options": {
|
||||
"text": "部署环境",
|
||||
"marginBottom": "4px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "配置开发测试生产环境",
|
||||
"cfontsize": 1.2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VScrollPanel",
|
||||
"id": "pipeline_sdlc_content",
|
||||
"options": {
|
||||
"css": "filler",
|
||||
"width": "100%",
|
||||
"height": "100%"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||
"script": "var ut=document.getElementsByName('cockpit_input')[0];var msg=ut?ut.value.trim():'';if(!msg){bricks.show_error({title:'提示',message:'请输入内容'});return;}var iter=bricks.getWidgetById('current_iteration_id');var iid=iter?iter.options.value:'';if(!iid){bricks.show_error({title:'提示',message:'请先选择迭代'});return;}var files=[];var bag=document.getElementById('cockpit_file_bag');if(bag){var chips=bag.querySelectorAll('[data-fn]');for(var j=0;j<chips.length;j++)files.push(chips[j].getAttribute('data-fn'));}var body='message_text='+encodeURIComponent(msg)+'&iteration_id='+encodeURIComponent(iid)+'&action=send_message&file_paths='+encodeURIComponent(JSON.stringify(files));fetch('{{entire_url(\"/pipeline-sdlc/api/cockpit_chat.dspy\")}}',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:body}).then(function(r){return r.json()}).then(function(r){if(r.success||r.error){ut.value='';ut.dispatchEvent(new Event('input',{bubbles:true}));if(bag)bag.innerHTML='';var c=bricks.getWidgetById('chat_scroll');if(c)c.render({});}});"
|
||||
"script": "var ut=document.getElementsByName('cockpit_input')[0];var msg=ut?ut.value.trim():'';if(!msg){bricks.show_error({title:'提示',message:'请输入内容'});return;}var iter=bricks.getWidgetById('current_iteration_id');var iid=iter?iter.options.value:'';if(!iid){bricks.show_error({title:'提示',message:'请先选择迭代'});return;}var files=[];var bag=document.getElementById('cockpit_file_bag');if(bag){var chips=bag.querySelectorAll('[data-fn]');for(var j=0;j<chips.length;j++)files.push(chips[j].getAttribute('data-fn'));}var body='message_text='+encodeURIComponent(msg)+'&iteration_id='+encodeURIComponent(iid)+'&action=send_message&file_paths='+encodeURIComponent(JSON.stringify(files));fetch('/pipeline-sdlc/api/cockpit_chat.dspy',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:body}).then(function(r){return r.json()}).then(function(r){if(r.success||r.error){ut.value='';ut.dispatchEvent(new Event('input',{bubbles:true}));if(bag)bag.innerHTML='';var c=bricks.getWidgetById('chat_scroll');if(c)c.render({});}});"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user