- 当前项目按钮:无项目时弹出选择器,有项目时显示详情 - 当前迭代按钮:无迭代时弹出选择器(按项目过滤),有迭代时显示详情 - 新增 cockpit_project_picker.dspy:返回项目列表 - 新增 cockpit_iteration_picker.dspy:返回迭代列表(支持project_id过滤) - 新增 cockpit_context_update.dspy:保存选择到 pipeline_agent_settings
20 lines
439 B
Plaintext
20 lines
439 B
Plaintext
# cockpit_project_picker.dspy - Returns all projects as {value, text} for dropdown
|
|
# Used by cockpit context bar project picker
|
|
|
|
dbname = get_module_dbname('pipeline-sdlc')
|
|
|
|
async with DBPools().sqlorContext(dbname) as sor:
|
|
recs = await sor.sqlExe(
|
|
"SELECT id, name FROM sd_projects ORDER BY name",
|
|
{}
|
|
)
|
|
|
|
rows = []
|
|
for r in recs:
|
|
rows.append({
|
|
'value': r.id,
|
|
'text': r.name,
|
|
})
|
|
|
|
return rows
|