mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 05:10:57 +00:00
chore: 完成项目多批次优化与功能迭代
本次提交包含多项改进: 1. 国际化补充:新增通知空状态文案中英文支持 2. 启动优化:重构banner输出、移除环境参数依赖,简化启动日志 3. 配置清理:移除冗余的REDIS_ENABLE/SQL_DB_ENABLE配置项,同步更新env示例与测试配置 4. 接口分页改造:将全局分页参数从Query改为Depends自动解析,统一排序逻辑 5. 菜单权限优化:调整菜单可见范围默认值、修复平台菜单路由路径错误 6. 异常处理增强:完善数据库异常捕获逻辑,新增连接失败专项处理 7. API令牌重构:重命名API令牌路由与权限标识,拆分前端API文件 8. 定时任务整合:将系统任务注册移入调度器初始化逻辑 9. 数据库连接优化:新增连接检查,简化建表/删表逻辑 10. 控制台美化:重构启动控制台面板,优化信息展示格式 11. 租户/角色服务优化:移除不必要的超级管理员装饰器,统一分页排序逻辑 12. 用户菜单适配:修复超级用户菜单过滤逻辑,移除scope强制校验
This commit is contained in:
@@ -99,18 +99,15 @@ async def remove_job_controller(
|
||||
@JobRouter.get("/log/list", summary="查询执行日志列表", response_model=ResponseSchema[PageResultSchema[JobOutSchema]])
|
||||
async def get_job_log_list_controller(
|
||||
auth: Annotated[AuthSchema, Security(AuthPermission(["module_task:cronjob:job:query"]))],
|
||||
page: Annotated[PaginationQueryParam, Query(description="分页参数")],
|
||||
page: Annotated[PaginationQueryParam, Depends()],
|
||||
search: Annotated[JobQueryParam, Query(description="查询参数")],
|
||||
db: Annotated[AsyncSession, Depends(db_getter)],
|
||||
) -> JSONResponse:
|
||||
order_by = [{"created_time": "desc"}]
|
||||
if page.order_by:
|
||||
order_by = page.order_by
|
||||
result_dict = await JobService(auth, db).get_job_log_page(
|
||||
page_no=page.page_no,
|
||||
page_size=page.page_size,
|
||||
search=search,
|
||||
order_by=order_by,
|
||||
order_by=page.order_by,
|
||||
)
|
||||
return SuccessResponse(data=result_dict, msg="查询执行日志列表成功")
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ async def get_obj_detail_controller(
|
||||
@NodeRouter.get("/list", summary="查询节点", response_model=ResponseSchema[PageResultSchema[NodeOutSchema]])
|
||||
async def get_obj_list_controller(
|
||||
auth: Annotated[AuthSchema, Security(AuthPermission(["module_task:cronjob:node:query"]))],
|
||||
page: Annotated[PaginationQueryParam, Query(description="分页参数")],
|
||||
page: Annotated[PaginationQueryParam, Depends()],
|
||||
search: Annotated[NodeQueryParam, Query(description="查询参数")],
|
||||
db: Annotated[AsyncSession, Depends(db_getter)],
|
||||
) -> JSONResponse:
|
||||
|
||||
@@ -29,7 +29,7 @@ async def get_workflow_detail_controller(
|
||||
async def get_workflow_list_controller(
|
||||
auth: Annotated[AuthSchema, Security(AuthPermission(["module_task:workflow:flow:query"]))],
|
||||
db: Annotated[AsyncSession, Depends(db_getter)],
|
||||
page: Annotated[PaginationQueryParam, Query(description="分页参数")],
|
||||
page: Annotated[PaginationQueryParam, Depends()],
|
||||
search: Annotated[WorkflowQueryParam, Query(description="查询参数")],
|
||||
) -> JSONResponse:
|
||||
result_dict = await WorkflowService(auth, db).get_workflow_page(
|
||||
|
||||
@@ -40,18 +40,15 @@ async def get_workflow_node_type_detail_controller(
|
||||
async def get_workflow_node_type_list_controller(
|
||||
auth: Annotated[AuthSchema, Security(AuthPermission(["module_task:workflow:nodes:query"]))],
|
||||
db: Annotated[AsyncSession, Depends(db_getter)],
|
||||
page: Annotated[PaginationQueryParam, Query(description="分页参数")],
|
||||
page: Annotated[PaginationQueryParam, Depends()],
|
||||
search: Annotated[WorkflowNodeTypeQueryParam, Query(description="查询参数")],
|
||||
) -> JSONResponse:
|
||||
order_by = [{"sort_order": "asc"}, {"id": "asc"}]
|
||||
if page.order_by:
|
||||
order_by = page.order_by
|
||||
service = WorkflowNodeTypeService(auth, db)
|
||||
result_dict = await service.get_page(
|
||||
page_no=page.page_no,
|
||||
page_size=page.page_size,
|
||||
search=search,
|
||||
order_by=order_by,
|
||||
order_by=page.order_by,
|
||||
)
|
||||
return SuccessResponse(data=result_dict, msg="查询节点列表成功")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user