- 修复文件权限 (600→644) - 删除调试日志 (global_func.py) - 添加 CRUD 生成的 wwwroot 文件 (pipeline_core/dist/ops) - 添加 mysql.ddl.sql 文件 - 更新 pyproject.toml 配置 - 添加 showcase 模块安装 (build.sh) - 更新 index.ui (sidebar toggle + 管理按钮) - 设置 start.sh/stop.sh 可执行权限 - 添加 wwwroot 符号链接 (appbase/rbac/pipeline_sdlc) - 更新 .gitignore (排除 pkgs/bricks/pipeline.pid)
51 lines
848 B
Plaintext
51 lines
848 B
Plaintext
|
|
ns = params_kw.copy()
|
|
for k,v in ns.items():
|
|
if v == 'NaN' or v == 'null':
|
|
ns[k] = None
|
|
id = params_kw.id
|
|
if not id or len(id) > 32:
|
|
id = uuid()
|
|
ns['id'] = id
|
|
|
|
|
|
|
|
userorgid = await get_userorgid()
|
|
if not userorgid:
|
|
return {
|
|
"widgettype":"Error",
|
|
"options":{
|
|
"title":"Authorization Error",
|
|
"timeout":3,
|
|
"cwidth":16,
|
|
"cheight":9,
|
|
"message":"Please login"
|
|
}
|
|
}
|
|
ns['org_id'] = userorgid
|
|
|
|
db = DBPools()
|
|
dbname = get_module_dbname('pipeline_ops')
|
|
async with db.sqlorContext(dbname) as sor:
|
|
r = await sor.C('pipeline_capacity', ns.copy())
|
|
return {
|
|
"widgettype":"Message",
|
|
"options":{
|
|
"cwidth":16,
|
|
"cheight":9,
|
|
"title":"Add Success",
|
|
"timeout":3,
|
|
"message":"ok"
|
|
}
|
|
}
|
|
|
|
return {
|
|
"widgettype":"Error",
|
|
"options":{
|
|
"title":"Add Error",
|
|
"cwidth":16,
|
|
"cheight":9,
|
|
"timeout":3,
|
|
"message":"failed"
|
|
}
|
|
} |